Promote or demote a member
PATCH /v1/members/{user_id}
Owners only. An org must always keep at least one owner, so demoting the last one is refused with 409 invalid_state; promote a second owner first. An owner may demote themselves once another owner exists.
Credential. A dashboard session token belonging to an owner of the organisation.
curl --fail-with-body -X PATCH "https://api-833252724876.us-central1.run.app/v1/members/usr_b2c3d4e5f6g7h8i9j0k1" \
-H "Authorization: Bearer $JEAN_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"role": "owner"
}'
Path
| Name | Type | Required | Notes |
|---|---|---|---|
user_id | string | yes |
Body
| Field | Type | Required | Notes |
|---|---|---|---|
role | "owner", "member" | yes |
Response · 200
{
"user_id": "usr_b2c3d4e5f6g7h8i9j0k1",
"email": "ada@example.com",
"role": "owner",
"created_at": "2026-01-15T09:30:00Z"
}
Errors
| Status | Meaning |
|---|---|
401 | Unauthenticated, invalid token or revoked key. |
403 | Forbidden, session required or org required. |
404 | No such resource in this org. |
409 | An org must keep at least one owner; this would remove the last. |
422 | Validation failed. |
429 | Quota or rate limit exceeded; error.details says which, and when. |
500 | Internal error; quote error.request_id when reporting it. |
Every one carries the same envelope.