Assign resource scopes to organization role

POST /api/organization-roles/{id}/resource-scopes

Assign resource scopes to the specified organization role

Path parameters

  • id string Required

    The unique identifier of the organization role.

application/json

Body Required

  • scopeIds array[string] Required

    An array of resource scope IDs to be assigned. Existed scope IDs assignments will be ignored.

    Minimum length of each is 1.

Responses

  • 201 application/json

    Resource scopes were assigned successfully.

  • Bad Request

  • Unauthorized

  • Forbidden

  • At least one of the IDs provided is invalid. For example, the resource scope ID does not exist;

POST /api/organization-roles/{id}/resource-scopes
curl \
 -X POST https://[tenant_id].logto.app/api/organization-roles/{id}/resource-scopes \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"scopeIds":["string"]}'
Request examples
{
  "scopeIds": [
    "string"
  ]
}