Skip to main content
POST
Save records

Description

Creates or updates the memory records of a user identified by userReferenceId and botId. Accepts a maximum of 20 records per request.

Endpoint

Body parameters

userReferenceId
string
required
The user’s external reference identifier.
botId
string
required
Identifier of the bot associated with the memory.
values
object
required
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. Maximum 86400 (24h).
  • contentType — optional content type of the value.
Each value must be sent as an object { "value": ... }. A plain value (for example "paso": "confirmacion") is stored empty.

Optional headers

x-hash-ttl
integer
TTL in seconds for the user’s entire memory hash.

Authentication

Every request must include the x-api-key header with an API key that has the memory:write scope.

Request example

cURL

Responses

Response example

Authorizations

x-api-key
string
header
required

API key del proyecto de Jelou

Headers

x-hash-ttl
integer

TTL in seconds for the user's full memory hash. Optional.

Body

application/json
userReferenceId
string
required

External reference identifier of the user.

botId
string
required

Identifier of the bot associated with the memory.

values
object
required

Map of key to record structure. The key is the variable name. Maximum 20 keys per request.

Response

Records saved successfully.