Skip to content

Introduction & quick start

WhatsTIG lets your application use WhatsApp through a REST API: you link a WhatsApp account once (by scanning a QR code), then send and receive messages over HTTP, and get signed webhooks for delivery receipts, incoming messages and connection changes.

Unofficial integration. WhatsTIG uses an unofficial implementation of the WhatsApp Web multi-device protocol (Baileys). It is not affiliated with, authorized or endorsed by WhatsApp or Meta. WhatsApp can restrict accounts, the protocol can change, and delivery is never guaranteed. Only message people who expect to hear from you (acceptable-use policy).

Concepts in one minute

ConceptWhat it is
OrganizationYour company account: members, plan, billing.
ProjectAn isolated space inside an organization (e.g. "Acme production"). API keys, webhooks and WhatsApp instances belong to exactly one project.
InstanceOne linked WhatsApp account. Map it to your own tenant/user with externalReference.
API keywt_live_... secret that authenticates your server to one project, with scopes.
Webhook endpointYour HTTPS URL that receives signed events.

1. Get an API key

  1. Sign up at the dashboard and create an organization (a Default project is created for you).
  2. Open API keys → Create key. Keep the defaults for a backend integration. Copy the key; it is shown once.
export WHATSTIG_API_KEY="wt_live_..."
export WT="https://api.whatstig.com"

2. Create an instance

curl -X POST $WT/v1/instances \
  -H "Authorization: Bearer $WHATSTIG_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: create-tenant-101" \
  -d '{ "name": "School A WhatsApp", "externalReference": "tenant-101" }'
{ "id": "wa_01jq8x7y2z3a4b5c6d7e8f9g0h", "name": "School A WhatsApp", "status": "DISCONNECTED", "externalReference": "tenant-101", "...": "..." }
curl -X POST $WT/v1/instances/wa_01jq.../connect -H "Authorization: Bearer $WHATSTIG_API_KEY" \
  -H "Content-Type: application/json" -d '{ "method": "qr" }'

# A second or two later:
curl $WT/v1/instances/wa_01jq.../qr -H "Authorization: Bearer $WHATSTIG_API_KEY"

The /qr response contains qrDataUrl (a PNG you can put in an <img>) and expiresAt. On the phone: WhatsApp → Settings → Linked devices → Link a device, then scan. Poll GET /v1/instances/{id}/status (or subscribe to webhooks) until status is CONNECTED. Don't want to render a QR yourself? Create a hosted connect link instead.

4. Send a message

curl -X POST $WT/v1/messages \
  -H "Authorization: Bearer $WHATSTIG_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: attendance-987" \
  -d '{
    "instanceId": "wa_01jq...",
    "recipient": "923001234567",
    "type": "text",
    "content": { "text": "Your child was marked absent today." },
    "clientReference": "attendance-987"
  }'
{ "id": "msg_01jq...", "status": "QUEUED", "instanceId": "wa_01jq...", "clientReference": "attendance-987", "createdAt": "..." }

QUEUED means the message is durably stored and will be sent asynchronously. It is not a delivery confirmation; see message lifecycle.

5. Receive events

Register a webhook and verify its signature (examples in TypeScript, C# and Python in Webhooks):

curl -X POST $WT/v1/webhooks -H "Authorization: Bearer $WHATSTIG_API_KEY" -H "Content-Type: application/json" \
  -d '{ "url": "https://api.example.com/whatstig/webhooks", "events": ["*"] }'

Next steps