Skip to main content
The Storefront API uses two layers of authentication: a Storefront API key that identifies your store on every request, and optional customer tokens (JWTs) for endpoints that act on behalf of a logged-in customer.

Storefront API key

Every request must include your Storefront API key in the X-Api-Key header:
Keys are created in the dashboard under Settings → API Keys, are scoped to a single store, and start with sfk_.
Treat the key like a secret: keep it in server-side environment variables and proxy requests through your own backend rather than calling the API directly from the browser.

Customer authentication

Endpoints that read or modify a specific customer’s data — their appointments, orders, and profile — additionally require a customer access token as a Bearer token:

Sign in

Exchange a customer’s credentials for a token pair:

Refresh tokens

Access tokens expire. Get a fresh pair by calling the refresh endpoint with the refresh token as the Bearer token:

All auth endpoints

See the API reference for full request and response shapes.

Which endpoints need a customer token?

Customer-scoped endpoints — appointments, orders, and self-service profile management — require a customer Bearer token. Catalog endpoints (products, availability, staff members, locations, collections, store settings) need only the API key.
Cart and checkout endpoints accept an optional customer token: guests can book without an account, and checkout can return auth tokens for new customers so they’re signed in automatically after their first booking.

Error responses

Errors use conventional HTTP status codes with a JSON body:

Security checklist

  • Store sfk_ keys in environment variables, never in client bundles or repositories.
  • Call the Storefront API from your server (API routes, server components, edge functions) and keep the key out of browser network requests.
  • Store customer refresh tokens in httpOnly cookies rather than localStorage where possible.
  • Rotate API keys from the dashboard if a key is ever exposed.
Last modified on June 13, 2026