Skip to main content
Append a message (user or assistant turn) to a chat session.

Endpoint

Authentication

Authorization: Bearer <jwt> or X-API-Key <sk_...>. Minimum role: contributor.

Path parameters

string
required
Workspace id.
string
required
Session id.

Request body

string
Speaker role (user / assistant / system); defaults to user.
string
required
Message content.

Response

string
Message id (msg_...).
string
Owning session id.
string
Owning workspace id.
string
Speaker role.
string
Message content.
integer
Order index of the message within the session.
string
Creation time (RFC3339).

Example