PATCH
/
users
/
{id}
/
role
Update user role
curl --request PATCH \
  --url https://api.wirespeed.co/users/{id}/role \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "role": "ADMIN"
}'
{
  "id": "<string>",
  "intercomId": "<string>",
  "createdAt": "<string>",
  "fullName": "<string>",
  "email": "<string>",
  "locked": true,
  "superAdmin": true,
  "activeTeamId": "<string>",
  "parentTeamId": "<string>",
  "completedOnboarding": true,
  "firstName": "<string>",
  "lastName": "<string>",
  "teamId": "<string>",
  "autoSubscribeToNotifications": true,
  "role": "ADMIN"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

User ID

Body

application/json
role
enum<string>
required

New role to assign to the user

Available options:
ADMIN,
ANALYST,
VIEWER

Response

id
string
required

Unique identifier for the user

intercomId
string
required

Intercom customer support identifier

createdAt
string
required

Timestamp when the user was created

email
string
required

Email address of the user

locked
boolean
required

Whether the user account is locked

superAdmin
boolean
required

Whether the user has super admin privileges

activeTeamId
string
required

ID of the currently active team

parentTeamId
string
required

ID of the parent team

completedOnboarding
boolean
required

Whether the user has completed onboarding

teamId
string
required

Team ID the user belongs to

autoSubscribeToNotifications
boolean
required

Whether the user is auto subscribed to notifications

role
enum<string>
required

Role assigned to the user

Available options:
ADMIN,
ANALYST,
VIEWER
fullName
string

Full name of the user

firstName
string

First name of the user

lastName
string

Last name of the user