Skip to main content
PATCH
/
workspaces
/
{workspace_id}
Update workspace
curl --request PATCH \
  --url https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-TL-Partner-Id: <x-tl-partner-id>' \
  --data '
{
  "display_name": "updated-workspace-name",
  "seats_purchased": 5
}
'
{
  "workspace_id": "ws_1234567890abcdef",
  "display_name": "my-first-workspace",
  "plan_id": 1,
  "seats_total": 3,
  "seats_available": 2,
  "updated_at": "2024-01-01T12:00:00Z",
  "owner_user_id": 42,
  "group_id": 7,
  "created_at": "2024-01-01T10:00:00Z",
  "suspended_members": [
    {
      "user_id": 123,
      "whatsapp_account_id": 1092930,
      "phone_numbers": [
        "+1234567890"
      ]
    }
  ]
}

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.

Body

application/json

Workspace update request payload

Partial update payload for a workspace. Allows partners to change the workspace display_name and/or the number of purchased seats. Fields are optional and only those provided are updated. Business rules around seat downgrades, including potential user suspensions, are enforced server-side.

display_name
string

New workspace display name

Required string length: 1 - 30
Example:

"updated-workspace-name"

seats_purchased
integer

New number of workspace seats

Required range: 1 <= x <= 99
Example:

5

Response

Workspace updated

Representation of a partner-managed workspace returned after creation or update. It includes the stable workspace_id, display_name, linked plan_id, seat allocation and utilization, audit timestamps, the default group identifier, the automatically generated Owner user, and any suspended members that resulted from a seat downgrade.

workspace_id
string
required

Unique identifier for the workspace

Example:

"ws_1234567890abcdef"

display_name
string
required

Workspace display name

Example:

"my-first-workspace"

plan_id
integer
required

Workspace plan type

Example:

1

seats_total
integer
required

Total number of seats in the workspace

Example:

3

seats_available
integer
required

Number of available seats in the workspace

Example:

2

updated_at
string<date-time>

Timestamp of the last update

Example:

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

owner_user_id
integer

User ID of the workspace owner

Example:

42

group_id
integer

Group ID associated with the workspace

Example:

7

created_at
string<date-time>

Timestamp of workspace creation

Example:

"2024-01-01T10:00:00Z"

suspended_members
object[]

array of suspended user IDs