Skip to main content
POST
/
workspaces
/
{workspace_id}
/
users
/
{user_id}
/
whatsapp
/
disconnect
Disconnect WhatsApp account
curl --request POST \
  --url https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}/users/{user_id}/whatsapp/disconnect \
  --header 'Authorization: Bearer <token>' \
  --header 'X-TL-Partner-Id: <x-tl-partner-id>'
{
  "workspace_id": "<string>",
  "user_id": 123,
  "disconnected": true,
  "disconnected_at": "2024-01-01T12:00:00Z",
  "whatsapp_account_id": 123,
  "phone_number": "<string>",
  "description": "<string>"
}

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.

Response

WhatsApp disconnected

Response payload for a WhatsApp disconnect operation. Indicates whether a WhatsApp account was actually disconnected for the given user, provides the disconnection timestamp, and, when applicable, echoes the workspace_id, user_id, whatsapp_account_id and phone_number involved in the operation.

workspace_id
string

Unique identifier for the workspace

user_id
integer

Unique identifier for the user

disconnected
boolean
default:true

Indicates whether a WhatsApp account was disconnected

disconnected_at
string<date-time>

Timestamp of the disconnection event

Example:

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

whatsapp_account_id
integer

ID of the disconnected WhatsApp account

phone_number
string

Phone number associated with the disconnected WhatsApp account

description
string

Additional information about the disconnection