POST https://api.getkanal.com/api/v1/messages/send
Every request must include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Your API key is tied to a WhatsApp Business number. All messages are sent from this number.
The contact must have sent a message within the last 24 hours (WhatsApp conversation window). Without an active conversation, use the /v1/templates endpoint to send an approved template.
{
"to": "33612345678",
"type": "text",
"text": {
"body": "Hello, here is your projection!"
}
}
{
"to": "33612345678",
"type": "image",
"image": {
"link": "https://example.com/photo.jpg",
"caption": "Find this product here 👉 https://example.com/product"
}
}
{
"to": "33612345678",
"type": "video",
"video": {
"link": "https://example.com/video.mp4",
"caption": "Discover our product on video"
}
}
{
"to": "33612345678",
"type": "audio",
"audio": {
"link": "https://example.com/audio.mp3"
}
}
{
"to": "33612345678",
"type": "document",
"document": {
"link": "https://example.com/invoice.pdf"
}
}
To avoid duplicate sends, add an idempotency-key header with a unique identifier:
idempotency-key: my-unique-id-123
If a message has already been sent with this key, the API returns a 201 without sending the message again.
Success (200):
{
"success": true,
"message": "Message sent successfully",
"message_id": 12345,
"contact_id": 678,
"phone_number": "33612345678"
}
Common errors:
Code
Reason
401 | Missing or invalid API key |
400 | Missing required field ( |
400 | Invalid phone number |
400 | Contact opted out |
400 | No active conversation window (24h) |
curl -X POST https://api.getkanal.com/api/v1/messages/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "33612345678",
"type": "text",
"text": {
"body": "Hello, here is your projection!"
}
}'
curl -X POST https://api.getkanal.com/api/v1/messages/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "33612345678",
"type": "image",
"image": {
"link": "https://example.com/projection.jpg",
"caption": "Find this product here 👉 https://example.com/product"
}
}'
curl -X POST https://api.getkanal.com/api/v1/messages/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "33612345678",
"type": "video",
"video": {
"link": "https://example.com/video.mp4",
"caption": "Discover our product on video"
}
}'
curl -X POST https://api.getkanal.com/api/v1/messages/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "33612345678",
"type": "audio",
"audio": {
"link": "https://example.com/audio.mp3"
}
}'
curl -X POST https://api.getkanal.com/api/v1/messages/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "33612345678",
"type": "document",
"document": {
"link": "https://example.com/invoice.pdf"
}
}'