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
}
'import requests
url = "https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}"
payload = {
"display_name": "updated-workspace-name",
"seats_purchased": 5
}
headers = {
"X-TL-Partner-Id": "<x-tl-partner-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-TL-Partner-Id': '<x-tl-partner-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({display_name: 'updated-workspace-name', seats_purchased: 5})
};
fetch('https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => 'updated-workspace-name',
'seats_purchased' => 5
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-TL-Partner-Id: <x-tl-partner-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}"
payload := strings.NewReader("{\n \"display_name\": \"updated-workspace-name\",\n \"seats_purchased\": 5\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-TL-Partner-Id", "<x-tl-partner-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}")
.header("X-TL-Partner-Id", "<x-tl-partner-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"updated-workspace-name\",\n \"seats_purchased\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-TL-Partner-Id"] = '<x-tl-partner-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"updated-workspace-name\",\n \"seats_purchased\": 5\n}"
response = http.request(request)
puts response.read_body{
"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"
]
}
]
}{
"error": "<string>",
"status": 123,
"description": "<string>"
}Update workspace
Updates mutable workspace attributes for a partner-managed workspace. Partners can change the human-readable display_name and/or adjust the number of purchased seats (seats_purchased, 1-999). When the purchased seats are reduced below current utilization, the platform may automatically suspend users and their associated WhatsApp accounts to comply with the new limit. The response returns the updated workspace representation, including seat counters and, when applicable, details of suspended members so partners can reconcile the downgrade on their side. Standard partner ownership and billing eligibility checks apply before processing the update.
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
}
'import requests
url = "https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}"
payload = {
"display_name": "updated-workspace-name",
"seats_purchased": 5
}
headers = {
"X-TL-Partner-Id": "<x-tl-partner-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-TL-Partner-Id': '<x-tl-partner-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({display_name: 'updated-workspace-name', seats_purchased: 5})
};
fetch('https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => 'updated-workspace-name',
'seats_purchased' => 5
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-TL-Partner-Id: <x-tl-partner-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}"
payload := strings.NewReader("{\n \"display_name\": \"updated-workspace-name\",\n \"seats_purchased\": 5\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-TL-Partner-Id", "<x-tl-partner-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}")
.header("X-TL-Partner-Id", "<x-tl-partner-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"updated-workspace-name\",\n \"seats_purchased\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-TL-Partner-Id"] = '<x-tl-partner-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"updated-workspace-name\",\n \"seats_purchased\": 5\n}"
response = http.request(request)
puts response.read_body{
"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"
]
}
]
}{
"error": "<string>",
"status": 123,
"description": "<string>"
}Authorizations
Body
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.
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.

