Authentication
Create an API key on the Integrations page of your workspace. The key is shown once, so store it somewhere safe. Send it as a bearer token with every request. A key only ever reaches the workspace that created it, and can be revoked at any time.
curl https://api.watiqo.io/api/v1/me \
-H "Authorization: Bearer wq_live_your_key" \
-H "Accept: application/json"Keep keys on your server. Never put one in a web page or a mobile app, where anyone can read it.
Endpoints
The base address is https://api.watiqo.io/api/v1. Requests and responses are JSON.
| Method | Path | What it does |
|---|---|---|
GET | /me | The workspace the key belongs to, and whether WhatsApp is connected. |
GET | /contacts | List contacts. Filter by phone number or tag. |
POST | /contacts | Add a contact, or update the one with that phone number. |
GET | /contacts/{id} | One contact with its tags and details. |
PUT | /contacts/{id}/tags | Replace a contact's tags. |
GET | /templates | Approved message templates you can send. |
POST | /messages | Send a text or a template message. |
GET | /messages/{id} | A sent message and its delivery status. |
GET | /events | The events a webhook can subscribe to. |
GET, POST | /webhooks | List your webhooks, or register a new one. |
DELETE | /webhooks/{id} | Remove a webhook. |
Send a message
Send plain text to a customer who has written to you in the last 24 hours. Outside that window, WhatsApp only allows an approved template, so send type: "template" with the template's name.
curl -X POST https://api.watiqo.io/api/v1/messages \
-H "Authorization: Bearer wq_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"to": "923001234567",
"type": "template",
"template": "order_confirmation",
"variables": ["Maya", "A-1042"]
}'to is the customer's number with country code, digits only. If Watiqo has not seen the number before, it creates the contact. variables fill the template's placeholders in order; leave them out and the mapping saved on the template is used.
Webhooks
Register an HTTPS address and choose the events you want. Watiqo posts each event as JSON, and retries if your server does not answer. An address that keeps failing is paused so it does not hold up the rest.
| Event | Sent when |
|---|---|
message.received | A customer sends a message |
message.sent | A message is sent to a customer |
message.status | A sent message is delivered, read, or fails |
contact.created | A new contact is added |
contact.tags_updated | A contact's tags change |
order.created | An order is placed |
order.status_changed | An order's status changes |
booking.created | A booking is made |
booking.status_changed | A booking's status changes |
Check that a webhook came from Watiqo
Every delivery carries four headers: X-Watiqo-Event, X-Watiqo-Delivery, X-Watiqo-Timestamp and X-Watiqo-Signature. The signature is an HMAC SHA-256 of the timestamp, a dot, and the raw request body, made with your webhook's secret.
// Node.js
const crypto = require("crypto");
function isFromWatiqo(req, secret) {
const timestamp = req.headers["x-watiqo-timestamp"];
const expected = "sha256=" + crypto
.createHmac("sha256", secret)
.update(timestamp + "." + req.rawBody)
.digest("hex");
const given = req.headers["x-watiqo-signature"] || "";
return given.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(given), Buffer.from(expected));
}Start an automation from your system
You do not always need the API. An automation in Watiqo can be given its own private address. Post JSON to it from a website form, an online store or a payment system, map which fields hold the phone number and name, and the automation runs for that customer: send a template, tag the contact, assign the chat.
Limits
- Up to 120 requests a minute for each key.
- Up to 60 message sends a minute for each key.
- WhatsApp's own rules still apply: free text only inside the 24-hour window, and templates must be approved by Meta.
Going over a limit returns 429. Wait and try again. If you need more, talk to us.
Getting help
Customers can ask for the full API reference from their workspace or by writing to us. If you are evaluating Watiqo for a project, book a demo and bring your developer.