Add New Sub-Organization Member

Add New Sub-Organization Member

This endpoint adds a new user to a specific sub-organization by providing the sub-organization ID. It allows you to set up the user's basic information, assign their role, and associate them with an organization. The user's email and password for login can also be configured.

HTTP Method and URL

MethodURL
POST{{host}}/api/v2/sub-organizations/:subOrganizationUuid/members?user_type=ENTERPRISE_API

Authentication Requirements

This endpoint requires authentication. Include a valid bearer token in the Authorization header:

Authorization: Bearer {USER-TOKEN}

Path and Query Parameters

Path Parameter:

  • subOrganizationUuid (string, required): The unique identifier of the sub-organization to which the user will be added.

Query Parameter:

  • user_type (string, required): Must be set to ENTERPRISE_API.

Request Body

The request body must be sent as multipart/form-data. The following fields are supported (array notation is used for batch addition, but typically only one user is added per request):

FieldTypeRequiredDescription
data[0][email]stringYesEmail address of the new user
data[0][first_name]stringYesFirst name of the user
data[0][last_name]stringYesLast name of the user
data[0][role]stringYesRole to assign (e.g., Member)
data[0][organization]objectYesOrganization details (JSON string)
data[0][organization_id]stringYesSub-organization UUID
data[0][company]stringNoCompany name
data[0][job_title]stringNoJob title
data[0][country]stringNoCountry
data[0][middle_name]stringNoMiddle name
data[0][password]stringNoPassword for the new user

Example Request

POST {{host}}/api/v2/sub-organizations/f91ce8d3-81ac-437a-bc5b-cffabb333cfa/members?user_type=ENTERPRISE_API
Authorization: Bearer {USER-TOKEN}
Content-Type: multipart/form-data
Form Data:
data[0][email]: [email protected]
data[0][first_name]: frist
data[0][last_name]: test
data[0][role]: Member
data[0][organization]: {"id":140,"sub_organization_type_name":"Department"}
data[0][organization_id]: f91ce8d3-81ac-437a-bc5b-cffabb333cfa

Example Successful Response

{
  "success": true,
  "message": "User added successfully.",
  "data": {
    "user_id": "...",
    "email": "[email protected]",
    "first_name": "frist",
    "last_name": "test",
    "role": "Member"
  }
}

Error Responses

  • 400 Bad Request: Missing or invalid parameters.

  • 401 Unauthorized: Invalid or missing authentication token.

  • 409 Conflict: User already exists in the sub-organization.

  • 500 Internal Server Error: Unexpected server error.

Usage Notes

  • Ensure the subOrganizationUuid is valid and the authenticated user has permission to add members.

  • The organization field should be a valid JSON string representing organization details.

  • Password is optional; if not provided, the user may receive an email to set their password.

  • For batch addition, increment the index in data[n][...] for each user.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
Query Params
string
Body Params
string

required

string

required

string

optional

string

required

string

optional

string

optional

string

optional

string

Admin | Member(default) ; required

string
string
string
string
string
string
string
string
string
string
string
integer
Response

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json