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. Onlyadminis accepted.
Responses
201 Created: all users successfully added; returns the created org-user list in request order.400 Bad Request: array is empty, anyorgRoleis notadmin, or anyuserIdis not a valid GUID.403 Forbidden: caller is not admin in the target org; or anyuserIdis not admin in the parent org (when org has a parent).404 Not Found: target org not found; parent org not found; or anyuserIddoes not exist in the system.409 Conflict: anyuserIdis already a member of the target org.
Security
This API requires authentication.
Request
Responses
- 201
- 400
- 401
- 403
- 404
- 409
- 500
- 501
Created
Array is empty, any orgRole is not admin, or any userId is not a valid GUID.
Unauthorized
Caller is not admin in target org, or any userId is not admin in parent org.
Target org not found, parent org not found, or any userId does not exist in the system.
Any userId is already a member of the target org.
Internal Server Error
Not Implemented