curl --request PATCH \
--url https://app.thinnest.ai/api/v1/customers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Sunrise Dental Clinic Pvt Ltd",
"allottedCallLines": 3,
"metadata": {
"tier": null,
"region": "west"
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Sunrise Dental Clinic Pvt Ltd',
allottedCallLines: 3,
metadata: {tier: null, region: 'west'}
})
};
fetch('https://app.thinnest.ai/api/v1/customers/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/customers/{id}"
payload = {
"name": "Sunrise Dental Clinic Pvt Ltd",
"allottedCallLines": 3,
"metadata": {
"tier": None,
"region": "west"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "org_5b2f9c1e-8a4d-4f7b-9e3a-2c6d1f0a7b84",
"name": "Sunrise Dental Clinic Pvt Ltd",
"externalId": "clinic-0042",
"metadata": {
"city": "Pune",
"seats": 3,
"region": "west"
},
"timezone": "Asia/Kolkata",
"allottedCallLines": 3,
"archivedAt": null,
"eraseAfter": null,
"createdAt": "2026-10-02T06:14:22.418Z"
}{
"error": "Unknown field `plan`. A customer's `name`, `externalId`, `metadata`, `timezone`, `allottedCallLines` can be changed."
}{
"error": "Send a valid API key as `Authorization: Bearer <key>`."
}{
"error": "This API key is read-only: it can read everything but change nothing."
}{
"error": "Customer not found."
}{
"error": "A customer with externalId `clinic-0042` already exists."
}{
"error": "This customer was deleted. Restore it first."
}{
"error": "Over 240 requests a minute. Slow down and retry."
}Update Customer
Changes a customer’s name, externalId, timezone, allottedCallLines or metadata; fields you leave out are kept. metadata is merged, not replaced: keys you do not mention stay, and a key set to null is removed. A deleted customer must be restored before it can be changed. Needs a full key.
curl --request PATCH \
--url https://app.thinnest.ai/api/v1/customers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Sunrise Dental Clinic Pvt Ltd",
"allottedCallLines": 3,
"metadata": {
"tier": null,
"region": "west"
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Sunrise Dental Clinic Pvt Ltd',
allottedCallLines: 3,
metadata: {tier: null, region: 'west'}
})
};
fetch('https://app.thinnest.ai/api/v1/customers/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/customers/{id}"
payload = {
"name": "Sunrise Dental Clinic Pvt Ltd",
"allottedCallLines": 3,
"metadata": {
"tier": None,
"region": "west"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "org_5b2f9c1e-8a4d-4f7b-9e3a-2c6d1f0a7b84",
"name": "Sunrise Dental Clinic Pvt Ltd",
"externalId": "clinic-0042",
"metadata": {
"city": "Pune",
"seats": 3,
"region": "west"
},
"timezone": "Asia/Kolkata",
"allottedCallLines": 3,
"archivedAt": null,
"eraseAfter": null,
"createdAt": "2026-10-02T06:14:22.418Z"
}{
"error": "Unknown field `plan`. A customer's `name`, `externalId`, `metadata`, `timezone`, `allottedCallLines` can be changed."
}{
"error": "Send a valid API key as `Authorization: Bearer <key>`."
}{
"error": "This API key is read-only: it can read everything but change nothing."
}{
"error": "Customer not found."
}{
"error": "A customer with externalId `clinic-0042` already exists."
}{
"error": "This customer was deleted. Restore it first."
}{
"error": "Over 240 requests a minute. Slow down and retry."
}Authorizations
Your API key (ta_live_…) from Settings → API keys, sent as Authorization: Bearer <key>. Keep it on a server: it can message every customer you have. A key is full, build or read-only; a request its level does not allow is refused with 403.
Path Parameters
The customer's id (org_…), as Create Customer answered.
Body
Send at least one field. Any other field is refused.
The customer's name.
1 - 120"Sunrise Dental Clinic Pvt Ltd"
Your own id for this customer; null clears it.
128^[A-Za-z0-9._:-]{1,128}$"clinic-0042"
Merged into what the customer has: keys you leave out are kept, a key set to null is removed. Values are strings (up to 500 characters), numbers or booleans; at most 50 keys and 8 KB once merged.
Show child attributes
Show child attributes
{ "tier": null, "region": "west" }
An IANA time zone. It cannot be cleared, only changed.
"Asia/Kolkata"
How many of your call lines this customer may use at once; null for no cap.
x >= 03
Response
The customer as it now is.
A workspace you created for one of your customers.
The customer's id (org_…). Send it as Thinnest-Workspace to act inside this customer.
"org_5b2f9c1e-8a4d-4f7b-9e3a-2c6d1f0a7b84"
The customer's name.
120"Sunrise Dental Clinic"
Your own id for this customer, unique among your customers; null when you gave none.
"clinic-0042"
Your own flat key-value data about the customer: up to 50 keys of 1-40 characters, each value a string (up to 500 characters), a number or a boolean. No nested objects or lists; 8 KB in all.
Show child attributes
Show child attributes
{
"city": "Pune",
"tier": "gold",
"seats": 3
}
The customer's IANA time zone; every date its console shows is in it.
"Asia/Kolkata"
How many of your call lines this customer may use at once; null for no cap.
x >= 02
When the customer was deleted; null while it is live.
null
When a deleted customer will be erased for good (30 days after deletion); null while it is live.
null
When the customer was created.
"2026-10-02T06:14:22.418Z"