What is the base URL?
All requests go to one HTTPS base URL. Plain HTTP is not supported.
https://api.tuskmail.africa/v1/whatsappRequests and responses are JSON, except downloading a message’s media, which returns the file itself.
What can I do with the API?
- Create sessions, link a number by QR code or pairing code, and start, stop or log out a session.
- Send text, images, video, audio, documents, locations, contact cards and polls, and reply, forward, react, edit or delete.
- Send the same message to many people as an asynchronous bulk batch.
- List chats, contacts and groups, read stored messages and fetch a chat’s history.
- Create and use text templates with placeholders.
- Receive incoming messages and other events at your own URL with webhooks.
How does it fit together?
- Base URL
https://api.tuskmail.africa/v1/whatsapp- Auth
- One API key in
X-API-Keyor as a Bearer token. No app password. - Billing
- A Tusk WhatsApp plan priced by number of sessions, in KES. The API stops working when the plan ends.
- Rate limit
- 120 requests per minute per key by default
- Errors
- JSON with a code, a message and a request_id
Every message endpoint lives under a session, at /sessions/{sessionId}/..., and only works on sessions that belong to your account. Read Authentication and Sessions to learn more.
What does a request look like?
This call lists your sessions. Replace the key with your own.
curl "https://api.tuskmail.africa/v1/whatsapp/sessions" \
-H "X-API-Key: $TUSK_WA_KEY"Ready to build? Follow the quickstart to send your first message.
Not signed up yet? Create a Tusk WhatsApp account.