Workspace/Role
Cette page n'est pas disponible en français. La version anglaise est affichée.
Assign a custom workspace role to users
Inserts `auth_assignment` rows linking the given users to the role. Users that already have the role are silently skipped. Each user must belong to the workspace — cross-workspace user ids are rejected with 400.
Authorization
BearerAuthObject AuthorizationBearer <token>
In: header
Path Parameters
id*string
Workspace UUID
Format
uuidroleId*string
auth_item.name of the custom role
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v2/workspaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/roles/string/assign" \ -H "Content-Type: application/json" \ -d '{}'{ "usersCount": 3}Empty
{ "message": { "error": "Your request was made with invalid credentials." }}{ "message": { "error": "You are not allowed to perform this action." }}{ "message": { "error": "Page not found" }}{ "errors": { "langBcp": "Language already exists" }}