DevelopersGetting started
Your first API call
A key, one request, real data. Five minutes.
2 min readUpdated View as Markdown
1. Get a key
In the dashboard, open Developers → API keys. Every organization has:
- a public key (
pk_…): read-only, safe in browser code; - a secret key (
sk_…): can change data, server-side only.
Use a test public key for now: test keys work from any origin, including localhost and curl. Live public keys only answer from the allowed origins you list.
2. Call the API
curl "https://papi.dashfordevs.com/api/storefront/products?limit=3" \
-H "X-API-Key: pk_test_YOUR_PUBLIC_KEY"You get JSON back. Useful query parameters: limit (up to 100), page, category, search, in_stock=true, sort=price_asc|price_desc|rating.
{
"products": [
{ "id": "…", "name": "Lemon Loaf", "slug": "lemon-loaf", "…": "…" }
],
"pagination": { "total": 42, "limit": 3, "offset": 0, "page": 1, "has_more": true }
}3. Read the headers
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 119
X-RateLimit-Reset: 1762531260
Cache-Control: private, no-store, max-age=0, must-revalidateA public key can make 120 requests a minute, a secret key 300. See Errors and rate limits.
What just happened
Drag to move · Ctrl/⌘ + scroll to zoom · ← → to step
Overview
Step through it: 4 steps. Click any box for detail.
Keep reading
Something wrong or missing on this page? Email support@dashfordevs.com.