Skip to Content
Members and roles

Update a custom role

Permissionroles:updateAuthentication
PATCH
/roles/{id}

Applies a partial update to a custom role. System roles are immutable, reserved names are rejected, and supplied permissions cannot exceed the caller's. A semantic no-op preserves the version and ETag.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Path Parameters

id*string
Formatuuid

Header Parameters

If-Match?string

Optional strong ETag (or *) from a prior response. A stale tag returns 412 without changing the resource.

Request Body

application/json
  1. body
Properties1 <= properties
name?string
Length1 <= length <= 120
description?string
Lengthlength <= 1000
permissions?array<>
Itemsitems <= 256

Response Body

Updated role, or the unchanged role for a semantic no-op.

application/json
  1. response
id*string
Formatuuid
name*string
Length1 <= length <= 120
description*string
Lengthlength <= 1000
is_system*boolean
is_locked*boolean
permissions*array<>
Itemsitems <= 256
member_count*integer
Formatint64
Range0 <= value
version*integer
Formatint64
Range1 <= value
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X PATCH 'https://api.kejue.co/v1/roles/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{}'
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"}