Members and roles
Create a custom role
POST
Creates a role from the closed RBAC vocabulary. Permissions are canonicalized and cannot exceed the caller's effective permissions. System-role names are reserved.
bearerAuthheader
AuthorizationBearer <token>Use a Voice API key or connected-app OAuth access token. Authentication.
Idempotency-Key*stringRequired. Reuse the same key to retry this write safely. Retries and idempotency.
Match
^[A-Za-z0-9!#$%&'*+.^_`|~-]+$Length
1 <= length <= 255application/json- body
name*stringLength
1 <= length <= 120description?stringLength
length <= 1000permissions*array<>Items
items <= 256Created custom role.
application/json- response
id*stringFormat
uuidname*stringLength
1 <= length <= 120description*stringLength
length <= 1000is_system*booleanis_locked*booleanpermissions*array<>Items
items <= 256member_count*integerFormat
int64Range
0 <= valueversion*integerFormat
int64Range
1 <= valuecreated_at*stringFormat
date-timeupdated_at*stringFormat
date-timecurl -X POST 'https://api.kejue.co/v1/roles' \ -H 'Idempotency-Key: string' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "permissions": [ "string" ]}'Example Response
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "description": "string", "is_system": true, "is_locked": true, "permissions": [ "string" ], "member_count": 0, "version": 1, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}