Skip to main content
PATCH
/
v1
/
users
/
{id}
/
roles
Change User Roles
curl --request PATCH \
  --url https://sandbox-api.borderless.xyz/v1/users/{id}/roles \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "role": "OWNER"
}
'
{
  "id": "<string>",
  "email": "<string>",
  "firstName": "<string>",
  "lastName": "<string>",
  "businessTitle": "<string>",
  "role": "OWNER",
  "deleted": true,
  "deletedAt": "2023-11-07T05:31:56Z",
  "mfaEnabled": true,
  "dashboardPermissions": [
    "OrganizationApiKeysGenerate"
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Body

application/json
role
enum<string>

The role assigned to the user in the dashboard. Learn more about roles at User Management Guide.

Available options:
OWNER,
VIEWER,
CUSTOM
Example:

"OWNER"

Response

200 - application/json

User data with updated role.

id
string
required
email
string
required
firstName
string | null
required
lastName
string | null
required
businessTitle
string | null
required
role
enum<string>
required
Available options:
OWNER,
VIEWER,
CUSTOM
deleted
boolean
required
deletedAt
string<date-time> | null
required
mfaEnabled
boolean
required
dashboardPermissions
enum<string>[]