Skip to main content
POST
/
workspaces
/
{workspace_id}
/
users
/
{user_id}
/
qr
Generate QR code for user
curl --request POST \
  --url https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}/users/{user_id}/qr \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-TL-Partner-Id: <x-tl-partner-id>' \
  --data '
{
  "expires_in_hours": 24
}
'
{
  "workspace_id": "my-first-workspace",
  "user_id": 42,
  "qr_link": "<string>",
  "expires_at": "2024-01-01T12:00:00Z",
  "whatsapp_disconnected": true,
  "previous_qr_revoked": true
}

Authorizations

Authorization
string
header
required

JWT bearer authentication. The token payload must include partner_id, nbf (not-before) and exp (expiry) claims. All Partner API requests must be authenticated with Authorization: Bearer .

Headers

X-TL-Partner-Id
string
required

The unique identifier for the partner.

Path Parameters

workspace_id
string
required

The unique identifier for the workspace.

user_id
integer
required

The unique identifier for the user.

Body

application/json

QR code link generation request payload

Request payload for configuring the lifetime of a WhatsApp QR link. The optional expires_in_hours field controls how long the issued qr_link remains valid. If omitted, a sensible default (24 hours) is applied by the server.

expires_in_hours
integer
default:24

Number of hours until the link expires

Required range: 1 <= x <= 168

Response

QR code generated

Response payload returned when issuing a WhatsApp QR link for a user. Includes the workspace_id and user_id, the unguessable qr_link URL, its expires_at timestamp, and boolean flags showing whether an existing WhatsApp account was disconnected and whether any previously issued QR link for this user was revoked.

workspace_id
string
required

Unique identifier for the workspace

Example:

"my-first-workspace"

user_id
integer
required

Unique identifier for the user

Example:

42

QR code link for connecting to WhatsApp

expires_at
string<date-time>
required

Expiration timestamp of the QR code link

Example:

"2024-01-01T12:00:00Z"

whatsapp_disconnected
boolean
required

Indicates whether an existing WhatsApp account was disconnected for this user

previous_qr_revoked
boolean
required

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