Skip to main content

Add 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: An array of user entries to add, 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. Returns the added organization users in request order. Each entry's orgRole is admin, because this endpoint only accepts admin.