# Update Agency Branding

> Change the stored branding settings.

Requires an API key with the `write` scope.

Only API keys of an Agency workspace can call this endpoint (`403 agency_required` otherwise). The call always runs in the key's own workspace; `X-Workspace-Id` is ignored. Writes also need a key created by the agency workspace owner (`403 agency_owner_required` otherwise).

Only the fields you send change. The bring-your-own OpenAI key cannot be set through the API.

## Body Parameters

<ParamField body="brandName" type="string">Up to 100 characters.</ParamField>
<ParamField body="logoUrl" type="string">HTTPS URL.</ParamField>
<ParamField body="faviconUrl" type="string">HTTPS URL.</ParamField>
<ParamField body="primaryColor" type="string">Hex color such as `#1a2b3c`.</ParamField>
<ParamField body="accentColor" type="string">Hex color.</ParamField>
<ParamField body="hideWatermark" type="boolean">Hide the FoxReach watermark.</ParamField>

## Response

Returns the branding after the change.

<ResponseField name="data" type="object">
  <Expandable title="data">
    <ResponseField name="brandName" type="string">Brand name shown to clients, or `null`.</ResponseField>
    <ResponseField name="logoUrl" type="string">HTTPS logo URL, or `null`.</ResponseField>
    <ResponseField name="faviconUrl" type="string">HTTPS favicon URL, or `null`.</ResponseField>
    <ResponseField name="primaryColor" type="string">Hex color.</ResponseField>
    <ResponseField name="accentColor" type="string">Hex color.</ResponseField>
    <ResponseField name="hideWatermark" type="boolean">Whether the FoxReach watermark is hidden.</ResponseField>
    <ResponseField name="hasOpenaiKey" type="boolean">Whether a bring-your-own OpenAI key is stored. The key itself is never returned.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
```bash cURL
curl -X PUT "https://api.foxreach.io/api/v1/agency/branding" \
  -H "X-API-Key: otr_your_key" \
  -H "Content-Type: application/json" \
  -d '{"brandName": "Acme Outreach", "primaryColor": "#E07A5F"}'
```

```python Python SDK
from foxreach import FoxReach

client = FoxReach(api_key="otr_your_key")
client.agency.update_branding(brand_name="Acme Outreach", primary_color="#E07A5F")
```

```typescript TypeScript SDK
import { FoxReach } from "foxreach";

const client = new FoxReach({ apiKey: "otr_your_key" });
await client.agency.updateBranding({ brandName: "Acme Outreach", primaryColor: "#E07A5F" });
```
</RequestExample>

<ResponseExample>
```json
{
  "data": {
    "brandName": "Acme Outreach",
    "logoUrl": "https://acme.com/logo.svg",
    "faviconUrl": null,
    "primaryColor": "#E07A5F",
    "accentColor": "#4A7C59",
    "hideWatermark": true,
    "hasOpenaiKey": false
  }
}
```
</ResponseExample>

## Errors

| Status | Description |
|--------|-------------|
| `401` | Missing, invalid, revoked or expired API key |
| `403` | API key does not have the required scope: `write` |
| `403` | `agency_required` or `agency_owner_required` |
| `422` | A URL is not HTTPS or a color is not a hex code |

Each change is recorded as an `audit.agency_branding.updated` event with the key as the actor and the names of the fields you sent (not their values), readable through the [audit log](/api-reference/audit-log/list-audit-log).

## Rate Limit

- **120 requests per minute, shared by every `write` call in your workspace.** Fixed 60-second window.
- Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (unix epoch seconds) and `X-RateLimit-Bucket` (`write`).
- A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns, see [Rate Limiting](/rate-limiting).
