Link scopes to role

POST /api/roles/{id}/scopes

Link a list of API resource scopes (permissions) to a role. The original linked scopes will be kept.

Path parameters

  • id string Required

    The unique identifier of the role.

application/json

Body Required

  • scopeIds array[string] Required

    An array of API resource scope IDs to be linked.

    Minimum length of each is 1.

Responses

  • 200

    The role was linked to the scopes successfully.

  • 201

    Created

  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 404

    Not Found

  • 422

    Unprocessable Content

POST /api/roles/{id}/scopes
curl \
 -X POST https://[tenant_id].logto.app/api/roles/{id}/scopes \
 -H "Content-Type: application/json" \
 -d '{"scopeIds":["string"]}'
Request example
{
  "scopeIds": [
    "string"
  ]
}