curl --request PATCH \
--url https://app.thinnest.ai/api/v1/members/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"role": "admin"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({role: 'admin'})
};
fetch('https://app.thinnest.ai/api/v1/members/{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/members/{id}"
payload = { "role": "admin" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "1f3a5c7e-9b2d-4e6f-8a0c-2e4f6a8b0d13",
"name": "Rahul Kulkarni",
"email": "rahul@sunrisedental.in",
"role": "admin",
"joinedAt": "2026-09-03T12:48:09.377Z"
}{
"error": "`role` must be `admin` or `member`."
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "Only an owner can make another owner. Do it from the console, signed in as one."
}{
"error": "That member was not found."
}{
"error": "A workspace needs at least one owner."
}{
"error": "This workspace was deleted on 2026-10-06 and is erased on 2026-11-05. POST /v1/customers/{id}/restore brings it back until then.",
"code": "workspace_deleted"
}{
"error": "Over 240 requests a minute. Slow down and retry.",
"code": "rate_limit_resources",
"limit": {
"name": "resources",
"perMinute": 240
}
}Update Member
Changes a member’s role to admin or member. A key cannot make anybody an owner — do that in the console, signed in as one — and the workspace’s last owner cannot be demoted. Needs a full key.
curl --request PATCH \
--url https://app.thinnest.ai/api/v1/members/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"role": "admin"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({role: 'admin'})
};
fetch('https://app.thinnest.ai/api/v1/members/{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/members/{id}"
payload = { "role": "admin" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "1f3a5c7e-9b2d-4e6f-8a0c-2e4f6a8b0d13",
"name": "Rahul Kulkarni",
"email": "rahul@sunrisedental.in",
"role": "admin",
"joinedAt": "2026-09-03T12:48:09.377Z"
}{
"error": "`role` must be `admin` or `member`."
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "Only an owner can make another owner. Do it from the console, signed in as one."
}{
"error": "That member was not found."
}{
"error": "A workspace needs at least one owner."
}{
"error": "This workspace was deleted on 2026-10-06 and is erased on 2026-11-05. POST /v1/customers/{id}/restore brings it back until then.",
"code": "workspace_deleted"
}{
"error": "Over 240 requests a minute. Slow down and retry.",
"code": "rate_limit_resources",
"limit": {
"name": "resources",
"perMinute": 240
}
}Authorizations
Headers
Developers only: the customer workspace this request acts in — its org_… id from POST /customers. Leave it out to act in your own workspace. Refused with 404 (Workspace not found.) when the id is unknown, is not one of your customers, or is not an org_… id; 410 when that customer was deleted (restore it with POST /customers/{id}/restore until it is erased); 403 when the key belongs to one customer workspace (it cannot act as another); 400 when your workspace is not a developer workspace. /customers/* and GET /customers/usage are your own workspace's and refuse the header with 400: call them without it.
"org_3fKq9TzQ1mN8vB2xR7cLpA"
Body
Response
The member as they now are.