NEO Sessions
Append a message to a session
POST /sessions/{id}/messages
POST /sessions/{id}/messages
Append a message to a session. On the first message the session is lazily created and the initiator is recorded as a participant.
A human agent who is not yet a participant may append to an unclaimed (owner-less) cortex warm-start session on a ticket they can access — this claims it (they become its first participant), the discover-and-continue path. Posting to a session already claimed by another human returns 403.
Auth rules: - Cookie/JWT (human agent): sender = {id, name, email}, direction = 'in' - Internal token (cortex/NEO): sender = null, direction = 'out';
costUsd, usageJson, model accepted only from the internal caller.
The to field is stamped by Mind from the current participant set — never read from the request body.
Path parameters
idstringpathrequiredSession ID (client-minted UUIDv4)
Request body
idstringbodyrequiredClient-minted message UUIDv4
typeenumbodyrequiredOptions: text, tool_use, tool_result, result, thinking
contentstringbodyrequiredRaw payload (opaque string or JSON-encoded object)
ticketIdintegerbodyAssociated ticket ID (used on first message to set session.ticketId)
attachmentsobject[]bodyNo description.
createdAtstringbodyCaller-supplied event time (defaults to now if absent)
Request Example
{
"id": "string",
"type": "text",
"content": "string",
"ticketId": 1,
"attachments": [
null
],
"createdAt": "2026-01-01T12:00:00Z"
}Responses
201 — Message created
Response Example
{
"success": true,
"id": "string",
"sessionId": "string",
"direction": "in",
"to": [
{
"id": 1
}
]
}400 — Missing or invalid fields
401 — Unauthorized