← All resourcesTutorial · Developers

Send your first WhatsApp API message

A working request against the WA Console API — the headers, the body, what comes back, and how to read what happened next.

Updated August 20266 min read

This walks through one real request. By the end you will have sent a template message and know where to look for what happened to it.

Before you start

  • A connected WhatsApp Business Account with a registered phone number.
  • At least one approved template — a business-initiated message needs one.
  • An API key pair created in the console. Keys are scoped to one account and shown once.

Authentication

Requests carry two headers rather than a bearer token. Both are required, and the secret key belongs on your server only — never in browser or mobile code.

HEADERS
x-access-key: ak_…x-secret-key: sk_…

Send the message

The phoneNumberId identifies which of your numbers it comes from, and the recipient is in E.164 digits without a plus or spaces.

CURL
curl -X POST https://wa.draskenapis.com/messages \  -H "Content-Type: application/json" \  -H "x-access-key: $WA_ACCESS_KEY" \  -H "x-secret-key: $WA_SECRET_KEY" \  -d '{    "phoneNumberId": "123456789012345",    "to": "919876543210",    "type": "template",    "templateName": "order_update",    "templateLanguage": "en_US"  }'

Read the response

Every response uses the same envelope, so a failure is shaped like a success. Keep metaMessageId — it is what later delivery events reference.

200 OK
{  "statusCode": 200,  "message": "Success",  "data": {    "id": 1842,    "metaMessageId": "wamid.HBgLOTE5…",    "to": "919876543210",    "type": "template",    "status": "sent"  }}

When it does not work

A 422 names the exact field that failed validation, which is usually a malformed recipient or a missing template field. A 401 means the key headers are missing, invalid, or the key is not scoped to an account.

Want to manage your WhatsApp infrastructure?

WA Console handles WABA management, API integration, messaging visibility and webhook events from one place.

Full API reference