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 Widgets
              • POSTCreate Widget
              • GETGet Widget
              • PUTUpdate Widget
              • DELDelete Widget
        • Page Widgets
      • Payments
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTAdminContentWidgetsWidget

Create Widget

POST
https://api.bigcommerce.com/stores/:store_hash/v3/content/widgets
POST
/stores/:store_hash/v3/content/widgets
$curl -X POST https://api.bigcommerce.com/stores/store_hash/v3/content/widgets \
> -H "Accept: application/json" \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "string",
> "widget_template_uuid": "string"
>}'
1{
2 "data": {
3 "channel_id": 1,
4 "date_created": "2020-12-21T19:54:16.406Z",
5 "date_modified": "2020-12-21T19:54:16.406Z",
6 "description": "",
7 "name": "Header Images",
8 "uuid": "1f05183e-dfa4-4583-af28-250b47e177b2",
9 "version_uuid": "c863f77b-e5b4-4462-a9ed-2aff9005140e",
10 "widget_configuration": {
11 "_": {
12 "id": "1f05183e-dfa4-4583-af28-250b47e177b2"
13 },
14 "images": [
15 {
16 "image_source": "https://cdn11.bigcommerce.com/s-n0i50vy/images/stencil/1280x1280/products/109/361/kinfolkessentialissue_1024x1024__22507.1456436715.jpg?c=2&imbypass=on"
17 },
18 {
19 "image_source": "https://cdn11.bigcommerce.com/s-n0i50vy/images/stencil/500x659/products/85/282/livingwithplants_grande__26452.1456436666.jpg?c=2&imbypass=on"
20 },
21 {
22 "image_source": "https://cdn11.bigcommerce.com/s-n0i50vy/images/stencil/1280x1280/products/109/361/kinfolkessentialissue_1024x1024__22507.1456436715.jpg?c=2&imbypass=on"
23 }
24 ]
25 },
26 "widget_template": {
27 "current_version_uuid": "c863f77b-e5b4-4462-a9ed-2aff9005140e",
28 "date_created": "2020-12-21T19:49:29.110Z",
29 "date_modified": "2020-12-21T19:49:29.110Z",
30 "icon_name": "default",
31 "kind": "custom",
32 "name": "Header Images",
33 "schema": [],
34 "storefront_api_query": "",
35 "template": "{{#each images}}{{/each}}",
36 "uuid": "f8459145-da8f-4d98-93e4-83aa47da61c6",
37 "channel_id": 1,
38 "client_rerender": false,
39 "template_engine": "handlebars_v3"
40 },
41 "storefront_api_query_params": {}
42 },
43 "meta": {}
44}
Creates a **Widget**. **Note:** There is a limit of 100,000 widgets per store and 150 widgets per page. For more information, see [Store Limits](https://support.bigcommerce.com/s/article/Platform-Limits#storelimits).
Was this page helpful?
Previous

List Widgets

Next

Get Widget

Built with

Creates a Widget.

Note: There is a limit of 100,000 widgets per store and 150 widgets per page. For more information, see Store Limits.

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

store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json

The MIME type of the response body.

Request

This endpoint expects an object.
namestringRequired
User friendly name.
widget_template_uuidstringRequired
The widget template UUID.
descriptionstringOptional

The user-friendly description.

widget_configurationobjectOptional
The JSON data that populates the template.
channel_idintegerOptional
The ID of the channel on which to create this widget. Defaults to the first channel created on the store.

Response

dataobject
metaobject
Response metadata.

Errors

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.