Create Site
Create a site that links a headless storefront to a sales channel.
Authentication
X-Auth-Tokenstring
### OAuth scopes
| UI Name | Permission | Parameter |
|:--------|:-----------|:----------|
| Channel Listings | modify | `store_channel_listings` |
| Channel Listings | read-only | `store_channel_listings_read_only` |
| Channel Settings | modify | `store_channel_settings` |
| Channel Settings | read-only | `store_channel_settings_read_only` |
| Sites & Routes | modify | `store_sites` |
| Sites & Routes | read-only | `store_sites_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-accounts#api-accounts). |
### Further reading
For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-accounts#x-auth-token-header-example-requests).
For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/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
This endpoint expects an object.
url
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_id
The channel this site is attached to. Each site belongs to a single channel, and each channel can have either zero or one sites.
Response
data
meta
Response metadata.
Errors
400
Bad Request Error
403
Forbidden Error
404
Not Found Error
502
Bad Gateway Error
504
Gateway Timeout Error