Append Transcript
const url = 'https://example.com/api/v1/org/example/ws/example/sessions/example/transcript';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"context":{"agent":"example","model":"example","system_prompt":"example"},"messages":[{"content":"","id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","metadata":{},"parent_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","role":"example","tool_call_id":"example","tool_calls":[{"arguments":"example","id":"example","name":"example"}],"usage":{"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cost_usd":1,"input_tokens":0,"output_tokens":0}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/org/example/ws/example/sessions/example/transcript \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "context": { "agent": "example", "model": "example", "system_prompt": "example" }, "messages": [ { "content": "", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metadata": {}, "parent_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "role": "example", "tool_call_id": "example", "tool_calls": [ { "arguments": "example", "id": "example", "name": "example" } ], "usage": { "cache_creation_input_tokens": 0, "cache_read_input_tokens": 0, "cost_usd": 1, "input_tokens": 0, "output_tokens": 0 } } ] }'Accepts a full UUID or a unique prefix.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Organization slug
Organization slug
Workspace slug
Workspace slug
Request Body required
Section titled “Request Body required ”Batch append messages to a session transcript.
object
Messages to append
Single message for transcript append.
object
Message content
Message role
Tool call as emitted by the model.
object
JSON-encoded arguments
Tool call ID (e.g. ‘call_abc’)
Tool name
Per-message token usage, populated on assistant messages only.
Responses
Section titled “ Responses ”Successful Response
Result of appending messages.
object
Example generated
{ "first_seq": 1, "last_seq": 1, "persisted_count": 1}Invalid request
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}Authentication failed
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}Access forbidden
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}Not found
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}Already exists
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}Validation error
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}Upgrade required
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}Rate limited
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}Internal server error
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}Bad gateway
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}Gateway timeout
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}