Context
Add memory context data
This endpoint adds memory (chat history) as context.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Request Body
application/json
sessionId*string
The ID of the session
contents*array<>
Array of content objects. Each object must contain at least the 'content' field. Additional properties are allowed.
metadata?
Optional metadata for the memory context. Defaults to ["default"] if not provided.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/context/memory/add" \ -H "Content-Type: application/json" \ -d '{ "sessionId": "support-thread-TCK-1234", "contents": [ { "content": "Customer asked about pricing for the Scale plan." } ] }'{ "success": true, "context_id": "ctx_01HXYZABC", "processed_documents": 1}