BigCommerce
Theme & Content APIs
Pages

Pages V3

Overview

A page appears on a site that is associated with a channel.

Some pages, such as blog pages, contact forms, and plain-text or HTML pages, are web pages in the traditional sense. They contain markup (a body) and load at a relative page location on the site itself (the url). Other pages, such as link and feed pages, make external or non-visual content available from the menu of a parent page or by direct link.

Bulk operations

All endpoints without a pageId path parameter support bulk operations.

Page types

The following table describes the types of pages that the Pages API can manage:

Page TypeDescriptionBody
pageA user-defined plain-text page.text
contact_formA user-customizable page that contains a contact form.HTML
rawA user-defined page that contains HTML markup or other stringified code.HTML, other code
blogA page that contains blog posts. Use caution; blog-type pages can only be created in the store control panel, but you may be able to change the type of a blog page to something else with this API. Use the blog feature of the REST Content API to work with blog posts and tags.empty string
feedMakes RSS-syndicated content feeds available in the menu of other pages that contain markup.
linkA link to an external absolute URL. Displays in the menu of other pages that contain markup.

Get Pages

GET /content/pages

Request

Returns one or more content pages. This endpoint supports bulk operations.

Authentication

  • X-Auth-Token in header
    required

Parameters

  • store_hash in path - string
  • channel_id in query - integer

    Return only pages associated with the specified channel.

  • id:in in query - array

    A comma-separated string of page IDs to fetch. Supports bulk operations. If none of the page IDs passed exist, the query will return an empty data array.

    Type: array[integer]

  • name in query - string

    Name of the page.

  • name:like in query - string

    Return only pages whose name or body contain the supplied string.

  • limit in query - integer

    The number of results to return per request. See meta.pagination.per_page in the response body.

  • page in query - integer

    The ordered grouping of results to return. See meta.pagination.current_page in the response body.

  • include in query - array

    Include the requested property in the response. The body property returns the page’s markup, text, or raw content.

    Type: array[string]

    Allowed: body

example

Response

Body

object | application/json

Response payload for the BigCommerce API.

  • data
    array[]

  • meta
    object

    Data about the response, including pagination and collection totals.

example

Create Pages

POST /content/pages

Request

Creates one or more content pages. This endpoint supports bulk operations.

Authentication

  • X-Auth-Token in header
    required

Parameters

  • store_hash in path - string
  • include in query - array

    Include the requested property in the response. The body property returns the page’s markup, text, or raw content.

    Type: array[string]

    Allowed: body

  • Content-Type in header with default of application/json - string
    required

Body

application/json
One of:
    One of:

      Create single page using object

      Create multiple pages using array

      Response

      Created.

      Response.data will inherit the data type of the request. A single entry passed as an object will return an object for the data property. Any number of entries passed in an array will return an array for the data property.

      Properties associated with a page type that are not required to create an entry will be created with default values.

      When you make bulk requests, an invalid input in any one entry will return 422. The entries that are valid will still be created.

      Body

      object | application/json
      • data

        Any of:
        • id
          integer
          read-only

        • channel_id
          integer
          read-only

          Default: 1

        • name
          string
          required

          The name of the page. Must be unique.

          >= 1 characters<= 100 characters

          Example: About Our Company

        • is_visible
          boolean

          A boolean value that controls whether the page is available to users or visible in any navigation menus.

          Example: true

          Default: true

        • parent_id
          integer

          ID of the parent page, if any.

          Default: 0

        • sort_order
          integer

          Determines the order in which the page is displayed in the parent page’s menu. Pages with lower integers display earlier.

        • type
          string
          required

          Determines the type of page. See Pages V3 page types for more about the differences.

          Allowed: page | raw | contact_form | feed | link | blog

          Example: page

        • is_homepage
          boolean

          Determines whether this page loads at the siteʼs root route. For example, at https://example.com/.

          Default: false

        • is_customers_only
          boolean

          When true, this page is not visible to merchant users who are signed in to the store control panel.

          Default: false

        • url
          string

          Relative URL on the storefront for this page.

          Example: /my-store-page

        • meta_title
          string or null

        • meta_keywords
          string or null

          Comma-separated list of SEO-relevant keywords to include in the element of this page.

          Default: ""

        • meta_description
          string or null

          Description contained within the element of this page.

          Default: ""

        • search_keywords
          string or null

          Comma-separated list of keywords that shoppers can use to locate this page when searching the store.

          Example: trousers,pockets,luxury

          Default: ""

      • meta
        object

        Data about the response, including pagination and collection totals.

      example

      Update Pages

      PUT /content/pages

      Request

      Updates one or more content pages. This endpoint supports bulk operations.

      Authentication

      • X-Auth-Token in header
        required

      Parameters

      • store_hash in path - string
      • include in query - array

        Include the requested property in the response. The body property returns the page’s markup, text, or raw content.

        Type: array[string]

        Allowed: body

      • Content-Type in header with default of application/json - string
        required

      Body

      application/json
      One of:
      • id
        integer

        The ID of the target page.

      • name
        string

        The name of the page. Must be unique.

        >= 1 characters<= 100 characters

        Example: My Store Page

      • is_visible
        boolean

        Boolean value that specifies the visibility of the page in the storefront’s navigation menu.

        Indicates whether the page is available to users and visible in any menus.

      • parent_id
        integer

        ID of any parent Web page.

        Default: 0

      • sort_order
        integer

        Specifies the order in which the page is displayed on the storefront. (Lower integers specify earlier display.)

        Default: 0

      • type
        string

        Specifies the type of page. See Pages V3 page types for more about the differences.

        Allowed: page | raw | contact_form | feed | link | blog

        Example: page

      • is_homepage
        boolean

        Boolean value that specifies whether this page is the storefront’s home page.

      • is_customers_only
        boolean

        Boolean value. If this value is set to true, this page will not be visible when the user is logged in to the store control panel.

      • email
        string

        Applicable when the page type is contact_form: contact email address that receives messages sent via the form. Must be unique.

        <= 255 characters
      • meta_title
        string or null

      • body
        string or null

        HTML or variable that populates the element of this page, in default/desktop view. Required in a POST request if the page type is raw.

        Example: <div>Hello World!</div>

      • feed
        string

        The URL of the RSS feed. Required in a POST request if the page type is feed.

      • link
        string

        Required in a POST request to create a link if the page type is link.

      • contact_fields
        string

        Applicable when the page type is contact_form: comma-separated list of keywords representing the fields enabled in the control panel for storefront display. Possible fields include:

        FieldDescription
        fullnameFull name of the customer submitting the form
        phoneCustomer’s phone number, as submitted on the form
        companynameCustomer’s submitted company name
        ordernoCustomer’s submitted order number
        rmaCustomer’s submitted RMA (Return Merchandise Authorization) number

        Example: fullname,companyname,phone,orderno,rma

      • meta_keywords
        string or null

        Comma-separated list of SEO-relevant keywords to include in the element of this page.

        Default:

      • meta_description
        string or null

        Description contained within the element of this page.

      • search_keywords
        string or null

        Comma-separated list of keywords that shoppers can use to locate this page when searching the store.

        Example: trousers,pockets,luxury

      • url
        string

        Relative URL on the storefront for this page.

        Example: /my-store-page

      • channel_id
        integer

        The ID of the channel where this page should be shown.

        Example: 12

        Default: 1

      One of:
      • id
        integer

        The ID of the target page.

      • name
        string

        The name of the page. Must be unique.

        >= 1 characters<= 100 characters

        Example: My Store Page

      • is_visible
        boolean

        Boolean value that specifies the visibility of the page in the storefront’s navigation menu.

        Indicates whether the page is available to users and visible in any menus.

      • parent_id
        integer

        ID of any parent Web page.

        Default: 0

      • sort_order
        integer

        Specifies the order in which the page is displayed on the storefront. (Lower integers specify earlier display.)

        Default: 0

      • type
        string

        Specifies the type of page. See Pages V3 page types for more about the differences.

        Allowed: page | raw | contact_form | feed | link | blog

        Example: page

      • is_homepage
        boolean

        Boolean value that specifies whether this page is the storefront’s home page.

      • is_customers_only
        boolean

        Boolean value. If this value is set to true, this page will not be visible when the user is logged in to the store control panel.

      • email
        string

        Applicable when the page type is contact_form: contact email address that receives messages sent via the form. Must be unique.

        <= 255 characters
      • meta_title
        string or null

      • body
        string or null

        HTML or variable that populates the element of this page, in default/desktop view. Required in a POST request if the page type is raw.

        Example: <div>Hello World!</div>

      • feed
        string

        The URL of the RSS feed. Required in a POST request if the page type is feed.

      • link
        string

        Required in a POST request to create a link if the page type is link.

      • contact_fields
        string

        Applicable when the page type is contact_form: comma-separated list of keywords representing the fields enabled in the control panel for storefront display. Possible fields include:

        FieldDescription
        fullnameFull name of the customer submitting the form
        phoneCustomer’s phone number, as submitted on the form
        companynameCustomer’s submitted company name
        ordernoCustomer’s submitted order number
        rmaCustomer’s submitted RMA (Return Merchandise Authorization) number

        Example: fullname,companyname,phone,orderno,rma

      • meta_keywords
        string or null

        Comma-separated list of SEO-relevant keywords to include in the element of this page.

        Default:

      • meta_description
        string or null

        Description contained within the element of this page.

      • search_keywords
        string or null

        Comma-separated list of keywords that shoppers can use to locate this page when searching the store.

        Example: trousers,pockets,luxury

      • url
        string

        Relative URL on the storefront for this page.

        Example: /my-store-page

      • channel_id
        integer

        The ID of the channel where this page should be shown.

        Example: 12

        Default: 1

      example

      Response

      Updated.

      Body

      object | application/json

      Response payload for the BigCommerce API.

      • data
        array[]

      • meta
        object

        Data about the response, including pagination and collection totals.

      Update meta descriptions for two pages

      Delete Pages

      DELETE /content/pages

      Request

      Deletes one or more content pages. This endpoint supports bulk operations.

      Warning

      Pay attention to query parameters If you attempt to delete multiple pages by passing more than one page ID to id:in and one or more of them does not exist, you will receive a 404 response. However, the pages corresponding to the page IDs that do exist will still be deleted.

      Authentication

      • X-Auth-Token in header
        required

      Parameters

      • store_hash in path - string
      • id:in in query - array
        required

        Request deletion of multiple pages by passing a comma-separated string of corresponding page IDs. Supports bulk operations.

        Type: array[integer]

      example

      Response

      No content. A 204 response with no payload indicates successful deletion of all specified pages.

      Get a Page

      GET /content/pages/{pageId}

      Request

      Returns one content page.

      Warning

      Pay attention to query parameters This endpoint recognizes the same query parameters as Get Multiple Pages. If the requested page does not meet the query parameters you specify, you will receive a 404 response even if the requested pageId does exist.

      Authentication

      • X-Auth-Token in header
        required

      Parameters

      • store_hash in path - string
      • include in query - array

        Include the requested property in the response. The body property returns the page’s markup, text, or raw content.

        Type: array[string]

        Allowed: body

      example

      Response

      Body

      object | application/json

      Response payload for a single content page.

      • data

        Any of:
        • id
          integer
          read-only

        • channel_id
          integer
          read-only

          Default: 1

        • name
          string
          required

          The name of the page. Must be unique.

          >= 1 characters<= 100 characters

          Example: About Our Company

        • is_visible
          boolean

          A boolean value that controls whether the page is available to users or visible in any navigation menus.

          Example: true

          Default: true

        • parent_id
          integer

          ID of the parent page, if any.

          Default: 0

        • sort_order
          integer

          Determines the order in which the page is displayed in the parent page’s menu. Pages with lower integers display earlier.

        • type
          string
          required

          Determines the type of page. See Pages V3 page types for more about the differences.

          Allowed: page | raw | contact_form | feed | link | blog

          Example: page

        • is_homepage
          boolean

          Determines whether this page loads at the siteʼs root route. For example, at https://example.com/.

          Default: false

        • is_customers_only
          boolean

          When true, this page is not visible to merchant users who are signed in to the store control panel.

          Default: false

        • url
          string

          Relative URL on the storefront for this page.

          Example: /my-store-page

        • meta_title
          string or null

        • meta_keywords
          string or null

          Comma-separated list of SEO-relevant keywords to include in the element of this page.

          Default: ""

        • meta_description
          string or null

          Description contained within the element of this page.

          Default: ""

        • search_keywords
          string or null

          Comma-separated list of keywords that shoppers can use to locate this page when searching the store.

          Example: trousers,pockets,luxury

          Default: ""

      • meta
        object

        Data about the response, including pagination and collection totals.

      Blog

      Contact form

      Page

      Raw

      Link

      Feed

      Update a Page

      PUT /content/pages/{pageId}

      Request

      Updates one content page.

      Authentication

      • X-Auth-Token in header
        required

      Parameters

      • store_hash in path - string
      • Content-Type in header with default of application/json - string
        required
      • include in query - array

        Include the requested property in the response. The body property returns the page’s markup, text, or raw content.

        Type: array[string]

        Allowed: body

      Body

      object | application/json

      Properties of the page modification request body.

      • name
        string

        The name of the page. Must be unique.

        >= 1 characters<= 100 characters

        Example: My Store Page

      • is_visible
        boolean

        Boolean value that specifies the visibility of the page in the storefront’s navigation menu.

        Indicates whether the page is available to users and visible in any menus.

      • parent_id
        integer

        ID of any parent Web page.

        Default: 0

      • sort_order
        integer

        Specifies the order in which the page is displayed on the storefront. (Lower integers specify earlier display.)

        Default: 0

      • type
        string

        Specifies the type of page. See Pages V3 page types for more about the differences.

        Allowed: page | raw | contact_form | feed | link | blog

        Example: page

      • is_homepage
        boolean

        Boolean value that specifies whether this page is the storefront’s home page.

      • is_customers_only
        boolean

        Boolean value. If this value is set to true, this page will not be visible when the user is logged in to the store control panel.

      • email
        string

        Applicable when the page type is contact_form: contact email address that receives messages sent via the form. Must be unique.

        <= 255 characters
      • meta_title
        string or null

      • body
        string or null

        HTML or variable that populates the element of this page, in default/desktop view. Required in a POST request if the page type is raw.

        Example: <div>Hello World!</div>

      • feed
        string

        The URL of the RSS feed. Required in a POST request if the page type is feed.

      • link
        string

        Required in a POST request to create a link if the page type is link.

      • contact_fields
        string

        Applicable when the page type is contact_form: comma-separated list of keywords representing the fields enabled in the control panel for storefront display. Possible fields include:

        FieldDescription
        fullnameFull name of the customer submitting the form
        phoneCustomer’s phone number, as submitted on the form
        companynameCustomer’s submitted company name
        ordernoCustomer’s submitted order number
        rmaCustomer’s submitted RMA (Return Merchandise Authorization) number

        Example: fullname,companyname,phone,orderno,rma

      • meta_keywords
        string or null

        Comma-separated list of SEO-relevant keywords to include in the element of this page.

        Default:

      • meta_description
        string or null

        Description contained within the element of this page.

      • search_keywords
        string or null

        Comma-separated list of keywords that shoppers can use to locate this page when searching the store.

        Example: trousers,pockets,luxury

      • url
        string

        Relative URL on the storefront for this page.

        Example: /my-store-page

      • channel_id
        integer

        The ID of the channel where this page should be shown.

        Example: 12

        Default: 1

      example

      Response

      Body

      object | application/json

      Response payload for a single content page.

      • data

        Any of:
        • id
          integer
          read-only

        • channel_id
          integer
          read-only

          Default: 1

        • name
          string
          required

          The name of the page. Must be unique.

          >= 1 characters<= 100 characters

          Example: About Our Company

        • is_visible
          boolean

          A boolean value that controls whether the page is available to users or visible in any navigation menus.

          Example: true

          Default: true

        • parent_id
          integer

          ID of the parent page, if any.

          Default: 0

        • sort_order
          integer

          Determines the order in which the page is displayed in the parent page’s menu. Pages with lower integers display earlier.

        • type
          string
          required

          Determines the type of page. See Pages V3 page types for more about the differences.

          Allowed: page | raw | contact_form | feed | link | blog

          Example: page

        • is_homepage
          boolean

          Determines whether this page loads at the siteʼs root route. For example, at https://example.com/.

          Default: false

        • is_customers_only
          boolean

          When true, this page is not visible to merchant users who are signed in to the store control panel.

          Default: false

        • url
          string

          Relative URL on the storefront for this page.

          Example: /my-store-page

        • meta_title
          string or null

        • meta_keywords
          string or null

          Comma-separated list of SEO-relevant keywords to include in the element of this page.

          Default: ""

        • meta_description
          string or null

          Description contained within the element of this page.

          Default: ""

        • search_keywords
          string or null

          Comma-separated list of keywords that shoppers can use to locate this page when searching the store.

          Example: trousers,pockets,luxury

          Default: ""

      • meta
        object

        Data about the response, including pagination and collection totals.

      example

      Delete a Page

      DELETE /content/pages/{pageId}

      Request

      Deletes one content page.

      Warning

      Query parameters not recognized This endpoint does not recognize query parameters.

      Authentication

      • X-Auth-Token in header
        required

      Parameters

      • store_hash in path - string
      • Accept in header with default of application/json - string
        required
      • pageId in path - string
        required

        The ID of the page to be operated on.

      example

      Response

      No content. A 204 response with no payload indicates successful deletion of all specified pages.

      Did you find what you were looking for?