Skip to main content
POST
Create Chat
Create a new chat for one of your chatbots. The returned chatId is required for sending messages and reading the conversation.

Authentication

This request requires your API key in the x-api-key header.

Request

chatbotId
string
required
ID of the chatbot the chat belongs to.
userId
string
Optional ID identifying the end user. Use it to associate a chat with a known user in your system.

Response

id
string
required
ID of the created chat. Use it as the chatId in later requests.
chatbotId
string
required
ID of the chatbot the chat belongs to.
userId
string
required
ID of the associated end user.
organizationId
string
required
ID of the organization that owns the chat.
createdAt
string
required
ISO 8601 timestamp of when the chat was created.

Examples

Success response

Error response

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
chatbotId
string
required
userId
string

Response

201 - application/json
id
string
required
chatbotId
string
required
userId
string
required
organizationId
string
required
createdAt
string
required