> ## 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.

# Organizations API

> API endpoints for managing organizations (Tenant Only)

# Overview

The Organization API provides endpoints for tenants to manage organizations within their account. These endpoints require a tenant-specific API key for authentication.

## Available Endpoints

<CardGroup cols={2}>
  <Card title="List Organizations" icon="list" href="/api-reference/endpoint/list-organizations">
    Retrieve a paginated list of organizations
  </Card>

  <Card title="Create Organization" icon="plus" href="/api-reference/endpoint/create-organization">
    Create a new organization
  </Card>

  <Card title="Get Organization" icon="eye" href="/api-reference/endpoint/get-organization">
    Retrieve a specific organization by ID
  </Card>

  <Card title="Update Organization" icon="pen-to-square" href="/api-reference/endpoint/update-organization">
    Update an existing organization
  </Card>

  <Card title="Delete Organization" icon="trash" href="/api-reference/endpoint/delete-organization">
    Soft delete an organization (mark as inactive)
  </Card>

  <Card title="Update Organization Metadata" icon="tags" href="/api-reference/endpoint/update-organization-metadata">
    Update organization metadata with custom fields
  </Card>
</CardGroup>

## Authentication

All Organization API endpoints require authentication using a tenant-specific API key in the format:

```
Authorization: Bearer YOUR-API-KEY
```

For more information on authentication, see the [Authentication guide](/api-reference/authentication).

## Data Structures

### Organization Object

| Field         | Type   | Description                                 |
| ------------- | ------ | ------------------------------------------- |
| id            | string | Unique identifier for the organization      |
| name          | string | Organization name                           |
| email         | string | Organization email address                  |
| address       | string | Street address                              |
| city          | string | City                                        |
| stateProvince | string | State or province                           |
| postalCode    | string | Postal code or ZIP code                     |
| country       | string | Country                                     |
| phoneNumber   | string | Contact phone number                        |
| tenantId      | string | Tenant ID that the organization belongs to  |
| timezone      | string | Timezone (e.g., "America/New\_York")        |
| createdAt     | string | Creation timestamp (ISO 8601 format)        |
| createdBy     | string | ID of the user who created the organization |

### Metadata Object

Organization metadata allows you to sync external clinic info to AlloMia organization. The metadata structure is validated against a schema that you define.

Example metadata object:

```json theme={null}
{
  "specialties": ["cardiology", "neurology"],
  "emrSystem": "Epic",
  "operatingHours": {
    "monday": "9:00-17:00",
    "tuesday": "9:00-17:00",
    "wednesday": "9:00-17:00",
    "thursday": "9:00-17:00",
    "friday": "9:00-17:00"
  },
  "services": {
    "telehealth": true,
    "inPersonVisits": true,
    "emergencyCare": false
  }
}
```
