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

# PATCH /v1/organizations/:id — Update Your Organization

> Update your organization's name, logo, KRA PIN, billing email, or address. All body fields are optional. Requires the org:organization:update permission.

Use this endpoint to update your organization's profile and compliance information. All body fields are optional — only the fields you include are updated. This is an organization context request: the path `:id` must match the organization in your `X-Organization-Id` header.

## Endpoint

```
PATCH https://api.nyotaimara.com/v1/organizations/:id
```

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer token. Format: `Bearer <token>`.
</ParamField>

<ParamField header="X-Organization-Id" type="string" required>
  The ID of the organization you are acting on behalf of. Must match the `:id` path parameter.
</ParamField>

## Path parameters

<ParamField path="id" type="string" required>
  The unique identifier of the organization to update.
</ParamField>

## Body

All fields are optional. Omitted fields are left unchanged.

<ParamField body="name" type="string">
  New display name for the organization.
</ParamField>

<ParamField body="logoUrl" type="string">
  URL of the organization's logo image.
</ParamField>

<ParamField body="kraPin" type="string">
  Kenya Revenue Authority PIN.
</ParamField>

<ParamField body="billingEmail" type="string">
  Email address for invoices and billing notifications.
</ParamField>

<ParamField body="address" type="string">
  Physical street address.
</ParamField>

<ParamField body="city" type="string">
  City of operation.
</ParamField>

<ParamField body="country" type="string">
  Country of operation.
</ParamField>

## Response

<ResponseField name="success" type="boolean" required>
  `true` on a successful update.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable confirmation. Value: `"Organization settings updated successfully."`
</ResponseField>

<Note>
  The `:id` in the path must match the organization ID in the `X-Organization-Id` header. Attempting to update a different organization returns a `403 Forbidden` error.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl --request PATCH \
    --url https://api.nyotaimara.com/v1/organizations/org_01j9kxyz \
    --header 'Authorization: Bearer <token>' \
    --header 'X-Organization-Id: org_01j9kxyz' \
    --header 'Content-Type: application/json' \
    --data '{
      "name": "Acme Kenya Ltd",
      "billingEmail": "finance@acmekenya.co.ke",
      "city": "Mombasa"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "message": "Organization settings updated successfully."
  }
  ```

  ```json 403 theme={null}
  {
    "success": false,
    "error": "Forbidden: you do not have permission to update this organization."
  }
  ```
</ResponseExample>
