Bring your own headless stack

Shopify’s composable commerce APIs allow you to integrate Shopify into nearly any technology stack, so you have the freedom to use the frameworks, hosting, and workflows that work best for you.
Anchor to Install the Headless channelInstall the Headless channel
To start accessing the Storefront API and the Customer Account API, you need to install the Headless channel from the Shopify App Store.
This channel gives you a single place to manage API access for all your client applications. It enables you to publish products to the Headless sales channel, as well as manage API permissions and credentials.
If you want to display products on an existing site or platform, you can skip installing the Headless channel and use Storefont Web Components instead.
Anchor to Create a storefrontCreate a storefront
You can create multiple storefronts in the Headless channel.
Each storefront has its own set of API tokens, but all storefronts in the Headless channel share the same API permissions.
- From your Shopify admin, under Sales channels, click Headless.
- Click Add storefront.
- (Optional) On the storefront detail page, click Rename to edit the storefront’s default name.
Anchor to Manage API permissionsManage API permissions
You can control which store data is available through the Storefront or Customer Account APIs. All storefronts in the Headless channel share the same API permissions.
- From your Shopify admin, under Sales channels, click Headless.
- Click the name of the storefront that you want to update.
- Under Manage API access, click Manage for the API that you want to update.
- Under Permissions, click the edit icon.
- Check the permission scopes that you want enabled.
- Click Save.
Anchor to Rotate API credentialsRotate API credentials
For security purposes, you can update your API credentials at any time.
- From your Shopify admin, under Sales channels, click Headless.
- Click the name of the storefront to update.
- Under Manage API access, click Manage for the API that you want to update.
- Under Rotate credentials, click Generate new token. Both the old and new credentials are valid until you delete the old credentials.
- Update your client apps with the new credentials.
- The Storefront API access relies on an API token.
- The Customer Account API might have a Client ID and a Client Secret, depending on the type of access.
- After you’ve updated your apps, delete the old credentials by clicking Revoke.
Anchor to Configure routesConfigure routes
The standard format for product URLs is /products/:handle
. If your storefront uses a different structure, then it's recommended that you provide a server-side redirect (3XX) from the expected /products/:handle
path to the product page.
It's also recommended that your storefront supports cart permalinks. View example implementation
Anchor to Delete a storefrontDelete a storefront
Deleting a storefront in the Headless channel revokes all its access tokens. You need to update any clients using those tokens.
- From your Shopify admin, under Sales channels, click Headless.
- Click the name of the storefront that you want to delete.
- Click Delete storefront.
- To confirm, click Delete storefront.
Anchor to Next stepsNext steps
From here, what you build is up to you! The Storefront API and the Customer Account API provide a wide selection of commerce primitives that enable you to integrate Shopify into your existing tech stack, or create something new.
- Learn more about getting started with the Storefront API.
- Learn more about getting started with the Customer Account API.
- Learn more about headless with B2B.
- Consult the complete Storefront API Reference.
- Consult the complete Customer Account API Reference.