API referencePeople and roles
Give a person a role
PUT
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.
bearerheader
AuthorizationBearer <token>An API token
id*stringA person's id
application/json- body
role*stringA role id
Changed
application/json- response
id*stringrole*stringcurl -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"}