Authentication
All requests require an API key in theAuthorization header:
Get your API key from the chatbot settings page under the API Keys tab.
Base URL
Track a conversation
Endpoint:POST /v1/track
Request body:
cURL example
Response
A successful request returns:| Status | Description |
|---|---|
400 | Invalid request body (missing required fields) |
401 | Invalid or missing API key |
429 | Rate limit exceeded |
500 | Internal server error |
Request body reference
| Field | Type | Required | Description |
|---|---|---|---|
conversationId | string | Yes | Unique conversation identifier |
messages | array | Yes | Array of message objects |
messages[].role | string | Yes | Either "user" or "assistant" |
messages[].content | string | Yes | The message text |
user | object | No | User information |
user.id | string | Recommended | Unique user identifier |
user.email | string | Recommended | User email address |
user.name | string | No | User display name |
organization | object | No | Organization information |
organization.id | string | Recommended | Unique organization identifier |
organization.name | string | Recommended | Organization display name |
metadata | object | No | Custom key-value metadata |
Including
user and organization data unlocks user-level and org-level analytics on your dashboard. Custom metadata fields are auto-discovered and can be tracked in analysis configuration.Rate limits
Rate limits vary by plan. If you receive a
429 response, reduce your request frequency or contact support@openbat.dev for higher limits.