How do I get an API key?
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.Open the API keys tab
In the web app go to WhatsApp, then the API keys tab, and create a key. It starts withtkw_live_and is shown once, so copy it right away.
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"
}'{
"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.
export SESSION_ID="9c1f6a4e-2b7d-4e0a-8f53-6d2a1b7c9e10"How do I link my number?
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!"
}'{
"message_id": "3EB0A1B2C3D4E5F60789",
"chat_id": "[email protected]",
"timestamp": 1768469400
}What should I read next?
- Webhooks to receive incoming messages.
- Plan and limits, rate limits and errors to make your integration robust.
- Send messages from a session and the send messages reference for every message type.
- Avoiding bans: how to warm up a number and send without getting it restricted. Read this before sending at volume.