> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allomia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Organizations

> Retrieves a paginated list of organizations

## List Organizations

Retrieves a paginated list of organizations for the authenticated tenant. This endpoint requires a valid tenant API key for authentication.

### Headers

<ParamField header="Authorization" type="string" required>
  API key is required. Enter your tenant-specific API key in the format 'Bearer
  YOUR-API-KEY'
</ParamField>

### Query Parameters

<ParamField query="page" type="integer" default="1">
  Page number for pagination (1-based indexing)
</ParamField>

<ParamField query="limit" type="integer" default="10">
  Number of items per page (default 10, max 100)
</ParamField>

<ParamField query="sort" type="string" default="createdAt">
  Field to sort by (prefix with - for descending order, e.g. -createdAt)
</ParamField>

<ParamField query="search" type="string">
  Search term to filter organizations by name
</ParamField>

### Response

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

  <Expandable title="Organization properties">
    <ResponseField name="id" type="string">
      The unique identifier for the organization
    </ResponseField>

    <ResponseField name="name" type="string">
      The name of the organization
    </ResponseField>

    <ResponseField name="email" type="string">
      The email address for the organization
    </ResponseField>

    <ResponseField name="address" type="string">
      The street address of the organization
    </ResponseField>

    <ResponseField name="city" type="string">
      The city where the organization is located
    </ResponseField>

    <ResponseField name="stateProvince" type="string">
      The state or province where the organization is located
    </ResponseField>

    <ResponseField name="postalCode" type="string">
      The postal code or ZIP code for the organization
    </ResponseField>

    <ResponseField name="country" type="string">
      The country where the organization is located
    </ResponseField>

    <ResponseField name="phoneNumber" type="string">
      The contact phone number for the organization
    </ResponseField>

    <ResponseField name="tenantId" type="string">
      The tenant ID that the organization belongs to
    </ResponseField>

    <ResponseField name="timezone" type="string">
      The timezone for the organization
    </ResponseField>

    <ResponseField name="createdAt" type="string" format="date-time">
      The timestamp when the organization was created (ISO 8601 format: "2025-06-01T12:34:56Z")
    </ResponseField>

    <ResponseField name="createdBy" type="string">
      The ID of the user who created the organization
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="pagination" type="object">
  Pagination information

  <Expandable title="Pagination properties">
    <ResponseField name="page" type="integer">
      Current page number
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Number of items per page
    </ResponseField>

    <ResponseField name="total" type="integer">
      Total number of items
    </ResponseField>

    <ResponseField name="totalPages" type="integer">
      Total number of pages
    </ResponseField>

    <ResponseField name="hasNextPage" type="boolean">
      Whether there is a next page
    </ResponseField>

    <ResponseField name="hasPreviousPage" type="boolean">
      Whether there is a previous page
    </ResponseField>
  </Expandable>
</ResponseField>

### Example Request

```bash theme={null}
curl -X GET "https://allomia.com/api/organization?page=1&limit=10&sort=name&search=health" \
  -H "Authorization: Bearer YOUR-API-KEY"
```

### Example Response

```json theme={null}
{
  "organizations": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-123456789012",
      "name": "Valley Health Clinic",
      "email": "info@valleyhealthclinic.com",
      "address": "123 Main Street",
      "city": "San Francisco",
      "stateProvince": "CA",
      "postalCode": "94105",
      "country": "USA",
      "phoneNumber": "+14155551234",
      "tenantId": "tenant_123",
      "timezone": "America/Los_Angeles",
      "createdAt": "2025-06-01T12:34:56Z",
      "createdBy": "b2c3d4e5-f6a7-8901-bcde-234567890123"
    },
    {
      "id": "d4e5f6a7-b8c9-0123-defa-456789012345",
      "name": "Mountain Health Partners",
      "email": "contact@mountainhealth.org",
      "address": "456 Oak Avenue",
      "city": "Denver",
      "stateProvince": "CO",
      "postalCode": "80202",
      "country": "USA",
      "phoneNumber": "+13035557890",
      "tenantId": "tenant_123",
      "timezone": "America/Denver",
      "createdAt": "2025-05-15T09:22:33Z",
      "createdBy": "e5f6a7b8-c9d0-1234-efab-567890123456"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 2,
    "totalPages": 1,
    "hasNextPage": false,
    "hasPreviousPage": false
  }
}
```
