Make your first request
Read one product from your store, check the result, and choose what to build next.
This request reads your catalog. It does not create a product or charge anyone.
You need a SellApp store and a server-side API key with the listing ability (shown as Products under Catalog; see ability names in the dashboard).
Create the key in your store's Developer settings. Keep it out of browser code
and source control. See authentication for OAuth and permissions.
1. Set your credentials
Replace replace-me with your API key and launch-lab with your store slug.
Run these commands in a terminal with cURL installed:
export SELLAPP_API_KEY='replace-me'
export SELLAPP_STORE='launch-lab'
export SELLAPP_API_BASE_URL='https://sell.app/api'The cURL and SDK programs below pass SELLAPP_API_BASE_URL explicitly.
Setting it alone does not configure every SDK.
2. List one product
curl --silent --show-error --fail-with-body \
--url "${SELLAPP_API_BASE_URL}/v2/products?limit=1" \
--header "Authorization: Bearer ${SELLAPP_API_KEY}" \
--header "X-STORE: ${SELLAPP_STORE}" \
--header 'Accept: application/json'A successful request returns HTTP 200. Read the data array in the JSON
response: it contains at most one product. Product IDs come from your store;
use the returned ID in later requests instead of copying an illustrative ID.
An empty store returns an empty data array. That is a successful request,
not an authentication problem. Create your first product
when you are ready.
3. If the request fails
| Response | What to do |
|---|---|
401 | Check that your key is present, valid, and has not been revoked. |
403 | Check the key's listing ability and your permission to access this store. |
400 with OAuth | Supply X-STORE with the store you selected. |
429 | Wait for the response's retry guidance before sending another request. |
Keep the X-Request-ID response header when asking for help. Never share your
API key. See errors for the complete response format.
Use an SDK or the CLI
Install the official Node.js and TypeScript SDK
from npm, the official Python SDK from PyPI, or the
official C#/.NET SDK from NuGet. Follow its setup guide,
then run the matching example below with the same environment credentials.
For terminal commands, follow CLI setup, sign in with sellapp login,
and select your store with sellapp stores use launch-lab before using its example.
All examples make the same catalog read. Each SDK prints the product or a
successful empty-store message. The CLI returns a JSON array when its output
is redirected; [] means the read succeeded. The CLI reads
SELLAPP_API_BASE_URL; --base-url overrides it.
import { SellApp } from '@sell.app/sdk';// Explicit endpoint selection keeps examples from accidentally calling a live store.const baseUrl = process.env.SELLAPP_API_BASE_URL;if (!baseUrl) throw new Error('Set SELLAPP_API_BASE_URL before running this example');const client = new SellApp({ baseUrl }); // Reads SELLAPP_API_KEY and SELLAPP_STORE.const page = await client.products.list({ limit: 1 });for (const product of page.data) { console.log(product.id, product.title);}if (page.data.length === 0) console.log('No products yet. The request worked!');What next?
- Create a product and variant.
- Create an order checkout.
- Receive order events.
- Advanced subscription checkout, including provider setup and webhooks.