Replace organization user members

PUT /api/organizations/{id}/users

Replace all user members for the specified organization with the given users. This effectively removing all existing user memberships in the organization and adding the new users as members.

Path parameters

  • id string Required

    The unique identifier of the organization.

application/json

Body Required

  • userIds array[string] Required

    An array of user IDs to replace existing users.

    Minimum length of each is 1.

Responses

  • Successfully replaced all users for the organization.

  • Bad Request

  • Unauthorized

  • Forbidden

  • At least one of the IDs provided is not valid. For example, the organization ID or user ID does not exist.

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