Start

Quickstart

You need a Tusk WhatsApp plan (the 5 days free trial counts), an API key and a linked WhatsApp number. Then one request sends your first message.

Tusk WhatsApp API: Quickstart

How do I get an API key?

  1. Sign up and choose a plan

    Create an account at app.tuskmail.africa, then pick a plan on the WhatsApp page. You can pay, or start the 5 days free trial.
  2. Open the API keys tab

    In the web app go to WhatsApp, then the API keys tab, and create a key. It starts with tkw_live_ and is shown once, so copy it right away.
Shell
export TUSK_WA_KEY="tkw_live_..."

How do I create a session?

A session is one WhatsApp number. Creating one is limited by your plan’s session count.

curl -X POST "https://api.tuskmail.africa/v1/whatsapp/sessions" \
  -H "X-API-Key: $TUSK_WA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Sales"
}'
201 Created
{
  "id": "9c1f6a4e-2b7d-4e0a-8f53-6d2a1b7c9e10",
  "name": "Sales",
  "phone": null,
  "status": "created",
  "status_label": "Created",
  "active": false,
  "created_at": "2026-01-15T09:30:00Z"
}

Keep the id. It is the sessionId in every other path.

Shell
export SESSION_ID="9c1f6a4e-2b7d-4e0a-8f53-6d2a1b7c9e10"

Start the session, then link the number either by scanning a QR code or by entering a pairing code on the phone.

curl -X POST "https://api.tuskmail.africa/v1/whatsapp/sessions/$SESSION_ID/start" \
  -H "X-API-Key: $TUSK_WA_KEY"

Option 1: fetch the QR code and scan it from WhatsApp, under Settings, then Linked devices.

curl "https://api.tuskmail.africa/v1/whatsapp/sessions/$SESSION_ID/qr" \
  -H "X-API-Key: $TUSK_WA_KEY"

Option 2: request a pairing code for the phone number, then enter it in WhatsApp under Linked devices, then Link with phone number.

curl -X POST "https://api.tuskmail.africa/v1/whatsapp/sessions/$SESSION_ID/pairing-code" \
  -H "X-API-Key: $TUSK_WA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "phoneNumber": "254700000001"
}'

Poll GET /sessions/{sessionId} until status is ready. You can also link the number from the dashboard in the web app. See Sessions for every status.

How do I send my first message?

Post to send-text with the recipient’s chat id, which is the phone number in international format without a plus, followed by @c.us.

curl -X POST "https://api.tuskmail.africa/v1/whatsapp/sessions/$SESSION_ID/messages/send-text" \
  -H "X-API-Key: $TUSK_WA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "chatId": "[email protected]",
  "text": "Hello from Tusk WhatsApp!"
}'
201 Created
{
  "message_id": "3EB0A1B2C3D4E5F60789",
  "chat_id": "[email protected]",
  "timestamp": 1768469400
}

What should I read next?