Create a chat
Create a new chat with segments (messages and tool invocations)
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Chat creation payload. Supports singular (agent/customer) or plural (agents/customers) formats.
When the chat started (ISO 8601 format)
When the chat ended (ISO 8601 format)
Ordered list of messages exchanged during the chat
- Option 1
- Option 2
List of tool invocations made during the chat
Custom properties to include with the chat. These can be used for filtering and will show in the chat details page
{
"source": "web",
"region": "US",
"sessionId": "abc123"
}Optional OpenTelemetry trace ID for the chat. Surfaces the chat in the tracing tab.
"4bf92f3577b34da6a3ce929d0e0e4736"
A stable identifier from your own system (e.g. session ID, conversation ID) used to correlate this chat with OpenTelemetry traces. Set the same value as a roark.external_id span or resource attribute on your traces and the matching trace will be linked automatically. Must be unique within a project.
255Single agent participating in the chat. Use this for the simpler API when you have only one agent.
- Option 1
- Option 2
- Option 3
Agents participating in the chat. Each agent requires identification and prompt information.
Agent participating in the chat with their identification and prompt
- Option 1
- Option 2
- Option 3
Single customer participating in the chat. Use this for the simpler API when you have only one customer.
Customers participating in the chat.
Response
Chat created successfully
Response containing the chat information

