Write
Save records
Create or update a user’s memory records
POST
Save records
Description
Creates or updates the memory records of a user identified byuserReferenceId and botId. Accepts a maximum of 20 records per request.
Endpoint
Body parameters
You must sendsocketId, or userReferenceId together with botId. One of the two forms is required.
Socket identifier of the user (the
flow_token of WhatsApp Flows). Alternative to userReferenceId + botId; it cannot be combined with them. An unknown socketId, or one of another company, answers 404.Map of key → record structure. The key is the variable name. Maximum 20 keys per request.Each record structure contains:
value(required) — value to store. Can be any JSON type.ttl— variable TTL in seconds. Maximum86400(24h).contentType— optional content type of the value.
Optional headers
Authentication
Every request must include thex-api-key header with an API key that has the memory:write scope.
Request example
cURL
Responses
Response example
Body
application/json
- Option 1
- Option 2
Response
Records saved successfully.
Save records