Skip to main content
The Memory API lets you manage Jelou’s per-user key-value storage from external services. It is the same memory you see as $memory in the builder and that ctx.memory uses in Functions — a single memory per user, not a parallel copy. Use it to persist conversation state across turns: multi-step flows, carts, counters, preferences, and temporary data without an external database.
For usage from Functions with the SDK (ctx.memory), see the Session memory guide. This section documents the direct REST endpoints of the Memory API v2.

Data model

Each record belongs to a user and has:
  • Key — the variable name.
  • Value — any JSON type.
  • Per-variable TTL — when that individual variable expires (maximum 24h).
  • hashTTL — when the user’s entire memory expires. The platform applies 30 days by default; you can override it per request with the x-hash-ttl header.

User identification

A user’s memory is identified by their userReferenceId together with the botId. You send these parameters in the body of each request to read or write memory by the user’s external reference.

Authentication

Every request is authenticated with an API key in the x-api-key header and made through the Jelou gateway.
The API key must have the corresponding scopes: memory:read for reading and memory:write for writing. See API Keys to create and manage your keys.

Resources

1

Read memory

Get all records for a user or a single record by key.See get records → · See get one record →
2

Write memory

Save one or several records by user reference (up to 20 keys per request).See save records →