Skip to main content
POST
/
api
/
v1
/
context
/
memory
/
add
curl --request POST \
  --url https://platform-backend.getalchemystai.com/api/v1/context/memory/add \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sessionId": "support-thread-TCK-1234",
  "contents": [
    {
      "content": "Customer asked about pricing for the Scale plan."
    }
  ]
}
'
{
  "success": true,
  "context_id": "ctx_01HXYZABC",
  "processed_documents": 1
}

Documentation Index

Fetch the complete documentation index at: https://getalchemystai.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
sessionId
string
required

The ID of the session

contents
object[]
required

Array of content objects. Each object must contain at least the 'content' field. Additional properties are allowed.

metadata
object

Optional metadata for the memory context. Defaults to ["default"] if not provided.

Response

Memory context added successfully

success
boolean
required
Example:

true

context_id
string
required
Example:

"ctx_01HXYZABC"

processed_documents
number
Example:

2