Get All Sub Organizations

Get All Sub Organizations

Retrieves a list of all existing sub-organizations based on the user type specified in the query parameter. This endpoint is useful for administrators or integrators who need to enumerate sub-organizations within an enterprise context.


HTTP Method and URL

GET {{host}}/api/v2/organizations/sub?user_type=ENTERPRISE_API


Authentication Requirements

This endpoint requires authentication. Include a valid user-token in the request headers. Ensure your token has sufficient permissions to access organization data.


Path and Query Parameters

  • Query Parameter:
    • user_type (required): The type of user context for the request. Example: ENTERPRISE_API

Request Body

This request does not require a body.


Example Request

GET {{host}}/api/v2/organizations/sub?user_type=ENTERPRISE_API
Headers:
  user-token: <your_token_here>

Example Successful Response

{
  "sub_organizations": [
    {
      "id": "sub-org-123",
      "name": "Sub Organization 1",
      "status": "active"
    },
    {
      "id": "sub-org-456",
      "name": "Sub Organization 2",
      "status": "inactive"
    }
  ],
  "total": 2
}

Error Responses

Example:

{
  "error": "Invalid or missing authentication token.",
  "code": 401
}

Usage Notes

  • The user_type query parameter is required; omitting it will result in an error.

  • Ensure the user-token header is present and valid.

  • The response contains an array of sub-organization objects, each with id, name, and status fields.

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

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!