curl --request POST \
--url https://api.example.com/cabinet/admin/rbac/assignments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_id": 123,
"role_id": 123,
"expires_at": "2023-11-07T05:31:56Z"
}
'{
"id": 123,
"user_id": 123,
"role_id": 123,
"is_active": true,
"role_name": "<string>",
"user_telegram_id": 123,
"user_username": "<string>",
"user_first_name": "<string>",
"user_email": "<string>",
"assigned_by": 123,
"assigned_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z"
}Assign a role to a user. Hierarchy enforcement applies.
curl --request POST \
--url https://api.example.com/cabinet/admin/rbac/assignments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_id": 123,
"role_id": 123,
"expires_at": "2023-11-07T05:31:56Z"
}
'{
"id": 123,
"user_id": 123,
"role_id": 123,
"is_active": true,
"role_name": "<string>",
"user_telegram_id": 123,
"user_username": "<string>",
"user_first_name": "<string>",
"user_email": "<string>",
"assigned_by": 123,
"assigned_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Successful Response
User-role assignment details.