Getting started

Quickstart

Send your first WhatsApp message in three steps. This uses an approved template — the reliable way to start a conversation with any customer.

1. Create an API key

Go to Settings → API and create a key with the messages:send and templates:read scopes. Copy it — it’s shown only once.

bash
export MYWA_KEY="wsk_live_your_key_here"
export MYWA_API="https://api.mywa.net/api/public/v1"

2. Find a template to send

Business-initiated messages must use a template approved by Meta. List the approved templates on your account and note the name and how many variables it takes.

bash
curl "$MYWA_API/templates" -H "Authorization: Bearer $MYWA_KEY"

No templates yet? Create one on the Templates page and wait for approval (authentication templates are usually fast).

3. Send the message

Pick your language. Each example sends an OTP template with a single variable to one recipient.

curl -X POST "$MYWA_API/messages" \
  -H "Authorization: Bearer $MYWA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+15551234567",
    "type": "template",
    "template": { "name": "otp_code", "variables": ["483920"] }
  }'

What you get back

A 201 with the created message. Save the id to check delivery status later.

json
{
  "id": "msg_9f2a…",
  "conversationId": "cnv_1a2b…",
  "contactId": "cts_3c4d…",
  "to": "+15551234567",
  "type": "template",
  "status": "sent",
  "body": "Your verification code is 483920",
  "createdAt": "2026-07-18T09:30:00.000Z"
}

Next steps

Read the Messages reference for text sends and delivery tracking, or copy a full client from Libraries.
MywaHey 👋 got a question? Say hi, a real human replies here.now