DialerBee APIv1 · 1.0.0-rc6

WhatsApp

Send a WhatsApp message

POST /v1/whatsapp/messages

Scope
whatsapp:send
Tier
Tier 1
Data
Personal data
Idempotency
Idempotency-Key: required

Not available yet. This operation is not available for any account yet: it answers 403 tier_not_enabled whatever the account's scopes and switches say, and nothing is sent. It is documented so that its shape is known.

Sends a text, or one of the account's approved WhatsApp templates with its values, from the account's own WhatsApp number. Every message carries your own client_reference: a second message with the same reference answers 409 duplicate_client_reference and nothing is sent again. A free text outside the customer's 24-hour service window can be refused by WhatsApp; use a template there. 202 means accepted: status is sent, pending, failed or blocked (the account cannot send WhatsApp now). Not available yet: this operation answers 403 tier_not_enabled for every account until DialerBee announces it.

Parameters

NameInTypeRequiredDescription
Idempotency-KeyheaderstringyesYour unique value for this logical operation (a UUID is fine). Scoped to your API client, kept 24 hours. (min length 1; max length 255)
X-Correlation-IDheaderstringnoYour own trace value, logged with the request. Metadata only, never identity. (min length 1; max length 128)

Request body

The message.

JSON: WhatsAppSendRequest

Response

202: Accepted for sending.

HeaderMeaning
X-Request-IDThe DialerBee request id. Quote it to support. Every response carries X-Request-ID: req_<ULID>, or edge_<32 hex> when the edge answered before the request reached the API.
Cache-ControlAlways no-store.
Idempotency-Replayedtrue when this answer is the stored answer of an earlier request with the same Idempotency-Key.

Examples

Request example

curl

curl -sS -X POST \
  "https://app.dialerbee.com/api/v1/whatsapp/messages" \
  -H "Authorization: Bearer $DIALERBEE_API_KEY" \
  -H 'Idempotency-Key: 5f2b7c1e-8a3d-4c6f-9b0e-2d4a6c8e1f3a' \
  -H "Content-Type: application/json" \
  --data '{
  "to": "+12125550101",
  "template": {
    "name": "appointment_reminder",
    "params": {
      "1": "Thursday 10:00"
    }
  },
  "client_reference": "order-1001-reminder"
}'

Python (SDK)

from dialerbee import DialerBee

db = DialerBee()  # reads DIALERBEE_API_KEY from the environment

result = db.whatsapp.send(
    to="+12125550101",
    template={"name": "appointment_reminder", "params": {"1": "Thursday 10:00"}},
    client_reference="order-1001-reminder",
    idempotency_key="5f2b7c1e-8a3d-4c6f-9b0e-2d4a6c8e1f3a",
)

Response example

202

{
  "id": "msg_0f8fad5b-d9cb-469f-a165-70867728950e",
  "to": "+12125550101",
  "status": "sent",
  "client_reference": "order-1001-reminder",
  "created_at": "2026-09-29T12:00:00Z"
}

Error examples

422 blocked_country

{
  "type": "https://docs.dialerbee.com/errors/blocked-country",
  "title": "Destination country blocked",
  "status": 422,
  "detail": "The platform does not contact numbers in this country.",
  "instance": "urn:dialerbee:request:req_01K6BZ3M9X4T7Q2V8N5R6P1W0C",
  "code": "blocked_country",
  "request_id": "req_01K6BZ3M9X4T7Q2V8N5R6P1W0C"
}

409 duplicate_client_reference

{
  "type": "https://docs.dialerbee.com/errors/duplicate-client-reference",
  "title": "Duplicate client reference",
  "status": 409,
  "detail": "A message with this client_reference was already accepted for this API client.",
  "instance": "urn:dialerbee:request:req_01K6BZ3M9X4T7Q2V8N5R6P1W0C",
  "code": "duplicate_client_reference",
  "request_id": "req_01K6BZ3M9X4T7Q2V8N5R6P1W0C"
}

403 insufficient_scope

{
  "type": "https://docs.dialerbee.com/errors/insufficient-scope",
  "title": "Not permitted",
  "status": 403,
  "detail": "The API client does not hold the scope this operation requires.",
  "instance": "urn:dialerbee:request:req_01K6BZ3M9X4T7Q2V8N5R6P1W0C",
  "code": "insufficient_scope",
  "request_id": "req_01K6BZ3M9X4T7Q2V8N5R6P1W0C"
}

Errors

StatusCodeTitle
401invalid_api_keyInvalid API key
403api_access_disabledAPI access disabled
403ip_not_allowedIP address not allowed
403insufficient_scopeNot permitted
400credential_in_urlCredential in URL
400credential_in_bodyCredential in body
400, 422validation_failedInvalid request
413payload_too_largePayload too large
415unsupported_media_typeUnsupported media type
400idempotency_key_requiredIdempotency-Key required
403tier_not_enabledCapability not enabled
422blocked_countryDestination country blocked
409duplicate_client_referenceDuplicate client reference
409conflictRequest in progress
409idempotency_conflictIdempotency key reused
409outcome_unknownOutcome unknown
429rate_limit_exceededToo many requests
503temporarily_unavailableTemporarily unavailable
503upstream_unavailableTemporarily unavailable
502upstream_invalid_responseUpstream error
500internal_errorInternal error

Objects

WhatsAppSendRequest

Send exactly one of text or template.

FieldTypeRequiredDescription
tostring (E.164 phone)yesA phone number in E.164 form.
textstringno (min length 1; max length 4096)
templateWhatsAppTemplateno
client_referencestringyesYour unique reference for this message; a duplicate is refused. (min length 1; max length 64)

WhatsAppMessage

FieldTypeRequiredDescription
idstring (SmsMessageId)yesAn outbound message (SMS or WhatsApp). msg_ + a lower-case UUID.
tostringyes
statusstringyes
client_referencestringyes
created_atstring (date-time)yes

WhatsAppTemplate

FieldTypeRequiredDescription
namestringyesThe approved template's name.
paramsobjectnoThe template's values by variable name (or 1, 2, ... for positional variables). (max keys 20)