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

# Update widget configuration (requires write scope)

Partial update. Only fields included in the body are changed. Cached config is busted server-side so changes appear immediately on the embedded widget.

` PATCH /projects/{projectId}/widget/config `

Update widget configuration (requires write scope)

Partial update. Only fields included in the body are changed. Cached config is busted server-side so changes appear immediately on the embedded widget.

## Servers

- ` https://api.rogeriq.com/api/v1 `

## Authentication

The operation accepts these alternatives. Schemes within one alternative are required together.

### Alternative 1

- ` apiKey `: ` apiKey `

  - Credential: ` X-API-Key ` in ` header `

  - API key with `riq_` prefix

## Parameters

### ` projectId ` (path, required)

- ` value `: type ` string `

## Request body (optional)

Content type: ` application/json `

- ` value `: type ` object `

  - ` project_id `: type ` string `

  - ` enabled `: type ` boolean `

  - ` position `: type ` string `

    - enum: ` ["bottom-right","bottom-left"] `

  - ` color `: type ` string ` — Hex color, e.g. #F26B3A

  - ` welcome_message `: type ` string `

  - ` show_branding `: type ` boolean `

  - ` theme `: type ` string `

    - enum: ` ["light","dark","auto"] `

  - ` locale `: type ` string `

## Responses

### ` 200 ` — Updated

Content type: ` application/json `

- ` value `: type ` object `

  - ` data `: type ` object `

    - ` project_id `: type ` string `

    - ` enabled `: type ` boolean `

    - ` position `: type ` string `

      - enum: ` ["bottom-right","bottom-left"] `

    - ` color `: type ` string ` — Hex color, e.g. #F26B3A

    - ` welcome_message `: type ` string `

    - ` show_branding `: type ` boolean `

    - ` theme `: type ` string `

      - enum: ` ["light","dark","auto"] `

    - ` locale `: type ` string `

## Request examples

### cURL

```curl
curl -X PATCH 'https://api.rogeriq.com/api/v1/projects/string/widget/config' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "project_id": "string",
  "enabled": true,
  "position": "bottom-right",
  "color": "string",
  "welcome_message": "string",
  "show_branding": true,
  "theme": "light",
  "locale": "string"
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.rogeriq.com/api/v1/projects/string/widget/config', {
  method: 'PATCH',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN",
      "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "project_id": "string",
    "enabled": true,
    "position": "bottom-right",
    "color": "string",
    "welcome_message": "string",
    "show_branding": true,
    "theme": "light",
    "locale": "string"
  })
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.patch('https://api.rogeriq.com/api/v1/projects/string/widget/config', headers=headers, json={
  "project_id": "string",
  "enabled": true,
  "position": "bottom-right",
  "color": "string",
  "welcome_message": "string",
  "show_branding": true,
  "theme": "light",
  "locale": "string"
})
print(response.json())
```