Skip to content

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.

Updated
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: Bearer with an X-Tenant-ID header. 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/events for live updates, and read the full developer guide inside the app.

Illustration of sending a message with a Bearer API key. The request is simplified for the picture; the exact paths are below and in the in-app docs.

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.

EndpointWhat it does
GET /api/conversationsList inbox conversations with unread counts and assignees
GET /api/conversations/{id}/messagesPaginated message history (limit, offset, before)
POST /api/conversations/{id}/readMark a conversation as read
GET / POST /api/v1/contactsList and create contacts (name, phone, tag, opted_in)
GET /api/v1/channelWhat is connected to the workspace: the QR session (official Meta numbers will appear here once the official platform launches)
GET /api/eventsServer-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?

  1. 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.

  2. 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.

  3. 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.

  4. 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?

Which credential can do what?
FeatureRead API keyWrite API keyOwner or admin session
List conversations, messages, contactsYesYesYes
Send messages and start conversationsNoYesYes
Create and delete contactsNoYesYes
Mark a conversation as readNoYesYes
Assign a conversation to a teammateNoNoYes
Manage API keys, webhooks, team and automationsNoNoYes

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:

HeaderPurpose
X-Whatsappx-EventWhich 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-256sha256= plus an HMAC-SHA256 of the raw body, keyed with the secret shown once when you created the webhook
X-Whatsappx-Webhook-TokenOptional 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, 429 and 5xx answers are retried with growing pauses (up to six attempts, honouring Retry-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?
No. whatsappx.si is a shared WhatsApp inbox for teams: you connect the WhatsApp you already have by QR code and reply together from one place. The REST API, webhooks and event stream are one feature of that inbox, there so your own systems can read and write the same conversations.
How do I authenticate API requests?
Create an API key in the app as an owner or admin, then send it as 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?
No. The API sends one message per request into a conversation and is designed for replies, notifications and CRM sync, not campaigns. WhatsApp’s terms prohibit bulk messaging and auto-messaging, and WhatsApp may restrict numbers that do it. Send 5–10 messages at a time to opted-in contacts, and use the official WhatsApp Business Platform (coming soon to whatsappx.si) with approved templates for volume.
How do I verify that a webhook really came from whatsappx.si?
Compute an HMAC-SHA256 of the raw request body with the secret shown when you created the webhook and compare it, in constant time, with the 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?
whatsappx.si retries each event up to six times over about two minutes, with growing pauses, and waits as long as your endpoint asks in a 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?
There are no built-in CRM integrations today. You connect other tools through the REST API and outbound webhooks: forward incoming messages to your system with a webhook, keep contacts in sync with /api/v1/contacts, and reply from your tool by posting to /api/conversations/{id}/messages. This works for QR-linked numbers.

Bring your team into one WhatsApp inbox

Create a workspace, connect your WhatsApp by QR code, and invite your teammates.

Get startedTalk to sales

7-day free trial — no card needed