> ## Documentation Index
> Fetch the complete documentation index at: https://doc-dev.weir.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get All Organizations

> Retrieve all organizations in the system

# Get All Organizations

Retrieve a list of all organizations in the system (admin only).

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET 'https://api.weir.ai/admin/organizations' \
    -H 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN'
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "data": {
      "organizations": [
        {
          "organizationId": "org_123456789",
          "name": "Acme Corporation",
          "type": "Platform",
          "status": "active",
          "memberCount": 15,
          "platformCount": 3,
          "createdAt": "2024-01-01T00:00:00Z"
        }
      ],
      "total": 1
    },
    "message": "Organizations retrieved successfully",
    "status": "success"
  }
  ```
</ResponseExample>

## Response Fields

<ResponseField name="data.organizations" type="array" required>
  Array of organization objects.

  <Expandable title="Organization Properties">
    <ResponseField name="organizationId" type="string" required>
      Unique organization identifier.
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Organization name.
    </ResponseField>

    <ResponseField name="type" type="string" required>
      Organization type.
    </ResponseField>

    <ResponseField name="status" type="string" required>
      Organization status.
    </ResponseField>

    <ResponseField name="memberCount" type="integer">
      Total member count.
    </ResponseField>

    <ResponseField name="platformCount" type="integer">
      Total platform count.
    </ResponseField>
  </Expandable>
</ResponseField>

## Usage Examples

<CodeGroup>
  ```javascript JavaScript theme={null}
  const getAllOrganizations = async (accessToken) => {
    const response = await fetch('https://api.weir.ai/admin/organizations', {
      headers: { 'Authorization': `Bearer ${accessToken}` }
    });
    if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
    return await response.json();
  };
  ```

  ```python Python theme={null}
  import requests

  def get_all_organizations(access_token):
      response = requests.get(
          'https://api.weir.ai/admin/organizations',
          headers={'Authorization': f'Bearer {access_token}'}
      )
      response.raise_for_status()
      return response.json()
  ```
</CodeGroup>
