POST
/
api
/
v2
/
conversations
Send a message
curl --request POST \
  --url https://app.livechatai.com/api/v2/conversations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "question": "What are your business hours?",
  "agentId": "clx1234567890abcdef",
  "conversationId": "chat_1234567890",
  "messageType": "TEXT",
  "streaming": false,
  "ip": "192.168.1.1",
  "country": "US",
  "responseFormat": "MARKDOWN",
  "integrationType": "WHATSAPP"
}'
{
  "status": "success",
  "message": "Message sent successfully",
  "data": {
    "conversationId": "chat_1234567890",
    "contactId": "contact_1234567890",
    "response": "Our business hours are Monday to Friday, 9 AM to 6 PM EST.",
    "messageId": "msg_1234567890",
    "responseMessageId": "msg_0987654321",
    "links": [
      {
        "link": "https://example.com/page",
        "type": "WEBSITE"
      }
    ]
  }
}

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"

conversationId
string

Optional: Unique identifier of an existing conversation

Example:

"chat_1234567890"

messageType
enum<string>

Type of message being sent

Available options:
TEXT,
IMAGE
Example:

"TEXT"

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