Built and tested. The public service opens with the platform launch; until then API keys are not issued to customers.
Getting started
Before you call the API
Connect a WhatsApp number in the dashboard (Numbers page, "Connect with Meta"). The API sends from your first connected number.
Get a template approved if you want to message people who have not written to you in the last 24 hours (Templates page). Free-form text works only inside the customer's 24-hour window.
Create an API key: Developers > API keys > "New key". The key is shown once. Copy it into your secret store. Only the workspace owner can create keys.
Add a webhook URL under Developers > Webhooks. Incoming customer messages, delivery statuses and order changes are posted to it, signed with your secret. See Webhooks.
# Getting started
## Before you call the API
1. **Connect a WhatsApp number** in the dashboard (Numbers page, "Connect with Meta"). The API sends from your first connected number.
2. **Get a template approved** if you want to message people who have not written to you in the last 24 hours (Templates page). Free-form text works only inside the customer's 24-hour window.
3. **Create an API key**: Developers > API keys > "New key". The key is shown **once**. Copy it into your secret store. Only the workspace owner can create keys.
## 1. Check the key works
```bash
curl https://app.easytawasul.com/api/v1/me \
-H "Authorization: Bearer $API_KEY"
```
```json
{ "workspace": { "name": "Your store", "country": "EG", "currency": "EGP" }, "wallet_currency": "EGP" }
```
A wrong or revoked key returns `401` with code `api.unauthorized`.
## 2. Send a template message
```bash
curl https://app.easytawasul.com/api/v1/messages \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042-confirm" \
-d '{
"to": "+201000000000",
"type": "template",
"template": { "name": "order_confirmation", "language": "ar", "variables": ["Mona", "1042"] },
"client_reference": "order-1042"
}'
```
```json
{
"id": "msg_81", "direction": "outbound", "to": "201000000000", "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"
}
```
The response is `202 Accepted`. The status moves to `delivered` and `read` as Meta reports it; you get each change as a [webhook](webhooks) or by reading the message.
## 3. Read it back
```bash
curl https://app.easytawasul.com/api/v1/messages/msg_81 -H "Authorization: Bearer $API_KEY"
```
## 4. Receive replies
Add a webhook URL under **Developers > Webhooks**. Incoming customer messages, delivery statuses and order changes are posted to it, signed with your secret. See [Webhooks](webhooks).
## Next
- [Send a message](send-message): text messages and the 24-hour rule.
- [OTP verification](otp-verify): send and check one-time codes.
- [Errors and limits](errors-and-limits).