Skip to main content

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

NameTypeRequiredNotes
user_idstringyes

Body

FieldTypeRequiredNotes
role"owner", "member"yes

Response · 200

{
"user_id": "usr_b2c3d4e5f6g7h8i9j0k1",
"email": "ada@example.com",
"role": "owner",
"created_at": "2026-01-15T09:30:00Z"
}

Errors

StatusMeaning
401Unauthenticated, invalid token or revoked key.
403Forbidden, session required or org required.
404No such resource in this org.
409An org must keep at least one owner; this would remove the last.
422Validation failed.
429Quota or rate limit exceeded; error.details says which, and when.
500Internal error; quote error.request_id when reporting it.

Every one carries the same envelope.

API overview · Full contract