> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# Create Pages

POST https://api.bigcommerce.com/stores/{store_hash}/v3/content/pages
Content-Type: application/json

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

Web pages created via this endpoint are subject to the 4000 web page platform limit. Attempting to create pages over the limit will return an error. For more information on platform limits, see [Platform Limits (Help Center)](https://support.bigcommerce.com/s/article/Platform-Limits).

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/admin/content/pages/create-pages

## Authentication

- `X-Auth-Token` header (required) — ### 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).

## Request

### Path parameters

- `store_hash` (string, required) — Permanent ID of the BigCommerce store.

### Query parameters

- `include` (list of enum, optional) — Include the requested property in the response. The `body` property returns the page’s markup, text, or raw content.
  - Allowed values: `body`

### Headers

- `Accept` (string, required, default: application/json) — The MIME type of the response body that the client accepts. Typically `application/json`.

### Body (application/json)

This endpoint expects a Pages (Bulk)_createPages_Request.

- `Pages (Bulk)_createPages_Request`

## Response

### 201

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.

- `data` (ContentPagesPostResponsesContentApplicationJsonSchemaData, optional)
- `meta` (ResponseMeta, optional) — Data about the response, including pagination and collection totals.

### 207

Multiple operations have occurred and the status for each operation can be viewed in the body of the response. Typically indicates that a partial failure has occurred, such as when a `POST` or `PUT` request is successful, but saving the URL has failed.

- `any`

## Errors

### 422 Unprocessable Entity Error

The input was not valid. This is the result of missing required fields or other invalid arguments. See the response for more details. When making bulk requests, an invalid input in any one entry will cause the whole request to return 422. The entries that are valid will still be created.

- `status` (integer, required) — The HTTP status code.
- `title` (string, optional) — The error title describing the particular error.
- `type` (string, optional)
- `detail` (string, optional)

## Types

### ContentPagesPostResponsesContentApplicationJsonSchemaData

### ResponseMeta

Data about the response, including pagination and collection totals.

- `pagination` (ResponseMetaPagination, optional) — Data about the response, including pagination and collection totals.

### typePage

`type: page`. A user-defined plain-text page.

- `name` (string, required) — The name of the page. Must be unique.
- `type` (enum, required) — Determines the type of page. See [Pages V3 page types](/developer/api-reference/rest/admin/content/pages#page-types) for more about the differences.
  - Allowed values: `page`, `raw`, `contact_form`, `link`, `blog`
- `id` (integer, optional)
- `channel_id` (integer, optional, default: 1)
- `is_visible` (boolean, optional, default: true) — A boolean value that controls whether the page is available to users or visible in any navigation menus.
- `parent_id` (integer, optional, default: 0) — ID of the parent page, if any.
- `sort_order` (integer, optional) — Determines the order in which the page is displayed in the parent page’s menu. Pages with lower integers display earlier.
- `is_homepage` (boolean, optional, default: false) — Determines whether this page loads at the siteʼs root route. For example, at `https://example.com/`.
- `is_customers_only` (boolean, optional, default: false) — When `true`, this page is visible only to logged-in customers.
- `url` (string, optional) — Relative URL on the storefront for this page.
- `meta_title` (string, optional, nullable)
- `meta_keywords` (string, optional, nullable, default: "") — Comma-separated list of SEO-relevant keywords to include in the element of this page.
- `meta_description` (string, optional, nullable, default: "") — Description contained within the element of this page.
- `search_keywords` (string, optional, nullable, default: "") — Comma-separated list of keywords that shoppers can use to locate this page when searching the store.

### typeBlog

A 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](/developer/api-reference/rest/admin/content/store-content/blog-posts/create-blog-posts) to work with blog posts and tags.

- `name` (string, required) — The name of the page. Must be unique.
- `type` (enum, required) — Determines the type of page. See [Pages V3 page types](/developer/api-reference/rest/admin/content/pages#page-types) for more about the differences.
  - Allowed values: `page`, `raw`, `contact_form`, `link`, `blog`
- `id` (integer, optional)
- `channel_id` (integer, optional, default: 1)
- `is_visible` (boolean, optional, default: true) — A boolean value that controls whether the page is available to users or visible in any navigation menus.
- `parent_id` (integer, optional, default: 0) — ID of the parent page, if any.
- `sort_order` (integer, optional) — Determines the order in which the page is displayed in the parent page’s menu. Pages with lower integers display earlier.
- `is_homepage` (boolean, optional, default: false) — Determines whether this page loads at the siteʼs root route. For example, at `https://example.com/`.
- `is_customers_only` (boolean, optional, default: false) — When `true`, this page is visible only to logged-in customers.
- `url` (string, optional) — Relative URL on the storefront for this page.
- `meta_title` (string, optional, nullable)
- `meta_keywords` (string, optional, nullable, default: "") — Comma-separated list of SEO-relevant keywords to include in the element of this page.
- `meta_description` (string, optional, nullable, default: "") — Description contained within the element of this page.
- `search_keywords` (string, optional, nullable, default: "") — Comma-separated list of keywords that shoppers can use to locate this page when searching the store.

### typeContactForm

`type: contact_form`. A user-customizable page that contains a contact form. Body content returns HTML.

- `name` (string, required) — The name of the page. Must be unique.
- `type` (enum, required) — Determines the type of page. See [Pages V3 page types](/developer/api-reference/rest/admin/content/pages#page-types) for more about the differences.
  - Allowed values: `page`, `raw`, `contact_form`, `link`, `blog`
- `id` (integer, optional)
- `channel_id` (integer, optional, default: 1)
- `is_visible` (boolean, optional, default: true) — A boolean value that controls whether the page is available to users or visible in any navigation menus.
- `parent_id` (integer, optional, default: 0) — ID of the parent page, if any.
- `sort_order` (integer, optional) — Determines the order in which the page is displayed in the parent page’s menu. Pages with lower integers display earlier.
- `is_homepage` (boolean, optional, default: false) — Determines whether this page loads at the siteʼs root route. For example, at `https://example.com/`.
- `is_customers_only` (boolean, optional, default: false) — When `true`, this page is visible only to logged-in customers.
- `url` (string, optional) — Relative URL on the storefront for this page.
- `meta_title` (string, optional, nullable)
- `meta_keywords` (string, optional, nullable, default: "") — Comma-separated list of SEO-relevant keywords to include in the element of this page.
- `meta_description` (string, optional, nullable, default: "") — Description contained within the element of this page.
- `search_keywords` (string, optional, nullable, default: "") — Comma-separated list of keywords that shoppers can use to locate this page when searching the store.
- `email` (string, optional) — Applicable when the page type is `contact_form`: contact email address that receives messages sent using the form. Must be unique.
- `contact_fields` (string, optional) — A comma-separated list of the contact field forms that are enabled in the store control panel for display on the subject storefront. Possible fields include: | Field | Description | |:------|:------------| | `fullname` | The full name of the customer submitting the form. | | `phone` | The customer’s phone number. | | `companyname` | The customer’s company name. | | `orderno` | A field that lets customers specify a subject order number. | | `rma` | A customer’s submitted RMA (Return Merchandise Authorization) number. |

### typeRaw

`type: raw`. A user-defined page with a body that contains HTML markup or other stringified code.

- `name` (string, required) — The name of the page. Must be unique.
- `type` (enum, required) — Determines the type of page. See [Pages V3 page types](/developer/api-reference/rest/admin/content/pages#page-types) for more about the differences.
  - Allowed values: `page`, `raw`, `contact_form`, `link`, `blog`
- `body` (string, required, nullable) — 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`.
- `id` (integer, optional)
- `channel_id` (integer, optional, default: 1)
- `is_visible` (boolean, optional, default: true) — A boolean value that controls whether the page is available to users or visible in any navigation menus.
- `parent_id` (integer, optional, default: 0) — ID of the parent page, if any.
- `sort_order` (integer, optional) — Determines the order in which the page is displayed in the parent page’s menu. Pages with lower integers display earlier.
- `is_homepage` (boolean, optional, default: false) — Determines whether this page loads at the siteʼs root route. For example, at `https://example.com/`.
- `is_customers_only` (boolean, optional, default: false) — When `true`, this page is visible only to logged-in customers.
- `url` (string, optional) — Relative URL on the storefront for this page.
- `search_keywords` (string, optional, nullable, default: "") — Comma-separated list of keywords that shoppers can use to locate this page when searching the store.
- `content_type` (string, optional) — The MIME type of the page body.

### typeLink

`type: link`. A link to an external absolute URL. Displays in the menu of other pages that contain markup. Does not contain a body.

- `name` (string, required) — The name of the page. Must be unique.
- `type` (enum, required) — Determines the type of page. See [Pages V3 page types](/developer/api-reference/rest/admin/content/pages#page-types) for more about the differences.
  - Allowed values: `page`, `raw`, `contact_form`, `link`, `blog`
- `link` (string, required) — The link for the page type `link`.
- `id` (integer, optional)
- `channel_id` (integer, optional, default: 1)
- `is_visible` (boolean, optional, default: true) — A boolean value that controls whether the page is available to users or visible in any navigation menus.
- `parent_id` (integer, optional, default: 0) — ID of the parent page, if any.
- `sort_order` (integer, optional) — Determines the order in which the page is displayed in the parent page’s menu. Pages with lower integers display earlier.
- `is_homepage` (boolean, optional, default: false) — Determines whether this page loads at the siteʼs root route. For example, at `https://example.com/`.
- `is_customers_only` (boolean, optional, default: false) — When `true`, this page is visible only to logged-in customers.
- `url` (string, optional) — Relative URL on the storefront for this page.

### ResponseMetaPagination

Data about the response, including pagination and collection totals.

- `total` (integer, optional) — Total number of items in the result set.
- `count` (integer, optional) — Total number of items in the collection response.
- `per_page` (integer, optional) — The amount of items returned in the collection per page, controlled by the limit parameter.
- `current_page` (integer, optional) — The page you are currently on within the collection.
- `total_pages` (integer, optional) — The total number of pages in the collection.
- `links` (ResponseMetaPaginationLinks, optional) — Pagination links for the previous and next parts of the whole collection.

### ResponseMetaPaginationLinks

Pagination links for the previous and next parts of the whole collection.

- `previous` (string, optional) — Link to the previous page returned in the response.
- `current` (string, optional) — Link to the current page returned in the response.
- `next` (string, optional) — Link to the next page returned in the response.

## Examples

### Create single page using object

**Request**

```json
{
  "body": "<div>Hello World!</div>",
  "channel_id": 1,
  "is_homepage": false,
  "is_visible": false,
  "meta_description": "string",
  "meta_keywords": "string",
  "meta_title": "My Content page",
  "name": "Content Page",
  "parent_id": 0,
  "search_keywords": "string",
  "sort_order": 0,
  "type": "page",
  "url": "/my-content-page"
}
```

**Response**

```json
{
  "data": {
    "channel_id": 1,
    "id": 1,
    "is_customers_only": false,
    "is_homepage": false,
    "is_visible": true,
    "meta_description": "\"\"",
    "meta_keywords": "\"\"",
    "meta_title": "string",
    "name": "About Our Company",
    "parent_id": 0,
    "search_keywords": "trousers,pockets,luxury",
    "sort_order": 0,
    "type": "page",
    "url": "/my-store-page"
  },
  "meta": {
    "pagination": {
      "total": 1,
      "count": 1,
      "per_page": 1,
      "current_page": 1,
      "total_pages": 1,
      "links": {
        "previous": "string",
        "current": "string",
        "next": "string"
      }
    }
  }
}
```

**SDK Code**

```python Create single page using object
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v3/content/pages"

payload = {
    "body": "<div>Hello World!</div>",
    "channel_id": 1,
    "is_homepage": False,
    "is_visible": False,
    "meta_description": "string",
    "meta_keywords": "string",
    "meta_title": "My Content page",
    "name": "Content Page",
    "parent_id": 0,
    "search_keywords": "string",
    "sort_order": 0,
    "type": "page",
    "url": "/my-content-page"
}
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Create single page using object
const url = 'https://api.bigcommerce.com/stores/store_hash/v3/content/pages';
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"body":"<div>Hello World!</div>","channel_id":1,"is_homepage":false,"is_visible":false,"meta_description":"string","meta_keywords":"string","meta_title":"My Content page","name":"Content Page","parent_id":0,"search_keywords":"string","sort_order":0,"type":"page","url":"/my-content-page"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Create single page using object
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v3/content/pages"

	payload := strings.NewReader("{\n  \"body\": \"<div>Hello World!</div>\",\n  \"channel_id\": 1,\n  \"is_homepage\": false,\n  \"is_visible\": false,\n  \"meta_description\": \"string\",\n  \"meta_keywords\": \"string\",\n  \"meta_title\": \"My Content page\",\n  \"name\": \"Content Page\",\n  \"parent_id\": 0,\n  \"search_keywords\": \"string\",\n  \"sort_order\": 0,\n  \"type\": \"page\",\n  \"url\": \"/my-content-page\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Accept", "application/json")
	req.Header.Add("X-Auth-Token", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Create single page using object
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v3/content/pages")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"body\": \"<div>Hello World!</div>\",\n  \"channel_id\": 1,\n  \"is_homepage\": false,\n  \"is_visible\": false,\n  \"meta_description\": \"string\",\n  \"meta_keywords\": \"string\",\n  \"meta_title\": \"My Content page\",\n  \"name\": \"Content Page\",\n  \"parent_id\": 0,\n  \"search_keywords\": \"string\",\n  \"sort_order\": 0,\n  \"type\": \"page\",\n  \"url\": \"/my-content-page\"\n}"

response = http.request(request)
puts response.read_body
```

```java Create single page using object
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.bigcommerce.com/stores/store_hash/v3/content/pages")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"body\": \"<div>Hello World!</div>\",\n  \"channel_id\": 1,\n  \"is_homepage\": false,\n  \"is_visible\": false,\n  \"meta_description\": \"string\",\n  \"meta_keywords\": \"string\",\n  \"meta_title\": \"My Content page\",\n  \"name\": \"Content Page\",\n  \"parent_id\": 0,\n  \"search_keywords\": \"string\",\n  \"sort_order\": 0,\n  \"type\": \"page\",\n  \"url\": \"/my-content-page\"\n}")
  .asString();
```

```php Create single page using object
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.bigcommerce.com/stores/store_hash/v3/content/pages', [
  'body' => '{
  "body": "<div>Hello World!</div>",
  "channel_id": 1,
  "is_homepage": false,
  "is_visible": false,
  "meta_description": "string",
  "meta_keywords": "string",
  "meta_title": "My Content page",
  "name": "Content Page",
  "parent_id": 0,
  "search_keywords": "string",
  "sort_order": 0,
  "type": "page",
  "url": "/my-content-page"
}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Create single page using object
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v3/content/pages");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"body\": \"<div>Hello World!</div>\",\n  \"channel_id\": 1,\n  \"is_homepage\": false,\n  \"is_visible\": false,\n  \"meta_description\": \"string\",\n  \"meta_keywords\": \"string\",\n  \"meta_title\": \"My Content page\",\n  \"name\": \"Content Page\",\n  \"parent_id\": 0,\n  \"search_keywords\": \"string\",\n  \"sort_order\": 0,\n  \"type\": \"page\",\n  \"url\": \"/my-content-page\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Create single page using object
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "body": "<div>Hello World!</div>",
  "channel_id": 1,
  "is_homepage": false,
  "is_visible": false,
  "meta_description": "string",
  "meta_keywords": "string",
  "meta_title": "My Content page",
  "name": "Content Page",
  "parent_id": 0,
  "search_keywords": "string",
  "sort_order": 0,
  "type": "page",
  "url": "/my-content-page"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v3/content/pages")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Create single page using object

**Request**

```json
{
  "body": "<div>Hello World!</div>",
  "channel_id": 1,
  "is_homepage": false,
  "is_visible": false,
  "meta_description": "string",
  "meta_keywords": "string",
  "meta_title": "My Content page",
  "name": "Content Page",
  "parent_id": 0,
  "search_keywords": "string",
  "sort_order": 0,
  "type": "page",
  "url": "/my-content-page"
}
```

**SDK Code**

```python Create single page using object
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v3/content/pages"

payload = {
    "body": "<div>Hello World!</div>",
    "channel_id": 1,
    "is_homepage": False,
    "is_visible": False,
    "meta_description": "string",
    "meta_keywords": "string",
    "meta_title": "My Content page",
    "name": "Content Page",
    "parent_id": 0,
    "search_keywords": "string",
    "sort_order": 0,
    "type": "page",
    "url": "/my-content-page"
}
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Create single page using object
const url = 'https://api.bigcommerce.com/stores/store_hash/v3/content/pages';
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"body":"<div>Hello World!</div>","channel_id":1,"is_homepage":false,"is_visible":false,"meta_description":"string","meta_keywords":"string","meta_title":"My Content page","name":"Content Page","parent_id":0,"search_keywords":"string","sort_order":0,"type":"page","url":"/my-content-page"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Create single page using object
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v3/content/pages"

	payload := strings.NewReader("{\n  \"body\": \"<div>Hello World!</div>\",\n  \"channel_id\": 1,\n  \"is_homepage\": false,\n  \"is_visible\": false,\n  \"meta_description\": \"string\",\n  \"meta_keywords\": \"string\",\n  \"meta_title\": \"My Content page\",\n  \"name\": \"Content Page\",\n  \"parent_id\": 0,\n  \"search_keywords\": \"string\",\n  \"sort_order\": 0,\n  \"type\": \"page\",\n  \"url\": \"/my-content-page\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Accept", "application/json")
	req.Header.Add("X-Auth-Token", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Create single page using object
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v3/content/pages")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"body\": \"<div>Hello World!</div>\",\n  \"channel_id\": 1,\n  \"is_homepage\": false,\n  \"is_visible\": false,\n  \"meta_description\": \"string\",\n  \"meta_keywords\": \"string\",\n  \"meta_title\": \"My Content page\",\n  \"name\": \"Content Page\",\n  \"parent_id\": 0,\n  \"search_keywords\": \"string\",\n  \"sort_order\": 0,\n  \"type\": \"page\",\n  \"url\": \"/my-content-page\"\n}"

response = http.request(request)
puts response.read_body
```

```java Create single page using object
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.bigcommerce.com/stores/store_hash/v3/content/pages")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"body\": \"<div>Hello World!</div>\",\n  \"channel_id\": 1,\n  \"is_homepage\": false,\n  \"is_visible\": false,\n  \"meta_description\": \"string\",\n  \"meta_keywords\": \"string\",\n  \"meta_title\": \"My Content page\",\n  \"name\": \"Content Page\",\n  \"parent_id\": 0,\n  \"search_keywords\": \"string\",\n  \"sort_order\": 0,\n  \"type\": \"page\",\n  \"url\": \"/my-content-page\"\n}")
  .asString();
```

```php Create single page using object
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.bigcommerce.com/stores/store_hash/v3/content/pages', [
  'body' => '{
  "body": "<div>Hello World!</div>",
  "channel_id": 1,
  "is_homepage": false,
  "is_visible": false,
  "meta_description": "string",
  "meta_keywords": "string",
  "meta_title": "My Content page",
  "name": "Content Page",
  "parent_id": 0,
  "search_keywords": "string",
  "sort_order": 0,
  "type": "page",
  "url": "/my-content-page"
}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Create single page using object
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v3/content/pages");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"body\": \"<div>Hello World!</div>\",\n  \"channel_id\": 1,\n  \"is_homepage\": false,\n  \"is_visible\": false,\n  \"meta_description\": \"string\",\n  \"meta_keywords\": \"string\",\n  \"meta_title\": \"My Content page\",\n  \"name\": \"Content Page\",\n  \"parent_id\": 0,\n  \"search_keywords\": \"string\",\n  \"sort_order\": 0,\n  \"type\": \"page\",\n  \"url\": \"/my-content-page\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Create single page using object
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "body": "<div>Hello World!</div>",
  "channel_id": 1,
  "is_homepage": false,
  "is_visible": false,
  "meta_description": "string",
  "meta_keywords": "string",
  "meta_title": "My Content page",
  "name": "Content Page",
  "parent_id": 0,
  "search_keywords": "string",
  "sort_order": 0,
  "type": "page",
  "url": "/my-content-page"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v3/content/pages")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Create multiple pages using array

**Request**

```json
{
  "0": {
    "body": "<div>Hello World!</div>",
    "channel_id": 1,
    "is_homepage": false,
    "is_visible": false,
    "meta_description": "string",
    "meta_keywords": "string",
    "meta_title": "My Content page",
    "name": "Content Page",
    "parent_id": 0,
    "search_keywords": "string",
    "sort_order": 0,
    "type": "page",
    "url": "/my-content-page"
  },
  "1": {
    "body": "<div>Hello World!</div>",
    "channel_id": 547,
    "is_homepage": false,
    "is_visible": false,
    "meta_description": "string",
    "meta_keywords": "string",
    "meta_title": "My Content page",
    "name": "Content Page For Secondary Channel",
    "parent_id": 0,
    "search_keywords": "string",
    "sort_order": 0,
    "type": "page",
    "url": "/my-content-page-for-secondary-channel"
  },
  "name": "About Our Company",
  "type": "page"
}
```

**Response**

```json
{
  "data": {
    "channel_id": 1,
    "id": 1,
    "is_customers_only": false,
    "is_homepage": false,
    "is_visible": true,
    "meta_description": "\"\"",
    "meta_keywords": "\"\"",
    "meta_title": "string",
    "name": "About Our Company",
    "parent_id": 0,
    "search_keywords": "trousers,pockets,luxury",
    "sort_order": 0,
    "type": "page",
    "url": "/my-store-page"
  },
  "meta": {
    "pagination": {
      "total": 1,
      "count": 1,
      "per_page": 1,
      "current_page": 1,
      "total_pages": 1,
      "links": {
        "previous": "string",
        "current": "string",
        "next": "string"
      }
    }
  }
}
```

**SDK Code**

```python Create multiple pages using array
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v3/content/pages"

payload = {
    "0": {
        "body": "<div>Hello World!</div>",
        "channel_id": 1,
        "is_homepage": False,
        "is_visible": False,
        "meta_description": "string",
        "meta_keywords": "string",
        "meta_title": "My Content page",
        "name": "Content Page",
        "parent_id": 0,
        "search_keywords": "string",
        "sort_order": 0,
        "type": "page",
        "url": "/my-content-page"
    },
    "1": {
        "body": "<div>Hello World!</div>",
        "channel_id": 547,
        "is_homepage": False,
        "is_visible": False,
        "meta_description": "string",
        "meta_keywords": "string",
        "meta_title": "My Content page",
        "name": "Content Page For Secondary Channel",
        "parent_id": 0,
        "search_keywords": "string",
        "sort_order": 0,
        "type": "page",
        "url": "/my-content-page-for-secondary-channel"
    },
    "name": "About Our Company",
    "type": "page"
}
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Create multiple pages using array
const url = 'https://api.bigcommerce.com/stores/store_hash/v3/content/pages';
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"0":{"body":"<div>Hello World!</div>","channel_id":1,"is_homepage":false,"is_visible":false,"meta_description":"string","meta_keywords":"string","meta_title":"My Content page","name":"Content Page","parent_id":0,"search_keywords":"string","sort_order":0,"type":"page","url":"/my-content-page"},"1":{"body":"<div>Hello World!</div>","channel_id":547,"is_homepage":false,"is_visible":false,"meta_description":"string","meta_keywords":"string","meta_title":"My Content page","name":"Content Page For Secondary Channel","parent_id":0,"search_keywords":"string","sort_order":0,"type":"page","url":"/my-content-page-for-secondary-channel"},"name":"About Our Company","type":"page"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Create multiple pages using array
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v3/content/pages"

	payload := strings.NewReader("{\n  \"0\": {\n    \"body\": \"<div>Hello World!</div>\",\n    \"channel_id\": 1,\n    \"is_homepage\": false,\n    \"is_visible\": false,\n    \"meta_description\": \"string\",\n    \"meta_keywords\": \"string\",\n    \"meta_title\": \"My Content page\",\n    \"name\": \"Content Page\",\n    \"parent_id\": 0,\n    \"search_keywords\": \"string\",\n    \"sort_order\": 0,\n    \"type\": \"page\",\n    \"url\": \"/my-content-page\"\n  },\n  \"1\": {\n    \"body\": \"<div>Hello World!</div>\",\n    \"channel_id\": 547,\n    \"is_homepage\": false,\n    \"is_visible\": false,\n    \"meta_description\": \"string\",\n    \"meta_keywords\": \"string\",\n    \"meta_title\": \"My Content page\",\n    \"name\": \"Content Page For Secondary Channel\",\n    \"parent_id\": 0,\n    \"search_keywords\": \"string\",\n    \"sort_order\": 0,\n    \"type\": \"page\",\n    \"url\": \"/my-content-page-for-secondary-channel\"\n  },\n  \"name\": \"About Our Company\",\n  \"type\": \"page\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Accept", "application/json")
	req.Header.Add("X-Auth-Token", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Create multiple pages using array
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v3/content/pages")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"0\": {\n    \"body\": \"<div>Hello World!</div>\",\n    \"channel_id\": 1,\n    \"is_homepage\": false,\n    \"is_visible\": false,\n    \"meta_description\": \"string\",\n    \"meta_keywords\": \"string\",\n    \"meta_title\": \"My Content page\",\n    \"name\": \"Content Page\",\n    \"parent_id\": 0,\n    \"search_keywords\": \"string\",\n    \"sort_order\": 0,\n    \"type\": \"page\",\n    \"url\": \"/my-content-page\"\n  },\n  \"1\": {\n    \"body\": \"<div>Hello World!</div>\",\n    \"channel_id\": 547,\n    \"is_homepage\": false,\n    \"is_visible\": false,\n    \"meta_description\": \"string\",\n    \"meta_keywords\": \"string\",\n    \"meta_title\": \"My Content page\",\n    \"name\": \"Content Page For Secondary Channel\",\n    \"parent_id\": 0,\n    \"search_keywords\": \"string\",\n    \"sort_order\": 0,\n    \"type\": \"page\",\n    \"url\": \"/my-content-page-for-secondary-channel\"\n  },\n  \"name\": \"About Our Company\",\n  \"type\": \"page\"\n}"

response = http.request(request)
puts response.read_body
```

```java Create multiple pages using array
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.bigcommerce.com/stores/store_hash/v3/content/pages")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"0\": {\n    \"body\": \"<div>Hello World!</div>\",\n    \"channel_id\": 1,\n    \"is_homepage\": false,\n    \"is_visible\": false,\n    \"meta_description\": \"string\",\n    \"meta_keywords\": \"string\",\n    \"meta_title\": \"My Content page\",\n    \"name\": \"Content Page\",\n    \"parent_id\": 0,\n    \"search_keywords\": \"string\",\n    \"sort_order\": 0,\n    \"type\": \"page\",\n    \"url\": \"/my-content-page\"\n  },\n  \"1\": {\n    \"body\": \"<div>Hello World!</div>\",\n    \"channel_id\": 547,\n    \"is_homepage\": false,\n    \"is_visible\": false,\n    \"meta_description\": \"string\",\n    \"meta_keywords\": \"string\",\n    \"meta_title\": \"My Content page\",\n    \"name\": \"Content Page For Secondary Channel\",\n    \"parent_id\": 0,\n    \"search_keywords\": \"string\",\n    \"sort_order\": 0,\n    \"type\": \"page\",\n    \"url\": \"/my-content-page-for-secondary-channel\"\n  },\n  \"name\": \"About Our Company\",\n  \"type\": \"page\"\n}")
  .asString();
```

```php Create multiple pages using array
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.bigcommerce.com/stores/store_hash/v3/content/pages', [
  'body' => '{
  "0": {
    "body": "<div>Hello World!</div>",
    "channel_id": 1,
    "is_homepage": false,
    "is_visible": false,
    "meta_description": "string",
    "meta_keywords": "string",
    "meta_title": "My Content page",
    "name": "Content Page",
    "parent_id": 0,
    "search_keywords": "string",
    "sort_order": 0,
    "type": "page",
    "url": "/my-content-page"
  },
  "1": {
    "body": "<div>Hello World!</div>",
    "channel_id": 547,
    "is_homepage": false,
    "is_visible": false,
    "meta_description": "string",
    "meta_keywords": "string",
    "meta_title": "My Content page",
    "name": "Content Page For Secondary Channel",
    "parent_id": 0,
    "search_keywords": "string",
    "sort_order": 0,
    "type": "page",
    "url": "/my-content-page-for-secondary-channel"
  },
  "name": "About Our Company",
  "type": "page"
}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Create multiple pages using array
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v3/content/pages");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"0\": {\n    \"body\": \"<div>Hello World!</div>\",\n    \"channel_id\": 1,\n    \"is_homepage\": false,\n    \"is_visible\": false,\n    \"meta_description\": \"string\",\n    \"meta_keywords\": \"string\",\n    \"meta_title\": \"My Content page\",\n    \"name\": \"Content Page\",\n    \"parent_id\": 0,\n    \"search_keywords\": \"string\",\n    \"sort_order\": 0,\n    \"type\": \"page\",\n    \"url\": \"/my-content-page\"\n  },\n  \"1\": {\n    \"body\": \"<div>Hello World!</div>\",\n    \"channel_id\": 547,\n    \"is_homepage\": false,\n    \"is_visible\": false,\n    \"meta_description\": \"string\",\n    \"meta_keywords\": \"string\",\n    \"meta_title\": \"My Content page\",\n    \"name\": \"Content Page For Secondary Channel\",\n    \"parent_id\": 0,\n    \"search_keywords\": \"string\",\n    \"sort_order\": 0,\n    \"type\": \"page\",\n    \"url\": \"/my-content-page-for-secondary-channel\"\n  },\n  \"name\": \"About Our Company\",\n  \"type\": \"page\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Create multiple pages using array
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "0": [
    "body": "<div>Hello World!</div>",
    "channel_id": 1,
    "is_homepage": false,
    "is_visible": false,
    "meta_description": "string",
    "meta_keywords": "string",
    "meta_title": "My Content page",
    "name": "Content Page",
    "parent_id": 0,
    "search_keywords": "string",
    "sort_order": 0,
    "type": "page",
    "url": "/my-content-page"
  ],
  "1": [
    "body": "<div>Hello World!</div>",
    "channel_id": 547,
    "is_homepage": false,
    "is_visible": false,
    "meta_description": "string",
    "meta_keywords": "string",
    "meta_title": "My Content page",
    "name": "Content Page For Secondary Channel",
    "parent_id": 0,
    "search_keywords": "string",
    "sort_order": 0,
    "type": "page",
    "url": "/my-content-page-for-secondary-channel"
  ],
  "name": "About Our Company",
  "type": "page"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v3/content/pages")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```