Clarify API
Users

Change a user’s role

Sets a workspace user’s role to `admin` or `member` and returns the updated user as a JSON:API resource. Requires an admin signed in with a user access token; the last admin cannot be demoted.

PATCH
/workspaces/{workspace}/users/{userId}/role
AuthorizationBearer <token>

User access token authentication for endpoints that act across workspaces. Send a WorkOS access token in the Authorization header as: Bearer <token>.

In: header

Path Parameters

workspace*string

The workspace slug — the {slug} segment of your Clarify workspace URL.

userId*string

The unique ID of the user.

Query Parameters

silent?boolean

When true, suppresses in-app and Slack notifications for this mutation.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/workspaces/string/users/string/role" \  -H "Content-Type: application/json" \  -d '{    "role": "admin"  }'
{  "data": {    "type": "user",    "id": "7d4e2f9a-1b3c-4d5e-8f6a-9c0b2d4e6f81",    "attributes": {      "_id": "7d4e2f9a-1b3c-4d5e-8f6a-9c0b2d4e6f81",      "name": {        "first_name": "Alex",        "last_name": "Rivera"      },      "roles": {        "items": [          "admin"        ]      },      "email": "alex@acme.com",      "profile_picture": "https://storage.clarify.ai/avatars/acme/alex-rivera.png",      "last_active_at": "2026-02-01T17:45:00.000Z",      "_created_at": "2026-01-15T09:30:00.000Z",      "_updated_at": "2026-02-01T17:45:00.000Z"    }  }}