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

# Organizations

> Manage organizations, storage configuration, and app stores

Organizations are the top-level container for all platform resources. Each organization has members, roles, entities, a store, and deployment infrastructure.

## List organizations

```bash theme={null}
GET /api/organizations
```

Returns organizations the authenticated user belongs to.

| Parameter  | Type  | Description                  |
| ---------- | ----- | ---------------------------- |
| `page`     | query | Page number (default: 1)     |
| `pageSize` | query | Items per page (default: 20) |
| `search`   | query | Search by name or slug       |

**Authentication:** User authentication required.

## Get organization

```bash theme={null}
GET /api/organizations/{id}
```

Returns organization details including members, roles, and storage configuration. Includes the organization's NPM registry key if the requesting user belongs to this organization.

**Authentication:** Organization member required.

## Storage configuration

### Get storage config

```bash theme={null}
GET /api/organizations/{id}/storage-config
```

Returns the organization's storage mode and configuration (Synthetiq-managed or external).

**Authentication:** Organization member required.

### Update storage config

```bash theme={null}
POST /api/organizations/{id}/storage-config
```

Configure where entity packages and assets are stored.

**Authentication:** Organization member + `org:settings` scope.

## Organization store

The organization store is an internal app store where members can discover and install shared entities.

### List store publications

```bash theme={null}
GET /api/organizations/{id}/store
```

| Parameter | Type  | Description                                               |
| --------- | ----- | --------------------------------------------------------- |
| `type`    | query | Filter by entity type: `app`, `service`, `chat_extension` |

**Authentication:** Organization member or public store access.

### Publish to store

```bash theme={null}
POST /api/organizations/{id}/store
```

| Parameter  | Type | Required | Description                           |
| ---------- | ---- | -------- | ------------------------------------- |
| `entityId` | body | Yes      | Entity to publish                     |
| `isPublic` | body | No       | Make visible outside the organization |

**Authentication:** Organization member + `entities:share_store` scope + entity publisher access.

### Remove from store

```bash theme={null}
DELETE /api/organizations/{id}/store
```

| Parameter  | Type | Required | Description         |
| ---------- | ---- | -------- | ------------------- |
| `entityId` | body | Yes      | Entity to unpublish |

**Authentication:** Organization member + `entities:share_store` scope + entity publisher access.

### Get publication details

```bash theme={null}
GET /api/organizations/{id}/store/{publicationId}
```

**Authentication:** Organization member or public access.

### Update publication

```bash theme={null}
PATCH /api/organizations/{id}/store/{publicationId}
```

| Parameter  | Type | Description              |
| ---------- | ---- | ------------------------ |
| `isPublic` | body | Update public visibility |

**Authentication:** Organization member + `entities:share_store` scope.

### Delete publication

```bash theme={null}
DELETE /api/organizations/{id}/store/{publicationId}
```

**Authentication:** Organization member + `entities:share_store` scope.

## List public stores

```bash theme={null}
GET /api/stores
```

Returns all publicly accessible stores across organizations.

**Authentication:** User authentication required.
