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

# Update Organization

> Modify organization metadata (name, contact details, addresses, metadata).

## Method

`PATCH` `/v1/organizations/:id`

## Path Parameters

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

## Body Parameters

Any subset of the fields accepted by the create endpoint:

* `name`
* `legalName` / `legal_name`
* `email`
* `phone`
* `description`
* `taxId` / `tax_id`
* `kind`
* `billingAddress` / `billing_address`
* `visitingAddress` / `visiting_address`
* `metadata`

## 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 PATCH https://api.voyantcloud.com/v1/organizations/org_123 \
    -H "Authorization: Bearer $VOYANT_API_KEY" \
    -H "content-type: application/json" \
    -d '{
      "phone": "+40 700 000 002",
      "metadata": {"tier": "platinum"}
    }'
  ```

  ```javascript Node.js theme={null}
  await fetch("https://api.voyantcloud.com/v1/organizations/org_123", {
    method: "PATCH",
    headers: {
      Authorization: `Bearer ${process.env.VOYANT_API_KEY}`,
      "content-type": "application/json",
    },
    body: JSON.stringify({ description: "Updated partner" }),
  })
  ```

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

  payload = {"email": "partners@voyantcruises.com", "kind": "wholesale"}

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

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": {
      "id": "org_123",
      "name": "Voyant Cruises",
      "legalName": "Voyant Cruises SRL",
      "email": "partners@voyantcruises.com",
      "phone": "+40 700 000 002",
      "description": "Updated partner",
      "taxId": "RO12345678",
      "kind": "wholesale",
      "billingAddress": null,
      "visitingAddress": null,
      "metadata": { "tier": "platinum" },
      "createdAt": "2025-02-20T10:00:00.000Z",
      "updatedAt": "2025-02-22T08:15:00.000Z"
    }
  }
  ```

  ```json 404 Not Found theme={null}
  { "error": "Organization not found" }
  ```
</ResponseExample>

<Tip>Fields omitted from the payload remain unchanged. Passing `null` sets nullable fields (like `metadata`) to `null`.</Tip>
