conversationId is new, or appends messages and updates metadata if the conversation already exists.
Endpoint
Request body
Required fields
Your unique identifier for this conversation. Used to group messages together across multiple capture calls.
An array of 1 to 100 message objects to ingest.
Optional fields
Metadata about the end user in the conversation.
Metadata about the organization the user belongs to.
Metadata about the current browsing session.
Custom key-value fields. These are validated against the schema you define for your chatbot in the dashboard. Unknown fields produce a warning in the response but do not cause the request to fail.
Deprecated fields
Use
user.id instead.Use
custom instead.Request example
Response
Success (200 OK)
Always
true on a successful response.OpenBat’s internal UUID for the conversation.
The number of new messages inserted. Duplicate messages (matched by
id) are excluded from this count.Whether LLM analysis (sentiment scoring, topic extraction) was queued for this batch of messages.
Non-fatal validation issues. For example, if you send a custom field that is not defined in your chatbot schema, it appears here.
Response with warnings
Error responses
| Status | Meaning |
|---|---|
| 400 | Invalid request body — missing required fields or wrong types |
| 401 | Missing or invalid API key |
| 429 | Rate limit exceeded |
Behavior
The capture endpoint returns immediately. Sentiment analysis and other LLM processing run asynchronously after the response is sent.
- Upsert semantics — if the
conversationIdhas been seen before, new messages are appended and user/organization/session metadata is updated. Otherwise a new conversation is created. - Message deduplication — messages are deduplicated by the
idfield. Sending the same message ID twice results in only one stored message. - Non-strict custom fields — custom fields that are not defined in your chatbot’s schema, or that have the wrong type, produce warnings but do not reject the request.
- Message limit — each request must contain between 1 and 100 messages.