Documentation
All pages
.md
Built and tested. The public service opens with the platform launch; until then API keys are not issued to customers.

Send a message

POST https://app.easytawasul.com/api/v1/messages

Rate limit: 120 requests per minute per key. The call returns 202 Accepted with the message object. Delivery results (delivered, read, failed) arrive later as webhooks, or read the message again.

The 24-hour rule

WhatsApp separates two situations:

  • Inside the customer service window. When a customer writes to you, a 24-hour window opens (and restarts with each new customer message). Inside it you may send free text.
  • Outside the window. You may only send an approved template. A text message returns 409 with code window_closed.

The rule is enforced by the platform, the same way as in the dashboard inbox.

Request fields

FieldTypeRequiredNotes
tostringyesRecipient with country code, for example +201000000000. Spaces and dashes are removed.
typestringyestemplate or text
text.bodystringfor textUp to 4,096 characters
template.namestringfor templateLowercase letters, digits and _ (as in the Templates page)
template.languagestringfor templateFor example ar, en, en_US
template.variablesarray of stringsnoFills {{1}}, {{2}} in order. Up to 20.
client_referencestringnoYour own ID (order, user), up to 128 characters. Returned on the message and in status webhooks.

Header Idempotency-Key (1 to 64 letters, digits, ., _, -): send the same key again within 24 hours and you get the first message back (200, header Idempotent-Replayed: true) instead of a second send. Use it on every retry.

Template

{
  "to": "+201000000000",
  "type": "template",
  "template": { "name": "order_confirmation", "language": "ar", "variables": ["Mona", "1042"] }
}

Text (inside the window only)

{ "to": "+201000000000", "type": "text", "text": { "body": "Your order is on its way." } }

The message object

{
  "id": "msg_81",
  "direction": "outbound",
  "to": "201000000000",
  "from": null,
  "type": "template",
  "body": "Hello Mona, your order 1042 ...",
  "status": "sent",
  "error": null,
  "client_reference": "order-1042",
  "whatsapp_message_id": "wamid.HBg...",
  "created_at": "2026-10-22T10:00:00+03:00"
}

status moves forward only: queued, sent, delivered, read, or failed (then error has code and message).

Read messages

GET /v1/messages/{id}
GET /v1/messages?limit=25&to=201000000000&status=delivered&before=msg_81

Newest first. limit is 1 to 100. The list returns { "data": [...], "has_more": true, "next_before": "msg_60" }; pass next_before as before for the next page. Incoming messages appear with direction: "inbound".

Errors for this endpoint

StatusCodeMeaning
409window_closedFree text outside the 24-hour window. Send a template. The body has window_expired_at.
422api.no_numberNo connected WhatsApp number in the workspace
422(validation)A field is missing or malformed. The body lists the fields.
422idempotency.invalidBad Idempotency-Key format
502meta.rejected, meta.undeliverable, meta.rate_limited, meta.permission, meta.invalid_token, meta.unreachableMeta refused or could not be reached. The message is saved with status failed.

All codes are listed in Errors and limits.