# Update cookie consent settings

**Publié le** : 2026-05-08
**Catégorie** : Settings & Config

## `PUT /cookie-consent/settings`

**Update cookie consent settings**

Updates the consent banner configuration.

Required permissions: `cookie_consent.update`

### Request Body

Content-Type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean | No | Boolean |
| `consentMode` | "opt-in" \| "opt-out" \| "notice-only" | No | One of: opt-in, opt-out, notice-only |
| `showOnFirstVisit` | boolean | No | Boolean |
| `position` | "bottom" \| "top" \| "center" \| "bottom-left" \| "bottom-right" | No | One of: bottom, top, center, bottom-left, bottom-right |
| `layout` | "banner" \| "modal" \| "floating" | No | One of: banner, modal, floating |
| `theme` | "light" \| "dark" \| "auto" | No | One of: light, dark, auto |
| `primaryColor` | string | No | Primary brand color (hex) |
| `borderRadius` | number | No | Between 0 and 50 |
| `fontSize` | number | No | Between 11 and 17 |
| `showCustomizeButton` | boolean | No | Boolean |
| `orientation` | "auto" \| "column" | No | One of: auto, column |
| `maxWidth` | number | No | Between 280 and 1200 |
| `themeStyles` | object | No | Custom theme style overrides |
| `texts` | object | No | UI text content |
| `categories` | object[] | No | Array of objects |
| `privacyPolicyUrl` | string \| null | No | Privacy policy page URL |
| `cookiePolicyUrl` | string \| null | No | Cookie policy page URL |
| `thirdPartyScripts` | object[] | No | Array of objects |


### Responses

| Status | Description |
| --- | --- |
| `200` | Successful response |
| `401` | Unauthorized — invalid or missing API token |
| `403` | Forbidden — insufficient permissions |
| `422` | Validation error |


### Response Example

```json
{
  "data": {
    "enabled": true,
    "position": "bottom",
    "categories": [
      {
        "key": "necessary",
        "label": "Necessary",
        "required": true
      },
      {
        "key": "analytics",
        "label": "Analytics",
        "required": false
      }
    ]
  }
}
```

---