Assign role to applications

POST /api/roles/{id}/applications

Assign a role to a list of applications. The role must have the type Application.

Path parameters

  • id string Required

    The unique identifier of the role.

application/json

Body Required

  • applicationIds array[string] Required

    An array of application IDs to be assigned.

    Minimum length of each is 1.

Responses

  • 201 application/json

    The role was assigned to the applications successfully.

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Unprocessable Content

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