API tokens and webhooks
Create an API token so your own systems can call NexlyFlow, and send WhatsApp events to your server with webhooks.
On this page
1. Open API and webhooks2. Create an API token3. Add a webhook4. Check the signatureNo developer? Use Zapier, Make or Google SheetsAn API token lets your developer, Zapier or Make work with your WhatsApp contacts and messages. A webhook sends events, such as a customer reply, to your own server as they happen.
Plans: all plans.
1. Open API and webhooks
In WhatsApp, open Integrations and click API and webhooks. You can also get there from Settings → API & webhooks.
2. Create an API token
- Under API tokens, give the token a Label so you remember what uses it, for example "Zapier".
- Click Create token.
- Copy the token straight away and keep it somewhere safe.
- Send it with every call as
Authorization: Bearer <token>.
You can have up to 10 active tokens. Each token can make 60 calls a minute.
3. Add a webhook
- Under Webhooks, enter the Endpoint address: an HTTPS address on the public internet.
- Tick the events you want: Message accepted by WhatsApp (
message.sent), Delivered to the phone (message.delivered), Read (message.read), Failed (message.failed) and A contact replied (inbound.received). - Click Add endpoint. You can add up to 5.
4. Check the signature
Each event is sent as JSON, for example:
{"event":"inbound.received",
It comes with these headers: X-Nexly-Signature (sha256= followed by the HMAC-SHA256 of the raw body, made with the endpoint's signing secret), X-Nexly-Event and X-Nexly-Delivery. Work out the same signature on your side and compare it before trusting the event.
Answer with any 2xx status within 8 seconds. A failed delivery is tried again after 1, 5 and 30 minutes.
No developer? Use Zapier, Make or Google Sheets
Under Set up a connection, pick Zapier, Make or Google Sheets (with Zapier) for step-by-step instructions. For example, to get events into Zapier: create a Webhooks by Zapier – Catch Hook, copy its address, and add it above as an endpoint.
NexlyFlow