Skip to main content

Add multiple existing users to an organization

POST 

/api/v1/orgs/{orgId}/users

Associates multiple existing users with an existing organization, assigning the admin role to each. All items are validated before any insertion — if any item fails, the entire batch is rejected.

Usage
POST /orgs/{orgId}/users

Parameters

  • orgId (Guid, required): the ID of the organization.
  • Request body:
    • input (CreateUpdateOrgUserDtoNoOrg[], required): array of user entries, each containing:
      • userId (string, required): the system GUID of the user to be added to the organization.
      • orgRole (string, required): the role assigned to the user within the organization. Only admin is accepted.

Responses

  • 201 Created: all users successfully added; returns the created org-user list in request order.
  • 400 Bad Request: array is empty, any orgRole is not admin, or any userId is not a valid GUID.
  • 403 Forbidden: caller is not admin in the target org; or any userId is not admin in the parent org (when org has a parent).
  • 404 Not Found: target org not found; parent org not found; or any userId does not exist in the system.
  • 409 Conflict: any userId is already a member of the target org.

Security
This API requires authentication.

Request

Responses

Created