General Documentation
Agents
Agent Executions
Test Suites
Projects
WhatsApp Conversations
Customers
WhatsApp Configs
Agent Test Chats
Conversation Assignments
WhatsApp Templates
WhatsApp Contact Notes
Agent Snapshots
WhatsApp Messages
Send a new WhatsApp message
Sends a new message through WhatsApp Cloud API and creates the message record
POST
/
whatsapp_conversations
/
{conversation_id}
/
whatsapp_messages
Copy
curl --request POST \
--url https://app.kapso.ai/api/v1/whatsapp_conversations/{conversation_id}/whatsapp_messages \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"message": {
"content": "Hello, how can I help you today?",
"message_type": "text",
"media_url": "<string>",
"media_id": "<string>",
"caption": "<string>",
"filename": "<string>",
"latitude": 123,
"longitude": 123,
"location_name": "<string>",
"location_address": "<string>",
"interactive_type": "button",
"body_text": "<string>",
"header_text": "<string>",
"footer_text": "<string>",
"buttons": [
{
"id": "<string>",
"title": "<string>"
}
],
"sections": [
{
"title": "<string>",
"rows": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>"
}
]
}
],
"list_button_text": "View Options",
"template_name": "<string>",
"template_language": "<string>",
"template_params": [
"John Smith",
"Tomorrow at 2 PM"
],
"header_type": "text",
"header_params": "<string>",
"header_filename": "<string>",
"reaction_emoji": "<string>",
"reacted_to_message_id": "<string>",
"contacts": [
{
"formatted_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phones": [
{
"phone": "<string>",
"type": "<string>"
}
],
"emails": [
{
"email": "<string>",
"type": "<string>"
}
]
}
]
}
}'
Copy
{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phone_number": "<string>",
"message_type": "text",
"content": "<string>",
"direction": "inbound",
"status": "<string>",
"processing_status": "pending",
"whatsapp_message_id": "<string>",
"metadata": {},
"media_url": "<string>",
"message_type_data": {
"text": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
Authorizations
API key required for all endpoints
Path Parameters
Body
application/json
Response
201
application/json
Message created and sent successfully
The response is of type object
.
Copy
curl --request POST \
--url https://app.kapso.ai/api/v1/whatsapp_conversations/{conversation_id}/whatsapp_messages \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"message": {
"content": "Hello, how can I help you today?",
"message_type": "text",
"media_url": "<string>",
"media_id": "<string>",
"caption": "<string>",
"filename": "<string>",
"latitude": 123,
"longitude": 123,
"location_name": "<string>",
"location_address": "<string>",
"interactive_type": "button",
"body_text": "<string>",
"header_text": "<string>",
"footer_text": "<string>",
"buttons": [
{
"id": "<string>",
"title": "<string>"
}
],
"sections": [
{
"title": "<string>",
"rows": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>"
}
]
}
],
"list_button_text": "View Options",
"template_name": "<string>",
"template_language": "<string>",
"template_params": [
"John Smith",
"Tomorrow at 2 PM"
],
"header_type": "text",
"header_params": "<string>",
"header_filename": "<string>",
"reaction_emoji": "<string>",
"reacted_to_message_id": "<string>",
"contacts": [
{
"formatted_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phones": [
{
"phone": "<string>",
"type": "<string>"
}
],
"emails": [
{
"email": "<string>",
"type": "<string>"
}
]
}
]
}
}'
Copy
{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phone_number": "<string>",
"message_type": "text",
"content": "<string>",
"direction": "inbound",
"status": "<string>",
"processing_status": "pending",
"whatsapp_message_id": "<string>",
"metadata": {},
"media_url": "<string>",
"message_type_data": {
"text": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
Assistant
Responses are generated using AI and may contain mistakes.