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

# Add Organization Capability

> Attach a capability tag to an organization.

## Method

`POST` `/v1/organizations/:id/capabilities`

## Path Parameters

<ParamField path="id" type="uuid" required>Organization ID.</ParamField>

## Body Parameters

<ParamField name="category" type="string" required>Capability category (`transport`, `accommodation`, `flight`, `experience`, `other`).</ParamField>
<ParamField name="modeId" type="string">Provider-specific identifier (alias `mode_id`).</ParamField>
<ParamField name="modeKey" type="string">Internal key or slug (alias `mode_key`).</ParamField>
<ParamField name="notes" type="string">Optional notes.</ParamField>
<ParamField name="attributes" type="object">Arbitrary metadata map.</ParamField>

## Headers

<ParamField header="Authorization" type="string">Bearer token with `organizations:write` scope.</ParamField>
<ParamField header="content-type" type="string">`application/json`</ParamField>

## Request Example

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.voyantcloud.com/v1/organizations/org_123/capabilities \
    -H "Authorization: Bearer $VOYANT_API_KEY" \
    -H "content-type: application/json" \
    -d '{
      "category": "transport",
      "modeKey": "cruise",
      "notes": "Focus on Mediterranean routes"
    }'
  ```

  ```javascript Node.js theme={null}
  await fetch("https://api.voyantcloud.com/v1/organizations/org_123/capabilities", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.VOYANT_API_KEY}`,
      "content-type": "application/json",
    },
    body: JSON.stringify({ category: "experience", attributes: { languages: ["en", "fr"] } }),
  })
  ```

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

  payload = {
    "category": "transport",
    "mode_id": "provider-001",
    "attributes": {"fleetSize": 5}
  }

  resp = requests.post(
    "https://api.voyantcloud.com/v1/organizations/org_123/capabilities",
    headers={
      "Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}",
      "content-type": "application/json",
    },
    json=payload,
  )
  capability = resp.json()
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json 201 Created theme={null}
  {
    "data": {
      "id": "cap_001",
      "organizationId": "org_123",
      "category": "transport",
      "modeId": null,
      "modeKey": "cruise",
      "notes": "Focus on Mediterranean routes",
      "attributes": null,
      "createdAt": "2025-02-20T10:10:00.000Z"
    }
  }
  ```

  ```json 400 Bad Request theme={null}
  { "error": "Validation failed", "details": [ ... ] }
  ```
</ResponseExample>

<Tip>Use capabilities to drive feature toggles (for example, enabling transport inventory sync for specific partners). Duplicate entries should be avoided at the application layer.</Tip>
