Developer docs

IotaBot WhatsApp API

Send and receive WhatsApp messages from your code — on every number you connected.

Get an API key

Send WhatsApp template messages via API

Templates start a conversation with anyone, any time. Meta approves them per number.

GET/v1/whatsapp/templatesmessages:sendThe API key needs the messages:send permission. Without it the call is refused with 403 insufficient_scope.Sign in to try

List approved templates

With the inputs each one needs.

Request
curl -X GET "https://api.iotabot.com/v1/whatsapp/templates" \
  -H "Authorization: Bearer $IOTABOT_API_KEY"
Response · 200
{
  "data": {
    "items": [
      {
        "name": "order_update",
        "language": "en_US",
        "category": "UTILITY",
        "whatsapp_account_id": "6a4c01aa…",
        "inputs": {
          "body": [
            "order number",
            "delivery date"
          ]
        }
      },
      {
        "name": "festive_offer",
        "language": "en_US",
        "category": "MARKETING",
        "whatsapp_account_id": "6a4c01aa…",
        "inputs": {
          "body": [
            "customer name"
          ]
        }
      }
    ]
  }
}
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 with variables

parameters fill {{1}}, {{2}}… in order.

Request
curl -X POST "https://api.iotabot.com/v1/messages" \
  -H "Authorization: Bearer $IOTABOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "channel": "whatsapp",
  "to": "+919812345678",
  "template": {
    "name": "order_update",
    "language": "en_US",
    "parameters": [
      "#1042",
      "Friday"
    ]
  }
}' \
  -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/messagesmessages:sendThe API key needs the messages:send permission. Without it the call is refused with 403 insufficient_scope.Sign in to try

Header image, buttons, coupon

A header saved with the template is sent automatically; headerMediaUrl replaces it.

Request
curl -X POST "https://api.iotabot.com/v1/messages" \
  -H "Authorization: Bearer $IOTABOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "channel": "whatsapp",
  "to": "+919812345678",
  "template": {
    "name": "festive_offer",
    "language": "en_US",
    "parameters": [
      "Priya"
    ],
    "values": {
      "headerMediaUrl": "https://cdn.acme.com/diwali.jpg",
      "couponCode": "DIWALI20",
      "urlSuffix": {
        "0": "diwali?ref=wa"
      }
    }
  }
}' \
  -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/messagesmessages:sendThe API key needs the messages:send permission. Without it the call is refused with 403 insufficient_scope.Sign in to try

One-time code

For authentication templates.

Request
curl -X POST "https://api.iotabot.com/v1/messages" \
  -H "Authorization: Bearer $IOTABOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "channel": "whatsapp",
  "to": "+919812345678",
  "template": {
    "name": "otp",
    "language": "en_US",
    "values": {
      "otpCode": "482913"
    }
  }
}' \
  -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