Skip to main content
POST
Send a message

Authorizations

Authorization
string
header
required

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

Body

application/json

Message details for the agent

question
string
required

The question or message to send to the agent

Example:

"What are your business hours?"

agentId
string
required

Unique identifier of the agent to message

Example:

"clx1234567890abcdef"

contactId
string

Optional: ID of an existing contact to associate with this conversation. If not provided, a new contact may be created automatically.

Example:

"contact_1234567890"

conversationId
string

Optional: ID of an existing conversation to continue. If provided, the message will be added to the existing conversation. If not provided, a new conversation will be created and returned in the response.

Example:

"chat_1234567890"

messageType
enum<string>

Type of message being sent. Resolved automatically when attachments are provided (single image -> IMAGE, otherwise FILE).

Available options:
TEXT,
IMAGE,
FILE
Example:

"TEXT"

attachments
object[]

Optional file attachments. Upload each file to S3 first via the attachments presign endpoint, then reference the returned metadata here.

streaming
boolean

Optional: Enable streaming of the response

Example:

false

ip
string

Optional: Client IP address

Example:

"192.168.1.1"

country
string

Optional: Client country code

Example:

"US"

responseFormat
enum<string>
default:MARKDOWN

Optional: Format of the AI response (MARKDOWN or PLAIN text)

Available options:
MARKDOWN,
PLAIN
Example:

"MARKDOWN"

integrationType
enum<string>

Optional: Integration type for the conversation

Available options:
WHATSAPP,
SLACK
Example:

"WHATSAPP"

Response

Message sent and response received successfully

status
string
Example:

"success"

message
string
Example:

"Message sent successfully"

data
object