Swell is a next-generation ecommerce platform with a schema-driven API, designed as an ideal alternative to building your own commerce backend from scratch. This guide takes you from a new account to your first API calls in a few minutes.

Learn how to use the Swell CLI to build apps and more in this complete reference.

Learn more

Learn how to use the Apps SDK to simplify building frontend interfaces for Swell Apps.

Learn more

If you don't have one yet, sign up at swell.is to create your account and store. Every store has a live environment, and you can enable a separate test environment for development — recommended while you're experimenting.

In the dashboard, open Developer → API keys. There are two kinds of keys:

  • Public keys (pk_) are safe to use in browsers and storefronts with the Frontend API.
  • Secret keys (sk_) grant full access to the Backend API — keep them on the server and never expose them publicly.

Keys are environment-specific: pk_test_ and sk_test_ keys route requests to your test environment, while pk_live_ and sk_live_ keys target live data.

The Backend API authenticates with basic auth, using your store ID and a secret key:

curl https://api.swell.store/products \
  -u your-store-id:your-secret-key

Or with the swell-node client:

const swell = require('swell-node').init('your-store-id', 'your-secret-key');

const products = await swell.get('/products', {
  limit: 10,
});

Every model in your store — standard and custom — has full CRUD endpoints like this. See the Backend API reference for all collections and query options.

The Frontend API is designed for browsers, authenticated with your public key. Install swell-js and list your products:

npm install swell-js
import swell from 'swell-js';

swell.init('your-store-id', 'your-public-key');

const products = await swell.products.list();

The Frontend API also covers carts, checkout, customer accounts, and subscriptions — everything needed to build a complete storefront.

  • Extend the platform with custom fields, functions, and integrations — learn about Apps.
  • Build a complete customer experience — learn about Storefronts.
  • Shape your data and content — learn about customizing models.