---
title: "Update widget configuration"
method: PATCH
path: "/agent/{id}/widget-config"
tags: ["Agents"]
---

# Update widget configuration

`PATCH /agent/{id}/widget-config`

Updates the web widget configuration for the agent. Only provided fields are updated (partial update). When `avatarUrl` is changed, the old CDN avatar is automatically deleted from S3. The `avatarUrl` must be a URL from the platform's CDN domain — use `POST /agent/{id}/avatar/presigned-url` to upload first.

## Path parameters

- `id` string, required

## Request body

- object
  - `widgetConfig` object — All fields are optional — only provided fields are updated
    - `position` 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'
    - `size` 'tiny' | 'compact' | 'full'
    - `borderRadius` number
    - `mode` 'chat' | 'voice'
    - `theme` 'light' | 'dark'
    - `baseColor` string
    - `accentColor` string
    - `agentBubbleColor` string
    - `textOnAccentColor` string
    - `secondaryTextColor` string
    - `primaryTextColor` string
    - `title` string
    - `startButtonText` string
    - `endButtonText` string
    - `ctaTitle` string, nullable
    - `ctaSubtitle` string, nullable
    - `ctaName` string, nullable
    - `widgetName` string, nullable
    - `avatarUrl` string, nullable — Must be a platform CDN URL. Use `POST /agent/{id}/avatar/presigned-url` to obtain one.
    - `voiceEmptyMessage` string, nullable
    - `voiceActiveEmptyMessage` string, nullable
    - `chatEmptyMessage` string, nullable
    - `chatFirstMessage` string, nullable
    - `chatPlaceholder` string
    - `voiceShowTranscript` boolean
    - `consentRequired` boolean
    - `consentTitle` string
    - `consentContent` string
    - `consentStorageKey` string, nullable
    - `publicKey` string
    - `allowlist` string[]

## Response `200`

Updated widget configuration

- object
  - `success` boolean
  - `data` object — The updated widgetConfig object

## Other responses

- `400` — Invalid agent ID or `avatarUrl` is not a valid CDN URL
- `401` — Unauthorized access
- `404` — Agent not found
- `500` — Internal server error

---

[API](https://skmtc.net/smallest-inc/apis/agent-management-api.md) · [All operations](https://skmtc.net/smallest-inc/apis/agent-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smallest-inc/agent-management-api/versions/6d1036a76fbc/schema)
