Skip to main content
PUT
/
api
/
v2
/
users
/
{id}
/
roles
/
update
Update roles of a company member
curl --request PUT \
  --url https://paradigm.lighton.ai/api/v2/users/{id}/roles/update/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "roles": [
    123
  ]
}
'
{
  "id": 123,
  "username": "<string>",
  "first_name": "<string>",
  "last_name": "<string>",
  "email": "<string>",
  "is_active": true,
  "date_joined": "2023-11-07T05:31:56Z",
  "account_expiration_date": "2023-11-07T05:31:56Z",
  "last_login": "2023-11-07T05:31:56Z",
  "invitation_status": "<string>",
  "language": "<string>",
  "company": {
    "id": 123,
    "name": "<string>"
  },
  "roles": [
    {
      "id": 123,
      "name": "<string>"
    }
  ],
  "groups": [
    {
      "id": 123,
      "name": "<string>",
      "description": "<string>",
      "role": "<string>",
      "category": "<string>",
      "created_at": "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

id
integer
required

The unique identifier of the user.

Body

roles
integer[]

Response

200 - application/json
id
integer
required
username
string
required
first_name
string
required
last_name
string
required
email
string
required
is_active
boolean
required
date_joined
string<date-time>
required
account_expiration_date
string<date-time>
required
last_login
string<date-time>
required
invitation_status
string
required
language
string
required
company
object
required
roles
object[]
required
groups
object[]
required