Added

Roles API

Roles are now available through the public API. A role is a named set of permissions that applies inside a structure, and it grants nothing until you assign users to it.

The following APIs enable you to create, read, and replace roles, plus assign users to them and read who holds them:

Endpoint nameEndpoint
Create a rolePOST /permissions/v1/roles
Get a roleGET /permissions/v1/roles/{role_id}
Update a rolePUT /permissions/v1/roles/{role.id}
Add users to a rolePOST /structures/v1/roles/{role_id}/members
List users by rolePOST /structures/v1/roles/{role_id}/members/list

Developer impact: There is no endpoint to list roles, so track the id returned by POST /permissions/v1/roles. Managing a role created outside the API, such as one created in the web app, is not currently supported. PUT /permissions/v1/roles/{role.id} is a full replacement, so send the complete role on every update, including the permissions you want to keep.

Action required: No action required. Existing endpoints are unchanged.