APIAuth

Update a role

Replace a custom role's name, description, and permissions.

PUT
/roles/{role_id}

Replace a custom role's name, description, and permissions.

Authorization

ApiKeyAuth
headerAuthorizationBearer <token>

Bearer token authentication. Send an API key (a saai_api_-prefixed token) as Authorization: Bearer <token>.

Required permission

manage_roles

Path Parameters

role_id*string
Formatuuid

Request Body

application/json
  1. body
name*string
Length1 <= length <= 255
description?string
Lengthlength <= 1000
permissions*array<>
Items1 <= items

Response Body

The request has succeeded.

application/json
  1. response

A named bundle of permissions that can be assigned to users.

id*uuid
Formatuuid
name*string

The role's name as shown in the console.

description*string

What the role is for.

permissions*array<>

What holding the role lets a person do.

system*boolean

Built-in roles are maintained by the product and cannot be changed.

created_at*string
Formatdate-time
curl -X PUT "https://example.com/roles/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "permissions": [      {        "permission": "view_agents",        "scope": "all"      }    ]  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "description": "string",  "permissions": [    {      "permission": "view_agents",      "scope": "all"    }  ],  "system": true,  "created_at": "2019-08-24T14:15:22Z"}