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.
Authorization
bearer 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
The workspace slug — the {slug} segment of your Clarify workspace URL.
The unique ID of the user.
Query Parameters
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" } }}Remove a user
Removes a user from the workspace: they lose access, their campaigns stop, and their connected mailboxes disconnect. Their records stay in the workspace. The last user and the last admin cannot be removed.
Create a workflow
Creates a workflow from a trigger and a set of blocks. Create it disabled and enable it once the automation graph is complete. Returns the created workflow.