Skip to content

Create a content page

POST
/stores/{storeRef}/content-pages
curl --request POST \
--url https://apibase.ecomweb.app/api/v1/stores/example/content-pages \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{ "title": "example", "slug": "about", "content": "example", "is_published": false, "page_type": "about", "sort_order": 0 }'

Creates a content page. Pages are drafts unless is_published is true. The slug must be unique within the store. SEO metadata is managed separately.

Required scopes: write:pages

storeRef
required
string

The store’s ref, as returned by GET /stores.

Media typeapplication/json
object
title
required

Title of the page

string
<= 255 characters
slug
required

URL slug of the page, unique within the store

string
<= 255 characters

Example

about
content

HTML content of the page

string
is_published

Whether the page is visible on the storefront

boolean
page_type
required

What kind of page this is

string
Allowed values: about privacy terms faq contact shopping_guide return_policy shipping_policy warranty home_page default
sort_order

Manual position among the store’s pages

number
0
Media typeapplication/json
object
content

HTML content of the page. Null when the page has no content.

string
nullable
page_type
required

What kind of page this is.

string
Allowed values: about privacy terms faq contact shopping_guide return_policy shipping_policy warranty home_page default
deleted_at

When the page was deleted. Always null on pages you can read.

string
nullable
seo_metadata

Search engine metadata. Present only when include_seo_metadata is passed; null when the page has none.

object
meta_title
required

Page title for search engines, or null when none is set.

string
nullable
meta_description
required

Page description for search engines, or null when none is set.

string
nullable
id
required

Page ID.

number
title
required

Title of the page.

string
slug
required

URL slug, unique within the store.

string
is_published
required

Whether the page is visible on the storefront.

boolean
sort_order

Manual position among the store’s pages.

number
created_at

When the page was created, as an ISO 8601 timestamp.

string
updated_at

When the page was last updated, as an ISO 8601 timestamp.

string
is_template_content

True while the page still holds the unedited text the store was created with.

boolean

Example

{
"page_type": "about"
}

The request is malformed or failed validation.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key is missing, invalid, revoked or expired.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}