Pistis
API referencePeople and roles

Give a person a role

PUT
/admin/api/people/{id}/role

Needs People & roles. It applies from their next request, tokens they already hold included. The last enabled Admin keeps Admin (409). From a browser session, send the page's CSRF token as x-csrf.

Authorization

bearer
headerAuthorizationBearer <token>

An API token

Path Parameters

id*string

A person's id

Request Body

application/json
  1. body
role*string

A role id

Response Body

Changed

application/json
  1. response
id*string
role*string
Example Request
curl -X PUT 'http://127.0.0.1:7777/admin/api/people/0f8fad5b-d9cb-469f-a165-70867728950e/role' \  -H 'Content-Type: application/json' \  -d '{  "role": "member"}'
Example Response
{  "id": "string",  "role": "string"}