For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
      • Overview
        • Abandoned Cart Emails
        • Custom Template Associations
        • Email Templates
        • Pages
        • Marketing
        • Store Content
        • Themes
        • Widgets
              • GETList Widget Templates
              • POSTCreate Widget Template
              • POSTRender Widget Template
              • GETGet Widget Template
              • PUTUpdate Widget Template
              • DELDelete Widget Template
        • Page Widgets
      • Payments
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTAdminContentWidgetsWidget Template

Update Widget Template

PUT
https://api.bigcommerce.com/stores/:store_hash/v3/content/widget-templates/:uuid
PUT
/stores/:store_hash/v3/content/widget-templates/:uuid
$curl -X PUT https://api.bigcommerce.com/stores/store_hash/v3/content/widget-templates/uuid \
> -H "Accept: application/json" \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "data": {
3 "current_version_uuid": "4bd7619e-7992-4454-8610-84fb16449761",
4 "date_created": "2020-12-21T19:36:16.896Z",
5 "date_modified": "2020-12-21T19:36:16.896Z",
6 "icon_name": "default",
7 "kind": "custom",
8 "name": "Header Images",
9 "schema": [],
10 "storefront_api_query": "",
11 "template": "{{#each images}}{{/each}}",
12 "uuid": "f8459145-da8f-4d98-93e4-83aa47da61c6",
13 "channel_id": 1,
14 "client_rerender": false,
15 "template_engine": "handlebars_v3"
16 },
17 "meta": {}
18}

Updates a Widget Template.

Was this page helpful?
Previous

Get Widget Template

Next

Delete Widget Template

Built with

Authentication

X-Auth-Tokenstring
### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Content | modify | `store_v2_content` | | Content | read-only | `store_v2_content_read_only` | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).

Path parameters

uuidstringRequiredformat: "uuid"
The identifier for a specific template.
store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json
The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.

Request

This endpoint expects an object.
channel_idintegerOptional
The id of the channel on which to place this template.
create_new_versionbooleanOptional
Can be added to create a new widget template version instead of updating the current one.
namestringOptional

The user-friendly name.

schemalist of objectsOptional

The schema for the widget’s merchant-facing UI. For more information on the available schema settings, see Widget UI Schema.

storefront_api_querystringOptional
The GraphQL Storefront API query that provides widget data.
templatestringOptionalformat: "html"
The widget template HTML. Supports Handlebars and Paper helpers.

Response

dataobject
metaobject
Response metadata.

Errors

404
Not Found Error
422
Unprocessable Entity Error

OAuth scopes

UI NamePermissionParameter
Contentmodifystore_v2_content
Contentread-onlystore_v2_content_read_only

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

Further reading

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.

The MIME type of the response body.