Replace organization application roles

PUT /api/organizations/{id}/applications/{applicationId}/roles

Replace all roles associated with the application in the organization with the given data.

Path parameters

  • id string Required

    The unique identifier of the organization.

  • applicationId string Required

    The unique identifier of the application.

application/json

Body Required

  • organizationRoleIds array[string] Required

    An array of role IDs to replace existing roles.

    Minimum length of each is 1.

Responses

  • The roles were replaced successfully.

  • Bad Request

  • Unauthorized

  • Forbidden

  • The roles could not be replaced. Some of the roles may not exist.

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