For the complete documentation index, see llms.txt. This page is also available as Markdown.

Conversation management

Lists and filters conversations

get

Required Permission: chatbots.conversations.list

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

Query parameters
contactIdstringOptional

Filters by a contact ID.

channelIdstringOptional

Filters by a channel ID.

Responses
200Success
application/json
errorstringOptional

Optional error message.

get
/v1/chatbots/{chatbotId}/conversations

Creates a new conversation

post

Required Permission: chatbots.conversations.create

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

Body
Responses
post
/v1/chatbots/{chatbotId}/conversations

Finds a conversation by external Id's

get

Required Permission: chatbots.conversations.list

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

Query parameters
channelIdstringRequired

The Id of the channel.

providerIdstringRequired

The Id of the provider.

Responses
200Success
application/json
errorstringOptional

Optional error message.

get
/v1/chatbots/{chatbotId}/conversations/find

Retrieves a specific conversation

get

Required Permission: chatbots.conversations.get

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

conversationIdstringRequired

The Id of the conversation to be retrieved.

Responses
200

The retrieved conversation.

application/json
errorstringOptional

Optional error message.

get
/v1/chatbots/{chatbotId}/conversations/{conversationId}

Deletes a conversation

delete

Required Permission: chatbots.conversations.edit

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

conversationIdstringRequired

The Id of the conversation to be deleted.

Responses
200Success
application/json
deletedbooleanOptional

Indicates whether the deletion was successful.

Example: true
errorstringOptional

Optional error message.

delete
/v1/chatbots/{chatbotId}/conversations/{conversationId}

Updates an existing conversation

patch

Required Permission: chatbots.conversations.edit

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

conversationIdstringRequired

The Id of the conversation to be updated.

Body
Responses
200Success
application/json
errorstringOptional

Optional error message.

patch
/v1/chatbots/{chatbotId}/conversations/{conversationId}

Processes a new incoming message (e.g., from a channel)

post

Required Permission: chatbots.messages.handle

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdanyRequired

The ID of the chatbot.

Body
chatbotIdstringRequired

The ID of the chatbot.

Example: bot_abc123xyz
channelIdstringRequired

The ID of the channel.

Example: channel_def456
channelNamestringRequired

The name of the channel.

Example: WhatsApp Business
providerIdstringRequired

The external provider ID for the conversation.

Example: 49123456789
calleestringOptional

The callee phone number (for voice channels).

Example: +4930123456
asyncbooleanOptional

Whether to process the message asynchronously.

Example: false
Responses
post
/v1/chatbots/{chatbotId}/conversations/handle

Processes a new incoming event (e.g., "user_seen")

post

Required Permission: chatbots.events.handle

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdanyRequired

The ID of the chatbot.

Body
chatbotIdstringRequired

The ID of the chatbot.

Example: bot_abc123xyz
channelIdstringRequired

The ID of the channel.

Example: channel_def456
channelNamestringRequired

The name of the channel.

Example: WhatsApp Business
providerIdstringRequired

The external provider ID for the conversation.

Example: 49123456789
eventstringRequired

The triggering event.

Example: user_seen_message
calleestringOptional

The callee phone number (for voice channels).

Example: +4930123456
asyncbooleanOptional

Whether to process the event asynchronously.

Example: false
Responses
post
/v1/chatbots/{chatbotId}/conversations/event

Processes a step payload.

post

Required Permission: chatbots.step-payload.handle

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdanyRequired

The ID of the chatbot.

Body
chatbotIdstringRequired

The ID of the chatbot.

Example: bot_abc123xyz
conversationIdstringRequired

The ID of the conversation.

Example: conv_def456uvw
flowIdstringOptional

The ID of the flow to execute.

Example: flow_ghi789
stepIdstringOptional

The ID of the step to execute.

Example: step_jkl012
eventstringOptional

The event name to trigger.

Example: custom_event
eventPayloadstringOptional

JSON payload for the event.

Example: {"orderId": "12345"}
asyncbooleanOptional

Whether to process asynchronously.

Example: false
isDebugbooleanOptional

Whether this is a debug request.

Example: false
Responses
post
/v1/chatbots/{chatbotId}/conversations/payload

Triggers a custom event in a conversation

post

Required Permission: chatbots.events.handle

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdanyRequired

The ID of the chatbot.

Body
chatbotIdstringRequired

The ID of the chatbot.

Example: bot_abc123xyz
conversationIdstringRequired

The ID of the conversation.

Example: conv_def456uvw
eventstringRequired

The custom event name to trigger.

Example: order_completed
Responses
post
/v1/chatbots/{chatbotId}/conversations/custom-event

Last updated