Skip to content
WAQR comes included with Emboxia, Zygore and AXEN. See how

Developers

API documentation

REST and JSON over HTTPS. You authenticate with an API key, query connections, conversations, messages and contacts, and receive real-time events through signed webhooks.

Base URL https://api.waqr.app/v1

43 endpoints

Authentication

Every request carries your API key in the Authorization header. Keys are created in the dashboard (Developers), with the scopes you choose.

API key

Format wq_live_… in production. It is shown only once when created: store it as a secret on your server.

Authorization: Bearer wq_live_…

  • Server-side only: never in the browser, a mobile app or a repository.
  • A key in the URL (?api_key=…) is rejected with 400 api_key_in_query. HTTPS only.
  • A key is worth its scopes and the current role of whoever created it: if that person leaves the organization, it stops working (401 credential_invalid).
  • Rotate it with a grace period or revoke it instantly from the dashboard. You get an email on every change.

If your organization belongs to a partner, a key with connections:read and connections:write can also request codes to embed WhatsApp linking in your own site (POST /v1/embed-sessions). See WAQR Embedded

Request
curl "https://api.waqr.app/v1/connections" \
  -H "Authorization: Bearer wq_live_…"

Scopes

  • connections:read View connections and the quota.
  • connections:write Create, rename, get the QR, log out and delete connections.
  • conversations:read View conversations and groups.
  • conversations:write Change status and mark as read.
  • messages:read Read messages, search and download attachments.
  • messages:send Send messages.
  • messages:manage Edit and delete for everyone messages from other members (your own go with messages:send).
  • groups:manage Manage groups: name, description, photo, members, admins, invite and leave.
  • leads:write Register leads from your website (POST /v1/leads) and trigger the WhatsApp welcome.
  • catalog:write Send the product catalog for the AI agent (used by the WordPress plugin).
  • integrations:manage View status, adjust, sync and disconnect Google Contacts.
  • usage:read Check your organization's usage.
  • contacts:read View and search contacts.
  • contacts:write Edit, merge and split contacts.
  • webhooks:read View endpoints, deliveries and event types.
  • webhooks:manage Create, change, rotate, test and replay (includes webhooks:read).

Conventions

Format
JSON with Content-Type: application/json, camelCase names, body up to 1 MB.
Ids
Type-prefixed: conn_, conv_, msg_, ct_, grp_, whk_, dlv_… An id from another organization returns 404.
Dates and phones
Dates in ISO 8601 UTC (2026-10-17T14:02:11Z). Phones in E.164 (+51987654321).
Pagination
Cursor-based: ?limit=…&cursor=… returns { data, nextCursor }. nextCursor is null on the last page.
Idempotency
Send Idempotency-Key on POSTs that create things. Same key and same request: same response (Idempotent-Replayed: true). Kept for 24 hours.
Versioning
The version is in the path (/v1). New fields are non-breaking: ignore the ones you do not know and tolerate new enum values.

Errors

Errors follow RFC 9457 (application/problem+json). Use code to decide what to do and keep requestId (also in the X-Request-Id header) if you contact us.

409 · application/problem+json
{
  "type": "https://docs.waqr.app/errors/connection-not-connected",
  "title": "La conexión no está activa",
  "status": 409,
  "code": "connection_not_connected",
  "detail": "La conexión debe estar en estado 'connected' para enviar mensajes.",
  "requestId": "req_01JA2F3G4H"
}
  • 400

    idempotency_key_required · invalid_cursor · api_key_in_query

    The request is malformed.

  • 401

    credential_invalid · wrong_environment

    Key missing, revoked, expired or from another environment.

  • 403

    insufficient_scope · api_key_not_allowed

    A scope is missing (requiredScopes, missingScopes) or the route is dashboard-only.

  • 404

    not_found

    It does not exist or belongs to another organization.

  • 409

    connection_not_connected · connection_paused · group_chats_disabled · group_read_only · idempotency_in_progress

    The current state does not allow the operation.

  • 413

    payload_too_large

    The body exceeds 1 MB.

  • 422

    validation_failed · idempotency_key_reused · connection_offline · engine_unsupported · mentions_unsupported

    Invalid data (with fieldErrors), a key reused with a different body, a connection that is not connected or a feature the connection's engine doesn't support.

  • 429

    rate_limited

    You hit a limit: wait as long as Retry-After says.

  • 502

    group_action_failed

    WhatsApp rejected a group action (create, sync…).

  • 503

    messaging_disabled

    The feature is not enabled on the platform yet.

Limits

There are limits per key and per organization, depending on your plan, plus specific limits on some routes (creating connections, requesting QRs, search and, once enabled, sending).

  • Every response includes RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset.
  • When you hit a limit you get 429 with Retry-After in seconds: retry later, with increasing backoff.
  • Sending will have anti-spam limits per connection, per organization and for new conversations. There is no bulk sending.
Headers
HTTP/1.1 200 OK
RateLimit-Limit: …
RateLimit-Remaining: …
RateLimit-Reset: …
X-Request-Id: req_01JA2F3G4H

HTTP/1.1 429 Too Many Requests
Retry-After: 12
Content-Type: application/problem+json

Webhooks

WAQR sends a POST to your endpoint for every event, signed per Standard Webhooks v1. The body carries ids and metadata, never message text or secrets: you fetch content from the API with your key.

A delivery
POST /webhooks/waqr HTTP/1.1
Host: tu-sistema.example
Content-Type: application/json
User-Agent: WAQR-Webhooks/1.0
webhook-id: evt_01JA2B7M3X
webhook-timestamp: 1792004400
webhook-signature: v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=
waqr-attempt: 1

{"type":"connection.disconnected","timestamp":"2026-10-14T19:00:00.000Z","data":{"organizationId":"org_01J9ZP7Y2H","connectionId":"conn_01J9ZQ4V8K","label":"Ventas","status":"logged_out","phoneE164":"+51987654321","reason":"logout_requested"}}
  1. 1 Use the raw body, without re-serializing the JSON.
  2. 2 Reject the delivery if webhook-timestamp is more than 5 minutes away from your clock.
  3. 3 Compute HMAC-SHA256 of "webhook-id.webhook-timestamp.body" with the secret (base64 after whsec_) and compare in constant time against every signature in webhook-signature.
  4. 4 Deduplicate by webhook-id: delivery is at-least-once and repeats on retries and replays.
  5. 5 Answer 2xx fast and process later. Any Standard Webhooks library also works (standardwebhooks on npm or PyPI).
Verification in Node.js (no dependencies)
import { createHmac, timingSafeEqual } from "node:crypto";

export function verifyWaqrWebhook(secret, headers, rawBody, toleranceSeconds = 300) {
  const id = headers["webhook-id"];
  const timestamp = Number(headers["webhook-timestamp"]);
  const signatures = String(headers["webhook-signature"] ?? "").split(" ");
  if (!id || !Number.isInteger(timestamp)) return false;
  if (Math.abs(Date.now() / 1000 - timestamp) > toleranceSeconds) return false;
  const key = Buffer.from(secret.replace(/^whsec_/, ""), "base64");
  const expected = createHmac("sha256", key).update(`${id}.${timestamp}.${rawBody}`).digest();
  return signatures.some((entry) => {
    const [version, value] = entry.split(",");
    if (version !== "v1" || !value) return false;
    const given = Buffer.from(value, "base64");
    return given.length === expected.length && timingSafeEqual(given, expected);
  });
}

// Express: lee el cuerpo crudo, verifica, responde rápido y procesa después.
app.post("/webhooks/waqr", express.raw({ type: "application/json" }), (req, res) => {
  if (!verifyWaqrWebhook(process.env.WAQR_WEBHOOK_SECRET, req.headers, req.body.toString("utf8"))) {
    return res.sendStatus(401);
  }
  res.sendStatus(204); // y encola el evento, deduplicando por req.headers["webhook-id"]
});

Retries and disabling

  • Any non-2xx response (including 3xx or a 15 s timeout) is retried: immediately, then after 5 s, 5 min, 30 min, 2 h, 5 h, 10 h, 14 h, 20 h and 24 h. Once exhausted, the delivery is marked exhausted and can only be replayed manually.
  • A 410 disables the endpoint, as does a long streak of failures with no success. Re-enable it from the dashboard or with PATCH { "status": "active" }.
  • HTTPS on port 443 only, no redirects; private addresses are blocked.

Events

Subscribe to the ones you need or to all with ["*"]. Ignore types you do not know: the catalog grows.

Connections

  • connection.created

    A connection was created.

  • connection.updated

    Its name or a setting changed (fields).

  • connection.connected

    The number was linked.

  • connection.disconnected

    The session was closed or WhatsApp disconnected it (reason).

  • connection.qr_updated

    There is a new QR: request it with GET …/qr (the image never travels in the webhook).

  • connection.deleted

    The connection was deleted.

  • connection.paused / .resumed

    The account paused or resumed the connection (pausedReason).

Messages and conversations

  • message.received

    A message arrived. Includes text: the text or the photo, video or document caption (up to 4096 characters; null if none).

  • message.sent

    A message went out, from WAQR or from the phone (origin: waqr or device), with text as in message.received.

  • message.status_updated

    Receipt for an outbound message: delivered, read, played…

  • message.failed

    A WAQR send did not go out (reason).

  • message.edited / .deleted

    It was edited or deleted for everyone.

  • conversation.created

    First conversation with a contact or group on a connection.

  • media.ready

    An attachment is ready to download.

Contacts

  • contact.created

    New contact because they wrote or were written to.

  • contact.updated

    Their name or a field changed (fields, source).

  • contact.merged / .unmerged

    Two contacts were merged or split.

Groups

  • group.observed

    First message or event of a group.

  • group.updated

    The subject, description or other data changed.

  • group.participant_*

    Someone joined, left, was promoted or demoted.

Other

  • member.* / invitation.*

    Changes to the account's team.

  • webhook.test

    Test event sent from the dashboard or the API.

Connections

8 endpoints

Each connection is a WhatsApp number linked to your account by scanning a QR. You can create them, request the QR, rename them, log them out and delete them.

Each connection carries engine: evolution (QR) or waba, Meta's official engine (coming soon), which is signed up with the business's Facebook account and adds the waba block. See official WhatsApp (Meta)

GET /connections List connections
Scope: connections:read

Returns the connections of the key's organization (deleted ones are not listed). status can be pending_qr, connecting, connected, disconnected, logged_out, banned or paused. engine says how it is linked: evolution (QR) or waba (official, Meta).

Request
curl "https://api.waqr.app/v1/connections" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "connections": [
    {
      "id": "conn_01J9ZQ4V8K",
      "label": "Ventas",
      "engine": "evolution",
      "status": "connected",
      "phoneE164": "+51987654321",
      "connectedAt": "2026-10-12T20:15:00Z",
      "lastSeenAt": "2026-10-17T14:02:11Z",
      "disconnectedAt": null,
      "pausedReason": null,
      "pausedAt": null,
      "groupChatsEnabled": false,
      "groupChatsActive": false,
      "createdAt": "2026-10-12T20:11:42Z",
      "updatedAt": "2026-10-17T14:02:11Z"
    }
  ]
}
GET /connections/quota Get the quota
Scope: connections:read

How many connections your plan allows, how many you use (paused ones count) and how many are left.

Request
curl "https://api.waqr.app/v1/connections/quota" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "quota": 2,
  "used": 1,
  "available": 1
}
POST /connections Create a connection
Scope: connections:write

Creates a connection in pending_qr status. Then request the QR and scan it from WhatsApp on the phone (Linked devices).

Parameters

  • Idempotency-Key header · string required

    8 to 255 visible characters (a UUID works). Retrying with the same key returns the same response without repeating the operation.

  • label body · string required

    Internal name for the connection, e.g. "Sales".

Request
curl -X POST "https://api.waqr.app/v1/connections" \
  -H "Authorization: Bearer wq_live_…" \
  -H "Idempotency-Key: 6c4e2a8e-1f0b-4c1e-9f7a-0b1c2d3e4f50" \
  -H "Content-Type: application/json" \
  -d '{"label":"Ventas"}'
Response · 201 Created
{
  "connection": {
    "id": "conn_01J9ZQ4V8K",
    "label": "Ventas",
    "engine": "evolution",
    "status": "pending_qr",
    "phoneE164": null,
    "connectedAt": null,
    "lastSeenAt": null,
    "disconnectedAt": null,
    "pausedReason": null,
    "pausedAt": null,
    "groupChatsEnabled": false,
    "groupChatsActive": false,
    "createdAt": "2026-10-12T20:11:42Z",
    "updatedAt": "2026-10-17T14:02:11Z"
  }
}

402 connection_quota_exceeded (with quota and used) if you have no free connections; 409 organization_suspended; 429 if you create too many in a short time.

GET /connections/{id} Get a connection
Scope: connections:read

Current state of a connection. An id from another organization or a deleted one returns 404.

Parameters

  • id path · string required

    Connection id (conn_…).

Request
curl "https://api.waqr.app/v1/connections/conn_01J9ZQ4V8K" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "connection": {
    "id": "conn_01J9ZQ4V8K",
    "label": "Ventas",
    "engine": "evolution",
    "status": "connected",
    "phoneE164": "+51987654321",
    "connectedAt": "2026-10-12T20:15:00Z",
    "lastSeenAt": "2026-10-17T14:02:11Z",
    "disconnectedAt": null,
    "pausedReason": null,
    "pausedAt": null,
    "groupChatsEnabled": false,
    "groupChatsActive": false,
    "createdAt": "2026-10-12T20:11:42Z",
    "updatedAt": "2026-10-17T14:02:11Z"
  }
}
PATCH /connections/{id} Update a connection
Scope: connections:write

Renames the connection or turns on group chats for it.

Parameters

  • id path · string required

    Connection id (conn_…).

  • label body · string

    New name.

  • groupChatsEnabled body · boolean

    Turns group chats on or off for this connection.

Request
curl -X PATCH "https://api.waqr.app/v1/connections/conn_01J9ZQ4V8K" \
  -H "Authorization: Bearer wq_live_…" \
  -H "Content-Type: application/json" \
  -d '{"label":"Ventas Lima"}'
Response · 200 OK
{
  "connection": {
    "id": "conn_01J9ZQ4V8K",
    "label": "Ventas Lima",
    "engine": "evolution",
    "status": "connected",
    "phoneE164": "+51987654321",
    "connectedAt": "2026-10-12T20:15:00Z",
    "lastSeenAt": "2026-10-17T14:02:11Z",
    "disconnectedAt": null,
    "pausedReason": null,
    "pausedAt": null,
    "groupChatsEnabled": false,
    "groupChatsActive": false,
    "createdAt": "2026-10-12T20:11:42Z",
    "updatedAt": "2026-10-17T14:02:11Z"
  }
}

409 group_chats_disabled if you try to turn groups on while they are off platform-wide.

GET /connections/{id}/qr Get the QR
Scope: connections:write

Returns the QR to link the number (PNG image as a data URL), valid for about 60 seconds (expiresAt). Request it again when it expires or when you receive the connection.qr_updated webhook. If already connected, qr is null.

Parameters

  • id path · string required

    Connection id (conn_…).

Request
curl "https://api.waqr.app/v1/connections/conn_01J9ZQ4V8K/qr" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "qr": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA…",
  "expiresAt": "2026-10-17T15:01:00Z",
  "status": "pending_qr"
}

409 connection_paused (with pausedReason) if the connection is paused by the account; 503 if the connection service does not respond.

POST /connections/{id}/logout Log out
Scope: connections:write

Closes the WhatsApp session without deleting the connection or its history. It becomes logged_out and can be scanned again.

Parameters

  • id path · string required

    Connection id (conn_…).

Request
curl -X POST "https://api.waqr.app/v1/connections/conn_01J9ZQ4V8K/logout" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "connection": {
    "id": "conn_01J9ZQ4V8K",
    "label": "Ventas",
    "engine": "evolution",
    "status": "logged_out",
    "phoneE164": "+51987654321",
    "connectedAt": "2026-10-12T20:15:00Z",
    "lastSeenAt": "2026-10-17T14:02:11Z",
    "disconnectedAt": "2026-10-17T15:05:00Z",
    "pausedReason": null,
    "pausedAt": null,
    "groupChatsEnabled": false,
    "groupChatsActive": false,
    "createdAt": "2026-10-12T20:11:42Z",
    "updatedAt": "2026-10-17T14:02:11Z"
  }
}
DELETE /connections/{id} Delete a connection
Scope: connections:write

Logs out and deletes the connection. Frees its place in the quota.

Parameters

  • id path · string required

    Connection id (conn_…).

Request
curl -X DELETE "https://api.waqr.app/v1/connections/conn_01J9ZQ4V8K" \
  -H "Authorization: Bearer wq_live_…"
204 No Content · No response body.

Conversations

4 endpoints

One conversation per contact or group and per connection, sorted by latest message. Reading them does not send read receipts to WhatsApp.

GET /conversations List conversations
Scope: conversations:read

The organization's conversations, newest first, with filters and cursor pagination.

Parameters

  • connectionId query · string

    Only those for that connection (conn_…).

  • kind query · direct | group

    One-to-one or group.

  • status query · open | closed | archived

    Conversation status.

  • unread query · boolean

    Only with (or without) unread messages.

  • limit query · integer

    Results per page (default 30).

  • cursor query · string

    Opaque cursor returned in nextCursor to fetch the next page.

Request
curl "https://api.waqr.app/v1/conversations?connectionId=conn_01J9ZQ4V8K&status=open&limit=30" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "data": [
    {
      "id": "conv_01J9ZQ3T7A",
      "connectionId": "conn_01J9ZQ4V8K",
      "kind": "direct",
      "status": "open",
      "unreadCount": 2,
      "lastMessageAt": "2026-10-17T14:02:11Z",
      "lastMessage": {
        "id": "msg_01JA2B7KQ9",
        "preview": "Hola, ¿tienen envío a Arequipa?",
        "direction": "inbound"
      },
      "lastReadAt": "2026-10-17T13:40:02Z",
      "assignedUserId": null,
      "contact": {
        "id": "ct_01J9ZR0M4P",
        "displayName": "María Torres",
        "displayNameSource": "wa_profile",
        "phoneE164": "+51912345678"
      },
      "group": null,
      "createdAt": "2026-10-15T09:12:30Z",
      "updatedAt": "2026-10-17T14:02:11Z"
    }
  ],
  "nextCursor": "eyJ0IjoiMjAyNi0xMC0xN1QxNDowMjoxMVoifQ"
}
GET /conversations/{id} Get a conversation
Scope: conversations:read

Detail of a conversation with its contact (or group) and latest message.

Parameters

  • id path · string required

    Conversation id (conv_…).

Request
curl "https://api.waqr.app/v1/conversations/conv_01J9ZQ3T7A" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "conversation": {
    "id": "conv_01J9ZQ3T7A",
    "connectionId": "conn_01J9ZQ4V8K",
    "kind": "direct",
    "status": "open",
    "unreadCount": 2,
    "lastMessageAt": "2026-10-17T14:02:11Z",
    "lastMessage": {
      "id": "msg_01JA2B7KQ9",
      "preview": "Hola, ¿tienen envío a Arequipa?",
      "direction": "inbound"
    },
    "lastReadAt": "2026-10-17T13:40:02Z",
    "assignedUserId": null,
    "contact": {
      "id": "ct_01J9ZR0M4P",
      "displayName": "María Torres",
      "displayNameSource": "wa_profile",
      "phoneE164": "+51912345678"
    },
    "group": null,
    "createdAt": "2026-10-15T09:12:30Z",
    "updatedAt": "2026-10-17T14:02:11Z"
  }
}
PATCH /conversations/{id} Change the status
Scope: conversations:write

Opens, closes or archives a conversation.

Parameters

  • id path · string required

    Conversation id (conv_…).

  • status body · open | closed | archived required

    New status.

Request
curl -X PATCH "https://api.waqr.app/v1/conversations/conv_01J9ZQ3T7A" \
  -H "Authorization: Bearer wq_live_…" \
  -H "Content-Type: application/json" \
  -d '{"status":"closed"}'
Response · 200 OK
{
  "conversation": {
    "id": "conv_01J9ZQ3T7A",
    "connectionId": "conn_01J9ZQ4V8K",
    "kind": "direct",
    "status": "closed",
    "unreadCount": 2,
    "lastMessageAt": "2026-10-17T14:02:11Z",
    "lastMessage": {
      "id": "msg_01JA2B7KQ9",
      "preview": "Hola, ¿tienen envío a Arequipa?",
      "direction": "inbound"
    },
    "lastReadAt": "2026-10-17T13:40:02Z",
    "assignedUserId": null,
    "contact": {
      "id": "ct_01J9ZR0M4P",
      "displayName": "María Torres",
      "displayNameSource": "wa_profile",
      "phoneE164": "+51912345678"
    },
    "group": null,
    "createdAt": "2026-10-15T09:12:30Z",
    "updatedAt": "2026-10-17T14:02:11Z"
  }
}
POST /conversations/{id}/read Mark as read
Scope: conversations:write

Sets unreadCount to 0 in WAQR. It does not send the read receipt (blue ticks) to WhatsApp.

Parameters

  • id path · string required

    Conversation id (conv_…).

Request
curl -X POST "https://api.waqr.app/v1/conversations/conv_01J9ZQ3T7A/read" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "conversation": {
    "id": "conv_01J9ZQ3T7A",
    "connectionId": "conn_01J9ZQ4V8K",
    "kind": "direct",
    "status": "open",
    "unreadCount": 0,
    "lastMessageAt": "2026-10-17T14:02:11Z",
    "lastMessage": {
      "id": "msg_01JA2B7KQ9",
      "preview": "Hola, ¿tienen envío a Arequipa?",
      "direction": "inbound"
    },
    "lastReadAt": "2026-10-17T15:10:00Z",
    "assignedUserId": null,
    "contact": {
      "id": "ct_01J9ZR0M4P",
      "displayName": "María Torres",
      "displayNameSource": "wa_profile",
      "phoneE164": "+51912345678"
    },
    "group": null,
    "createdAt": "2026-10-15T09:12:30Z",
    "updatedAt": "2026-10-17T14:02:11Z"
  }
}

Messages

5 endpoints

History of each conversation and status of each message, plus sending messages: one recipient per request, with a required Idempotency-Key and anti-spam limits per connection and per organization.

On Meta's official connections (waba, coming soon) the 24-hour window applies: outside it, POST /v1/messages accepts template instead of text. 24-hour window and templates

GET /conversations/{id}/messages List messages
Scope: messages:read

Messages in a conversation, newest first. type can be text, image, audio, video, document, sticker, location, contact, reaction, system…

Parameters

  • id path · string required

    Conversation id (conv_…).

  • limit query · integer

    Results per page (default 50, max 100).

  • cursor query · string

    Opaque cursor returned in nextCursor to fetch the next page.

Request
curl "https://api.waqr.app/v1/conversations/conv_01J9ZQ3T7A/messages?limit=50" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "data": [
    {
      "id": "msg_01JA2B7KQ9",
      "conversationId": "conv_01J9ZQ3T7A",
      "connectionId": "conn_01J9ZQ4V8K",
      "conversationType": "direct",
      "direction": "inbound",
      "type": "text",
      "body": "Hola, ¿tienen envío a Arequipa?",
      "status": "received",
      "sender": {
        "kind": "contact",
        "contactId": "ct_01J9ZR0M4P",
        "jid": "51912345678@s.whatsapp.net",
        "altJid": null,
        "displayName": "María Torres"
      },
      "quoted": null,
      "attachments": [],
      "sentAt": "2026-10-17T14:02:11Z",
      "editedAt": null,
      "deletedAt": null
    }
  ],
  "nextCursor": null
}
GET /messages/{id} Get a message
Scope: messages:read

A message with its current status: received (inbound) or pending → sent → delivered → read (played for audio), or failed with failureReason. body is null if it was deleted for everyone.

Parameters

  • id path · string required

    Message id (msg_…).

Request
curl "https://api.waqr.app/v1/messages/msg_01JA2B7KQ9" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "message": {
    "id": "msg_01JA2B7KQ9",
    "conversationId": "conv_01J9ZQ3T7A",
    "connectionId": "conn_01J9ZQ4V8K",
    "conversationType": "direct",
    "direction": "inbound",
    "type": "text",
    "body": "Hola, ¿tienen envío a Arequipa?",
    "status": "received",
    "sender": {
      "kind": "contact",
      "contactId": "ct_01J9ZR0M4P",
      "jid": "51912345678@s.whatsapp.net",
      "altJid": null,
      "displayName": "María Torres"
    },
    "quoted": null,
    "attachments": [],
    "sentAt": "2026-10-17T14:02:11Z",
    "editedAt": null,
    "deletedAt": null
  }
}
POST /messages Send a text message
Scope: messages:send

Sends text to a number (E.164) or a contact from a connection. Reuses the 1:1 conversation or creates it. The response comes with status: "pending"; the rest of the lifecycle arrives via webhooks (message.sent, message.status_updated, message.failed). A message that cannot go out within 15 minutes fails as expired: a stale message is never delivered.

Parameters

  • Idempotency-Key header · string required

    8 to 255 visible characters (a UUID works). Retrying with the same key returns the same response without repeating the operation.

  • connectionId body · string required

    Connection to send from (conn_…).

  • to body · string

    Number in E.164, e.g. +51987654321. Use to or contactId, not both.

  • contactId body · string

    Contact (ct_…); also works for contacts without a known number.

  • text body · string required

    Up to 4096 characters; cannot be empty.

Request
curl -X POST "https://api.waqr.app/v1/messages" \
  -H "Authorization: Bearer wq_live_…" \
  -H "Idempotency-Key: 6c4e2a8e-1f0b-4c1e-9f7a-0b1c2d3e4f50" \
  -H "Content-Type: application/json" \
  -d '{"connectionId":"conn_01J9ZQ4V8K","to":"+51912345678","text":"Hola, tu pedido está listo."}'
Response · 202 Accepted
{
  "message": {
    "id": "msg_01JA2C1F3D",
    "conversationId": "conv_01J9ZQ3T7A",
    "connectionId": "conn_01J9ZQ4V8K",
    "conversationType": "direct",
    "direction": "outbound",
    "type": "text",
    "body": "Hola, tu pedido está listo.",
    "status": "pending",
    "sender": {
      "kind": "connection",
      "jid": "51987654321@s.whatsapp.net",
      "origin": "waqr"
    },
    "quoted": null,
    "attachments": [],
    "sentAt": "2026-10-17T15:00:00Z",
    "editedAt": null,
    "deletedAt": null
  }
}

Errors: 400 idempotency_key_required, 409 connection_not_connected, 409 connection_paused, 422 validation_failed, 429 rate_limited (limits per connection, per organization and for new conversations) and, while sending is off, 503 messaging_disabled.

On a waba connection (coming soon): 422 waba_window_closed if more than 24 hours have passed since the contact's last message; then send template instead of text (see "Official WhatsApp (Meta)").

POST /conversations/{id}/messages Reply in a conversation
Scope: messages:send

Same as above, but inside an existing conversation: no need to give a connection or recipient.

Parameters

  • Idempotency-Key header · string required

    8 to 255 visible characters (a UUID works). Retrying with the same key returns the same response without repeating the operation.

  • id path · string required

    Conversation id (conv_…).

  • text body · string required

    Up to 4096 characters.

  • mentions body · string[]

    Groups only: phones (E.164) of participants to mention; the text must include @<number without +>.

  • mentionAll body · boolean

    Groups only: true mentions everyone.

Request
curl -X POST "https://api.waqr.app/v1/conversations/conv_01J9ZQ3T7A/messages" \
  -H "Authorization: Bearer wq_live_…" \
  -H "Idempotency-Key: 6c4e2a8e-1f0b-4c1e-9f7a-0b1c2d3e4f50" \
  -H "Content-Type: application/json" \
  -d '{"text":"Sí, enviamos a todo el Perú."}'
Response · 202 Accepted
{
  "message": {
    "id": "msg_01JA2C1F3D",
    "conversationId": "conv_01J9ZQ3T7A",
    "connectionId": "conn_01J9ZQ4V8K",
    "conversationType": "direct",
    "direction": "outbound",
    "type": "text",
    "body": "Sí, enviamos a todo el Perú.",
    "status": "pending",
    "sender": {
      "kind": "connection",
      "jid": "51987654321@s.whatsapp.net",
      "origin": "waqr"
    },
    "quoted": null,
    "attachments": [],
    "sentAt": "2026-10-17T15:00:00Z",
    "editedAt": null,
    "deletedAt": null
  }
}

409 conversation_read_only in a group the connection has left. Mentions in a 1:1 conversation or on an official connection return 422 mentions_unsupported.

GET /messages/{id}/attachments/{attachmentId} Download an attachment
Scope: messages:read

Redirects (302) to a short-lived signed URL to download the file. With redirect=false it returns the URL as JSON. Do not store the URL: request a new one when needed.

Parameters

  • id path · string required

    Message id (msg_…).

  • attachmentId path · string required

    Attachment id (att_…).

  • redirect query · boolean

    false to get JSON instead of the redirect.

Request
curl "https://api.waqr.app/v1/messages/msg_01JA2B7KQ9/attachments/att_01JA2B7N8F?redirect=false" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "attachment": {
    "url": "https://…",
    "expiresAt": "2026-10-17T15:05:00Z",
    "mimeType": "image/jpeg",
    "fileName": "foto.jpg",
    "sizeBytes": 182340,
    "sha256": "9f2c…"
  }
}

409 attachment_not_ready (with attachmentStatus) if the file is not available yet.

Contacts

5 endpoints

A contact is a person, unique in your organization even if they talk to several of your numbers. It can have several WhatsApp identities (number wa_pn or identifier wa_lid). WAQR never makes up names: without a name, the number is shown.

GET /contacts List and search contacts
Scope: contacts:read

Paginated list of contacts. With q it searches by name (typo-tolerant) or by number digits and returns the best matches without a cursor.

Parameters

  • q query · string

    Text or digits to search for.

  • createdVia query · string

    Contact origin, e.g. inbound_message or group_message.

  • limit query · integer

    Results per page (default 30).

  • cursor query · string

    Opaque cursor returned in nextCursor to fetch the next page.

Request
curl "https://api.waqr.app/v1/contacts?q=maria" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "data": [
    {
      "id": "ct_01J9ZR0M4P",
      "displayName": "María Torres",
      "displayNameSource": "wa_profile",
      "phoneE164": "+51912345678",
      "givenName": null,
      "familyName": null,
      "company": null,
      "notes": null,
      "createdVia": "inbound_message",
      "lastInteractionAt": "2026-10-17T14:02:11Z"
    }
  ],
  "nextCursor": null
}
GET /contacts/{id} Get a contact
Scope: contacts:read

Full record: identities, observed names and their source, conversations, groups and merges. If the contact was merged into another, it returns the survivor with mergedFrom.

Parameters

  • id path · string required

    Contact id (ct_…).

Request
curl "https://api.waqr.app/v1/contacts/ct_01J9ZR0M4P" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "contact": {
    "id": "ct_01J9ZR0M4P",
    "displayName": "María Torres",
    "displayNameSource": "wa_profile",
    "phoneE164": "+51912345678",
    "givenName": null,
    "familyName": null,
    "company": null,
    "notes": null,
    "createdVia": "inbound_message",
    "lastInteractionAt": "2026-10-17T14:02:11Z",
    "userEditedAt": null,
    "createdAt": "2026-10-15T09:12:30Z",
    "updatedAt": "2026-10-17T14:02:11Z",
    "merges": [],
    "externalLinks": [],
    "identities": [
      {
        "id": "cid_01J9ZR0M5Q",
        "kind": "wa_pn",
        "value": "+51912345678",
        "jid": "51912345678@s.whatsapp.net",
        "firstSeenAt": "2026-10-15T09:12:30Z",
        "lastSeenAt": "2026-10-17T14:02:11Z"
      }
    ],
    "nameObservations": [
      {
        "source": "wa_profile",
        "value": "María Torres",
        "confidence": "high",
        "timesSeen": 4,
        "connectionId": "conn_01J9ZQ4V8K",
        "firstSeenAt": "2026-10-15T09:12:30Z",
        "observedAt": "2026-10-17T14:02:11Z"
      }
    ],
    "conversations": [
      {
        "id": "conv_01J9ZQ3T7A",
        "connectionId": "conn_01J9ZQ4V8K",
        "status": "open",
        "unreadCount": 2,
        "lastMessageAt": "2026-10-17T14:02:11Z"
      }
    ],
    "groups": []
  }
}
PATCH /contacts/{id} Edit a contact
Scope: contacts:write

Changes the contact's data. A name edited by your team takes priority over the WhatsApp profile name. null clears the field.

Parameters

  • id path · string required

    Contact id (ct_…).

  • displayName body · string | null

    Display name.

  • givenName body · string | null

    Given name.

  • familyName body · string | null

    Family name.

  • company body · string | null

    Company.

  • notes body · string | null

    Internal notes.

Request
curl -X PATCH "https://api.waqr.app/v1/contacts/ct_01J9ZR0M4P" \
  -H "Authorization: Bearer wq_live_…" \
  -H "Content-Type: application/json" \
  -d '{"company":"Ferretería Sol","notes":"Prefiere entregas por la tarde"}'
Response · 200 OK
{
  "contact": {
    "id": "ct_01J9ZR0M4P",
    "displayName": "María Torres",
    "displayNameSource": "wa_profile",
    "phoneE164": "+51912345678",
    "givenName": null,
    "familyName": null,
    "company": "Ferretería Sol",
    "notes": "Prefiere entregas por la tarde",
    "createdVia": "inbound_message",
    "lastInteractionAt": "2026-10-17T14:02:11Z",
    "userEditedAt": "2026-10-17T15:20:00Z",
    "createdAt": "2026-10-15T09:12:30Z",
    "updatedAt": "2026-10-17T14:02:11Z",
    "merges": [],
    "externalLinks": [],
    "identities": [
      {
        "id": "cid_01J9ZR0M5Q",
        "kind": "wa_pn",
        "value": "+51912345678",
        "jid": "51912345678@s.whatsapp.net",
        "firstSeenAt": "2026-10-15T09:12:30Z",
        "lastSeenAt": "2026-10-17T14:02:11Z"
      }
    ],
    "nameObservations": [
      {
        "source": "wa_profile",
        "value": "María Torres",
        "confidence": "high",
        "timesSeen": 4,
        "connectionId": "conn_01J9ZQ4V8K",
        "firstSeenAt": "2026-10-15T09:12:30Z",
        "observedAt": "2026-10-17T14:02:11Z"
      }
    ],
    "conversations": [
      {
        "id": "conv_01J9ZQ3T7A",
        "connectionId": "conn_01J9ZQ4V8K",
        "status": "open",
        "unreadCount": 2,
        "lastMessageAt": "2026-10-17T14:02:11Z"
      }
    ],
    "groups": []
  }
}
POST /contacts/{id}/merge Merge two contacts
Scope: contacts:write

Joins the same person when they appear twice (for example, one record with the number and another with only the WhatsApp identifier). The contact in the path survives and absorbs the other's identities, names and conversations. Emits the contact.merged webhook.

Parameters

  • id path · string required

    Surviving contact id (ct_…).

  • contactId body · string required

    Contact to merge in (ct_…).

Request
curl -X POST "https://api.waqr.app/v1/contacts/ct_01J9ZR0M4P/merge" \
  -H "Authorization: Bearer wq_live_…" \
  -H "Content-Type: application/json" \
  -d '{"contactId":"ct_01JA0Z6W1R"}'
Response · 200 OK
{
  "merge": {
    "id": "cmg_01JA2D4H6K",
    "survivorId": "ct_01J9ZR0M4P",
    "mergedId": "ct_01JA0Z6W1R",
    "reason": "manual",
    "createdAt": "2026-10-17T15:25:00Z"
  },
  "contact": {
    "id": "ct_01J9ZR0M4P",
    "displayName": "María Torres",
    "displayNameSource": "wa_profile",
    "phoneE164": "+51912345678",
    "givenName": null,
    "familyName": null,
    "company": null,
    "notes": null,
    "createdVia": "inbound_message",
    "lastInteractionAt": "2026-10-17T14:02:11Z",
    "userEditedAt": null,
    "createdAt": "2026-10-15T09:12:30Z",
    "updatedAt": "2026-10-17T14:02:11Z",
    "merges": [
      {
        "id": "cmg_01JA2D4H6K",
        "mergedContactId": "ct_01JA0Z6W1R",
        "reason": "manual",
        "reversible": true,
        "createdAt": "2026-10-17T15:25:00Z"
      }
    ],
    "externalLinks": [],
    "identities": [
      {
        "id": "cid_01J9ZR0M5Q",
        "kind": "wa_pn",
        "value": "+51912345678",
        "jid": "51912345678@s.whatsapp.net",
        "firstSeenAt": "2026-10-15T09:12:30Z",
        "lastSeenAt": "2026-10-17T14:02:11Z"
      }
    ],
    "nameObservations": [
      {
        "source": "wa_profile",
        "value": "María Torres",
        "confidence": "high",
        "timesSeen": 4,
        "connectionId": "conn_01J9ZQ4V8K",
        "firstSeenAt": "2026-10-15T09:12:30Z",
        "observedAt": "2026-10-17T14:02:11Z"
      }
    ],
    "conversations": [
      {
        "id": "conv_01J9ZQ3T7A",
        "connectionId": "conn_01J9ZQ4V8K",
        "status": "open",
        "unreadCount": 2,
        "lastMessageAt": "2026-10-17T14:02:11Z"
      }
    ],
    "groups": []
  }
}

409 contacts_same if you try to merge a contact with itself.

POST /contacts/{id}/unmerge Undo a merge
Scope: contacts:write

Reverts a manual merge and restores the contact with its conversations and messages. Automatic merges by number and identifier in the same message cannot be undone (the next message would repeat them). Emits contact.unmerged.

Parameters

  • id path · string required

    Merged contact id (ct_…).

  • mergeId body · string

    Specific merge (cmg_…); without it, the latest active one is undone.

Request
curl -X POST "https://api.waqr.app/v1/contacts/ct_01JA0Z6W1R/unmerge" \
  -H "Authorization: Bearer wq_live_…" \
  -H "Content-Type: application/json" \
  -d '{}'
Response · 200 OK
{
  "merge": {
    "id": "cmg_01JA2D4H6K",
    "survivorId": "ct_01J9ZR0M4P",
    "restoredId": "ct_01JA0Z6W1R",
    "revertedAt": "2026-10-17T15:30:00Z"
  },
  "contact": {
    "id": "ct_01JA0Z6W1R",
    "displayName": "+51 912 345 678",
    "displayNameSource": "phone",
    "phoneE164": "+51912345678",
    "givenName": null,
    "familyName": null,
    "company": null,
    "notes": null,
    "createdVia": "inbound_message",
    "lastInteractionAt": "2026-10-17T14:02:11Z",
    "userEditedAt": null,
    "createdAt": "2026-10-15T09:12:30Z",
    "updatedAt": "2026-10-17T14:02:11Z",
    "merges": [],
    "externalLinks": [],
    "identities": [
      {
        "id": "cid_01J9ZR0M5Q",
        "kind": "wa_pn",
        "value": "+51912345678",
        "jid": "51912345678@s.whatsapp.net",
        "firstSeenAt": "2026-10-15T09:12:30Z",
        "lastSeenAt": "2026-10-17T14:02:11Z"
      }
    ],
    "nameObservations": [
      {
        "source": "wa_profile",
        "value": "María Torres",
        "confidence": "high",
        "timesSeen": 4,
        "connectionId": "conn_01J9ZQ4V8K",
        "firstSeenAt": "2026-10-15T09:12:30Z",
        "observedAt": "2026-10-17T14:02:11Z"
      }
    ],
    "conversations": [
      {
        "id": "conv_01J9ZQ3T7A",
        "connectionId": "conn_01J9ZQ4V8K",
        "status": "open",
        "unreadCount": 2,
        "lastMessageAt": "2026-10-17T14:02:11Z"
      }
    ],
    "groups": []
  }
}

409 merge_not_reversible with reason (protocol_evidence, already_reverted, survivor_changed…).

Groups

6 endpoints

The WhatsApp groups each connection sees, kept apart from contacts, with their participants. They are enabled per connection (groupChatsEnabled). With groups:manage you can create groups and fetch all of the number's groups; with messages:send, write to any group and mention its participants (QR connections only).

GET /groups List groups
Scope: conversations:read

Groups observed by your connections. status: observed, active, left (the connection left; read-only) or ignored.

Parameters

  • connectionId query · string

    Only those for that connection.

  • status query · string

    Filter by status.

  • jid query · string

    Find a group by its WhatsApp JID (1203…@g.us), exact match. A value that is not a group JID returns 422.

  • limit query · integer

    Results per page (default 30).

  • cursor query · string

    Opaque cursor returned in nextCursor to fetch the next page.

Request
curl "https://api.waqr.app/v1/groups?connectionId=conn_01J9ZQ4V8K" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "data": [
    {
      "id": "grp_01JA0K2N7S",
      "connectionId": "conn_01J9ZQ4V8K",
      "jid": "120363025246125486@g.us",
      "subject": "Pedidos mayoristas",
      "displayName": "Pedidos mayoristas",
      "description": null,
      "ownerJid": null,
      "createdAt": null,
      "sizeObserved": 12,
      "participantCount": 12,
      "announce": false,
      "restrict": false,
      "linkedParentJid": null,
      "status": "active",
      "readOnly": false,
      "conversationId": "conv_01JA0K2P1T",
      "firstSeenAt": "2026-10-16T10:00:00Z",
      "metadataFetchedAt": "2026-10-16T10:00:04Z",
      "leftAt": null
    }
  ],
  "nextCursor": null
}
GET /groups/{id} Get a group
Scope: conversations:read

Group data with its first active participants and a cursor for the rest.

Parameters

  • id path · string required

    Group id (grp_…).

Request
curl "https://api.waqr.app/v1/groups/grp_01JA0K2N7S" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "group": {
    "id": "grp_01JA0K2N7S",
    "connectionId": "conn_01J9ZQ4V8K",
    "jid": "120363025246125486@g.us",
    "subject": "Pedidos mayoristas",
    "displayName": "Pedidos mayoristas",
    "description": null,
    "ownerJid": null,
    "createdAt": null,
    "sizeObserved": 12,
    "participantCount": 12,
    "announce": false,
    "restrict": false,
    "linkedParentJid": null,
    "status": "active",
    "readOnly": false,
    "conversationId": "conv_01JA0K2P1T",
    "firstSeenAt": "2026-10-16T10:00:00Z",
    "metadataFetchedAt": "2026-10-16T10:00:04Z",
    "leftAt": null,
    "participants": [
      {
        "id": "gpt_01JA0K3B9C",
        "jid": "51912345678@s.whatsapp.net",
        "altJid": null,
        "role": "member",
        "displayName": "María Torres",
        "contact": {
          "id": "ct_01J9ZR0M4P",
          "displayName": "María Torres",
          "displayNameSource": "wa_profile",
          "phoneE164": "+51912345678"
        },
        "joinedAt": null,
        "leftAt": null,
        "lastSeenAt": "2026-10-17T11:20:00Z",
        "lastMessageAt": "2026-10-17T11:20:00Z"
      }
    ],
    "participantsNextCursor": null
  }
}
GET /groups/{id}/participants List participants
Scope: conversations:read

Group participants with their role (member, admin, superadmin) and their contact if any.

Parameters

  • id path · string required

    Group id (grp_…).

  • includeLeft query · boolean

    Include those who left.

  • limit query · integer

    Results per page (default 200).

  • cursor query · string

    Opaque cursor returned in nextCursor to fetch the next page.

Request
curl "https://api.waqr.app/v1/groups/grp_01JA0K2N7S/participants?includeLeft=true" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "data": [
    {
      "id": "gpt_01JA0K3B9C",
      "jid": "51912345678@s.whatsapp.net",
      "altJid": null,
      "role": "member",
      "displayName": "María Torres",
      "contact": {
        "id": "ct_01J9ZR0M4P",
        "displayName": "María Torres",
        "displayNameSource": "wa_profile",
        "phoneE164": "+51912345678"
      },
      "joinedAt": null,
      "leftAt": null,
      "lastSeenAt": "2026-10-17T11:20:00Z",
      "lastMessageAt": "2026-10-17T11:20:00Z"
    }
  ],
  "nextCursor": null
}
POST /groups Create a group
Scope: groups:manage

Creates a WhatsApp group from a QR connection with name, description, photo, participants and admins. The group's conversation is created at the same time: you can write right away. results tells, per phone, whether it joined and whether it is an admin; those who could not be added carry a reason: privacy (they don't allow being added: send them inviteLink), not_on_whatsapp, invalid_number or failed. Photo and admins are separate steps: if they fail, the group is still created.

Parameters

  • Idempotency-Key header · string required

    8 to 255 visible characters (a UUID works). Retrying with the same key returns the same response without repeating the operation.

  • connectionId body · string required

    QR connection that creates the group (conn_…).

  • subject body · string required

    Name, 1 to 100 characters.

  • description body · string

    Up to 2048 characters.

  • participants body · string[] required

    1 to 256 phones in E.164.

  • admins body · string[]

    Phones from participants that will be admins.

  • pictureUploadId body · string

    Image uploaded with POST /v1/media/uploads.

Request
curl -X POST "https://api.waqr.app/v1/groups" \
  -H "Authorization: Bearer wq_live_…" \
  -H "Idempotency-Key: 6c4e2a8e-1f0b-4c1e-9f7a-0b1c2d3e4f50" \
  -H "Content-Type: application/json" \
  -d '{"connectionId":"conn_01J9ZQ4V8K","subject":"Proyecto web - Ferretería","description":"Grupo del proyecto","participants":["+51987654321","+51912345678"],"admins":["+51912345678"]}'
Response · 201 Created
{
  "group": {
    "id": "grp_01JA0K2N7S",
    "connectionId": "conn_01J9ZQ4V8K",
    "jid": "120363025246125486@g.us",
    "subject": "Proyecto web - Ferretería",
    "displayName": "Proyecto web - Ferretería",
    "description": "Grupo del proyecto",
    "ownerJid": null,
    "createdAt": null,
    "sizeObserved": 12,
    "participantCount": 2,
    "announce": false,
    "restrict": false,
    "linkedParentJid": null,
    "status": "active",
    "readOnly": false,
    "conversationId": "conv_01JA0K2P1T",
    "firstSeenAt": "2026-10-16T10:00:00Z",
    "metadataFetchedAt": "2026-10-16T10:00:04Z",
    "leftAt": null
  },
  "results": [
    {
      "phone": "+51987654321",
      "ok": false,
      "reason": "privacy"
    },
    {
      "phone": "+51912345678",
      "ok": true,
      "admin": true
    }
  ],
  "picture": null,
  "inviteLink": "https://chat.whatsapp.com/AbCdEfGh123"
}

Errors: 422 engine_unsupported (Meta official connection), 422 connection_offline (with connectionStatus), 409 group_chats_disabled, 409 connection_paused, 502 group_action_failed if WhatsApp rejects the creation and 429 rate_limited (30 group actions every 10 minutes per connection). Retrying with the same Idempotency-Key and body returns the same response without creating another group.

POST /groups/{id}/messages Write to a group
Scope: messages:send

Sends a message to any group the connection is in, even if it has no conversation in WAQR yet (it is created with this message). Same body and response as "Reply in a conversation", with mentions. The group must appear in GET /v1/groups: to fetch all of the number's groups use "Sync groups".

Parameters

  • Idempotency-Key header · string required

    8 to 255 visible characters (a UUID works). Retrying with the same key returns the same response without repeating the operation.

  • id path · string required

    Group id (grp_…).

  • text body · string required

    Up to 4096 characters.

  • mentions body · string[]

    Up to 256 phones in E.164 that are participants. For WhatsApp to show it as a mention, the text must include @<number without +>.

  • mentionAll body · boolean

    true mentions every participant without writing them in the text.

Request
curl -X POST "https://api.waqr.app/v1/groups/grp_01JA0K2N7S/messages" \
  -H "Authorization: Bearer wq_live_…" \
  -H "Idempotency-Key: 6c4e2a8e-1f0b-4c1e-9f7a-0b1c2d3e4f50" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hola @51912345678, ya está el reporte.","mentions":["+51912345678"]}'
Response · 202 Accepted
{
  "message": {
    "id": "msg_01JA2C1F3D",
    "conversationId": "conv_01JA0K2P1T",
    "connectionId": "conn_01J9ZQ4V8K",
    "conversationType": "direct",
    "direction": "outbound",
    "type": "text",
    "body": "Hola @51912345678, ya está el reporte.",
    "status": "pending",
    "sender": {
      "kind": "connection",
      "jid": "51987654321@s.whatsapp.net",
      "origin": "waqr"
    },
    "quoted": null,
    "attachments": [],
    "sentAt": "2026-10-17T15:00:00Z",
    "editedAt": null,
    "deletedAt": null
  }
}

Errors: 409 group_read_only if the connection is no longer in the group, 422 connection_offline, 409 group_chats_disabled, 422 mentions_unsupported (Meta official connection) and 422 validation_failed if a number in mentions is not a participant.

POST /connections/{id}/groups/sync Sync groups
Scope: groups:manage

Fetches all of the number's groups from WhatsApp, with their participants, without waiting for activity. It also runs on its own when the connection connects or its group chats are enabled.

Parameters

  • id path · string required

    Connection id (conn_…).

Request
curl -X POST "https://api.waqr.app/v1/connections/conn_01J9ZQ4V8K/groups/sync" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "groups": 115,
  "created": 12,
  "updated": 103
}

Once every 10 minutes per connection: earlier it returns 429 rate_limited with Retry-After. QR connections only (422 engine_unsupported).

Website leads

3 endpoints

Register each visitor who leaves their phone on your website, with its context, and WAQR writes to them on WhatsApp with the welcome you set in the panel (text on QR connections, an approved template on official ones). It is what the WordPress plugin uses. WAQR doesn't repeat the welcome to the same number, applies a daily cap per connection, respects people who opted out and sends a single reminder if there is no reply.

POST /leads Register a lead
Scope: leads:write

Creates or updates the contact by phone, stores the lead with its context and decides the welcome on the server. Registration never fails because of the welcome: its result comes in welcome.status (queued, deduplicated, daily_cap, opted_out, not_connected, template_pending, disabled or skipped, with reason). "Queued" does not mean delivered: delivery shows in the conversation.

Parameters

  • Idempotency-Key header · string required

    Required.

  • connectionId body · string required

    The connection that writes to the visitor (conn_…).

  • phone body · string required

    Visitor's phone in E.164.

  • name body · string

    Visitor's name.

  • email body · string

    Visitor's email.

  • page body · string

    Page it came from.

  • product body · string

    Product it was viewing.

  • form body · string

    Form it filled in.

  • topic body · string

    Topic of the inquiry.

  • variant body · string

    Welcome to use: form, product or page (if missing, the one the context suggests).

  • consent body · object

    Consent the visitor accepted.

Request
curl -X POST "https://api.waqr.app/v1/leads" \
  -H "Authorization: Bearer wq_live_…" \
  -H "Idempotency-Key: 6c4e2a8e-1f0b-4c1e-9f7a-0b1c2d3e4f50" \
  -H "Content-Type: application/json" \
  -d '{"connectionId":"conn_01J9ZQ4V8K","phone":"+51912345678","name":"María Torres","page":"https://tutienda.com/zapatillas","product":"Zapatillas Run"}'
Response · 201 Created
{
  "lead": {
    "id": "lead_01JC4R8T2M",
    "contactId": "ct_01J9ZR0M4P",
    "conversationId": "conv_01J9ZQ3T7A"
  },
  "welcome": {
    "status": "queued"
  }
}
GET /leads List leads
Scope: contacts:read

Most recent leads first, with their context, the welcome status, whether they replied and the reminder. By default, the last 30 days.

Parameters

  • connectionId query · string

    Only those for that connection.

  • from query · string

    From (YYYY-MM-DD, UTC).

  • to query · string

    To, inclusive.

Request
curl "https://api.waqr.app/v1/leads?connectionId=conn_01J9ZQ4V8K" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "data": [
    {
      "id": "lead_01JC4R8T2M",
      "connectionId": "conn_01J9ZQ4V8K",
      "conversationId": "conv_01J9ZQ3T7A",
      "contact": {
        "id": "ct_01J9ZR0M4P",
        "name": "María Torres",
        "phone": "+51912345678",
        "email": null
      },
      "variant": "product",
      "page": "https://tutienda.com/zapatillas",
      "product": "Zapatillas Run",
      "welcome": {
        "status": "queued",
        "reason": null,
        "at": "2026-11-13T15:04:10Z"
      },
      "repliedAt": "2026-11-13T15:09:42Z",
      "followUp": {
        "status": null,
        "reason": null,
        "at": null
      },
      "createdAt": "2026-11-13T15:04:09Z"
    }
  ],
  "page": 1,
  "pageSize": 50,
  "total": 1
}
GET /leads/metrics Lead metrics
Scope: contacts:read

Leads, welcomes sent, replies, reply rate, median minutes until the lead replies and until your team's first reply, by variant, and opt-outs in the period.

Parameters

  • connectionId query · string

    Only that connection.

  • from query · string

    From.

  • to query · string

    To.

Request
curl "https://api.waqr.app/v1/leads/metrics" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "leads": 42,
  "welcomed": 39,
  "replied": 21,
  "replyRate": 0.54,
  "medianMinutesToReply": 6,
  "medianMinutesToHumanReply": 14,
  "optOuts": 1
}

Webhooks API

11 endpoints

Register the URLs that receive events, inspect each delivery and replay the ones that failed. Signing and retries are explained in the webhooks guide.

GET /webhooks/endpoints List endpoints
Scope: webhooks:read

The organization's endpoints with their status and health (never the secret).

Request
curl "https://api.waqr.app/v1/webhooks/endpoints" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "endpoints": [
    {
      "id": "whk_01JA1M8R2D",
      "url": "https://tu-sistema.example/webhooks/waqr",
      "description": "Producción",
      "events": [
        "connection.disconnected",
        "message.received"
      ],
      "status": "active",
      "apiVersion": "v1",
      "failureCount": 0,
      "failureSince": null,
      "lastSuccessAt": "2026-10-17T14:02:12Z",
      "lastFailureAt": null,
      "disabledAt": null,
      "disabledReason": null,
      "createdAt": "2026-10-14T18:30:00Z",
      "updatedAt": "2026-10-14T18:30:00Z"
    }
  ]
}
POST /webhooks/endpoints Create an endpoint
Scope: webhooks:manage

Registers an HTTPS URL (port 443) and the events you want, or ["*"] for all. The signing secret (whsec_…) is returned only in this response: store it on your server.

Parameters

  • url body · string required

    Public HTTPS URL. Private destinations are rejected.

  • events body · string[] required

    Event types from the catalog or ["*"].

  • description body · string

    A note to recognize it.

Request
curl -X POST "https://api.waqr.app/v1/webhooks/endpoints" \
  -H "Authorization: Bearer wq_live_…" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://tu-sistema.example/webhooks/waqr","events":["connection.disconnected","message.received"],"description":"Producción"}'
Response · 201 Created
{
  "endpoint": {
    "id": "whk_01JA1M8R2D",
    "url": "https://tu-sistema.example/webhooks/waqr",
    "description": "Producción",
    "events": [
      "connection.disconnected",
      "message.received"
    ],
    "status": "active",
    "apiVersion": "v1",
    "failureCount": 0,
    "failureSince": null,
    "lastSuccessAt": "2026-10-17T14:02:12Z",
    "lastFailureAt": null,
    "disabledAt": null,
    "disabledReason": null,
    "createdAt": "2026-10-14T18:30:00Z",
    "updatedAt": "2026-10-14T18:30:00Z"
  },
  "secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"
}

422 invalid URL; 409 conflict if the URL already exists; 409 webhook_endpoint_limit_reached.

GET /webhooks/endpoints/{id} Get an endpoint
Scope: webhooks:read

Status, subscribed events and health of an endpoint.

Parameters

  • id path · string required

    Endpoint id (whk_…).

Request
curl "https://api.waqr.app/v1/webhooks/endpoints/whk_01JA1M8R2D" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "endpoint": {
    "id": "whk_01JA1M8R2D",
    "url": "https://tu-sistema.example/webhooks/waqr",
    "description": "Producción",
    "events": [
      "connection.disconnected",
      "message.received"
    ],
    "status": "active",
    "apiVersion": "v1",
    "failureCount": 0,
    "failureSince": null,
    "lastSuccessAt": "2026-10-17T14:02:12Z",
    "lastFailureAt": null,
    "disabledAt": null,
    "disabledReason": null,
    "createdAt": "2026-10-14T18:30:00Z",
    "updatedAt": "2026-10-14T18:30:00Z"
  }
}
PATCH /webhooks/endpoints/{id} Update an endpoint
Scope: webhooks:manage

Changes URL, events or description. status: "active" reactivates an endpoint disabled by failures (the counter resets to 0).

Parameters

  • id path · string required

    Endpoint id (whk_…).

  • url body · string

    New URL.

  • events body · string[]

    New list of events.

  • description body · string

    New description.

  • status body · active | disabled

    Enables or disables the endpoint.

Request
curl -X PATCH "https://api.waqr.app/v1/webhooks/endpoints/whk_01JA1M8R2D" \
  -H "Authorization: Bearer wq_live_…" \
  -H "Content-Type: application/json" \
  -d '{"events":["*"]}'
Response · 200 OK
{
  "endpoint": {
    "id": "whk_01JA1M8R2D",
    "url": "https://tu-sistema.example/webhooks/waqr",
    "description": "Producción",
    "events": [
      "*"
    ],
    "status": "active",
    "apiVersion": "v1",
    "failureCount": 0,
    "failureSince": null,
    "lastSuccessAt": "2026-10-17T14:02:12Z",
    "lastFailureAt": null,
    "disabledAt": null,
    "disabledReason": null,
    "createdAt": "2026-10-14T18:30:00Z",
    "updatedAt": "2026-10-17T15:40:00Z"
  }
}
DELETE /webhooks/endpoints/{id} Delete an endpoint
Scope: webhooks:manage

Deletes the endpoint. Pending deliveries are canceled and the history is kept.

Parameters

  • id path · string required

    Endpoint id (whk_…).

Request
curl -X DELETE "https://api.waqr.app/v1/webhooks/endpoints/whk_01JA1M8R2D" \
  -H "Authorization: Bearer wq_live_…"
204 No Content · No response body.
POST /webhooks/endpoints/{id}/rotate-secret Rotate the secret
Scope: webhooks:manage

Generates a new secret. For 24 hours every delivery carries two signatures (new and previous) so you can update your server without downtime.

Parameters

  • id path · string required

    Endpoint id (whk_…).

Request
curl -X POST "https://api.waqr.app/v1/webhooks/endpoints/whk_01JA1M8R2D/rotate-secret" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "endpoint": {
    "id": "whk_01JA1M8R2D",
    "url": "https://tu-sistema.example/webhooks/waqr",
    "description": "Producción",
    "events": [
      "connection.disconnected",
      "message.received"
    ],
    "status": "active",
    "apiVersion": "v1",
    "failureCount": 0,
    "failureSince": null,
    "lastSuccessAt": "2026-10-17T14:02:12Z",
    "lastFailureAt": null,
    "disabledAt": null,
    "disabledReason": null,
    "createdAt": "2026-10-14T18:30:00Z",
    "updatedAt": "2026-10-14T18:30:00Z"
  },
  "secret": "whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD",
  "previousSecretExpiresAt": "2026-10-18T15:45:00Z"
}
POST /webhooks/endpoints/{id}/test Send a test event
Scope: webhooks:manage

Queues a webhook.test event for that endpoint only. Useful to check your signature verification.

Parameters

  • id path · string required

    Endpoint id (whk_…).

Request
curl -X POST "https://api.waqr.app/v1/webhooks/endpoints/whk_01JA1M8R2D/test" \
  -H "Authorization: Bearer wq_live_…"
Response · 202 Accepted
{
  "delivery": {
    "id": "dlv_01JA2E0A1B",
    "webhookId": "evt_01JA2B7M3X",
    "endpointId": "whk_01JA1M8R2D",
    "eventType": "webhook.test",
    "organizationId": "org_01J9ZP7Y2H",
    "state": "pending",
    "attempts": 0,
    "replays": 0,
    "lastStatusCode": null,
    "lastDurationMs": null,
    "lastError": null,
    "lastAttemptAt": null,
    "nextAttemptAt": null,
    "succeededAt": null,
    "createdAt": "2026-10-17T14:02:11Z"
  }
}

409 webhook_endpoint_disabled if the endpoint is disabled.

GET /webhooks/deliveries List deliveries
Scope: webhooks:read

Most recent deliveries first. state: pending, delivering, succeeded, failed (with nextAttemptAt), exhausted or canceled.

Parameters

  • endpointId query · string

    Only those for that endpoint.

  • state query · string

    Filter by state.

  • eventType query · string

    Filter by event type.

  • limit query · integer

    Results per page (default 50).

  • cursor query · string

    Opaque cursor returned in nextCursor to fetch the next page.

Request
curl "https://api.waqr.app/v1/webhooks/deliveries?endpointId=whk_01JA1M8R2D&state=failed" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "data": [
    {
      "id": "dlv_01JA2B7M4E",
      "webhookId": "evt_01JA2B7M3X",
      "endpointId": "whk_01JA1M8R2D",
      "eventType": "message.received",
      "organizationId": "org_01J9ZP7Y2H",
      "state": "succeeded",
      "attempts": 1,
      "replays": 0,
      "lastStatusCode": 204,
      "lastDurationMs": 182,
      "lastError": null,
      "lastAttemptAt": "2026-10-17T14:02:12Z",
      "nextAttemptAt": null,
      "succeededAt": "2026-10-17T14:02:12Z",
      "createdAt": "2026-10-17T14:02:11Z"
    }
  ],
  "nextCursor": null
}
GET /webhooks/deliveries/{id} Get a delivery
Scope: webhooks:read

Detail with every attempt: outcome, HTTP code, duration and error. Your server's response body is never stored.

Parameters

  • id path · string required

    Delivery id (dlv_…).

Request
curl "https://api.waqr.app/v1/webhooks/deliveries/dlv_01JA2B7M4E" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "delivery": {
    "id": "dlv_01JA2B7M4E",
    "webhookId": "evt_01JA2B7M3X",
    "endpointId": "whk_01JA1M8R2D",
    "eventType": "message.received",
    "organizationId": "org_01J9ZP7Y2H",
    "state": "succeeded",
    "attempts": 1,
    "replays": 0,
    "lastStatusCode": 204,
    "lastDurationMs": 182,
    "lastError": null,
    "lastAttemptAt": "2026-10-17T14:02:12Z",
    "nextAttemptAt": null,
    "succeededAt": "2026-10-17T14:02:12Z",
    "createdAt": "2026-10-17T14:02:11Z",
    "attemptLog": [
      {
        "attempt": 1,
        "outcome": "succeeded",
        "statusCode": 204,
        "durationMs": 182,
        "error": null,
        "nextAttemptAt": null,
        "at": "2026-10-17T14:02:12Z"
      }
    ]
  }
}
POST /webhooks/deliveries/{id}/replay Replay a delivery
Scope: webhooks:manage

Sends the same delivery again (same webhook-id, so you can deduplicate) with retries from scratch.

Parameters

  • id path · string required

    Delivery id (dlv_…).

Request
curl -X POST "https://api.waqr.app/v1/webhooks/deliveries/dlv_01JA2B7M4E/replay" \
  -H "Authorization: Bearer wq_live_…"
Response · 202 Accepted
{
  "delivery": {
    "id": "dlv_01JA2B7M4E",
    "webhookId": "evt_01JA2B7M3X",
    "endpointId": "whk_01JA1M8R2D",
    "eventType": "message.received",
    "organizationId": "org_01J9ZP7Y2H",
    "state": "pending",
    "attempts": 1,
    "replays": 1,
    "lastStatusCode": 204,
    "lastDurationMs": 182,
    "lastError": null,
    "lastAttemptAt": "2026-10-17T14:02:12Z",
    "nextAttemptAt": "2026-10-17T15:50:00Z",
    "succeededAt": "2026-10-17T14:02:12Z",
    "createdAt": "2026-10-17T14:02:11Z"
  }
}

409 if it is already queued or the endpoint is disabled.

GET /webhooks/event-types List event types
Scope: webhooks:read

Catalog of events you can subscribe to, with their description.

Request
curl "https://api.waqr.app/v1/webhooks/event-types" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "eventTypes": [
    {
      "type": "connection.disconnected",
      "description": "…"
    },
    {
      "type": "message.received",
      "description": "…"
    }
  ]
}

Second engine

Coming soon

Official WhatsApp (Meta)

Besides QR linking, WAQR adds a second engine: Meta's WhatsApp Cloud API. Each connection picks its engine when it is created (engine) and, from then on, everything works the same: the same routes, the same chats, contacts and metrics, the same signed webhooks. What changes are Meta's rules: signup with the business's Facebook account, the 24-hour window and approved templates.

engine "evolution" · "waba"

3 endpoints

WhatsApp Cloud API

Coming soon

The official engine is already designed and documented, but it is not switched on in the platform yet. Until then the dashboard does not offer the option and the routes in this section answer 404 waba_disabled. Nothing you see here will change when it is enabled: you can prepare your integration now.

QR or official: what changes

Both engines live in the same account and count the same toward your plan's connection quota. Pick per connection, according to what each number needs.

QR evolution

How it links
A QR is scanned from the phone (Linked devices), like WhatsApp Web.
Approval
None: it works in minutes.
Phone
The phone remains the primary device and must come online from time to time.
Writing first
Free, within WAQR's anti-spam limits.
Templates
Not applicable.
Risk
WhatsApp may sign the session out or block the number, especially with bulk sending.
Meta costs
None.
Groups
Yes (coming soon in WAQR).
In the WAQR API
Connections with QR and log out.

Official (Meta) waba

How it links
Meta's embedded signup: the business signs in with its Facebook account, picks or creates its WhatsApp Business account and number, and comes back with the connection created.
Approval
The account and display name are subject to Meta's reviews; verifying the business with Meta raises the messaging limits.
Phone
It does not depend on a phone being on: the number runs in Meta's cloud. With coexistence, the business also keeps using the WhatsApp Business app.
Writing first
Free-form messages only within 24 hours of the customer's last message; outside that window, only approved templates.
Templates
Yes: they are created in Meta's WhatsApp Manager and WAQR syncs and sends them.
Risk
Meta's policies apply: a quality rating and messaging limits per number; Meta may restrict it if quality drops.
Meta costs
Meta charges certain messages separately (templates, by category and country) to the business's WhatsApp Business account, which needs a payment method with Meta.
Groups
Not in this version.
In the WAQR API
The same routes, plus the waba block and templates; no QR or log out.

WAQR neither sets nor collects Meta's rates, and they change over time: we do not repeat them here. Official WhatsApp Business Platform pricing

Embedded signup

An official connection is not created with an API key: the business has to sign in with its own Facebook account and authorize access to its WhatsApp Business account. That step happens in the WAQR dashboard or inside your SaaS with WAQR Embedded, and ends with the connection created.

  1. 1 The person clicks "New connection" → "Official WhatsApp (Meta)". WAQR checks the connection quota before opening Meta and creates a single-use signup intent (wsi_…, 15 minutes).
  2. 2 A new window opens, within the click, at https://my.waqr.app/meta/signup: the only domain registered with Meta, also when signup starts in your SaaS. If the intent comes from a partner, the window carries its brand.
  3. 3 With "Continue with Facebook" the business signs in to Meta, picks or creates its business portfolio, its WhatsApp Business account and the number (verified by SMS or call), and accepts Meta's terms.
  4. 4 Meta returns a single-use code and the account and number ids to that window. WAQR redeems the code on its server for a business token (stored encrypted and never shown), subscribes the app to the account and registers the number on the Cloud API.
  5. 5 The connection is created with engine: "waba" and status: "connected" (default label "WhatsApp oficial"), the window notifies the page that opened it and closes, and the connection.created and connection.connected webhooks fire as with a QR. Templates sync in the background.
The full flow
WAQR dashboard or WAQR Embedded           my.waqr.app/meta/signup              Meta (facebook.com)
      │                                          │                                     │
      │ "New connection" → "Official WhatsApp (Meta)"                                  │
      │ 1. signup intent → api.waqr.app           (wsi_…, 15 min, single use; quota checked)
      │                                          │                                     │
      │ 2. new window, within the click ────────▶│                                     │
      │                                          │ 3. "Continue with Facebook" ───────▶│ signs in, picks or creates
      │                                          │                                     │ the business, the WhatsApp
      │                                          │                                     │ Business account and number
      │                                          │◀── code + waba_id + phone_number_id │
      │                                          │                                     │
      │                                          │ 4. complete → api.waqr.app: redeems the code server-side,
      │                                          │    subscribes the app, registers the number, creates the connection
      │                                          │
      │◀── 5. result (postMessage) and close ────│
      │
      └─ connection engine:"waba", status:"connected" → webhooks connection.created and connection.connected

Keep in mind

  • If the business cancels in Meta or closes the window, nothing is created and the intent expires on its own. A used, expired or unknown intent answers 400 waba_signup_invalid.
  • If Meta rejects a step, the window shows the reason (502 waba_signup_failed, with metaCode when Meta provides it). The intent is always spent: retrying opens a new one.
  • Before opening Meta, WAQR checks the quota (402 connection_quota_exceeded, same as with a QR), that the organization is active (409 organization_suspended) and the limit of 20 signups per hour per organization.
  • A number can only be in one live WAQR connection: repeating it answers 409 waba_phone_in_use.
  • If the number's registration stays pending at Meta, the connection is created as connecting with a lastError explaining what is missing; to retry, delete the connection and repeat the signup.
  • The business needs a payment method on its Meta WhatsApp Business account to send the messages Meta charges for.

Coexistence with the WhatsApp Business app

If the number is already used in the WhatsApp Business app on the phone, the person can tick "I already use WhatsApp Business on this number": Meta shares it with WAQR without migrating it, the number keeps working in the app and WAQR does not register it again. The connection shows it as waba.coexistence: true. It only appears when the platform has it available.

engine and the waba block

The connection object is the same everywhere (public API, dashboard, WAQR Embedded and partner API) and gains two additive fields. Existing connections are evolution. Your code keeps working if it ignores what it does not know.

New fields

  • engine evolution (QR) or waba (Meta's official one). Set when the connection is created; it never changes.
  • phoneE164 Also on waba: the WhatsApp Business account's number, in E.164.
  • lastError Readable reason when a connection is not operational (registration pending at Meta, access revoked: starts with waba_token_invalid…); null when all is well.
  • waba.wabaId Id of the WhatsApp Business account at Meta.
  • waba.phoneNumberId Id of the number on Meta's Cloud API.
  • waba.displayPhone The number as Meta displays it.
  • waba.verifiedName The business display name approved by Meta.
  • waba.qualityRating The number's quality rating according to Meta (GREEN, YELLOW, RED…).
  • waba.messagingLimitTier The number's messaging limit tier according to Meta (TIER_250, TIER_1K…).
  • waba.coexistence true if the number is also still used in the WhatsApp Business app.
GET /v1/connections/{id} · official connection
{
  "connection": {
    "id": "conn_01JB7W2D9K",
    "label": "Atención al cliente",
    "engine": "waba",
    "status": "connected",
    "phoneE164": "+51987654322",
    "connectedAt": "2026-10-24T16:20:05Z",
    "lastSeenAt": "2026-10-24T16:20:05Z",
    "disconnectedAt": null,
    "lastError": null,
    "pausedReason": null,
    "pausedAt": null,
    "groupChatsEnabled": false,
    "groupChatsActive": false,
    "waba": {
      "wabaId": "104398275631842",
      "phoneNumberId": "109876543210987",
      "displayPhone": "+51 987 654 322",
      "verifiedName": "Ferretería Lima",
      "qualityRating": "GREEN",
      "messagingLimitTier": "TIER_1K",
      "coexistence": false
    },
    "createdAt": "2026-10-24T16:20:05Z",
    "updatedAt": "2026-10-24T16:20:05Z"
  }
}

What changes in the connection routes

  • POST /v1/connections only creates QR connections. Official ones come from the embedded signup.
  • GET …/qr and POST …/logout on a waba connection (also in Embedded and the partner API) answer 409 not_supported_for_engine: there is no QR and no session to close. So does PATCH with groupChatsEnabled: true.
  • An account pause (trial or non-payment) on a waba connection only blocks sending: inbound messages keep arriving.
  • DELETE /v1/connections/{id} on a waba connection unsubscribes the WAQR app from the account, deletes the encrypted token and frees the quota. It does not deregister the number or touch anything in the business's Meta account.
  • No API object ever includes Meta tokens.

24-hour window

It is a Meta rule: a business can only send free-form messages (text, image, document, audio, video) within 24 hours of the last message the customer sent it. Every new customer message restarts the clock. Outside the window, you can only write with an approved template.

  • WAQR checks it before queueing the send: if the window is closed, POST /v1/messages and POST /v1/conversations/{id}/messages answer 422 waba_window_closed right away, without spending anything at Meta.
  • If Meta rejects it anyway (for example, because the window closed while the message was waiting), the message ends as failed and you receive message.failed.
  • The window is per conversation: what counts is the contact's last message in that conversation, and a new conversation starts closed. QR connections have no window.
  • Every conversation carries lastInboundAt and replyWindowExpiresAt (lastInboundAt + 24 h, or null): use them to know in advance whether you can send a free-form message. They only matter on waba connections.
422 · application/problem+json
{
  "type": "https://docs.waqr.app/errors/waba-window-closed",
  "title": "Ventana de 24 horas cerrada",
  "status": 422,
  "code": "waba_window_closed",
  "detail": "Han pasado más de 24 horas desde el último mensaje del cliente: envía una plantilla aprobada.",
  "requestId": "req_01JB7X4M2Q"
}

How to handle it

  • On waba_window_closed, retry the same content as a template (template), with a new Idempotency-Key.
  • For notices your system fires on its own (order ready, appointment reminder), use a UTILITY template directly.
  • The WAQR dashboard shows in each official chat until when you can reply and offers "Send template" when the window is closed.

Templates

3 endpoints

Templates are messages with fixed text and variables ({{1}}, {{2}}…) that Meta reviews and approves. They are created in Meta's WhatsApp Manager; WAQR syncs them so you can list and send them through its API.

  • Only APPROVED ones can be sent. Meta may also pause or disable them if they get poor feedback.
  • category is Meta's: MARKETING, UTILITY or AUTHENTICATION. It determines what Meta charges for each send.
  • The three routes only exist for waba connections; on a QR one they answer 409 not_supported_for_engine.
  • Meta's WhatsApp Manager Official WhatsApp Business Platform pricing
GET /connections/{id}/templates List templates Coming soon
Scope: connections:read

Templates of that connection's WhatsApp Business account, as Meta has them: name, language, category (MARKETING, UTILITY, AUTHENTICATION), status (all of them are listed, sorted by name and language; only APPROVED ones can be sent) and components with their {{1}}, {{2}}… variables. WAQR does not create or edit templates: they are managed in Meta's WhatsApp Manager and WAQR syncs them.

Parameters

  • id path · string required

    Connection id (conn_…); it must be engine: "waba".

Request
curl "https://api.waqr.app/v1/connections/conn_01JB7W2D9K/templates" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "templates": [
    {
      "name": "pedido_listo",
      "language": "es",
      "category": "UTILITY",
      "status": "APPROVED",
      "components": [
        {
          "type": "BODY",
          "text": "Hola {{1}}, tu pedido {{2}} está listo para recoger."
        },
        {
          "type": "FOOTER",
          "text": "Ferretería Lima"
        }
      ]
    }
  ]
}

409 not_supported_for_engine if the connection is a QR one (engine: "evolution").

POST /connections/{id}/templates/sync Sync templates Coming soon
Scope: connections:write

Reads the templates from Meta again. WAQR already syncs them when the connection is created and whenever Meta reports a status change (approved, rejected, paused…); use this route when the customer has just created a template and you do not want to wait.

Parameters

  • id path · string required

    Connection id (conn_…); it must be engine: "waba".

Request
curl -X POST "https://api.waqr.app/v1/connections/conn_01JB7W2D9K/templates/sync" \
  -H "Authorization: Bearer wq_live_…"
Response · 200 OK
{
  "templates": [
    {
      "name": "pedido_listo",
      "language": "es",
      "category": "UTILITY",
      "status": "APPROVED",
      "components": [
        {
          "type": "BODY",
          "text": "Hola {{1}}, tu pedido {{2}} está listo para recoger."
        },
        {
          "type": "FOOTER",
          "text": "Ferretería Lima"
        }
      ]
    }
  ],
  "syncedAt": "2026-10-25T08:59:12Z"
}

Limit: 6 syncs per hour per connection (429 rate_limited with Retry-After). 409 not_supported_for_engine on a QR connection; 409 waba_token_invalid if Meta revoked access.

POST /messages Send a template Coming soon
Scope: messages:send

The same send route as always, with template instead of text (it also works on POST /v1/conversations/{id}/messages). It is the only way to write to a contact outside the 24-hour window or to start a new conversation. components is passed to Meta as is and fills the variables in the template's order; if there are none, omit it. In the history it is stored as type: "text" with the body already rendered. The lifecycle arrives through the usual webhooks (message.sent, message.status_updated, message.failed).

Parameters

  • Idempotency-Key header · string required

    As with any send: retrying with the same key does not duplicate the message.

  • connectionId body · string required

    The waba connection to send from.

  • to · contactId body · string required

    Recipient: E.164 number or contact (ct_…), one of the two.

  • template.name body · string required

    Exact name of an APPROVED template of that account.

  • template.language body · string required

    Template language as shown in the list (es, es_PE, en_US…).

  • template.components body · array

    Variable values per component, in Meta's format (up to 20 objects and 16 KB): [{ "type": "body", "parameters": [{ "type": "text", "text": "María" }] }].

Request
curl -X POST "https://api.waqr.app/v1/messages" \
  -H "Authorization: Bearer wq_live_…" \
  -H "Idempotency-Key: 0b7f3d1e-8a42-4c6e-b1f9-2d5a7c9e0f13" \
  -H "Content-Type: application/json" \
  -d '{
    "connectionId": "conn_01JB7W2D9K",
    "to": "+51912345678",
    "template": {
      "name": "pedido_listo",
      "language": "es",
      "components": [
        { "type": "body", "parameters": [
          { "type": "text", "text": "María" },
          { "type": "text", "text": "#4821" }
        ] }
      ]
    }
  }'
Response · 202 Accepted
{
  "message": {
    "id": "msg_01JB7X9P4T",
    "conversationId": "conv_01JB7X9N3S",
    "connectionId": "conn_01JB7W2D9K",
    "conversationType": "direct",
    "direction": "outbound",
    "type": "text",
    "body": "Hola María, tu pedido #4821 está listo para recoger.",
    "status": "pending",
    "sender": {
      "kind": "connection",
      "origin": "waqr"
    },
    "quoted": null,
    "attachments": [],
    "sentAt": "2026-10-25T09:00:00Z",
    "editedAt": null,
    "deletedAt": null
  }
}

404 waba_template_not_found if there is no APPROVED template with that name and language; 409 not_supported_for_engine if the connection is a QR one; 409 waba_token_invalid if Meta revoked access; 422 validation_failed if you send template together with text, an attachment, caption, fileName or quotedMessageId. Other errors, as with any send.

Templates are messages Meta charges for separately, depending on their category and the recipient's country. Check the current rates on Meta's official pricing page.

New errors

Problem+json, like the rest of the API. The signup ones are only seen by the dashboard and WAQR Embedded; the rest can reach you through the API.

  • 404

    waba_disabled

    The official engine is switched off in the platform (today, while it is "Coming soon").

  • 503

    waba_not_configured

    The engine is on but its Meta configuration is incomplete. Temporary: retry later.

  • 400

    waba_signup_invalid

    Signup: the intent does not exist, was already used or expired (15 minutes). Start again.

  • 502

    waba_signup_failed

    Signup: Meta rejected a step. Carries a readable detail and, if Meta gave one, metaCode.

  • 409

    waba_phone_in_use

    Signup: that number is already connected in WAQR.

  • 422

    waba_window_closed

    More than 24 hours since the customer's last message: send a template.

  • 404

    waba_template_not_found

    There is no synced, APPROVED template with that name and language. If it was just approved, sync.

  • 409

    not_supported_for_engine

    The operation does not exist for that connection's engine: QR, log out or groups on a waba one; templates on an evolution one. In Embedded, also an engine the partner does not allow.

  • 409

    waba_token_invalid

    Meta revoked WAQR's access to that account (token revoked or app uninstalled). The connection becomes disconnected with this lastError; signup must be repeated.

Webhooks: the same events

WAQR receives Meta's notifications on its own server, verifies them and turns them into the same internal events a QR connection produces. Your webhook endpoints, the signature and the catalog do not change: you configure nothing at Meta.

  • message.received for text, image, document, audio, video, sticker, location, contacts and reactions. Button and list replies arrive as text with their metadata.
  • message.sent and message.status_updated (delivered, read or failed, with Meta's error { code, message }) for what you send. If sending fails in WAQR, message.failed arrives with reason (waba_window_closed, undeliverable, waba_token_invalid, meta_<code>…). Meta's rate limits are retried automatically.
  • With coexistence, what the business sends from the WhatsApp Business app also enters WAQR as an outbound message.
  • connection.updated when Meta changes the quality, the messaging limit tier or the account status: read the connection again to see the waba block.
  • If the business revokes WAQR's access from Meta (or uninstalls the app), the connection becomes disconnected with a lastError starting with waba_token_invalid, and you receive the disconnection event as with QR. The same if Meta disables the account.
  • Connection events also carry engine. connection.qr_updated is never emitted for a waba connection.
Webhooks guide and event catalog

In WAQR Embedded

If you are a partner, your customers can sign up an official number without leaving your SaaS. The connections surface offers both options under "Link a new WhatsApp" when you allow it and the platform has it switched on.

  1. 1 In Partner → Integration → Embedded, tick "Allow official WhatsApp (Meta)" next to "Allow QR linking". By default only QR is allowed; your configuration shows it as engines (["qr"], ["qr", "waba"] or ["waba"]) and wabaAvailable tells whether the platform has it switched on.
  2. 2 The surface reads the available engines (engines: the ones you allow that are also on in WAQR) and shows "QR" and "Official (Meta)".
  3. 3 "Official (Meta)" opens the my.waqr.app/meta/signup window within your customer's click (the iframe may already open windows), with your brand, and waits for the result.
  4. 4 When it finishes, the connection shows up in the list with its "Official" badge, without "Show QR" or "Log out", and your page receives the usual events.
Events in your page
// En tu página, con el SDK de WAQR Embedded ya montado (ver «El SDK en tu página»).
// Las altas oficiales llegan con los mismos eventos que las de QR; engine es opcional y aditivo.
WAQR.on("connection.created", ({ connectionId, label, engine }) => {
  console.debug("nueva conexión", connectionId, label, engine ?? "evolution");
});

WAQR.on("connection.updated", ({ connectionId, status, phone, engine }) => {
  if (status === "connected") marcarWhatsappConectado(connectionId, phone, { oficial: engine === "waba" });
});

// Nada más: tu página no carga el SDK de Facebook ni cambia su CSP.
// La ventana de Meta la abre la superficie embebida, dentro del clic de tu cliente.
  • Your page does not load the Facebook SDK or need CSP changes: everything happens in the my.waqr.app window.
  • Your partner webhooks (customer.connection.connected…) fire as with a QR connection.
  • An engine you do not allow does not appear, and requesting it anyway answers 409 not_supported_for_engine. If you remove QR, the surface only offers the official option.
See WAQR Embedded

For partners

Partners

If you resell WAQR inside your SaaS, this API lets you create each customer's account at sign-up, drop them into their WhatsApp inbox with one click from your product and control their access according to what they pay on your platform. All under your brand, at https://<your-slug>.waqr.app, without your customers seeing WAQR as a separate vendor.

Base URL https://api.waqr.app/v1/partner/api

8 endpoints

https://<slug>.waqr.app

What a partner is

A partner is a company with its own product (an ERP, a CRM, an invoicing platform, an LMS…) that offers WAQR to its customers as part of its service. WAQR never charges the partner or its customers on its own: the partner decides how it is included or billed.

Each partner's host is https://<slug>.waqr.app. The examples use acme.waqr.app; your dashboard shows yours.

Would you rather have your customer link their WhatsApp without leaving your SaaS? With WAQR Embedded you embed the connection list and the QR in your own page, under your brand, with a single endpoint on your server. See WAQR Embedded

  • Your customers live in organizations managed by you: your name, logo, colors and subdomain in emails and in the dashboard.
  • This API is scoped to your customers: you can never see or touch another partner's organizations or WAQR's direct customers.
  • Your customers use WAQR normally (connections, inbox, contacts, their own API key if they want one). You control sign-up, sign-in and access.
  • Everything you do through the API lands in each customer's audit log with the actor partner_api.

The three billing modes

In Partner → Billing you choose how WAQR reaches your customers. The mode decides what they see in the payments tab and what cuts their access. The first two are driven by this API; the third is driven by payment inside WAQR.

included

Included for free in my product

Who charges
Nobody
Customer's payments tab
Fully hidden: no plans, prices or notices
What cuts access
The status you send via the API (subscription) or change from your dashboard
external

Billed from my platform

Who charges
You, outside WAQR
Customer's payments tab
Fully hidden
What cuts access
Same: the status you send via the API or from your dashboard
partner_paypal

Billed inside WAQR with my PayPal

Who charges
You, with your PayPal account, inside WAQR
Customer's payments tab
Visible, with your plans, prices and receipts
What cuts access
Non-payment of the subscription in WAQR
  • Partners start in included. Switching to partner_paypal requires a verified PayPal account in your dashboard; leaving it cancels live subscriptions at the end of their cycle.
  • In included and external the customer never sees a WAQR billing block: if you send nothing, access stays open. In /v1/me your customers see activeOrganization.managedBy.billingMode with the mode's value.
  • The mode is per partner, not per customer: all your customers share the same mode.

API credentials

Partner credentials are different from an organization's API key: they identify your company as a partner and grant access only to the /v1/partner/api/* routes. They are managed in Partner → Integration in your dashboard.

  1. 1 Sign in to your dashboard as owner and open Partner → Integration. You will see your fixed Client ID (pcl_…) and the token URL.
  2. 2 Click "Generate secret" and confirm your password. The Client Secret (wqp_live_…) is shown only once: store it as a secret on your server.
  3. 3 To rotate it, generate again: the previous secret stays valid for 24 hours (previousSecretExpiresAt) so you can update your deployment without downtime.
  4. 4 On the same screen register your webhook URL (owner or admin) and generate its signing secret (whsec_…, owner only), also shown only once.

What you see in Integration

  • id · clientId Integration id (pint_…) and public client identifier. Safe in code and logs.
  • secretHint · secretIssuedAt The last characters of the current secret and when it was issued. The full secret is never shown again.
  • status · lastUsedAt Whether the integration is active and when the last call with its token was made.
  • tokenUrl · tokenTtlSeconds Where to request the token and how long it lasts (600 seconds).
  • webhookUrl · webhookSecretHint · webhookSecretIssuedAt Where we send events and the hint of the secret we sign them with. An owner or admin can change the URL; only the owner can generate the secret.
  • events The event types your URL will receive.
  • scopes Always partner:*: the partner API is not split into permissions.
Your integration, as the dashboard sees it
{
  "integration": {
    "id": "pint_01JB4L9C3TX8",
    "clientId": "pcl_01JB4M2Q7XK9",
    "status": "active",
    "scopes": [
      "partner:*"
    ],
    "tokenUrl": "https://api.waqr.app/v1/oauth/token",
    "tokenTtlSeconds": 600,
    "secretHint": "…7Kq2",
    "secretIssuedAt": "2026-10-21T14:00:00Z",
    "lastUsedAt": "2026-10-22T10:05:00Z",
    "webhookUrl": "https://tu-saas.example/webhooks/waqr",
    "webhookSecretHint": "…mN4e",
    "webhookSecretIssuedAt": "2026-10-21T14:02:00Z",
    "events": [
      "customer.created",
      "customer.updated",
      "customer.deleted",
      "customer.connection.connected",
      "customer.connection.disconnected",
      "customer.connection.logged_out",
      "customer.access.blocked",
      "customer.access.restored",
      "customer.subscription.changed"
    ],
    "createdAt": "2026-10-21T14:00:00Z"
  }
}
When generating or rotating the secret (shown once)
{
  "clientId": "pcl_01JB4M2Q7XK9",
  "clientSecret": "wqp_live_Xk3nQ8vL2pR7tW9yB4dF6hJ1mN5sC0aE7Kq2",
  "previousSecretExpiresAt": "2026-10-23T10:10:00Z",
  "integration": {
    "id": "pint_01JB4L9C3TX8",
    "secretHint": "…7Kq2",
    "secretIssuedAt": "2026-10-22T10:10:00Z",
    "status": "active"
  }
}

Getting a token

The partner API is used server to server with OAuth 2.0 client credentials: you exchange your Client ID and Client Secret for a short-lived access token and send it as Authorization: Bearer on every call to /v1/partner/api/*.

POST /v1/oauth/token grant_type=client_credentials
Request (Basic; client_id and client_secret in the body also work)
curl -X POST "https://api.waqr.app/v1/oauth/token" \
  -u "pcl_01JB4M2Q7XK9:wqp_live_…" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials"
Response · 200 OK
{
  "access_token": "eyJhbGciOiJFZERTQSIsImtpZCI6IndhcXItMjAyNi0xMCJ9…",
  "token_type": "Bearer",
  "expires_in": 600,
  "scope": "partner:*"
}
  • The token is a JWT (EdDSA-signed) valid for 10 minutes (expires_in: 600). Keep it in memory and request a new one about 30 s before it expires; do not request one per call.
  • Its scope is partner:*, bound to your partner. If you rotate or revoke the secret, tokens already issued stop working immediately.
  • Credentials travel only over HTTPS and never to the browser, a mobile app or a repository.
  • Errors are problem+json and also include the OAuth 2.0 error field for standard libraries.
Error · 401 · application/problem+json
{
  "type": "https://docs.waqr.app/errors/credential-invalid",
  "title": "Credenciales no válidas",
  "status": 401,
  "code": "credential_invalid",
  "error": "invalid_client",
  "requestId": "req_01JB4P1K7M2N"
}
  • 400

    invalid_grant_type · error: unsupported_grant_type

    grant_type other than client_credentials.

  • 400

    invalid_scope · error: invalid_scope

    You requested a scope that is not yours (invalidScopes). Normally you do not send scope.

  • 401

    credential_invalid · error: invalid_client

    Unknown Client ID, wrong secret or one expired after a rotation.

  • 403

    partner_integration_disabled

    Your integration is disabled: check it in Partner → Integration.

  • 409

    partner_inactive

    Your partner account is pending approval or suspended.

  • 429

    rate_limited

    More than 30 tokens per minute with the same Client ID: reuse the one you have.

Customers

8 endpoints

Each of your customers is an organization in WAQR identified by its externalId: the id that customer has in your SaaS. That way you never need to store WAQR ids in your database. Every route carries the partner token as Bearer.

POST /partner/api/customers Create a customer
Scope: partner:*

Creates the customer's organization managed by you (with your brand and host), the owner's user if it does not exist and the coverage according to plan. Idempotent by externalId: calling it again returns 200 with the same customer and created: false, without touching its data (use PATCH to change it). If that externalId had been deactivated, the call restores it (200 with restored: true). No email is sent to the owner unless you pass sendInvite: true: if they will sign in with one click from your SaaS, they do not need it.

Parameters

  • Idempotency-Key header · string

    Optional but recommended on POSTs: retrying with the same key returns the same response without repeating the operation (Idempotent-Replayed: true).

  • externalId body · string required

    The customer's id in your SaaS. Unique per partner; it is the key you will use to name it in the other routes.

  • name body · string required

    The customer's company name, as they will see it in the dashboard.

  • country body · string

    Country as ISO 3166-1 alpha-2, e.g. PE.

  • owner.email body · string required

    Email of the account owner. If a user with that email already exists, they become the owner of the new organization.

  • owner.name body · string required

    Owner's name.

  • plan.connections body · integer

    WhatsApp connection quota. Without it, the customer uses the partner's unlimited quota.

  • plan.status body · active | suspended

    Initial plan status (defaults to active).

  • timezone body · string

    The customer's IANA time zone, e.g. America/Lima.

  • sendInvite body · boolean

    true emails the owner a branded invitation to set a password. Defaults to false.

Request
curl -X POST "https://api.waqr.app/v1/partner/api/customers" \
  -H "Authorization: Bearer eyJhbGciOiJFZERTQSIsImtpZCI6IndhcXItMjAyNi0xMCJ9…" \
  -H "Idempotency-Key: 2b7f0c7e-5a4d-4e1b-9c2a-7d6e5f4a3b21" \
  -H "Content-Type: application/json" \
  -d '{"externalId":"acct_48213","name":"Ferretería Sol","country":"PE","owner":{"email":"ana@ferreteriasol.pe","name":"Ana Quispe"},"plan":{"connections":2,"status":"active"}}'
Response · 201 Created
{
  "customer": {
    "id": "org_01JB4N7R9WX2",
    "externalId": "acct_48213",
    "name": "Ferretería Sol",
    "country": "PE",
    "accessUrl": "https://acme.waqr.app",
    "status": "active",
    "connections": 2,
    "usage": {
      "connections": {
        "used": 1,
        "limit": 2
      }
    },
    "graceUntil": null,
    "reason": null,
    "timezone": "America/Lima",
    "owner": {
      "id": "usr_01JB4N8T2VQ3",
      "email": "ana@ferreteriasol.pe",
      "status": "invited"
    },
    "createdAt": "2026-10-21T15:02:11Z",
    "updatedAt": "2026-10-21T15:02:11Z"
  },
  "created": true
}

200 OK with created: false if a customer with that externalId already existed; 200 OK with created: false, restored: true if it had been deactivated and was restored. 422 validation_failed with fieldErrors if a field is missing or the email is invalid; 409 partner_inactive if your partner account is pending or suspended; 403 partner_integration_disabled if your integration is disabled; 429 rate_limited.

owner.status is invited until the person signs in for the first time (via SSO or the invitation); then active.

GET /partner/api/customers List customers
Scope: partner:*

Your customers, newest first, with cursor pagination. You will never see another partner's organizations or WAQR's direct customers.

Parameters

  • status query · string

    Filter by plan status: active, past_due, suspended, canceled or deleted. Without a filter, deactivated customers (deleted) are not listed.

  • limit query · integer

    Results per page (default 50, max 100).

  • cursor query · string

    Opaque cursor returned in nextCursor to fetch the next page.

Request
curl "https://api.waqr.app/v1/partner/api/customers?status=active&limit=50" \
  -H "Authorization: Bearer eyJhbGciOiJFZERTQSIsImtpZCI6IndhcXItMjAyNi0xMCJ9…"
Response · 200 OK
{
  "data": [
    {
      "id": "org_01JB4N7R9WX2",
      "externalId": "acct_48213",
      "name": "Ferretería Sol",
      "country": "PE",
      "accessUrl": "https://acme.waqr.app",
      "status": "active",
      "connections": 2,
      "usage": {
        "connections": {
          "used": 1,
          "limit": 2
        }
      },
      "graceUntil": null,
      "reason": null,
      "timezone": "America/Lima",
      "owner": {
        "id": "usr_01JB4N8T2VQ3",
        "email": "ana@ferreteriasol.pe",
        "status": "active"
      },
      "createdAt": "2026-10-21T15:02:11Z",
      "updatedAt": "2026-10-21T15:02:11Z"
    }
  ],
  "nextCursor": null
}
GET /partner/api/customers/{externalId} Get a customer
Scope: partner:*

The customer's current state: plan, quota, owner and access URL on your host.

Parameters

  • externalId path · string required

    The customer's id in your SaaS, as sent when creating it.

Request
curl "https://api.waqr.app/v1/partner/api/customers/acct_48213" \
  -H "Authorization: Bearer eyJhbGciOiJFZERTQSIsImtpZCI6IndhcXItMjAyNi0xMCJ9…"
Response · 200 OK
{
  "customer": {
    "id": "org_01JB4N7R9WX2",
    "externalId": "acct_48213",
    "name": "Ferretería Sol",
    "country": "PE",
    "accessUrl": "https://acme.waqr.app",
    "status": "active",
    "connections": 2,
    "usage": {
      "connections": {
        "used": 1,
        "limit": 2
      }
    },
    "graceUntil": null,
    "reason": null,
    "timezone": "America/Lima",
    "owner": {
      "id": "usr_01JB4N8T2VQ3",
      "email": "ana@ferreteriasol.pe",
      "status": "active"
    },
    "createdAt": "2026-10-21T15:02:11Z",
    "updatedAt": "2026-10-21T15:02:11Z"
  }
}

404 not_found if the externalId does not belong to one of your customers.

PATCH /partner/api/customers/{externalId} Update a customer
Scope: partner:*

Changes the name or the plan (quota and status). For plan status changes with a grace date or reason, use the /subscription route.

Parameters

  • externalId path · string required

    The customer's id in your SaaS, as sent when creating it.

  • name body · string

    New name.

  • plan.connections body · integer

    New connection quota. If it drops below what is in use, existing connections keep working but no new ones can be created.

  • plan.status body · active | past_due | suspended | canceled

    New plan status.

Request
curl -X PATCH "https://api.waqr.app/v1/partner/api/customers/acct_48213" \
  -H "Authorization: Bearer eyJhbGciOiJFZERTQSIsImtpZCI6IndhcXItMjAyNi0xMCJ9…" \
  -H "Content-Type: application/json" \
  -d '{"name":"Ferretería Sol S.A.C.","plan":{"connections":3}}'
Response · 200 OK
{
  "customer": {
    "id": "org_01JB4N7R9WX2",
    "externalId": "acct_48213",
    "name": "Ferretería Sol S.A.C.",
    "country": "PE",
    "accessUrl": "https://acme.waqr.app",
    "status": "active",
    "connections": 3,
    "usage": {
      "connections": {
        "used": 1,
        "limit": 2
      }
    },
    "graceUntil": null,
    "reason": null,
    "timezone": "America/Lima",
    "owner": {
      "id": "usr_01JB4N8T2VQ3",
      "email": "ana@ferreteriasol.pe",
      "status": "active"
    },
    "createdAt": "2026-10-21T15:02:11Z",
    "updatedAt": "2026-10-22T09:30:00Z"
  }
}
DELETE /partner/api/customers/{externalId} Deactivate a customer
Scope: partner:*

Soft deletion: pauses their WhatsApp connections, blocks dashboard access and emits customer.deleted. No data is deleted (history, contacts or connections). If the customer comes back, repeat POST /partner/api/customers with its externalId (it answers restored: true) or send subscription { status: "active" }: everything resumes.

Parameters

  • externalId path · string required

    The customer's id in your SaaS, as sent when creating it.

Request
curl -X DELETE "https://api.waqr.app/v1/partner/api/customers/acct_48213" \
  -H "Authorization: Bearer eyJhbGciOiJFZERTQSIsImtpZCI6IndhcXItMjAyNi0xMCJ9…"
Response · 200 OK
{
  "customer": {
    "id": "org_01JB4N7R9WX2",
    "externalId": "acct_48213",
    "name": "Ferretería Sol",
    "country": "PE",
    "accessUrl": "https://acme.waqr.app",
    "status": "deleted",
    "connections": 2,
    "usage": {
      "connections": {
        "used": 1,
        "limit": 0
      }
    },
    "graceUntil": null,
    "reason": null,
    "timezone": "America/Lima",
    "owner": {
      "id": "usr_01JB4N8T2VQ3",
      "email": "ana@ferreteriasol.pe",
      "status": "active"
    },
    "createdAt": "2026-10-21T15:02:11Z",
    "updatedAt": "2026-10-22T10:00:00Z",
    "deletedAt": "2026-10-22T10:00:00Z"
  }
}
POST /partner/api/customers/{externalId}/sso One-click sign-in (SSO)
Scope: partner:*

Generates a single-use sign-in URL for a user of that customer. Your server requests it when the person clicks the button and redirects them to url: they land signed in on your subdomain, with no password. The code is valid for 60 seconds and is consumed on first use (even if it fails). If the email does not belong to the organization yet, WAQR creates the user as a member with the given role (agent by default).

Parameters

  • externalId path · string required

    The customer's id in your SaaS, as sent when creating it.

  • email body · string required

    Email of the user signing in. Must be the owner or a member of that organization; if it does not exist, it is created.

  • name body · string

    Name used to create the user if they do not exist.

  • role body · admin | agent

    Role for a newly created member (defaults to agent). It does not change the role of an existing member.

  • next body · string

    Dashboard path to land on after signing in, e.g. /inbox or /connections/new. Relative paths only.

Request
curl -X POST "https://api.waqr.app/v1/partner/api/customers/acct_48213/sso" \
  -H "Authorization: Bearer eyJhbGciOiJFZERTQSIsImtpZCI6IndhcXItMjAyNi0xMCJ9…" \
  -H "Content-Type: application/json" \
  -d '{"email":"ana@ferreteriasol.pe","next":"/inbox"}'
Response · 200 OK
{
  "url": "https://acme.waqr.app/api/auth/handoff?code=hs_01JB4Q9W3ZD7K5N8R2T6V0X4",
  "expiresAt": "2026-10-22T10:01:00Z",
  "expiresInSeconds": 60,
  "user": {
    "id": "usr_01JB4N8T2VQ3",
    "email": "ana@ferreteriasol.pe",
    "created": false
  }
}

Do not store or reuse the URL: request a new one on every click. user.created tells whether the user was created in this call. 404 not_found if the customer is not yours; 409 customer_deleted if it was deactivated; 422 validation_failed if the email or next are invalid; 429 rate_limited when you exceed this route's own limit (the highest in the API, sized for one click per person).

A suspended or canceled customer can still sign in: they will see the blocking modal with your name and the link to your SaaS.

POST /partner/api/customers/{externalId}/subscription Change the plan status
Scope: partner:*

Tells WAQR the customer's status in your SaaS. It is the access switch in the "Included" and "Billed from my platform" modes: active grants access, past_due warns, suspended and canceled block and pause connections (without deleting anything). Repeating the same status has no effect. Emits customer.access.blocked or customer.access.restored when access changes.

Parameters

  • externalId path · string required

    The customer's id in your SaaS, as sent when creating it.

  • Idempotency-Key header · string

    Optional but recommended on POSTs: retrying with the same key returns the same response without repeating the operation (Idempotent-Replayed: true).

  • status body · active | past_due | suspended | canceled required

    New plan status (see the states table).

  • connections body · integer

    New connection quota, if it changes with the plan.

  • graceUntil body · string (ISO 8601)

    Only with past_due: deadline shown in the notice. If it passes with no other status, dashboard access is blocked and the quota drops to 0, but connections stay active until you send suspended.

  • reason body · string

    Internal reason for your audit trail (up to 200 characters); returned in customer.reason. Not shown to the customer.

Request
curl -X POST "https://api.waqr.app/v1/partner/api/customers/acct_48213/subscription" \
  -H "Authorization: Bearer eyJhbGciOiJFZERTQSIsImtpZCI6IndhcXItMjAyNi0xMCJ9…" \
  -H "Idempotency-Key: 2b7f0c7e-5a4d-4e1b-9c2a-7d6e5f4a3b21" \
  -H "Content-Type: application/json" \
  -d '{"status":"past_due","graceUntil":"2026-11-05T00:00:00Z","reason":"invoice 2026-10 unpaid"}'
Response · 200 OK
{
  "customer": {
    "id": "org_01JB4N7R9WX2",
    "externalId": "acct_48213",
    "name": "Ferretería Sol",
    "country": "PE",
    "accessUrl": "https://acme.waqr.app",
    "status": "past_due",
    "connections": 2,
    "usage": {
      "connections": {
        "used": 1,
        "limit": 2
      }
    },
    "graceUntil": "2026-11-05T00:00:00Z",
    "reason": "invoice 2026-10 unpaid",
    "timezone": "America/Lima",
    "owner": {
      "id": "usr_01JB4N8T2VQ3",
      "email": "ana@ferreteriasol.pe",
      "status": "active"
    },
    "createdAt": "2026-10-21T15:02:11Z",
    "updatedAt": "2026-10-22T10:05:00Z"
  },
  "changed": true
}

changed is false if the customer was already in that status (no event is emitted). 422 validation_failed if graceUntil comes with a status other than past_due or is in the past; 404 not_found; 429 rate_limited.

POST /partner/api/subscription-events Send statuses in bulk
Scope: partner:*

The same operation for many customers at once (up to 500 per request): useful when syncing your billing once a day or catching up after a backlog. Each event is idempotent by eventId and applied in occurredAt order; one older than the last applied is ignored as stale. Unknown externalId values do not stop the batch.

Parameters

  • events[].eventId body · string required

    Unique event id in your system (8–128 characters). Repeating it does not apply it again.

  • events[].externalId body · string required

    Affected customer.

  • events[].status body · active | past_due | suspended | canceled required

    New status.

  • events[].connections body · integer

    New quota, if it changes.

  • events[].graceUntil body · string (ISO 8601)

    Only with past_due.

  • events[].occurredAt body · string (ISO 8601) required

    When it happened in your SaaS; orders events and discards stale ones.

Request
curl -X POST "https://api.waqr.app/v1/partner/api/subscription-events" \
  -H "Authorization: Bearer eyJhbGciOiJFZERTQSIsImtpZCI6IndhcXItMjAyNi0xMCJ9…" \
  -H "Content-Type: application/json" \
  -d '{"events":[{"eventId":"evt_9f1c2a","externalId":"acct_48213","status":"active","occurredAt":"2026-10-22T08:00:00Z"},{"eventId":"evt_9f1c2b","externalId":"acct_51007","status":"suspended","occurredAt":"2026-10-22T08:00:05Z"}]}'
Response · 202 Accepted
{
  "received": 2,
  "applied": 1,
  "ignored": 1,
  "results": [
    {
      "eventId": "evt_9f1c2a",
      "externalId": "acct_48213",
      "outcome": "applied"
    },
    {
      "eventId": "evt_9f1c2b",
      "externalId": "acct_51007",
      "outcome": "ignored",
      "reason": "unknown_customer"
    }
  ]
}

outcome is applied, duplicate (same eventId already processed), stale (older than the last one applied) or ignored with reason (unknown_customer, invalid_status…). 413 payload_too_large above 500 events or 1 MB.

One-click sign-in

Your customer does not need to know what WAQR is or remember another password. You add an "Open WhatsApp" button to your product; when clicked, your server requests a sign-in URL and redirects the person, who lands signed in on your subdomain.

  1. 1 Your server gets a partner token (or reuses the live one).
  2. 2 It calls POST /partner/api/customers/{externalId}/sso with the email of the person who clicked and, optionally, next.
  3. 3 It redirects the browser to the url in the response immediately: the code lasts 60 seconds and is consumed on first use.
  4. 4 Your subdomain redeems the code, creates the session in a cookie on that domain and takes the person to next. No session token ever travels in the URL.
Full flow
Person (browser)         Your SaaS (server)              api.waqr.app              acme.waqr.app
      │                          │                              │                          │
      │ click "Open WhatsApp"    │                              │                          │
      │─────────────────────────▶│                              │                          │
      │                          │ 1. POST /v1/oauth/token      │                          │
      │                          │    (only if you have no live │                          │
      │                          │     token; lasts ≤ 10 min)   │                          │
      │                          │─────────────────────────────▶│                          │
      │                          │◀─── { access_token } ────────│                          │
      │                          │                              │                          │
      │                          │ 2. POST /v1/partner/api/customers/acct_48213/sso        │
      │                          │    { email, next: "/inbox" } │                          │
      │                          │─────────────────────────────▶│                          │
      │                          │◀─── { url, expiresAt } ──────│  code hs_…, 60 s, 1 use   │
      │                          │                              │                          │
      │ 3. 302 Location: url     │                              │                          │
      │◀─────────────────────────│                              │                          │
      │                          │                              │                          │
      │ 4. GET /api/auth/handoff?code=hs_…                      │                          │
      │────────────────────────────────────────────────────────────────────────────────────▶│
      │                          │                              │◀── redeems the code ─────│
      │                          │                              │─── new session ─────────▶│
      │ 5. session cookie + redirect to /inbox                  │                          │
      │◀────────────────────────────────────────────────────────────────────────────────────│
      │  The person is in, under your brand, with no password.  │                          │
Your server (Node, no dependencies)
// Tu servidor: una ruta por la que pasa el botón «Abrir WhatsApp».
let cached = { token: "", expiresAt: 0 };

async function partnerToken() {
  if (cached.expiresAt > Date.now() + 30_000) return cached.token;
  const basic = Buffer.from(`${process.env.WAQR_CLIENT_ID}:${process.env.WAQR_CLIENT_SECRET}`).toString("base64");
  const res = await fetch("https://api.waqr.app/v1/oauth/token", {
    method: "POST",
    headers: { Authorization: `Basic ${basic}`, "Content-Type": "application/x-www-form-urlencoded" },
    body: "grant_type=client_credentials",
  });
  if (!res.ok) throw new Error(`token ${res.status}`);
  const data = await res.json();
  cached = { token: data.access_token, expiresAt: Date.now() + data.expires_in * 1000 };
  return cached.token;
}

app.get("/whatsapp/open", requireLogin, async (req, res) => {
  const account = req.user.account; // tu cliente; su id es el externalId en WAQR
  const r = await fetch(`https://api.waqr.app/v1/partner/api/customers/${account.id}/sso`, {
    method: "POST",
    headers: { Authorization: `Bearer ${await partnerToken()}`, "Content-Type": "application/json" },
    body: JSON.stringify({ email: req.user.email, name: req.user.name, next: "/inbox" }),
  });
  if (!r.ok) return res.status(502).send("WhatsApp no disponible ahora mismo");
  const { url } = await r.json(); // vale 60 s y un solo uso: redirige ya
  res.redirect(302, url);
});
  • Request the URL at click time, not on page load or in a static link: it expires and is single-use.
  • If the person is not yet a member of that organization, they are created as agent (or the role you send) with no invitation email. Existing members keep their role.
  • The same user can sign in from several of your customers if they are a member of several organizations: the URL always opens the one for the externalId in the path.
  • If you also want the customer to sign in with a password, use sendInvite: true when creating them or let them use "Forgot password" on your subdomain.

Plan statuses and access

In the included and external modes, you decide each customer's access with the status of /subscription (or with "Suspend/Restore access" in your dashboard, which does the same). WAQR turns each status into what the customer sees:

  • active

    Full

    Normal dashboard and API, with the connections quota you sent (or your partner's unlimited one). If coming from a block, their connections resume on their own.

  • past_due

    Full, with a notice

    Everything keeps working and a banner "Your plan in <your product> is pending payment" appears with a link to your SaaS (supportUrl), with no WAQR payment button. If you sent graceUntil, the banner shows the date; when it passes, dashboard access is blocked and the quota drops to 0, but connections stay active until you send suspended.

  • suspended

    Blocked

    Full-screen blocking modal explaining that access is managed by <your product>, with a link to your SaaS. WhatsApp connections are paused (they stop receiving and sending) without deleting anything. Reversible with active.

  • canceled

    Blocked

    Same effect as suspended, with the cancellation wording. Use it when the customer leaves your SaaS. Reversible with active if they return.

  • Access changes emit customer.access.blocked and customer.access.restored, so your SaaS can mirror them.
  • DELETE is a soft deletion with status deleted (connections paused, quota 0): revert it with active or by repeating POST /partner/api/customers with the same externalId.
  • Only suspended, canceled and deactivation pause connections. An expired grace period blocks the dashboard without pausing them: you decide when to send suspended.
  • In partner_paypal these endpoints are still accepted, but access is driven by payment in WAQR: use customer.subscription.changed to find out.

Webhooks to your SaaS

WAQR sends a POST to the URL registered in Partner → Integration for every event of your customers, signed per Standard Webhooks v1 with your webhookSecret. data always carries customerId, externalId and source (partner_api, partner_panel or customer, depending on who triggered the event), plus the event's own fields; never messages or secrets.

A delivery
POST /webhooks/waqr HTTP/1.1
Host: tu-saas.example
Content-Type: application/json
User-Agent: WAQR-Webhooks/1.0
webhook-id: evt_01JB4R2M8K5T
webhook-timestamp: 1792409100
webhook-signature: v1,Qm4bNfYw3o9dP1y2W7lX0c8vA5uR6tK9jH2gF4eD3sB=
waqr-attempt: 1

{"type":"customer.connection.connected","timestamp":"2026-10-22T10:05:00.000Z","data":{"customerId":"org_01JB4N7R9WX2","externalId":"acct_48213","source":"customer","connectionId":"conn_01JB4R1Z6YM3","label":"Ventas","phoneE164":"+51987654321"}}
  1. 1 Always verify the signature against the raw body: HMAC-SHA256 of "webhook-id.webhook-timestamp.body" with the secret (base64 after whsec_), compared in constant time.
  2. 2 Reject deliveries whose webhook-timestamp is more than 5 minutes away from your clock.
  3. 3 Deduplicate by webhook-id: delivery is at-least-once and repeats on retries.
  4. 4 Answer 2xx within 15 seconds and process later. A failure is retried with increasing backoff for 24 hours; a long streak of failures disables the URL until you re-enable it in your dashboard.
  5. 5 When you rotate the webhook secret, every delivery carries two signatures (new and previous) for 24 hours.
Verification and handling in Node.js (no dependencies)
import { createHmac, timingSafeEqual } from "node:crypto";

// Secreto de webhooks de Partner → Integración (formato whsec_…). Nunca en el navegador.
const SECRET = process.env.WAQR_PARTNER_WEBHOOK_SECRET;

export function verifyWaqrWebhook(headers, rawBody, toleranceSeconds = 300) {
  const id = headers["webhook-id"];
  const timestamp = Number(headers["webhook-timestamp"]);
  const signatures = String(headers["webhook-signature"] ?? "").split(" ");
  if (!id || !Number.isInteger(timestamp)) return false;
  if (Math.abs(Date.now() / 1000 - timestamp) > toleranceSeconds) return false;
  const key = Buffer.from(SECRET.replace(/^whsec_/, ""), "base64");
  const expected = createHmac("sha256", key).update(`${id}.${timestamp}.${rawBody}`).digest();
  return signatures.some((entry) => {
    const [version, value] = entry.split(",");
    if (version !== "v1" || !value) return false;
    const given = Buffer.from(value, "base64");
    return given.length === expected.length && timingSafeEqual(given, expected);
  });
}

// Express: cuerpo crudo, verificar, responder rápido y procesar después.
app.post("/webhooks/waqr", express.raw({ type: "application/json" }), async (req, res) => {
  if (!verifyWaqrWebhook(req.headers, req.body.toString("utf8"))) return res.sendStatus(401);
  res.sendStatus(204);

  const event = JSON.parse(req.body.toString("utf8"));
  if (await alreadySeen(req.headers["webhook-id"])) return; // entrega al menos una vez
  switch (event.type) {
    case "customer.connection.connected":
      await markWhatsappConnected(event.data.externalId, event.data.connectionId);
      break;
    case "customer.connection.disconnected":
    case "customer.connection.logged_out":
      await notifyCustomer(event.data.externalId, "Tu WhatsApp se desconectó: vuelve a escanear el QR.");
      break;
    case "customer.access.blocked":
    case "customer.access.restored":
      await syncAccessFlag(event.data.externalId, event.type.endsWith("restored"));
      break;
    default:
      // Ignora los tipos que no conozcas: el catálogo crece.
  }
});

Partner events

All events of your customers go to your single partner URL; filter by type. Ignore types you do not know: the catalog grows.

Customers

  • customer.created

    A customer was created (via the API or from your dashboard). data: customerId, externalId, accessUrl.

  • customer.updated

    A customer's name, quota or plan status changed (fields), via the API or from your dashboard.

  • customer.deleted

    A customer was deactivated (DELETE or from your dashboard). Its connections are paused.

Customer connections

  • customer.connection.connected

    The customer linked a number: connectionId, label, phoneE164. The right moment to mark "WhatsApp connected" in your SaaS.

  • customer.connection.disconnected

    WhatsApp disconnected the session (reason). It usually comes back on its own; otherwise the customer must scan again.

  • customer.connection.logged_out

    The session was closed from the phone or the dashboard: a new QR scan is needed.

Access and plan

  • customer.access.blocked

    The customer was blocked: by your suspended/canceled, by graceUntil passing or by a manual action in your dashboard (reason, source).

  • customer.access.restored

    The customer is back to active and its connections resumed.

  • customer.subscription.changed

    Only in the "Billed inside WAQR with my PayPal" mode: the customer subscribed, renewed, failed to pay or canceled in WAQR (status, planId). In the other two modes you send the status, so it is not emitted.

Limits

Each partner has its own limits, independent from its customers' and from other partners'. They are sized for a SaaS's real usage: sign-ups, plan changes and one sign-in click per person.

  • Every response includes RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset; when you hit a limit you get 429 rate_limited with Retry-After in seconds.
  • The SSO route has the highest limit, per minute and per partner, to absorb sign-in peaks; creation and plan-change routes are stricter. For bulk syncs use /subscription-events in batches.
  • Tokens are limited too: cache yours until it is about to expire.
  • Limits are enforced with 429, not with blocks: nothing you do through the API can suspend your partner account.

Idempotency

  • POST /partner/api/customers is idempotent by externalId: repeating it never creates a duplicate (it returns 200 with the existing customer).
  • POST …/subscription is idempotent by nature: repeating the same status does nothing; still, send Idempotency-Key so a retry on a flaky network returns exactly the same response.
  • POST /partner/api/subscription-events is idempotent by eventId: use your billing system's event id and resend the whole batch without fear.
  • The Idempotency-Key (8–255 visible characters) is kept for 24 hours; reusing it with a different body returns 422 idempotency_key_reused.

Best practices

What partners who integrate WAQR with no friction for their customers do:

Create the customer at sign-up

Call POST /partner/api/customers in the same flow where you create the account in your SaaS (or the first time they click the button). WhatsApp then shows up ready, with no sign-ups or welcome emails from another vendor.

SSO on button click

Request the sign-in URL at click time and redirect at once. Never store it, never put it in a static link and never email it.

Send suspended on non-payment

Wire your billing to /subscription: past_due with graceUntil when a charge fails, suspended when the deadline passes, active when they pay. The customer sees the notice with your name and your link, never a third-party checkout.

Listen to connections

With customer.connection.connected you mark "WhatsApp connected" in your SaaS; with disconnected/logged_out you tell the customer to scan again. You avoid support tickets that are not yours.

Reconcile once a day

A daily batch to /subscription-events with the real status of all your customers fixes any webhook or call that got lost. It is idempotent: repeating it does no harm.

Secrets on the server

Client Secret and webhook secret only on your server, in environment variables. Rotate without downtime: the previous one stays valid for 24 hours in both cases.

It all starts in your dashboard

Credentials, webhook URL, billing mode and curl examples with your real Client ID already filled in live in Partner → Integration. If you are not a partner yet, write to us and we will tell you how to become one.

Go to the dashboard

For partners

WAQR Embedded

Show WhatsApp linking inside your own SaaS: your customer sees their connections, scans the QR and follows the live status without leaving your product or knowing what WAQR is. One <script>, one endpoint on your server and no WAQR sessions in the browser. Available to partners.

SDK https://<slug>.waqr.app/embed/v1/sdk.js

2 endpoints

connections · panel

What it is and how it fits

The SDK (WAQR) creates in your page an iframe served from your WAQR host (https://<slug>.waqr.app) with the connections surface: the connection list with label, number and status, "Link a new WhatsApp" with its QR, "Log out", the account strip ("N of M connections") and an "Open WAQR" button that leads to the full dashboard. All with your logo, your product name and your color.

The SDK and the iframe are served from your WAQR host (acme.waqr.app in the examples; your dashboard shows yours). Server calls go to api.waqr.app, like the rest of the API.

Besides QR, "Link a new WhatsApp" can offer the official WhatsApp (Meta) option (coming soon): your customer signs in with their Facebook account in a WAQR window and comes back with the connection created. It is switched on with a checkbox in your Embedded tab. Official WhatsApp in Embedded

  • Two surfaces in v1: connections, embedded in your page, and panel, which only opens in a new tab (WAQR.launch).
  • The iframe never receives cookies: it signs in with a single-use code (ec_, 60 seconds) requested by your server, redeems it for a session that lives in memory only and can only view and manage connections. No chats, contacts or messages.
  • How each surface is presented (embedded, new tab, off) is decided in your dashboard and read live: changing it does not require deploying your SaaS.
  • Real-time events and the customer.connection.* webhooks to your SaaS fire exactly as when the customer links from the dashboard.
  • The surface's texts are in Spanish. So are the SDK's (errors, "Retry").
How it fits
Your page (https://app.tu-saas.example)            acme.waqr.app (your host)                api.waqr.app
      │                                            │                                           │
      │ <script src="https://acme.waqr.app/embed/v1/sdk.js">                                 │
      │ WAQR.mount('connections', { container })   │                                           │
      │                                            │                                           │
      │ 1. GET /embed/v1/config?partner=acme      │                                           │
      │───────────────────────────────────────────▶│ Is Embedded on for your origin?           │
      │◀── { allowed, surfaces, heights } ─────────│ Which mode does each surface have?        │
      │                                            │                                           │
      │ 2. getSessionCode({ surface, purpose, parentOrigin })                                  │
      │────▶ YOUR server ─────────────────────────────────────────────────────────────────────▶│
      │      (partner token or the customer's      │  POST /v1/partner/api/customers/{externalId}/embed-sessions
      │       API key; never in the browser)       │  or POST /v1/embed-sessions               │
      │◀──── { code: "ec_…" } ◀───────────────────────────────────────────────────────────────│  60 s, single use
      │                                            │                                           │
      │ 3. <iframe src="https://acme.waqr.app/embed/v1/connections?parent=<your origin>#code=ec_…">
      │───────────────────────────────────────────▶│                                           │
      │                                            │ 4. clears the fragment and redeems ──────▶│ POST /v1/embed/session
      │                                            │◀── token we_… (memory only) ──────────────│ 15 min sliding, 8 h max
      │                                            │                                           │
      │ 5. connection list, QR, live status, "Open WAQR"… under your brand                     │
      │◀───────────────────────────────────────────│                                           │
      └─ events to the host: ready, connection.created, connection.updated, launch.requested… (postMessage waqr-embed/1)

Setup in your dashboard

Everything is configured in Partner → Integration → Embedded tab of your dashboard (owner or admin). Nothing is per customer: the configuration belongs to the partner and applies to all its organizations.

  1. 1 Add the origins of the pages that will mount the SDK: exact https:// (with port if not 443) or https://*.your-domain.tld for all subdomains. Never * or http.
  2. 2 Leave each surface's mode on auto unless you want to turn it off (disabled) or force a behavior.
  3. 3 Switch the status to sandbox to test from your development environments and, once it works, to active (requires at least one https origin).
  4. 4 Copy the code snippet the dashboard already shows filled with your host and slug, and implement the endpoint from the next section.

Status

  • off

    Off

    Initial value. The public configuration answers allowed: false with every mode disabled; the SDK renders nothing (surface.disabled) and issuing codes returns 409 embed_not_available.

  • sandbox

    Testing

    Works like production, with your https origins. In addition, if the WAQR deployment allows it (localOriginsAllowed: true), it accepts http://localhost:<port> and http://127.0.0.1:<port>.

  • active

    Active

    Production. Requires at least one https origin, and local origins stop working.

Allowed origins

  • They are the single list WAQR uses for three things: the iframe's frame-ancestors, the configuration the SDK reads and the parentOrigin check when issuing and redeeming the code.
  • Format: exact https://host[:port] or https://*.domain.tld (the wildcard covers subdomains only, not the root domain or deeper levels).
  • An origin outside the list does not break your page: the SDK renders nothing and emits error { code: "origin_rejected" }.

Mode of each surface

  • connections auto (= embedded) or disabled. In auto it is embedded in the container you pass.
  • panel auto, launch, redirect or disabled. auto resolves to launch (one-click sign-in, new tab with a session) if the code was issued by your partner token, and to redirect (new tab at /login) if it was issued by a customer API key.
Your configuration, as the dashboard sees it
{
  "embed": {
    "status": "active",
    "origins": [
      "https://app.tu-saas.example",
      "https://*.tu-saas.example"
    ],
    "surfaces": {
      "connections": {
        "mode": "auto"
      },
      "panel": {
        "mode": "auto"
      }
    },
    "engines": [
      "qr"
    ],
    "wabaAvailable": false,
    "host": "https://acme.waqr.app",
    "slug": "acme",
    "sdkUrl": "https://acme.waqr.app/embed/v1/sdk.js",
    "docsUrl": "https://waqr.app/es/desarrolladores/#embedded",
    "localOriginsAllowed": false
  }
}
Public configuration read by the SDK
{
  "partner": "acme",
  "protocol": "1",
  "status": "active",
  "allowed": true,
  "surfaces": {
    "connections": {
      "mode": "embedded",
      "container": "inline"
    },
    "panel": {
      "mode": "launch"
    }
  },
  "brand": {
    "slug": "acme",
    "productName": "Acme Ventas",
    "primaryColor": "#1d4ed8",
    "logoUrl": "https://api.waqr.app/v1/public/branding/acme/logo",
    "supportUrl": "https://tu-saas.example/soporte"
  },
  "host": "https://acme.waqr.app",
  "heights": {
    "connections": [
      [
        360,
        640
      ],
      [
        720,
        560
      ],
      [
        1024,
        520
      ]
    ]
  }
}

The SDK requests it from GET https://<slug>.waqr.app/embed/v1/config?partner=<slug> with your page's origin; you do not have to call it, but it helps when debugging. If Embedded is off, the partner does not exist or the origin is not allowed, it answers 200 with allowed: false and every mode disabled: never an error that breaks your site.

Your server: the only endpoint

2 endpoints

The only thing you implement is a route the SDK calls with { surface, purpose, parentOrigin } through your getSessionCode. Your server checks that your user may manage WhatsApp on that account and requests the code from WAQR with one of these two credentials. Return to the browser only the code (or the url for launch).

With your partner token

For any of your customers, by externalId. The usual path for a SaaS reselling WAQR: you already have the Client ID and Client Secret from Partner → Integration, and "Open WAQR" can be a one-click sign-in.

With the customer's API key

If your server already stores that organization's wq_live_ key (for example, because it is yours), POST /v1/embed-sessions issues the code without the partner API. "Open WAQR" goes to /login.

POST /partner/api/customers/{externalId}/embed-sessions Code with your partner token
Scope: partner:*

For any of your customers, by externalId. Carries the same Bearer as the rest of the partner API (POST /v1/oauth/token). The code is valid for 60 seconds, is consumed on first use and only works on your host (https://<slug>.waqr.app) from the given parentOrigin. A suspended or past_due customer still gets a code: the surface will show the block with your name and link.

Parameters

  • externalId path · string required

    The customer's id in your SaaS, as sent when creating it.

  • surface body · connections required

    Surface you are going to embed. In v1 only connections is embeddable; panel opens with WAQR.launch.

  • parentOrigin body · string required

    The exact origin of the page that mounts the SDK (https://host[:port], no path). It must be in your allowed origins; the iframe checks it again when redeeming the code. Set it on your server: do not copy it from the browser without validating it.

Request
curl -X POST "https://api.waqr.app/v1/partner/api/customers/acct_48213/embed-sessions" \
  -H "Authorization: Bearer eyJhbGciOiJFZERTQSIsImtpZCI6IndhcXItMjAyNi0xMCJ9…" \
  -H "Content-Type: application/json" \
  -d '{"surface":"connections","parentOrigin":"https://app.tu-saas.example"}'
Response · 201 Created
{
  "code": "ec_01JB5A7Q2M9X4K8R3T6V0W1Y",
  "expiresAt": "2026-10-23T15:01:00Z",
  "expiresInSeconds": 60,
  "surface": "connections",
  "embedUrl": "https://acme.waqr.app/embed/v1/connections"
}

404 not_found if the externalId is not one of your customers; 409 customer_deleted if it was deactivated; 403 origin_not_allowed if parentOrigin is not in your list; 409 surface_not_embedded if that surface is not in embedded mode; 409 embed_not_available if Embedded is off in your dashboard; 429 rate_limited above 60 codes per minute for the same customer.

No Idempotency-Key needed: every call issues a new code and earlier ones stay valid until they expire or are used.

POST /embed-sessions Code with the customer's API key
Scope: connections:read + connections:write

If your server already holds the API key of the organization that will embed (for example, your own), you do not need the partner API. The organization is the key's; the partner, the one managing it. Same response and same rules: 60 seconds, single use, parentOrigin among the partner's origins.

Parameters

  • surface body · connections required

    Surface you are going to embed. In v1 only connections is embeddable; panel opens with WAQR.launch.

  • parentOrigin body · string required

    The exact origin of the page that mounts the SDK (https://host[:port], no path). It must be in your allowed origins; the iframe checks it again when redeeming the code. Set it on your server: do not copy it from the browser without validating it.

Request
curl -X POST "https://api.waqr.app/v1/embed-sessions" \
  -H "Authorization: Bearer wq_live_…" \
  -H "Content-Type: application/json" \
  -d '{"surface":"connections","parentOrigin":"https://app.tu-saas.example"}'
Response · 201 Created
{
  "code": "ec_01JB5A7Q2M9X4K8R3T6V0W1Y",
  "expiresAt": "2026-10-23T15:01:00Z",
  "expiresInSeconds": 60,
  "surface": "connections",
  "embedUrl": "https://acme.waqr.app/embed/v1/connections"
}

The key needs both connections:read and connections:write. 409 embed_not_available if the organization does not belong to a partner or its partner has Embedded off; 403 origin_not_allowed, 409 surface_not_embedded and 429 rate_limited as in the partner route.

With an API key the panel surface is in redirect mode: the "Open WAQR" button goes to https://<slug>.waqr.app/login without a session. One-click sign-in requires the partner token.

Node/Express with a partner token (pcl_ · wqp_)
// Tu servidor (Node/Express): el único endpoint que necesita WAQR Embedded.
// partnerToken() es la misma función de «Entrada con un clic» (POST /v1/oauth/token, en caché 10 min).
const PARENT_ORIGIN = "https://app.tu-saas.example"; // origen EXACTO de la página que monta el SDK; registrado en tu panel

app.post("/api/waqr/embed-code", requireLogin, express.json(), async (req, res) => {
  const { surface, purpose } = req.body; // lo que manda el SDK: { surface, purpose: "embed" | "launch", parentOrigin }
  const account = req.user.account; // tu cliente; su id es el externalId en WAQR
  if (!req.user.can("whatsapp.manage")) return res.status(403).json({ error: "forbidden" });

  const base = `https://api.waqr.app/v1/partner/api/customers/${account.id}`;
  const headers = { Authorization: `Bearer ${await partnerToken()}`, "Content-Type": "application/json" };

  if (purpose === "launch") {
    // «Abrir WAQR»: la persona entra al panel completo con un clic, en tu subdominio y con tu marca.
    const r = await fetch(`${base}/sso`, { method: "POST", headers, body: JSON.stringify({ email: req.user.email, name: req.user.name, next: "/connections" }) });
    if (!r.ok) return res.status(502).json({ error: "waqr_unavailable" });
    const { url } = await r.json();
    return res.json({ url }); // 60 s y un solo uso: el SDK la abre dentro del clic
  }

  const r = await fetch(`${base}/embed-sessions`, { method: "POST", headers, body: JSON.stringify({ surface, parentOrigin: PARENT_ORIGIN }) });
  if (!r.ok) return res.status(502).json({ error: "waqr_unavailable" });
  const { code } = await r.json(); // ec_…, 60 s y un solo uso: devuélvelo ya; no lo guardes ni lo registres en logs
  res.json({ code });
});
Node/Express with an API key (wq_live_)
// Tu servidor (Node/Express) cuando ya tienes la clave de API de la organización que incrusta
// (por ejemplo, la tuya). La clave necesita connections:read y connections:write. Nunca en el navegador.
const PARENT_ORIGIN = "https://app.tu-saas.example";

app.post("/api/waqr/embed-code", requireLogin, express.json(), async (req, res) => {
  if (!req.user.can("whatsapp.manage")) return res.status(403).json({ error: "forbidden" });

  const r = await fetch("https://api.waqr.app/v1/embed-sessions", {
    method: "POST",
    headers: { Authorization: `Bearer ${process.env.WAQR_API_KEY}`, "Content-Type": "application/json" },
    body: JSON.stringify({ surface: req.body.surface, parentOrigin: PARENT_ORIGIN }),
  });
  if (!r.ok) return res.status(502).json({ error: "waqr_unavailable" });

  const { code } = await r.json(); // ec_…, 60 s y un solo uso
  res.json({ code });
  // Con clave de API el botón «Abrir WAQR» abre https://acme.waqr.app/login (modo redirect):
  // el SDK no llama a tu endpoint con purpose "launch".
});

What WAQR checks before issuing

  • Embedded is on in WAQR, your partner is active and its Embedded status is not off.
  • parentOrigin is a valid origin and is in your list (or it is local and you are in sandbox with local origins allowed).
  • The customer's organization exists and is not deactivated. A suspended or past_due one does get a code: the surface shows the block with your name and link instead of the connections.
  • The surface's resolved mode is embedded. If it is launch, redirect or disabled, it answers 409 surface_not_embedded.

The SDK in your page

One file (sdk.js, an IIFE exposing WAQR, or sdk.esm.js as a module) under 8 KB gzip served from your host. init() downloads nothing else: the configuration, sdk.css and the iframe arrive on mount. The SDK talks to the iframe through validated postMessage (protocol waqr-embed/1).

Load and init
<!-- Donde quieras mostrar «Vincular WhatsApp» -->
<div id="waqr-whatsapp"></div>

<!-- El SDK se sirve desde TU host de WAQR; pesa menos de 8 KB (gzip) y no carga nada más hasta montar -->
<script src="https://acme.waqr.app/embed/v1/sdk.js" defer></script>
<script defer>
  addEventListener("DOMContentLoaded", () => {
    WAQR.init({
      partner: "acme",
      theme: "auto", // light | dark | auto
      getSessionCode: (req) =>
        // req = { surface, purpose: "embed" | "launch", parentOrigin }. Devuelve el code (ec_…) o, para launch, la url.
        fetch("/api/waqr/embed-code", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(req) })
          .then((r) => r.json().then((d) => { if (!r.ok) throw new Error(d.error); return d.code ?? d.url; })),
      onEvent: (type, payload) => console.debug("waqr", type, payload),
    });
    WAQR.mount("connections", { container: "#waqr-whatsapp" });
  });
</script>
Mount, launch, listen
// Como módulo ES, en lugar del <script>:
import * as WAQR from "https://acme.waqr.app/embed/v1/sdk.esm.js";

// La superficie «Vincular WhatsApp» dentro de tu página (modo embedded). El alto se ajusta solo;
// minHeight y maxHeight son opcionales y mandan si los pones.
WAQR.mount("connections", { container: "#waqr-whatsapp", minHeight: 360, maxHeight: 900 });

// El panel completo de WAQR en una pestaña nueva. Llámalo desde un clic: el SDK abre la pestaña dentro del gesto.
botonAbrir.onclick = () => WAQR.launch("panel");

// Lo que pasa dentro, en tu SaaS.
WAQR.on("connection.updated", ({ connectionId, status, phone }) => {
  if (status === "connected") marcarWhatsappConectado(connectionId, phone);
});
const onError = ({ code, message }) => mostrarAviso(message);
WAQR.on("error", onError);
WAQR.off("error", onError); // deja de escuchar

// Tema en caliente, cierre y limpieza.
WAQR.setTheme("dark"); // equivale a WAQR.send("theme.set", { theme: "dark" })
WAQR.close("connections"); // quita el iframe; WAQR.destroy() quita todo y los listeners
console.log(WAQR.version); // semver del SDK cargado; la mayor coincide con /embed/v1

SDK API

  • init({ partner, getSessionCode, theme?, onEvent?, baseUrl? })

    partner is your slug. getSessionCode(req) receives { surface, purpose: "embed" | "launch", parentOrigin } and returns a promise with the code (ec_…) or, for launch, the url. theme: light, dark or auto (follows the system). onEvent(type, payload) receives every event. baseUrl is inferred from the <script> itself; only needed if you load it another way.

  • mount("connections", { container, minHeight?, maxHeight? })

    Creates the iframe in container (selector or element). If the mode is not embedded, it renders nothing and emits surface.mode (and surface.disabled if it is off). It never opens tabs on its own.

  • launch("panel")

    Opens WAQR in a new tab within the click. In launch mode it asks your getSessionCode for a one-click sign-in url (purpose: "launch"); in redirect it opens https://<slug>.waqr.app/login without calling you.

  • on(type, handler) · off(type, handler)

    Subscribe to the events in the table. Unknown types are ignored.

  • send(type, payload?) · setTheme(theme) · close(surface?) · destroy()

    Messages to the iframe (theme.set, close), live theme change, closing a surface and full cleanup.

  • version

    Semver of the loaded SDK; the major matches the URL (/embed/v1).

What the SDK handles for you

  • Reserves the height before creating the iframe with the heights WAQR announces per width (heights), and does not shrink it until the surface says ready: your page does not jump. Afterwards, the height follows the content (resize), with no double scroll.
  • The load timer does not run while the iframe is not visible (a hidden tab or a collapsed container does not cause timeout).
  • If the iframe's session expires (for example after hours in the background), the SDK asks your getSessionCode for a new code once and signs in again without you doing anything.
  • Errors are shown inside the surface with a "Retry" button. If a tab is blocked, you receive popup_blocked with the url to offer a link.
  • On screens of 640 px or less the surface stacks into one column.

Modes

The mode is set per surface in your dashboard; the SDK reads it from the configuration and acts accordingly. A mode the SDK does not know is treated as disabled.

  • embedded connections

    Creates the iframe in your container with the reserved height, fits it to the content and delivers the events. This is what auto resolves to for connections.

  • launch panel

    Asks your getSessionCode for a one-click sign-in url and opens it in a new tab, signed in. auto picks it when the code was issued by your partner token.

  • redirect panel

    Opens https://<slug>.waqr.app/login in a new tab, with no session. auto picks it when the code was issued by a customer API key.

  • connect_only —

    Reserved for future surfaces that need a prior connection step. No WAQR surface uses it in v1.

  • disabled connections · panel

    Renders and opens nothing; emits surface.disabled. It is also what any disallowed origin or a switched-off partner receives.

  • auto connections · panel

    WAQR decides on the server with the rules above and the SDK receives the resolved mode (surface.mode).

Events to your page

Delivered through on() and onEvent. Use them to mark "WhatsApp connected" in your SaaS or for analytics; the source of truth for your server remains the customer.connection.* webhooks.

  • ready { surface }

    The surface is rendered and signed in.

  • surface.mode { surface, mode }

    Which mode WAQR resolved for that surface on mount or launch.

  • surface.disabled { surface }

    The surface is off (or the origin is not allowed): nothing was rendered.

  • connection.created { connectionId, label, engine? }

    The customer clicked "Link a new WhatsApp" and the connection was created (QR: not scanned yet; an official Meta one arrives already connected). engine: evolution or waba.

  • connection.updated { connectionId, status, phone?, engine? }

    A connection changed status: connected after scanning the QR, disconnected or logged out.

  • launch.requested { surface: "panel" }

    The person clicked "Open WAQR" inside the surface. The SDK already handles it (launch/redirect).

  • launch.opened { surface: "panel", mode }

    The dashboard tab was opened.

  • resize { height }

    The content changed height. The SDK already resizes the iframe; informational.

  • error { code, message, url? }

    Something failed: session_failed, origin_rejected, config_unavailable, timeout, launch_failed or popup_blocked (with url). See "Errors".

To the iframe

  • theme.set · { theme }

    Switches light/dark live. WAQR.setTheme() is the shortcut.

  • close

    Closes the surface. WAQR.close() is the shortcut.

Your page's CSP

If your page sends Content-Security-Policy, add your WAQR host to these four directives. The SDK uses no inline styles or eval, so you need neither 'unsafe-inline' nor 'unsafe-eval'.

Directives to add
Content-Security-Policy:
  script-src  'self' https://acme.waqr.app;   # sdk.js
  style-src   'self' https://acme.waqr.app;   # sdk.css (no hace falta 'unsafe-inline')
  frame-src   https://acme.waqr.app;          # el iframe de la superficie
  connect-src 'self' https://acme.waqr.app;   # /embed/v1/config
  • Referrer-Policy: no-referrer on your page breaks nothing: the SDK passes your origin to the iframe in ?parent= and the browser confirms it through postMessage. The default, strict-origin-when-cross-origin, is the recommended value.
  • The iframe carries its own Content-Security-Policy: frame-ancestors <your origins>: no other site can embed your surface, not even another WAQR partner.
  • Do not copy sdk.js to your server: always load it from your WAQR host to receive fixes (5-minute cache with stale-while-revalidate).

Security

The design assumes your customer's browser is hostile territory: nothing that travels through it is useful outside that iframe, that origin and those 60 seconds.

What WAQR already does

  • The ec_ code travels in the fragment of the iframe URL (#code=), never in the query: it does not reach your server, logs or Referer. The iframe clears it before anything else (history.replaceState).
  • Single use and 60 seconds: redeeming consumes it atomically, even on failure. A code issued for your host is useless on another partner's host, and one issued for a parentOrigin is useless from another.
  • The embedded session (we_) lives in the iframe's memory only: 15 minutes sliding, 8 hours at most, no cookies. Every request re-checks that Embedded is still on, your partner still active and the organization still open.
  • That session can only view and manage connections (list, create, QR, log out, delete). It cannot read chats, contacts or messages, nor call /v1/connections or the rest of the API.
  • frame-ancestors limited to your origins; postMessage validated by schema, only between your WAQR host's origin and your window, with an explicit targetOrigin; the iframe without cookies and with Referrer-Policy: no-referrer.
  • Everything the customer does from the surface lands in their audit log with the actor embed (plus your partner and the session).

What is up to you

  • No secrets in the browser: Client Secret (wqp_), partner tokens and API keys (wq_live_) live only on your server. The browser only sees the code.
  • Check in your endpoint that your user may manage WhatsApp on that account before requesting the code; protect it like any other route (session, CSRF, rate limit).
  • Set parentOrigin on the server (or validate it against your own list): do not blindly copy it from the body the browser sends.
  • Do not log or store the code or the sign-in url: request them at the moment and return them right away.

Limits and errors

Limits are sized for real usage: a person opens the page, the SDK requests a code and redeems it. Every API response carries RateLimit-* and, when a limit is exceeded, 429 rate_limited with Retry-After.

  • Issuing: 60 codes per minute per customer organization (on both routes). Request the code on mount, not on every view load.
  • Redeeming (inside the iframe): 120 per minute per IP address. When exceeded, the code is not spent; the surface shows "Too many attempts" with "Retry".
  • The embedded session has its own per-session limit, generous for one person's usage, and the QR keeps the dashboard's limits.
  • Limits are enforced with 429, never with blocks: nothing the SDK does can suspend your partner or your customer.

Errors when issuing the code

Problem+json like the rest of the API. Your endpoint receives them from WAQR; translate for your user only what they need to know ("WhatsApp is not available right now").

  • 400

    invalid_parent_origin

    parentOrigin is missing or is not an origin (https://host[:port], no path or trailing slash).

  • 403

    origin_not_allowed

    parentOrigin is not among your origins (or it is local and you are not in sandbox with local origins allowed). Add it in your dashboard.

  • 404

    embed_disabled

    Embedded is switched off in WAQR right now. The public configuration says allowed: false and your page keeps working without the surface.

  • 409

    embed_not_available

    The organization does not belong to a partner or its partner has Embedded off.

  • 409

    surface_not_embedded

    That surface is not in embedded mode (panel always; connections if you set it to disabled). For panel, use WAQR.launch.

  • 404 · 409

    not_found · customer_deleted

    Partner route only: the externalId is not yours or the customer was deactivated.

  • 429

    rate_limited

    More than 60 codes per minute for the same organization. Wait Retry-After.

Example · 403 · application/problem+json
{
  "type": "https://docs.waqr.app/errors/origin-not-allowed",
  "title": "Origen no permitido",
  "status": 403,
  "code": "origin_not_allowed",
  "detail": "https://staging.tu-saas.example no está en los orígenes permitidos de tu partner.",
  "requestId": "req_01JB5B2K9N4P"
}

SDK errors

Delivered as the error { code, message, url? } event. The surface already shows the message and "Retry"; use them for analytics or to offer a link when a tab is blocked.

  • session_failed

    Your getSessionCode failed or the code was rejected on redeem (expired, already used or issued for another origin or host: embed_code_invalid).

  • origin_rejected

    Your page is served from an origin that is not in your allowed origins.

  • config_unavailable

    The public configuration could not be read (network or CSP without connect-src).

  • timeout

    The surface did not say ready in time while visible.

  • launch_failed

    Your getSessionCode did not return a valid url for launch.

  • popup_blocked

    The browser blocked the new tab. Carries url: offer it as a link.

Sandbox and local origins

The `sandbox` status exists so you can integrate from your development environments before opening the surface to your customers. Nothing changes on the WhatsApp side: the connections you link are real.

  • In sandbox everything works as in active, with your staging or pre-production https origins.
  • The origins http://localhost:<port> and http://127.0.0.1:<port> are accepted only in sandbox and if the WAQR deployment allows it: you see it as localOriginsAllowed in your dashboard. Never in production.
  • When you switch to active, local origins stop working even if they stay in the list; https ones are unaffected.
  • You can go back to sandbox or off at any time: the SDK reads it on the next load (the configuration is cached for 60 seconds).

What to test before activating

  1. 1 Mount the surface, create a connection, scan the QR and receive connection.updated with status: "connected".
  2. 2 An unregistered origin: your page stays the same and you receive error { code: "origin_rejected" }.
  3. 3 disabled mode on connections: nothing renders and surface.disabled arrives.
  4. 4 "Open WAQR" from a click: new tab signed in (launch) or at /login (redirect).
  5. 5 Mobile (≤ 640 px), light and dark theme, and a tab left in the background for hours (the session renews itself).

Production checklist

Before switching your partner to active:

  • Exact https origins (or https://*.domain) registered; none local.
  • getSessionCode endpoint on your server: authorizes the user, sets parentOrigin, rate limited and does not log the code.
  • Client Secret, partner token or API key only in server environment variables, outside the repository.
  • Your page's CSP with script-src, style-src, frame-src and connect-src for https://<slug>.waqr.app.
  • An error handler with a message for the person (popup_blocked → link).
  • customer.connection.* webhooks verified and idempotent: they are the source of truth for your server.
  • Tested in sandbox: light/dark, mobile, disallowed origin, disabled mode and "Open WAQR".
  • Status active in Partner → Integration → Embedded.

Versioning

  • The major version is in the URL: /embed/v1/sdk.js, /embed/v1/connections and messages with v: 1. An incompatible change would be /embed/v2, published alongside v1, which is kept.
  • Within v1 everything is additive: new events, optional fields and modes. Ignore what you do not know; the SDK already ignores unknown messages and treats an unknown mode as disabled.
  • Always load the SDK from your WAQR host, not from a copy: 5-minute cache with stale-while-revalidate, so fixes reach you without deploying.
  • WAQR.version tells which SDK version is loaded (semver; the major matches the URL).

Switch it on from your dashboard

The status, the origins, each surface's mode and the code snippet with your host and slug already filled in live in Partner → Integration → Embedded. If you are not a partner yet, write to us.

Go to the dashboard

Missing something?

This reference covers everything you can do today with an API key. Features marked "Coming soon" are already designed and will be enabled without changing the contract. If you need something you do not see here, write to us.

hi@waqr.app

Your WhatsApp should not be isolated from your systems.

Connect it once and use it wherever you need it.

Using Emboxia, Zygore or AXEN? Connect it from your account