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

# Organizations API

> Manage partner organizations, including metadata, capability tags, and API keys for B2B integrations.

## Endpoints

| Method | Path                                    | Description                                        |
| ------ | --------------------------------------- | -------------------------------------------------- |
| GET    | `/v1/organizations`                     | List organizations for the current workspace.      |
| POST   | `/v1/organizations`                     | Create an organization record.                     |
| GET    | `/v1/organizations/:id`                 | Retrieve a specific organization.                  |
| PATCH  | `/v1/organizations/:id`                 | Update organization metadata.                      |
| DELETE | `/v1/organizations/:id`                 | Soft-delete an organization.                       |
| GET    | `/v1/organizations/:id/capabilities`    | List capability tags assigned to the organization. |
| POST   | `/v1/organizations/:id/capabilities`    | Add a capability tag to the organization.          |
| GET    | `/v1/organizations/:id/api-keys`        | List API keys for the organization.                |
| POST   | `/v1/organizations/:id/api-keys`        | Create an API key for the organization.            |
| DELETE | `/v1/organizations/:id/api-keys/:keyId` | Revoke an organization API key.                    |

<Info>
  Organizations APIs require `workspaceId` in context (supplied automatically by workspace-scoped API keys). Read endpoints use the `organizations:read` scope; mutations require `organizations:write`.
</Info>

## Key concepts

* Organization create/update payloads accept both camelCase and snake\_case keys (`legalName` / `legal_name`, etc.). The API normalizes them before storing in the database.
* Capabilities allow segmenting organizations by category (`transport`, `accommodation`, `flight`, `experience`, `other`) and optional mode identifiers/keys.
* Deletions return `{ ok: true }` when successful; attempting to delete a missing organization returns `404`.
* **API Keys**: Organizations can have their own API keys for B2B integrations. These keys are scoped to specific products and capabilities.

## Webhooks

The following webhook events are emitted for organization operations:

| Event                          | Description                                           |
| ------------------------------ | ----------------------------------------------------- |
| `organization.created`         | Fired when a new organization is created.             |
| `organization.updated`         | Fired when organization metadata is updated.          |
| `organization.deleted`         | Fired when an organization is deleted.                |
| `organization.api_key.created` | Fired when an API key is created for an organization. |
| `organization.api_key.revoked` | Fired when an organization API key is revoked.        |
