curl --request POST \
--url https://api.open.cx/chat/sessions/{session_id}/send \
--header 'Content-Type: application/json' \
--data '
{
"sender": "contact",
"message": {
"type": "<string>",
"text": "<string>",
"attachments": [
{
"name": "<string>",
"url": "<string>",
"base64": "<string>",
"mime_type": "<string>"
}
]
},
"contact": {
"name": "<string>",
"email": "jsmith@example.com",
"phone_number": "<string>",
"avatar_url": "<string>",
"custom_data": {}
},
"agent": {
"id": 123,
"name": "<string>",
"avatar_url": "<string>"
},
"should_take_over_session_from_ai": false
}
'{
"success": true,
"data": {
"message": {
"id": "<string>"
}
}
}Sends a message in a chat session. The message can be sent as either a contact or an agent.
curl --request POST \
--url https://api.open.cx/chat/sessions/{session_id}/send \
--header 'Content-Type: application/json' \
--data '
{
"sender": "contact",
"message": {
"type": "<string>",
"text": "<string>",
"attachments": [
{
"name": "<string>",
"url": "<string>",
"base64": "<string>",
"mime_type": "<string>"
}
]
},
"contact": {
"name": "<string>",
"email": "jsmith@example.com",
"phone_number": "<string>",
"avatar_url": "<string>",
"custom_data": {}
},
"agent": {
"id": 123,
"name": "<string>",
"avatar_url": "<string>"
},
"should_take_over_session_from_ai": false
}
'{
"success": true,
"data": {
"message": {
"id": "<string>"
}
}
}The unique identifier of the chat session
Was this page helpful?