Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Partially update a widget

Updates one or more fields of a widget. Only the fields included in the request body are changed, with two exceptions:

  • Sending name without slug regenerates the slug from the new name (lower-cased, spaces replaced by hyphens). Storefront pages that reference the old slug stop finding the widget. Include the current slug to keep it.

  • Sending attributes replaces the stored values — non-localizable values and the localizable values of the request language. Keys you leave out are removed; keys not defined in the widget type's schema are dropped.

The request language is resolved as described under IGNORE_ACCEPT_LANGUAGE_HEADER in Dynamic Settings & Environment Variables.

A resulting slug — sent or regenerated from name — that is already used by another widget is rejected, and nothing is changed: with 400 when a sent slug matches exactly, otherwise with 406 (cms_widget_100).

patch
/widgets/{id}/
Authorizations
AuthorizationstringRequired

Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.

Path parameters
idintegerRequired

The unique identifier of the widget.

Body

The body of a widget partial update request. Only the fields included are changed — except that sending name without slug regenerates the slug from the new name.

namestring · max: 255Optional

The display name of the widget. When sent without slug, the slug is regenerated from this value.

slugstring · max: 255Optional

The unique key of the widget. Letters, digits, underscores, and hyphens only; converted to lower case, with underscores replaced by hyphens, before it is stored.

Pattern: ^[-a-zA-Z0-9_]+$
widget_typeintegerOptional

The identifier of an existing widget type.

templatestring · max: 512Optional

The path of the template used to render the widget.

Responses
200

The updated widget.

application/json

A CMS widget.

pkintegerRead-onlyOptional

The unique identifier of the widget.

created_datestring · date-timeRead-onlyOptional

When the widget was created.

modified_datestring · date-timeRead-onlyOptional

When the widget was last changed.

namestring · max: 255Optional

The display name of the widget. Not unique.

slugstring · max: 255Optional

The unique, normalized (lower-case, hyphenated) key the storefront uses to look the widget up.

widget_typeintegerOptional

The identifier of the widget type.

templatestring · max: 512Optional

The path of the template used to render the widget.

patch/widgets/{id}/
PATCH /api/v1/remote/1/widgets/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 38

{
  "attributes": {
    "title": "Autumn Sale"
  }
}
{
  "pk": 12,
  "created_date": "2026-09-29T09:08:29.608203Z",
  "modified_date": "2026-09-29T09:08:29.608215Z",
  "name": "Home Hero Banner",
  "slug": "home-hero-banner",
  "widget_type": 3,
  "template": "widgets/hero-banner.html",
  "attributes": {
    "title": "Summer Sale",
    "subtitle": "Up to 50% off"
  },
  "attributes_kwargs": {}
}

Last updated

Was this helpful?