v50

latestOpenAPI 3.1.0raw.githubusercontent.com2026-04-285553225.5 KB
Chat

Create a chat

Create a new chat with segments (messages and tool invocations)

post/v1/chat

Request body

startTimestampstring required

When the chat started (ISO 8601 format)

endTimestampstring required

When the chat ended (ISO 8601 format)

propertiesobject

Custom properties to include with the chat. These can be used for filtering and will show in the chat details page

traceIdstring nullable

Optional OpenTelemetry trace ID for the chat. Surfaces the chat in the tracing tab.

Example request

{
  "properties": {
    "source": "web",
    "region": "US",
    "sessionId": "abc123"
  },
  "traceId": "4bf92f3577b34da6a3ce929d0e0e4736"
}

Response

Chat created successfully

Example response

{
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "projectId": "660e8400-e29b-41d4-a716-446655440001",
    "organizationId": "770e8400-e29b-41d4-a716-446655440002",
    "title": "Account assistance request",
    "summary": "Customer inquired about account balance and recent transactions",
    "startTimestamp": "2024-01-15T10:00:00Z",
    "endTimestamp": "2024-01-15T10:30:00Z",
    "durationMs": 1800000,
    "createdAt": "2024-01-15T10:31:00Z",
    "updatedAt": "2024-01-15T10:31:00Z"
  }
}