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
        • Page Widgets
            • GETGet Page Snapshot
            • POSTPublish or Overwrite Page Content
      • Payments
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTAdminContentPage Widgets

Publish or Overwrite Page Content

POST
https://api.bigcommerce.com/stores/:store_hash/v3/content/page-widgets
POST
/stores/:store_hash/v3/content/page-widgets
$curl -X POST https://api.bigcommerce.com/stores/store_hash/v3/content/page-widgets \
> -H "Accept: application/json" \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "regions": [
> {
> "name": "home_below_menu",
> "children": [
> {
> "configuration": {
> "title": "Hero Banner Title",
> "subtitle": "Add a description for this hero banner. This is a great place to highlight a promotion.",
> "buttonText": "Shop now",
> "contentAlignment": {
> "horizontal": "left"
> },
> "containerHeight": "small",
> "backgroundType": "image",
> "backgroundColor": "#444444",
> "imageUrl": {
> "src": "https://images.unsplash.com/photo-1533038590840-1cde6e668a91?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2000&q=100",
> "type": "IMAGE_MANAGER"
> },
> "imageFit": "fill",
> "imageParallax": "off",
> "imageAlignment": {
> "horizontal": "center",
> "vertical": "middle"
> },
> "imageOpacity": 100,
> "titleVisible": "show",
> "titleStyle": "default",
> "titleFontFamily": "inherit",
> "titleFontWeight": "400",
> "titleFontSize": {
> "value": 36,
> "type": "px"
> },
> "descriptionVisible": "show",
> "descriptionStyle": "default",
> "descriptionFontFamily": "inherit",
> "descriptionFontWeight": "400",
> "descriptionFontSize": {
> "value": 21,
> "type": "px"
> },
> "textColor": "#444444",
> "mobileTextColor": "#444444",
> "buttonVisible": "show",
> "buttonFont": "default",
> "buttonFontFamily": "inherit",
> "buttonStyle": "round",
> "buttonColor": "#444444",
> "mobileButtonColor": "#444444",
> "buttonTextColor": "rgba(255,255,255,1)",
> "mobileButtonTextColor": "rgba(255,255,255,1)"
> },
> "storefront_api_query_params": {},
> "name": "Hero Banner",
> "description": "",
> "type": "widget"
> }
> ]
> },
> {
> "name": "header_bottom",
> "children": [
> {
> "configuration": {
> "columnWeights": [
> "33.333333%",
> "33.333333%",
> "33.333333%"
> ],
> "layoutBackgroundColor": "rgba(0,0,0,0)",
> "layoutBackgroundImageAlignment": {
> "horizontal": "center",
> "vertical": "middle"
> },
> "layoutBackgroundImageFit": "fill",
> "layoutBackgroundImageOpacity": 100,
> "layoutBackgroundImageUrl": "",
> "layoutBorderColor": "#333333",
> "layoutBorderStyle": "solid",
> "layoutBorderThickness": 0,
> "layoutHeight": "",
> "layoutMargin": {
> "bottom": {
> "type": "px",
> "value": "0"
> },
> "left": {
> "type": "px",
> "value": "0"
> },
> "right": {
> "type": "px",
> "value": "0"
> },
> "top": {
> "type": "px",
> "value": "0"
> }
> },
> "layoutPadding": {
> "bottom": {
> "type": "px",
> "value": "0"
> },
> "left": {
> "type": "px",
> "value": "0"
> },
> "right": {
> "type": "px",
> "value": "0"
> },
> "top": {
> "type": "px",
> "value": "0"
> }
> },
> "numberOfDropzones": 3,
> "layoutBackgroundType": "",
> "layoutZIndex": "auto",
> "name": "Layout"
> },
> "name": "Layout",
> "dropzones": [
> {
> "configuration": {
> "dropzoneBackgroundColor": "rgba(0,0,0,0)",
> "dropzoneBackgroundImageAlignment": {
> "horizontal": "center",
> "vertical": "middle"
> },
> "dropzoneBackgroundImageFit": "fill",
> "dropzoneBackgroundImageOpacity": 100,
> "dropzoneBackgroundImageUrl": "",
> "dropzoneBorderColor": "#333333",
> "dropzoneBorderStyle": "solid",
> "dropzoneBorderThickness": 0,
> "dropzoneHeight": "",
> "dropzoneJustifyContent": "center",
> "dropzoneMargin": {
> "bottom": {
> "type": "px",
> "value": "0"
> },
> "left": {
> "type": "px",
> "value": "0"
> },
> "right": {
> "type": "px",
> "value": "0"
> },
> "top": {
> "type": "px",
> "value": "0"
> }
> },
> "dropzonePadding": {
> "bottom": {
> "type": "px",
> "value": "0"
> },
> "left": {
> "type": "px",
> "value": "10.5"
> },
> "right": {
> "type": "px",
> "value": "10.5"
> },
> "top": {
> "type": "px",
> "value": "0"
> }
> },
> "dropzoneZIndex": "auto",
> "dropzoneBackgroundType": ""
> },
> "widgets": [
> {
> "configuration": {
> "productCardContentAlignment": {
> "horizontal": "center"
> },
> "productImage": {
> "visibility": "show",
> "imageFit": "fill"
> },
> "brand": {
> "visibility": "show",
> "textStyle": "default",
> "color": "#444444"
> },
> "productName": {
> "visibility": "show",
> "textStyle": "default",
> "color": "#444444"
> },
> "price": {
> "visibility": "show",
> "textStyle": "default",
> "color": "#444444"
> },
> "productRating": {
> "visibility": "hide",
> "starColorFilled": "#3C64F4",
> "starColorEmpty": "#ECEEF5",
> "reviewsColor": "#8C93AD"
> },
> "button": {
> "visibility": "hide",
> "shape": "round",
> "buttonColor": "rgba(68,68,68,1)",
> "textStyle": "default",
> "buttonTextColor": "rgba(255,255,255,1)",
> "buttonActionType": "addToCart"
> },
> "productId": "77"
> },
> "storefront_api_query_params": {
> "productId": 77
> },
> "name": "Product",
> "description": "",
> "type": "widget"
> }
> ]
> },
> {
> "configuration": {
> "dropzoneBackgroundColor": "rgba(0,0,0,0)",
> "dropzoneBackgroundImageAlignment": {
> "horizontal": "center",
> "vertical": "middle"
> },
> "dropzoneBackgroundImageFit": "fill",
> "dropzoneBackgroundImageOpacity": 100,
> "dropzoneBackgroundImageUrl": "",
> "dropzoneBorderColor": "#333333",
> "dropzoneBorderStyle": "solid",
> "dropzoneBorderThickness": 0,
> "dropzoneHeight": "",
> "dropzoneJustifyContent": "center",
> "dropzoneMargin": {
> "bottom": {
> "type": "px",
> "value": "0"
> },
> "left": {
> "type": "px",
> "value": "0"
> },
> "right": {
> "type": "px",
> "value": "0"
> },
> "top": {
> "type": "px",
> "value": "0"
> }
> },
> "dropzonePadding": {
> "bottom": {
> "type": "px",
> "value": "0"
> },
> "left": {
> "type": "px",
> "value": "10.5"
> },
> "right": {
> "type": "px",
> "value": "10.5"
> },
> "top": {
> "type": "px",
> "value": "0"
> }
> },
> "dropzoneZIndex": "auto",
> "dropzoneBackgroundType": ""
> },
> "widgets": [
> {
> "configuration": {
> "productCardContentAlignment": {
> "horizontal": "center"
> },
> "productImage": {
> "visibility": "show",
> "imageFit": "fill"
> },
> "brand": {
> "visibility": "show",
> "textStyle": "default",
> "color": "#444444"
> },
> "productName": {
> "visibility": "show",
> "textStyle": "default",
> "color": "#444444"
> },
> "price": {
> "visibility": "show",
> "textStyle": "default",
> "color": "#444444"
> },
> "productRating": {
> "visibility": "hide",
> "starColorFilled": "#3C64F4",
> "starColorEmpty": "#ECEEF5",
> "reviewsColor": "#8C93AD"
> },
> "button": {
> "visibility": "hide",
> "shape": "round",
> "buttonColor": "rgba(68,68,68,1)",
> "textStyle": "default",
> "buttonTextColor": "rgba(255,255,255,1)",
> "buttonActionType": "addToCart"
> },
> "productId": "80"
> },
> "storefront_api_query_params": {
> "productId": 80
> },
> "name": "Product",
> "description": "",
> "type": "widget"
> }
> ]
> },
> {
> "configuration": {
> "dropzoneBackgroundColor": "rgba(0,0,0,0)",
> "dropzoneBackgroundImageAlignment": {
> "horizontal": "center",
> "vertical": "middle"
> },
> "dropzoneBackgroundImageFit": "fill",
> "dropzoneBackgroundImageOpacity": 100,
> "dropzoneBackgroundImageUrl": "",
> "dropzoneBorderColor": "#333333",
> "dropzoneBorderStyle": "solid",
> "dropzoneBorderThickness": 0,
> "dropzoneHeight": "",
> "dropzoneJustifyContent": "center",
> "dropzoneMargin": {
> "bottom": {
> "type": "px",
> "value": "0"
> },
> "left": {
> "type": "px",
> "value": "0"
> },
> "right": {
> "type": "px",
> "value": "0"
> },
> "top": {
> "type": "px",
> "value": "0"
> }
> },
> "dropzonePadding": {
> "bottom": {
> "type": "px",
> "value": "0"
> },
> "left": {
> "type": "px",
> "value": "10.5"
> },
> "right": {
> "type": "px",
> "value": "10.5"
> },
> "top": {
> "type": "px",
> "value": "0"
> }
> },
> "dropzoneZIndex": "auto",
> "dropzoneBackgroundType": ""
> },
> "widgets": [
> {
> "configuration": {
> "productCardContentAlignment": {
> "horizontal": "center"
> },
> "productImage": {
> "visibility": "show",
> "imageFit": "fill"
> },
> "brand": {
> "visibility": "show",
> "textStyle": "default",
> "color": "#444444"
> },
> "productName": {
> "visibility": "show",
> "textStyle": "default",
> "color": "#444444"
> },
> "price": {
> "visibility": "show",
> "textStyle": "default",
> "color": "#444444"
> },
> "productRating": {
> "visibility": "hide",
> "starColorFilled": "#3C64F4",
> "starColorEmpty": "#ECEEF5",
> "reviewsColor": "#8C93AD"
> },
> "button": {
> "visibility": "hide",
> "shape": "round",
> "buttonColor": "rgba(68,68,68,1)",
> "textStyle": "default",
> "buttonTextColor": "rgba(255,255,255,1)",
> "buttonActionType": "addToCart"
> },
> "productId": "93"
> },
> "storefront_api_query_params": {
> "productId": 93
> },
> "name": "Product",
> "description": "",
> "type": "widget"
> }
> ]
> }
> ],
> "type": "layout"
> }
> ]
> }
> ],
> "template_file": "pages/page",
> "entity_id": "5",
> "channel_id": 1
>}'
Publish or overwrite the content of a page that uses page widgets.
Was this page helpful?
Previous

Get Page Snapshot

Next

Abandoned carts

Built with

Authentication

X-Auth-Tokenstring
### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Add scopes ++++ | modify | `...` | | Add | read-only | `store_v2_marketing_read_only` | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate access tokens, see [API Accounts and OAuth Scopes](/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). For more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). 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.

X-Correlation-IdstringOptionalformat: "uuid"

An identifier unique to a set of related requests. For use on headless storefronts, excluding BigCommerce for WordPress. For more information, see Best Practices or the Headless Guide.

Request

This endpoint expects an object.
regionslist of objectsRequired
template_filestringOptional
The template file that you would like to target. Leave it empty if the request is for Global regions.
entity_idstringOptional

The identifier of a page you would like to target. For product pages, choose product ID. For category pages, choose category ID. Home page does not support entity_id. Leave it empty if the request is for Global regions.

channel_idintegerOptional
The id of the channel on which to create this placement. Defaults to the first channel created on the store.

Response

The request was successful. No response body is returned.

Errors

422
Unprocessable Entity Error

OAuth scopes

UI NamePermissionParameter
Add scopes ++++modify...
Addread-onlystore_v2_marketing_read_only

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access tokens, see API Accounts and OAuth Scopes.

Further reading

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

For more about BigCommerce OAuth scopes, see API Accounts and OAuth Scopes.

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