Skip to main content
POST
Assign role to user

Authorizations

Authorization
string
header
required

JWT token for user authentication

Path Parameters

userId
string
required

User ID to assign the role to

Body

application/json
roleId
string
required

ID of the role to assign

Example:

"a3dbd0c2-9f79-4f86-8caa-47779b3f2793"

companyId
string
required

ID of the company the role is assigned in

Example:

"123e4567-e89b-12d3-a456-426614174000"

Response

Role assigned successfully

id
string
required

User ID

Example:

"user123"

identifiers
object[]
required

User identifiers (email/phone)

primary_identifier
object
required
auth_methods
enum<string>[]
required

Available authentication methods

Available options:
password,
google,
client_platform
Example:
created_at
string<date-time>
required

User creation timestamp

Example:

"2024-01-01T00:00:00.000Z"

updated_at
string<date-time>
required

User last update timestamp

Example:

"2024-01-01T00:00:00.000Z"

roles
object[]

User roles

first_name
string

User first name

Example:

"John"

last_name
string

User last name

Example:

"Doe"

suspended_at
string<date-time>

User suspension timestamp

Example:

"2024-01-01T00:00:00.000Z"

metadata
object | null

Additional user metadata