Skip to main content
GET
Organization Tree

Organization Tree

Retrieve the complete hierarchical structure of your organization, starting from the top-level parent (holding) down to all subsidiaries and child organizations. The tree always starts from the root organization, regardless of which organization is specified in the x-organization-id header. This means you can use the API key from any organization in the tree and always get the full hierarchy.

Request

Headers

string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
string
required
Your organization UUID. Can be any organization in the tree - the response always starts from the root.Example: dce3ff33-9fcc-4521-910f-7972d81fb70c

Response

string
Organization UUID (root/holding organization)
string
Organization name
array[object]
Child organizations (recursive structure - each child has the same shape)

Example

Successful Response

Common Errors

401 Unauthorized

Cause: Missing or invalid API key
Solution: Verify your API key is valid and active. Get a new one from Settings > API.

404 Not Found

Cause: Organization not found
Solution: Verify that the x-organization-id header contains a valid organization UUID.

Use Cases

List All Subsidiaries (Flat)

Flatten the tree to get a simple list of all organizations:

Count Organizations by Level

Analyze the depth of the organizational structure:

Export Organization IDs

Extract all organization IDs for use with other API endpoints:

Organizations Overview

Learn about the Organizations API

Authentication

Set up API authentication