Remember a fact
Store one fact so the agent can recall it later by meaning. The text is embedded on write; retrieval is semantic, not keyword.
Scope goes in the body here. Pass scope plus the matching contactId / conversationId. Omit it for the project scope. Every read endpoint takes the scope as a ?scope= query parameter instead — see the scope parameter on GET /v1/memory.
One fact per call. A paragraph carrying five unrelated facts is embedded as an average of all five and retrieved well by none of them.
Authorization
AuthorizationheaderrequiredBearer YOUR_API_KEY. Create a key in the dashboard.
Body
application/json
textstringrequiredWhat to remember. Max 8,192 bytes of UTF-8. Write one fact per call: a paragraph holding five unrelated facts embeds as an average of all five and is retrieved well by none of them.
scopestringWhich namespace a memory belongs to. Scopes are isolated: a search in one never returns a memory from another.
project: shared by the whole project. What the agent knows in general.contact: what the agent knows about one person, across every conversation with them.conversation: what the agent knows about one inbox thread.
Defaults to
projecteverywhere.contactandconversationrequire the matching id.One ofprojectcontactconversationcontactIdstringRequired when
scopeiscontact.conversationIdstringRequired when
scopeisconversation.metadataobjectArbitrary string tags stored alongside the fact and returned with it. Keys max 64 chars, values max 512, whole object max 2,048 bytes. Not searchable — search matches
textonly.1 properties
{key}string
ttlSecondsintegerDelete the fact after this many seconds. 60 to 63,072,000 (2 years). Omit to keep it until deleted.
Limitsmin 60 · max 63072000
Responses
201Fact stored.
memoryobjectrequiredA stored fact, as returned when it is created.
4 properties
idstringrequiredscopestringrequiredWhich namespace a memory belongs to. Scopes are isolated: a search in one never returns a memory from another.
project: shared by the whole project. What the agent knows in general.contact: what the agent knows about one person, across every conversation with them.conversation: what the agent knows about one inbox thread.
Defaults to
projecteverywhere.contactandconversationrequire the matching id.One ofprojectcontactconversationcreatedAtstring<date-time>requiredexpiresAtstring<date-time>When the fact self-deletes. Present only when it was stored with
ttlSeconds, or when the key is a test-mode key (forced to 30 days).
400Invalid body, oversized text, or a scope without its id.
codestringrequiredmessagestringrequireddetailsobject
401Unauthorized.
codestringrequiredmessagestringrequireddetailsobject
429A quota is exhausted. `memory_scope_full` means this scope is at its cap (10,000 facts for project, 2,000 per contact, 1,000 per conversation); `memory_limit_exceeded` means the plan's monthly unit quota is spent. Reads and deletes keep working in both cases.
codestringrequiredmessagestringrequireddetailsobject
503Memory is not available for this deployment.
codestringrequiredmessagestringrequireddetailsobject