v9

latestOpenAPI 3.0.3raw.githubusercontent.com2026-07-2181734.3 KB
qr

Generate QR code for user

Issues a long-lived WhatsApp QR-code link for a specific user in a partner-managed workspace. If the user already has a connected WhatsApp account, that account is disconnected first and the previous QR link (if any) is revoked. Only one active QR link per user is allowed at any given time; generating a new link invalidates any existing one. The request optionally accepts expires_in_hours (1–168, default 24) to control how long the QR link remains valid. The response includes the workspace_id, user_id, an unguessable qr_link URL, its expires_at timestamp, and flags indicating whether an existing WhatsApp account was disconnected and whether a previously active QR link was revoked. Generating a new QR code link is a destructive action: any currently connected WhatsApp account for this user will be forcibly disconnected.

post/workspaces/{workspace_id}/users/{user_id}/qr

Path parameters

workspace_idstring required

The unique identifier for the workspace.

user_idinteger required

The unique identifier for the user.

Headers

X-TL-Partner-Idstring required

The unique identifier for the partner.

Request body

expires_in_hoursinteger

Number of hours until the link expires

Response

QR code generated

workspace_idstring required

Unique identifier for the workspace

user_idinteger required

Unique identifier for the user

qr_linkstring required

QR code link for connecting to WhatsApp

expires_atstring date-time required

Expiration timestamp of the QR code link

whatsapp_disconnectedboolean required

Indicates whether an existing WhatsApp account was disconnected for this user

previous_qr_revokedboolean required

Indicates whether a previously issued QR link for this user was revoked

Example response

{
  "workspace_id": "my-first-workspace",
  "user_id": 42,
  "expires_at": "2024-01-01T12:00:00Z"
}