Skip to main content
PATCH
/
api
/
v1
/
shared
/
users
/
{user_id}
/
role
Update User Role
curl --request PATCH \
  --url https://api.example.com/api/v1/shared/users/{user_id}/role \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "role": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "email": "<string>",
  "firstName": "<string>",
  "lastName": "<string>",
  "role": "<string>",
  "state": "<string>",
  "lastLogin": "2023-11-07T05:31:56Z",
  "createdAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

user_id
string<uuid>
required

Body

application/json

Payload for changing a user's role.

role
string
required

One of: admin, office-admin, office-employee, crew-member

Response

Successful Response

User info for admin view — hides technical fields.

role is the cached WorkOS membership role, used purely to render the crew table. Never read it for authorization.

id
string<uuid>
required
email
string
required
firstName
string
required
lastName
string
required
role
string
required
state
string
required
lastLogin
string<date-time> | null
required
createdAt
string<date-time>
required