Docs · Quickstart
From zero to first API call in five minutes.
This page assumes you already run a shop on anyshop.io. If you don't, start the free trial first.
1Generate an API key
From the dashboard, open Developer and click Generate a key. The raw as_… token is shown once at creation. Store it.
2Verify the key
curl -H 'Authorization: Bearer as_yours_here' \ https://anyshop.io/api/whoami
Returns 200 OK with { shop_id, shop_slug, preset, scopes } when valid, 401 otherwise.
3Pick a client
- TypeScript SDK —
npm i @anyshop/sdk. Typed, zero runtime deps, returns parsed objects. - CLI —
npx @anyshop/cli help. Zero deps, exits 0 on 2xx so shell scripts canset -ecleanly. - MCP server —
npx @anyshop/mcp. Drop into Claude Desktop's config to let an agent run your shop. - Raw HTTP — all v1 endpoints are documented in /docs/api. Discovery doc at GET /api/v1.
4Create your first product via API
curl -X POST https://anyshop.io/api/v1/products \
-H 'Authorization: Bearer as_yours_here' \
-H 'Content-Type: application/json' \
-d '{
"title": "Pro license",
"slug": "pro",
"type": "serial",
"price_cents": 4900,
"currency": "USD",
"status": "draft"
}'Returns 201 with the created product row.
5Subscribe to webhooks
curl -X POST https://anyshop.io/api/v1/webhooks \
-H 'Authorization: Bearer as_yours_here' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://your-service.example.com/anyshop",
"events": ["order.paid", "order.fulfilled", "subscription.renewed"]
}'Response includes the signing_secret exactly once. Store it; verify HMAC-SHA256 of t.body against the v1 in the X-Anyshop-Signature header. Reject events older than 5 minutes. There's a browser playground at /docs/signature-playground if your signature isn't matching.
Next steps
- Full API reference — every endpoint with body shapes and examples
- Changelog — what shipped recently
GET /api/v1— machine-readable endpoint discovery doc