PUT
/
users
Update User
curl --request PUT \
  --url https://api.contextual.ai/v1/users \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "<string>",
  "is_tenant_admin": false,
  "roles": [
    "VISITOR"
  ],
  "agent_level_roles": [
    "AGENT_LEVEL_USER"
  ],
  "per_agent_roles": [
    {
      "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "roles": [
        "AGENT_LEVEL_USER"
      ],
      "grant": true
    }
  ]
}'
{}

Authorizations

Authorization
string
header
required

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

Body

application/json

The schema used for creating new users or updating existing users.

email
string
required

The email of the user

is_tenant_admin
boolean
default:false

Flag indicating if the user is a tenant admin

roles
enum<string>[]

The user level roles of the user.

agent_level_roles
enum<string>[]

The user level roles of the user for agent level roles.

per_agent_roles
PerAgentRoles · object[]

Per agent level roles for the user. If a user is granted any role under agent_level_roles, then the user has that role for all the agents. Only the roles that need to be updated should be part of this.

Response

Successful Response

The response is of type object.