---
title: "Update Web Widget"
method: PUT
path: "/core/web-widgets/{id}"
tags: ["Web Widgets"]
---

# Update Web Widget

`PUT /core/web-widgets/{id}`

## Request

- Base URL: `https://api.anyreach.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.anyreach.ai/core/web-widgets/{id}`
- Auth: HTTP bearer

Update a web widget.

## Path parameters

- `id` string, required

## Headers

- `x-anyreach-org` string, nullable: Organization ID for user PATs (pat_ prefix tokens)

## Request body

- WebWidgetUpdateRequest: Schema for API requests to update a web widget.
  - `agent_id` string, nullable
  - `agent_version_id` string, nullable
  - `name` string, nullable
  - `domains` string[], nullable
  - `published` boolean, nullable
  - `collect_analytics` boolean, nullable
  - `config` object, nullable
  - `preset_id` string, nullable
  - `preset_sections` string[], nullable

## Response `200`

Successful Response

- WebWidget: Web widget entity representing a web embed configuration. `config` is the effective config: the widget's own, with the sections it follows replaced by its preset's. Every read resolves it, so the embed and every other reader see what the widget actually shows.
  - `id` string, required
  - `organization_id` string, required
  - `agent_id` string, required
  - `agent_version_id` string, required
  - `name` string, nullable
  - `domains` string[], required
  - `published` boolean, required
  - `collect_analytics` boolean
  - `config` object, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `created_by` string, nullable
  - `modified_by` string, nullable
  - `preset_id` string, nullable
  - `preset_sections` string[]

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/anyreach/apis/anyreach-api.md) - [All operations](https://skmtc.dev/anyreach/apis/anyreach-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anyreach/apis/anyreach-api/revisions/2eddf40c8c93?raw)
