curl -X POST "https://api.contactship.ai/v1/waba/send" \
-H "x-api-key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "chn_abc123",
"contact_id": "c1d2e3f4-a5b6-7890-cdef-123456789012",
"content": "Hello! How can I help you today?"
}'
const response = await fetch(
'https://api.contactship.ai/v1/waba/send',
{
method: 'POST',
headers: {
'x-api-key': 'your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
channel_id: 'chn_abc123',
contact_id: 'c1d2e3f4-a5b6-7890-cdef-123456789012',
content: 'Hello! How can I help you today?',
}),
}
);
const result = await response.json();
console.log(`Sent: ${result.data.message_id}`);
import requests
response = requests.post(
'https://api.contactship.ai/v1/waba/send',
headers={'x-api-key': 'your-api-key'},
json={
'channel_id': 'chn_abc123',
'contact_id': 'c1d2e3f4-a5b6-7890-cdef-123456789012',
'content': 'Hello! How can I help you today?',
},
)
print(response.json())
{
"success": true,
"message": "Mensaje WABA enviado",
"data": {
"message_id": "msg-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"provider_id": "wamid.HBgNMTIxMjM0NTY3ODkwFQIAERgSM...",
"thread_id": "thr-b2c3d4e5-f6a7-8901-bcde-f12345678901",
"status": "sent"
}
}
WhatsApp (WABA)
Send WhatsApp Message
Send a text message to a contact via WhatsApp Business API (WABA)
POST
/
v1
/
waba
/
send
curl -X POST "https://api.contactship.ai/v1/waba/send" \
-H "x-api-key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "chn_abc123",
"contact_id": "c1d2e3f4-a5b6-7890-cdef-123456789012",
"content": "Hello! How can I help you today?"
}'
const response = await fetch(
'https://api.contactship.ai/v1/waba/send',
{
method: 'POST',
headers: {
'x-api-key': 'your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
channel_id: 'chn_abc123',
contact_id: 'c1d2e3f4-a5b6-7890-cdef-123456789012',
content: 'Hello! How can I help you today?',
}),
}
);
const result = await response.json();
console.log(`Sent: ${result.data.message_id}`);
import requests
response = requests.post(
'https://api.contactship.ai/v1/waba/send',
headers={'x-api-key': 'your-api-key'},
json={
'channel_id': 'chn_abc123',
'contact_id': 'c1d2e3f4-a5b6-7890-cdef-123456789012',
'content': 'Hello! How can I help you today?',
},
)
print(response.json())
{
"success": true,
"message": "Mensaje WABA enviado",
"data": {
"message_id": "msg-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"provider_id": "wamid.HBgNMTIxMjM0NTY3ODkwFQIAERgSM...",
"thread_id": "thr-b2c3d4e5-f6a7-8901-bcde-f12345678901",
"status": "sent"
}
}
Sends a plain text message to a contact through a configured WhatsApp Business channel. Automatically creates or reuses an existing conversation thread.
Headers
Body
UUID of the WABA channel to send from. Find your channel IDs in your dashboard under Channels.
UUID of the contact to message. The contact must have a valid WhatsApp number (
wa_id or phone_number).UUID of an existing conversation thread. If provided,
channel_id and contact_id are inferred from the thread automatically.Response
Error Codes
400 Bad Request— Missing required fields or channel is not WABA type, or Meta rejected the request (messagecarries the reason Meta gave, for example an expired channel token or a re-engagement window that closed)401 Unauthorized— Invalid or missing API key404 Not Found— Channel or contact not found429 Too Many Requests— Meta rate limit; retry after a pause500 Internal Server Error— Server-side error502 Bad Gateway— Meta API unavailable; safe to retry
Code Examples
curl -X POST "https://api.contactship.ai/v1/waba/send" \
-H "x-api-key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "chn_abc123",
"contact_id": "c1d2e3f4-a5b6-7890-cdef-123456789012",
"content": "Hello! How can I help you today?"
}'
const response = await fetch(
'https://api.contactship.ai/v1/waba/send',
{
method: 'POST',
headers: {
'x-api-key': 'your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
channel_id: 'chn_abc123',
contact_id: 'c1d2e3f4-a5b6-7890-cdef-123456789012',
content: 'Hello! How can I help you today?',
}),
}
);
const result = await response.json();
console.log(`Sent: ${result.data.message_id}`);
import requests
response = requests.post(
'https://api.contactship.ai/v1/waba/send',
headers={'x-api-key': 'your-api-key'},
json={
'channel_id': 'chn_abc123',
'contact_id': 'c1d2e3f4-a5b6-7890-cdef-123456789012',
'content': 'Hello! How can I help you today?',
},
)
print(response.json())
{
"success": true,
"message": "Mensaje WABA enviado",
"data": {
"message_id": "msg-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"provider_id": "wamid.HBgNMTIxMjM0NTY3ODkwFQIAERgSM...",
"thread_id": "thr-b2c3d4e5-f6a7-8901-bcde-f12345678901",
"status": "sent"
}
}
