Permissions

Replace team role

Changed on

Full-replace, idempotent update for role name, description, and permissions.

put/teams/{key}/roles/{roleId}

Request

  • Base URL
    https://api.session.services
  • Auth
    API key in header x-tenant-id

Path parameters

key, string required

Team identifier (ID or slug)

roleId, string required

Unique permission role identifier

Request body

object required
name, string required

Role display name

description, string

Optional role description

permissions, string[] required

Non-empty array of permission nodes. Supports wildcard and negation.

Example request

{
  "permissions": [
    "team.read",
    "team.member.write"
  ]
}

Response

OK

object required
role, object required

Team-scoped permission role

Example response

{
  "role": {
    "permissions": [
      "team.read",
      "team.member.write"
    ]
  }
}

Changes

    • breaking

      added the pattern ^prl_[0-9a-z]{26}$ to the path request parameter roleId

    • breaking

      the permissions request property's minItems was increased to 1

    • breaking

      the name request property's minLength was increased from 0 to 1

    4 more changes in this revision