Skip to main content
PUT
/
v1
/
users
/
{id}
/
roles
Replace (sync) the roles for a user
curl --request PUT \
  --url https://dev.flextell.ai/api/v1/users/{id}/roles \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Tenant: <x-tenant>' \
  --data '
{
  "role_ids": [
    123
  ]
}
'
{
  "success": "<string>",
  "data": [
    "<unknown>"
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

X-Tenant
number
required

Tenant identifier. Send the Tenant ID in the X-Tenant header to scope API requests to a specific tenant.

Path Parameters

id
integer
required

The user identifier

Body

application/json
role_ids
integer[]
required

Role IDs to assign (full sync — empty array clears all roles).

A role ID.

Response

success
string
required
data
any[]
required