# Update White-label Config

`PATCH https://api.astroway.info/v1/whitelabel/config`

Update one or more branding fields. Hex colours validated as #RRGGBB; custom_domain validated as RFC-1035 subdomain. Setting custom_domain resets domain_verified=false; call /whitelabel/domain/verify after pointing your CNAME to api.astroway.info.

Group: White-label. Auth: `X-Api-Key` header. Operation ID: `whitelabel_config_patch`.

## Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `fields` | query | no | string | Comma-separated dotted paths, relative to `data`, to keep in the response. A path is applied to every element of an array, so `planets.name` means the name of each planet. Paths that match nothing come back in `_fields_unmatched`; a list where nothing matches at all is a 400, because an empty object would be a confident wrong answer. |
| `precision` | query | no | integer | Round every non-integer number in the response to this many decimal places. Integers are left alone, because an id is not a measurement. Ecliptic longitudes ship with fourteen decimals by default; 2 is about a tenth of an arcminute. |

## Request body

| Field | Type | Required | Description |
|---|---|---|---|
| `primaryColor` | string | no |  |
| `secondaryColor` | string | no |  |
| `fontFamily` | string | no |  |
| `footerText` | string | no |  |
| `customDomain` | string | no |  |

```json
{
  "primary_color": "#0a0b1e",
  "footer_text": "© 2026 MyAstroBrand",
  "custom_domain": "api.myastrobrand.com"
}
```

## Responses

| Status | Meaning |
|---|---|
| 200 | Successful calculation |
| 400 | Validation error |
| 401 | Missing or invalid API key |

### Success fields, under `data`

| Field | Type | Required | Description |
|---|---|---|---|
| `primary_color` | string | no |  |
| `secondary_color` | string | no |  |
| `font_family` | string | no |  |
| `footer_text` | string | no |  |
| `custom_domain` | string | no |  |
| `domain_verified` | boolean | no |  |
| `domain_last_checked_at` | object | no |  |
| `logo_storage_key` | object | no |  |
| `updated_at` | string | no |  |

## Example

```bash
curl -X PATCH https://api.astroway.info/v1/whitelabel/config \
  -H "X-Api-Key: aw_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "primary_color": "#0a0b1e", "footer_text": "© 2026 MyAstroBrand", "custom_domain": "api.myastrobrand.com" }'
```

---

Rendered from https://api.astroway.info/v1/openapi.json. HTML page: https://api.astroway.info/docs/api/operations/whitelabel_config_patch/
