APIAuth
Create a role
Create a custom role.
POST
Create a custom role.
ApiKeyAuthheader
AuthorizationBearer <token>Bearer token authentication. Send an API key (a saai_api_-prefixed token) as Authorization: Bearer <token>.
Required permission
manage_rolesapplication/json- body
name*stringLength
1 <= length <= 255description?stringLength
length <= 1000permissions*array<>Every permission must be one you hold yourself, at a scope no wider than yours.
Items
1 <= itemsThe request has succeeded and a new resource has been created as a result.
application/json- response
A named bundle of permissions that can be assigned to users.
id*uuidFormat
uuidname*stringThe role's name as shown in the console.
description*stringWhat the role is for.
permissions*array<>What holding the role lets a person do.
system*booleanBuilt-in roles are maintained by the product and cannot be changed.
created_at*stringFormat
date-timecurl -X POST "https://example.com/roles" \ -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"}