Skip to navigation

Create Site

Create a site that links a headless storefront to a sales channel.

Authentication

X-Auth-Tokenstring

OAuth scopes

UI NamePermissionParameter
Channel Listingsmodifystore_channel_listings
Channel Listingsread-onlystore_channel_listings_read_only
Channel Settingsmodifystore_channel_settings
Channel Settingsread-onlystore_channel_settings_read_only
Sites & Routesmodifystore_sites
Sites & Routesread-onlystore_sites_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.

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.
urlstringOptional

The Fully Qualified URL (including host and scheme) where this site is hosted. All URLs generated for this site will be appended to this.

channel_idintegerOptional
The channel this site is attached to. Each site belongs to a single channel, and each channel can have either zero or one sites.
certificateobjectOptional

Response

The requested site.
dataobjectOptional
metaobjectOptional
Response metadata.

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
502
Bad Gateway Error
504
Gateway Timeout Error