Developers
A REST API and webhooks for the WhatsApp inbox your team already uses
Connect WhatsApp by QR code, work from one shared inbox, and let your own systems read and write the same conversations with API keys and webhooks.
On this page
In short
whatsappx.si is a shared WhatsApp inbox for teams, and its REST API is one feature of that inbox. With a Bearer API key you can send messages, list conversations and contacts, and register HTTPS webhooks that receive every incoming WhatsApp message with X-Whatsappx-Event and X-Whatsappx-Webhook-Token headers. The docs are public at /docs and also inside the app.
What can you do with the whatsappx.si API?
Everything your team does in the shared inbox is backed by the same JSON API.
API keys with Bearer auth
Create read or write keys in the app and send them as
Authorization: Bearerwith anX-Tenant-IDheader. Each key is bound to one workspace, expires when you choose (30, 90 or 365 days, or never) and is blocked automatically if it looks leaked.Send messages
Post a text message into an existing conversation, or start one by phone number and send the first message in the same call.
List conversations and messages
Read the inbox list with unread counts and assignees, page through message history and mark conversations as read.
Contacts
List, create and delete contacts with a tag and an opt-in flag, so your CRM and your inbox stay aligned.
Outbound webhooks
Register HTTPS URLs that receive each incoming WhatsApp event as JSON, signed with HMAC-SHA256 and labelled with
X-Whatsappx-Event.Live event stream and in-app docs
Subscribe to server-sent events at
/api/eventsfor live updates, and read the full developer guide inside the app.
How do you send a WhatsApp message with the REST API?
Post a text message to an existing conversation. Send your API key as a Bearer token and the workspace ID in X-Tenant-ID; a key only works in the workspace that issued it. $BASE_URL is the address you sign in at.
# 1. Find the conversation (read or write key)
curl "$BASE_URL/api/conversations" \
-H "Authorization: Bearer $API_KEY" \
-H "X-Tenant-ID: $WORKSPACE_ID"
# 2. Send a text message into it (write key)
curl -X POST "$BASE_URL/api/conversations/$CONVERSATION_ID/messages" \
-H "Authorization: Bearer $API_KEY" \
-H "X-Tenant-ID: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{"body": "Your order is ready for pickup."}'
The response is the stored message with its id, conversation_id, content, status and timestamp. To write to someone who is not in the inbox yet, call POST /api/conversations with a phone (digits only, with country code) and an optional body; if the workspace has more than one connected channel, add the channel_id that should send.
| Endpoint | What it does |
|---|---|
GET /api/conversations | List inbox conversations with unread counts and assignees |
GET /api/conversations/{id}/messages | Paginated message history (limit, offset, before) |
POST /api/conversations/{id}/read | Mark a conversation as read |
GET / POST /api/v1/contacts | List and create contacts (name, phone, tag, opted_in) |
GET /api/v1/channel | What is connected to the workspace: the QR session (official Meta numbers will appear here once the official platform launches) |
GET /api/events | Server-sent events stream for live inbox updates |
Errors are JSON with an error field and standard status codes: 400 invalid input, 401 unauthenticated, 403 forbidden, 404 not found, 409 conflict, 502 provider error from WhatsApp or Meta.
How do you set up API access?
Create an API key
As an owner or admin, open API keys in the app, name the key and choose a scope: read (read only) or write (send messages, manage contacts). The secret is shown once, so store it right away.
Make a read call first
List contacts or conversations with the Bearer key and the X-Tenant-ID header to confirm everything is right before you send anything.
Add an outbound webhook
Register an HTTPS URL to receive incoming messages. Save the signing secret shown at creation and, if you enable it, the shared delivery token.
Build against the in-app docs
The developer guide in the app lists every endpoint with example requests and responses. Revoke a key from the same screen if it ever leaks.
Which credential can do what?
| Feature | Read API key | Write API key | Owner or admin session |
|---|---|---|---|
| List conversations, messages, contacts | Yes | Yes | Yes |
| Send messages and start conversations | No | Yes | Yes |
| Create and delete contacts | No | Yes | Yes |
| Mark a conversation as read | No | Yes | Yes |
| Assign a conversation to a teammate | No | No | Yes |
| Manage API keys, webhooks, team and automations | No | No | Yes |
Read keys can only make GET requests; write keys can also send, mark as read and manage contacts. Administration stays with signed-in owners and admins.
How do outbound webhooks work?
When an incoming WhatsApp event reaches the inbox, whatsappx.si posts it as JSON to every enabled webhook URL in the workspace, asynchronously, after whatsappx.si has processed it. For a QR-linked number the body is a whatsappx.si message object (sent after your keyword automations have been checked); once the official WhatsApp Business Platform launches (coming soon), its numbers will deliver Meta's original webhook payload instead. Each delivery carries these headers:
| Header | Purpose |
|---|---|
X-Whatsappx-Event | Which connection produced the event: scan.whatsapp for a QR-linked number (meta.whatsapp is reserved for official WhatsApp Business Platform numbers, which are coming soon) |
X-Hub-Signature-256 | sha256= plus an HMAC-SHA256 of the raw body, keyed with the secret shown once when you created the webhook |
X-Whatsappx-Webhook-Token | Optional shared token you set or generate on the webhook, sent on every delivery so your endpoint can reject anything else |
Before you write the receiver:
- HTTPS only. Plain
http://and localhost URLs are rejected. - Respond with any 2xx within 15 seconds. Timeouts,
429and5xxanswers are retried with growing pauses (up to six attempts, honouringRetry-After); if every attempt fails, the event is counted as undelivered on the webhook. Treat deliveries as at-least-once and deduplicate on the message ID. - Manage webhooks from the app or via
/api/v1/webhooks. Signed-in owners and admins (not API keys) can add a destination, pause it, rotate or clear the token, and delete it.
A typical pattern is to verify the signature, then reply from your own system with POST /api/conversations/{id}/messages. For example, a repair shop could forward each incoming message to its ticketing tool and post a confirmation back into the same WhatsApp conversation.
Does the API work with a QR-linked number, and what about the official API?
Yes, with QR-linked numbers. The REST API and webhooks sit on top of the shared inbox. The official WhatsApp Business Platform is coming soon to whatsappx.si (we are waiting for Meta approval), and the X-Whatsappx-Event header will tell your receiver which connection produced each event. The two connections differ in what WhatsApp itself allows:
- QR-linked numbers use WhatsApp's linked-device feature, like WhatsApp Web: up to four linked devices, which log out if the primary phone is unused for more than 14 days (WhatsApp Help Center). WhatsApp states its products are "not intended for bulk or automated messaging" (WhatsApp Help Center). Use a QR-linked number for replying to customers, not for campaigns.
- Official WhatsApp Business Platform numbers (coming soon to whatsappx.si) are built for programmatic use. Free-form messages are allowed only inside the 24-hour customer service window that opens when a customer writes to you; outside it, only approved templates can be sent (Meta for Developers). Meta bills its per-message fees separately (Meta pricing).
Number-safety rules for anything you automate. If you connect a brand-new WhatsApp number, use it normally from a phone for 15–20 days before you link it by QR code. Send 5–10 messages at a time, never a bulk blast, and only to people who agreed to hear from you. Scripts make it easy to send faster than a person would, and that is exactly the pattern WhatsApp may restrict or block. For higher volume, templates and automation at scale, go with the official WhatsApp Business Platform (coming soon to whatsappx.si) instead.
What is the live event stream for?
GET /api/events returns a text/event-stream response for the workspace in X-Tenant-ID. It is what keeps the inbox updating without a refresh, and any integration that speaks server-sent events can use it too. Event types include message.created, conversation.updated (unread counts, assignment) and sync.progress (history syncing after a QR link). Use webhooks when you want events pushed to a server you host; use the stream for a long-lived connection from a dashboard or a running worker.
Frequently asked questions
Is whatsappx.si an API platform?
How do I authenticate API requests?
Authorization: Bearer <key> together with an X-Tenant-ID header holding your workspace ID. Keys have a read or write scope, are bound to the workspace that issued them, expire when you choose (30, 90 or 365 days, or never), can be rotated or revoked at any time, and are blocked automatically if they look leaked. The secret is shown only once.Can I send bulk WhatsApp messages through the API?
How do I verify that a webhook really came from whatsappx.si?
X-Hub-Signature-256 header (after the sha256= prefix). If you also set a shared token, check the X-Whatsappx-Webhook-Token header matches. Reject anything that fails either check.What happens if my webhook endpoint is down?
Retry-After header. If every attempt fails, the event is counted as undelivered on the webhook (you see it in the app) and is not retried later. The message is still stored in the inbox, so your integration can catch up by listing recent messages with GET /api/conversations/{id}/messages or by subscribing to the live event stream.Can I connect my CRM or helpdesk to whatsappx.si?
/api/v1/contacts, and reply from your tool by posting to /api/conversations/{id}/messages. This works for QR-linked numbers.Related
Feature
Shared inbox
Answer customer WhatsApp chats as a team: one shared inbox with search, assignment, unread counts and live updates. Connect by QR code.
Glossary
WhatsApp Cloud API
The WhatsApp Cloud API is Meta’s hosted API for sending and receiving WhatsApp messages as a business, part of the WhatsApp Business Platform.
Blog
QR Linking vs the Official WhatsApp Business Platform
Two ways to bring a WhatsApp number into a team inbox: link it by QR code or connect it through Meta’s Cloud API. What each means and how to choose.
Resources
Features
Everything whatsappx.si does.
Bring your team into one WhatsApp inbox
Create a workspace, connect your WhatsApp by QR code, and invite your teammates.