/Docs
Search docs or ask a question⌘K
DocsAgent
Changelog
API Reference Update Member Role

Update Member Role

Change a workspace member's role.

PATCH/v1/orgs/{orgId}/members/{memberId}Try it
Session token

Changes a member's role to admin or member. To make someone an owner, use Transfer Ownership.

Note

Requires the admin or owner role and a session JWT. Changing the role of an owner requires the owner role. API keys are rejected with 401. A member gets 403 forbidden with details.requiredRole: "admin" — see Role errors. Any plan.

A workspace always keeps at least one owner, so the only owner can't be demoted (409 last_owner). If two owners demote each other at the same moment, one request succeeds and the other gets 409 last_owner.

Path Parameters

NameDescription
orgId:stringpathRequired
The organization ID.
memberId:stringpathRequired
The membership id from List Members.

Request Body

NameDescription
role:stringbodyRequired
admin or member. owner is rejected with 400.

Response — 200 OK

Returns the member in the same shape as List Members:

The change is recorded in the audit log as org.member.role_changed.

Error Responses

400 Bad Request

A missing role, or one other than admin or member, returns 400 validation_error, with the problem in details.issues.

401 Unauthorized

unauthorized for a missing, invalid or expired token (or an API key); session_revoked when the session has been signed out.

403 Forbidden

forbidden with details.requiredRole: "admin" when you are a member. An admin changing an owner's role gets:

json
{
"error": {
"code": "forbidden",
"message": "Only the workspace owner can change an owner’s role.",
"details": { "requiredRole": "owner", "currentRole": "admin", "traceId": "6f1c2a9e-3b7d-4c11-9a0e-2d5f8b4c7e10" }
}
}

Without role details, the 403 means you don't belong to the workspace.

404 Not Found

not_found — the workspace doesn't exist or is deleted, or memberId is not a member of this workspace ("Member not found").

409 Conflict

last_owner — the member is the workspace's only owner:

json
{
"error": {
"code": "last_owner",
"message": "A workspace needs an owner. Transfer ownership to someone else first.",
"details": { "traceId": "6f1c2a9e-3b7d-4c11-9a0e-2d5f8b4c7e10" }
}
}
Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl -X PATCH https://api.syntext.dev/v1/orgs/3f9c2a1e-6b4d-4e8a-a1c7-5d2e9f0b7c13/members/a2c4e6f8-1b3d-4f5a-8c7e-9d0b2f4a6c81 \
-H "Authorization: Bearer $SYNTEXT_JWT" \
-H "Content-Type: application/json" \
-d '{ "role": "admin" }'
Responseapplication/json
200OK
{
"data": {
"id": "a2c4e6f8-1b3d-4f5a-8c7e-9d0b2f4a6c81",
"userId": "7c9e1a3b-5d7f-4b2c-a4e6-8f0a2c4e6b17",
"email": "sam@example.com",
"name": "Sam Lee",
"avatarUrl": null,
"role": "admin",
"joinedAt": "2026-06-01T12:30:00.000Z",
"lastActiveAt": null
}
}
Product
Resources
Company
© 2026 SyntextBuilt with Syntext