Send WhatsApp text, images and documents via API
Free text and files within 24 hours of the customer's last message.
Not sure the window is open? POST /messaging-window/check answers for up to 100 numbers at once — see Marketing messages.
POST/v1/messagesmessages:sendThe API key needs the messages:send permission. Without it the call is refused with 403 insufficient_scope.Sign in to try Reply with text
Request
curl -X POST "https://api.iotabot.com/v1/messages" \
-H "Authorization: Bearer $IOTABOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"conversation_id": "6a4b9e21c3f1a2b3c4d5e6f7",
"text": "Your order #1042 shipped yesterday."
}' \
-H "Idempotency-Key: order-1042-shipped"Response · 202
{
"data": {
"id": "6a4ba0f1c3f1a2b3c4d5e733",
"object": "message",
"status": "queued",
"channel": "whatsapp",
"conversation_id": "6a4b9e21c3f1a2b3c4d5e6f7",
"created_at": "2026-10-01T09:16:10.004Z"
}
}Errors
window_closedtemplate_not_approvedconversation_closedintegration_pausedrecipient_opted_outinvalid_phonefile_already_usedattachments_too_largeapi_quota_exceededidempotency_key_reusedidempotency_in_progress
POST/v1/filesmessages:sendThe API key needs the messages:send permission. Without it the call is refused with 403 insufficient_scope.Sign in to try Upload a file
Images, video, audio or documents — up to 10 MB.
Request
curl -X POST "https://api.iotabot.com/v1/files" \
-H "Authorization: Bearer $IOTABOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"filename": "invoice.pdf",
"content_type": "application/pdf",
"content_base64": "JVBERi0xLjQK…"
}'Response · 201
{
"data": {
"id": "6a4ba1c0c3f1a2b3c4d5e741",
"object": "file",
"filename": "invoice.pdf",
"content_type": "application/pdf",
"size": 48213,
"created_at": "2026-10-01T09:17:00.000Z"
}
}Errors
file_rejected
POST/v1/messagesmessages:sendThe API key needs the messages:send permission. Without it the call is refused with 403 insufficient_scope.Sign in to try Send it with a caption
Request
curl -X POST "https://api.iotabot.com/v1/messages" \
-H "Authorization: Bearer $IOTABOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"conversation_id": "6a4b9e21c3f1a2b3c4d5e6f7",
"text": "Your invoice",
"attachments": [
{
"file_id": "6a4ba1c0c3f1a2b3c4d5e741"
}
]
}' \
-H "Idempotency-Key: order-1042-shipped"Response · 202
{
"data": {
"id": "6a4ba0f1c3f1a2b3c4d5e733",
"object": "message",
"status": "queued",
"channel": "whatsapp",
"conversation_id": "6a4b9e21c3f1a2b3c4d5e6f7",
"created_at": "2026-10-01T09:16:10.004Z"
}
}Errors
window_closedtemplate_not_approvedconversation_closedintegration_pausedrecipient_opted_outinvalid_phonefile_already_usedattachments_too_largeapi_quota_exceededidempotency_key_reusedidempotency_in_progress
After 24 hours free text is refused with window_closed — send a template instead.