WhatsApp API
Available: approved utility and authentication templates, from your own number. Sending live through the API takes a plan with API access, from Growth; test keys send nothing. Meta bills each message to your WhatsApp account, with no Tellwing markup.
What you can send
The API sends a Meta-approved template from one of these two categories:
- Utility: order confirmation, shipment on its way, appointment reminder or payment received, with a text header, variables and link buttons.
- Authentication: verification codes, with the code in the message and a button to copy it.
Promotions don't go through the API: a marketing template returns an error and is sent from campaigns, where the hours and frequency of Colombia's Law 2300 apply.
The request
With an API key that has the whatsapp:send scope: tw_live_… live, or tw_test_… to test without sending anything.
The response comes back with status 202:
Always send Idempotency-Key: if your system retries the request, Tellwing returns the same response and doesn't send two messages. For a utility template you can use a contact's contact_id instead of the number. The full reference is in the API documentation.
Statuses and webhooks
With the send's id, GET /v1/whatsapp tells you whether the message was sent, delivered, read or failed, with the time of each step.
The same statuses arrive as webhooks (whatsapp.delivered, whatsapp.read and whatsapp.failed), also for the templates in your campaigns and flows. Webhooks for every event come from the Pro plan.
Rules and limits
- Opt-in for utility. A utility template only goes to a number with WhatsApp opt-in recorded in your account. You record it when you create or update the contact through the API, with the wording the person agreed to.
- Codes to any number. Someone who asks for a code on your site has already given permission, so authentication goes to any number, and Tellwing stores neither the number nor the code.
- Unsubscribes are respected. If the person wrote STOP or opted out on WhatsApp, the send returns an error and doesn't go out.
- Limits: 60 sends per minute per account, 10 per number per hour and 5 codes per number per hour, on top of the daily limit Meta gives your number.
- Your system generates and checks the codes. Tellwing delivers them; it doesn't create or verify them.
Test without sending
With a tw_test_… key the API validates your real number and templates, but never sends anything. Three test numbers simulate the cases: +573005550001 is delivered and read, +573005550002 fails and +573005550003 has opted out.
Plans and cost
WhatsApp comes with every paid plan, from Starter, with 1 number of your own, and sending it live through the API takes a plan with API access, from Growth. Meta bills each message to your WhatsApp account by country and category, with no Tellwing markup: see the rates by country. To send the same codes by SMS, see SMS OTP.
Frequently asked questions
Can I send promotions through the WhatsApp API?
No. The API sends utility and authentication templates; promotions go out from campaigns, which respect the hours and frequency of Law 2300.
Do I need the customer's permission?
For utility, yes: the number must have WhatsApp opt-in recorded in your account. For a verification code, no, because the person just asked for it.
How much does sending WhatsApp through the API cost?
What Meta charges per delivered message by country and category; in Colombia, $0.0008 per utility or authentication message. Tellwing adds no markup, and sending live through the API takes a plan with API access, from Growth.
Can I tell whether the message was read?
Yes. With the send's id, GET /v1/whatsapp tells you whether it was sent, delivered, read or failed, and the same statuses arrive as webhooks.
Can I test without sending real messages?
Yes. With a test key the API validates your setup and simulates the statuses with three test numbers, without sending anything.