Update API resource roles for application

PUT /api/applications/{applicationId}/roles

Update API resource roles assigned to the specified application. This will replace the existing API resource roles.

Path parameters

application/json

Body Required

  • roleIds array[string] Required

    An array of API resource role IDs to update for the application.

    Minimum length of each is 1.

Responses

  • 200 application/json

    The API resource roles have been updated for the application successfully.

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Unprocessable Content

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