Role object

A Role is a named collection of permissions that links actions to a Resource. Roles are assigned to Members, either explicitly by direct assignment or implicitly by matching attributes or conditions, which grants them permissions.

Role assignment can be programmatically managed through certain Stytch API endpoints. Refer to this guide for details on controls for delegating Roles to Members.

All Roles are stored in your Project's RBAC Policy. You can create, manage, and assign Roles in the Dashboard.

Check out the RBAC overview to learn more about Stytch's RBAC permissioning model.


Fields


role_idstring

descriptionstring

permissionsarray[objects]

OBJECT

{
  "roles": [
    {
      "description": "",
      "permissions": [
        {
          "actions": [
            "read",
            "write"
          ],
          "resource_id": "documents"
        },
        {
          "actions": [
            "read",
            "export",
            "share"
          ],
          "resource_id": "images"
        }
      ],
      "role_id": "editor"
    },
    {
      "description": "",
      "permissions": [
        {
          "actions": [
            "read"
          ],
          "resource_id": "documents"
        },
        {
          "actions": [
            "read"
          ],
          "resource_id": "images"
        }
      ],
      "role_id": "reader"
    }
  ]
}