Assign Role To User In Organization
PUT/api/v1/organizations/:organization_id/users/roles
Assign a role to a user in an organization.
Request
Path Parameters
Cookie Parameters
- application/json
Body
required
The user's ID.
The organization's ID.
The role's ID.
Responses
- 200
- 422
Successful Response
- application/json
- Schema
- Example (from schema)
Schema
- MOD1
- MOD1
- MOD1
- MOD1
- MOD1
Array [
- MOD1
- MOD1
- MOD1
]
Unique identifier
created_at
object
Creation datetime
anyOf
string
updated_at
object
Update datetime
anyOf
string
The user's ID.
The organization's ID.
The role's ID.
role
object
required
The role.
Unique identifier
created_at
object
Creation datetime
anyOf
string
updated_at
object
Update datetime
anyOf
string
A name for the role.
Possible values: non-empty
and <= 3000 characters
organization_id
object
required
The organization's ID.
anyOf
string
permissions
object[]
required
The actual permissions of the role.
Unique identifier
created_at
object
Creation datetime
anyOf
string
updated_at
object
Update datetime
anyOf
string
A name for the permission.
Possible values: non-empty
and <= 3000 characters
description
object
required
A description for the permission.
anyOf
string
Whether the permission is granted or not.
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "2024-07-29T15:51:28.071Z",
"updated_at": "2024-07-29T15:51:28.071Z",
"user_id": "string",
"organization_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"role_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"role": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "2024-07-29T15:51:28.071Z",
"updated_at": "2024-07-29T15:51:28.071Z",
"name": "string",
"organization_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"permissions": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "2024-07-29T15:51:28.071Z",
"updated_at": "2024-07-29T15:51:28.071Z",
"name": "string",
"description": "string",
"access": true
}
]
}
}
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
- MOD1
- MOD2
]
]
detail
object[]
loc
object[]
required
anyOf
string
integer
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}