Your First API Request
Create a publishable key and use it to fetch your products from outside the admin - the first step of every custom storefront.
Create a key
Go to Settings, open API Keys, and click Create API Key. Give it a label that names the site or project it belongs to, then use the Copy button to grab the full key.
One key per site keeps revocation surgical: turning off one site never breaks another.Fetch your products with it
Your store slug is shown in the top bar (it has its own copy button). In a terminal, run: curl "https://dash.courseycreative.com/api/store/YOUR-SLUG/products?limit=3" -H "X-CCP-Api-Key: YOUR-KEY" - you should see your products as JSON. That same request works from any website, which is the whole point of the key.
No terminal handy? Paste the same URL and header into any online HTTP tester, or use the fetch snippet in the developer docs.Do it from a real site
In the code of your own site, call fetch() with that URL and the X-CCP-Api-Key header, and render data.products. A site built in Coursey Studio does not need this step: its shop blocks load your products already.
Lock the key to your site before launch
Edit the key and add your live site addresses so browsers on other domains cannot use it. Leave the list empty while building; add the real domain when the site ships.
Rotate without downtime
When a key should die (site retired, key pasted somewhere it should not be), create the replacement first, update the site, then revoke the old key. Revoking disconnects its sites immediately and cannot be undone.
The Last Used column tells you whether anything still depends on a key before you revoke it.