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"
}
}'
{
"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"
}
}
Sends a new message through WhatsApp Cloud API and creates the message record
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"
}
}'
{
"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"
}
}
API key required for all endpoints
Message created and sent successfully
The response is of type object
.
Was this page helpful?