Pistis
API referencePeople and roles

Rename a role or change its permissions

PATCH
/admin/api/roles/{roleId}

Needs People & roles. Admin can't change; Member keeps its name. Holders get the new permissions on their next request.

Authorization

bearer
headerAuthorizationBearer <token>

An API token

Path Parameters

roleId*string

A role id

Request Body

application/json
  1. body
name?string
permissions?array<string>

Response Body

Changed

application/json
  1. response
id*string

admin and member are built in; others are made by an admin

name*string
builtIn*boolean
permissions*array<>
people*integer

How many people have it

Example Request
curl -X PATCH 'http://127.0.0.1:7777/admin/api/roles/member' \  -H 'Content-Type: application/json' \  -d '{  "permissions": [    "sessions.start",    "mcp.read"  ]}'
Example Response
{  "id": "string",  "name": "string",  "builtIn": true,  "permissions": [    "string"  ],  "people": 0}