v1 · stable

Public API

Push products, releases and files straight into your store — from CI, a script, or any workflow tool. No dashboard required.

Use it from Claude Code

One-liner install~/.claude/skills/sell-push/SKILL.md · idempotent

Install our official Claude Code skill and shipping a release becomes a sentence in your dev session. No curl, no JSON, no orchestration.

curl -fsSL https://sell.thinkspark.dev/skills/sell-push/install.sh | bash

Restart Claude Code once so it picks up the new skill, then in any session:

> Pousse cette app sur ma boutique Sell.
  Path: ./dist/my-app-1.0.0.zip
  Name: My App, prix 1900, externalId: my-app
  Description dans ./README.md. Publie.

Claude handles the 7 API calls under the hood: create or upsert the product, presign the upload, PUT the file to R2, register it against a new release, publish. Idempotent by externalId, so re-running with a new version just ships an update.

Not on Claude Code? The REST API below works from anything that speaks HTTP — CI, Zapier, a Bash one-liner, a Python script.

Quick start

Create a key in Settings → API keys, then push your first product end-to-end:

# 1. Create the product (upsert by externalId)
curl https://sell.thinkspark.dev/api/v1/products \
  -H "Authorization: Bearer tsk_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "externalId": "my-app",
    "name": "My App",
    "priceCents": 2900,
    "currency": "USD",
    "productType": "DIGITAL_DOWNLOAD"
  }'

# 2. Get a presigned upload URL
curl https://sell.thinkspark.dev/api/v1/uploads \
  -H "Authorization: Bearer tsk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"fileName":"my-app-1.0.0.zip","contentType":"application/zip","contentLength":1048576}'
# → { "url": "https://r2…?signed", "key": "sellers/…/api/…-my-app-1.0.0.zip" }

# 3. Upload the file directly to R2
curl -X PUT --data-binary @my-app-1.0.0.zip \
  -H "Content-Type: application/zip" \
  "<presigned-url>"

# 4. Create a release and register the file against it
curl https://sell.thinkspark.dev/api/v1/products/my-app/releases \
  -H "Authorization: Bearer tsk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"version":"1.0.0","externalId":"git-tag-v1.0.0"}'

curl https://sell.thinkspark.dev/api/v1/products/my-app/releases/git-tag-v1.0.0/files \
  -H "Authorization: Bearer tsk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"storageKey":"<key-from-step-2>","fileName":"my-app-1.0.0.zip","fileSize":1048576,"mimeType":"application/zip"}'

# 5. Publish the release (also marks it current) and publish the product
curl -X POST https://sell.thinkspark.dev/api/v1/products/my-app/releases/git-tag-v1.0.0/publish \
  -H "Authorization: Bearer tsk_live_…"
curl -X POST https://sell.thinkspark.dev/api/v1/products/my-app/publish \
  -H "Authorization: Bearer tsk_live_…"

Authentication

Every request takes a Bearer token in the Authorization header. Two environments share the same DB and code path:

  • tsk_live_… — writes hit your real catalogue. Use this from CI when you're confident.
  • tsk_test_… — sandbox. Products created with a test key are forced to status=DRAFT and never publishable through the API. Same DB, zero risk to your public store.

Keys are shown once at creation. Lost a key? Revoke it and create a new one — no recovery.

Each key carries scopes, picked when you create it in Settings: products:read, products:write (product fields, editions, FAQ), releases:write, uploads:write, media:write (gallery, type tester font) and translations:write. Write scopes need an active plan. A key created before a scope existed doesn't have it: create a new key.

Authorization: Bearer tsk_live_AB23K9NPQR...

Idempotency via externalId

Every write endpoint accepts an externalId field. Pass a stable identifier you own (a Git tag, a row id from your CMS, a Notion page id…). When the same externalId is sent again, the resource is updated instead of duplicated — perfect for CI retries, Zapier replays and idempotent pipelines.

externalId is scoped to its parent: per seller for products, per product for releases. Two different sellers can both use my-app without collision.

Error shape

Every non-2xx response carries the same JSON envelope:

{
  "error": {
    "type":    "invalid_request",
    "code":    "missing_field",
    "message": "Subscription products require a billingInterval",
    "param":   "billingInterval"
  }
}
  • authentication_required · 401 — missing or invalid key
  • permission_denied · 403 — key lacks the required scope
  • rate_limited · 429 — slow down (see below)
  • not_found · 404 — unknown id or externalId
  • conflict · 409 — duplicate externalId / slug
  • invalid_request · 400 — validation failed
  • internal_error · 500 — our bad. Retry with backoff.

Rate limits

60 requests per minute per API key, burst of 60. A noisy CI key won't starve your other keys. On a 429 the response body tells you when to retry.

Products

GET/api/v1/productsproducts:read

List products. Cursor-paginated via ?cursor=<last-id>&limit=20. Filter with ?status=PUBLISHED or ?externalId=….

POST/api/v1/productsproducts:write

Create or upsert (if externalId matches an existing product). Test-mode keys force status=DRAFT.

GET/api/v1/products/{ref}products:read

{ref} may be the Thinkspark id or your externalId.

PATCH/api/v1/products/{ref}products:write

Partial update — only the fields you send are written. coverImage takes the key of an image uploaded via /api/v1/uploads (1200×800 recommended); null clears it. locale ("en" / "fr") is the language the product's own texts are written in — see Translations. licenseSigner sets offline-signed licence keys: { signingKey?, prefix?, productCode? }; the Ed25519 private key is write-only, stored sealed, never returned (responses show the publicKey). Typefaces: fontGenre (DISPLAY / TEXT / MONOSPACE / SCRIPT, null takes it off) puts the product on the store's fonts page; fontSample is the line shown there before the visitor types — see Font styles.

PUT/api/v1/products/{ref}/preview-fontmedia:write

Type tester font for typefaces: { storageKey, fileName } of a .ttf / .otf / .woff (5 MB max) uploaded via /api/v1/uploads. The file stays on the server; the store page renders typed text to outlines.

DELETE/api/v1/products/{ref}/preview-fontmedia:write
POST/api/v1/products/{ref}/publishproducts:write

Gates: priceCents > 0; DIGITAL_DOWNLOAD needs a current release with at least one file; SUBSCRIPTION needs a billingInterval. Refused for test-mode keys.

POST/api/v1/products/{ref}/archiveproducts:write
DELETE/api/v1/products/{ref}products:write

Soft-delete — archives the product to preserve past orders. Use POST .../archive for the explicit verb.

Releases & files

GET/api/v1/products/{ref}/releasesproducts:read
POST/api/v1/products/{ref}/releasesreleases:write

Create or upsert by externalId. Accepts publish: true to auto-promote after registering files, or markCurrent: true to swap the active version for rollback.

POST/api/v1/products/{ref}/releases/{releaseRef}/publishreleases:write

Stamps publishedAt and promotes to isCurrent=true, demoting the prior current release atomically.

GET/api/v1/products/{ref}/releases/{releaseRef}/filesproducts:read
POST/api/v1/products/{ref}/releases/{releaseRef}/filesreleases:write

Register a file you've PUT to R2 via the presigned URL. The storageKey must live under your seller namespace (sellers/<sellerId>/api/...) — keys outside it are rejected. Optional edition (an edition key): the file is then delivered only to that edition's buyers.

PATCH/api/v1/products/{ref}/releases/{releaseRef}/files/{fileId}releases:write

Move a file to an edition with { "edition": "family" }, or back to every buyer with { "edition": null }.

Editions

One product, several ways to buy it: a single font style, the family, the complete set. Each edition has its price; buyers receive the files assigned to what they bought, plus the files left on every buyer (editionId: null). A product without active editions sells at its priceCents as before; with editions, priceCents follows the cheapest one and listings read “From …”. Launch pricing doesn't apply to editions.

kind: "ITEM" editions can be combined at checkout; kind: "BUNDLE" is bought alone. A bundle with coversItems: true contains every item: when the ticked items cost as much as the cheapest such bundle, the buyer gets the bundle at its price.

GET/api/v1/products/{ref}/editionsproducts:read
POST/api/v1/products/{ref}/editionsproducts:write

Create or update by key. Body: { key, name, priceCents, kind?, coversItems?, description?, sortOrder?, active? }.

PATCH/api/v1/products/{ref}/editions/{key}products:write

Partial update; send key to rename it.

DELETE/api/v1/products/{ref}/editions/{key}products:write

Only for an edition never sold and without files (409 otherwise): send { "active": false } to take it off sale, past buyers keep their files.

Usage rights

What buyers may do with the files: desktop, e-book, app… Buyers see them as “Licence”; they have nothing to do with license keys. One order has one right. The base right costs the edition's price; the others multiply it (multiplier in hundredths, 800 = ×8) and round to the nearest price ending in 9. priceCents everywhere else in the API is the base right's.

GET/api/v1/usage-rightsproducts:read

Your catalogue.

PUT/api/v1/usage-rights/{key}products:write

Create or replace. Body: { multiplier, isBase?, sortOrder?, texts: { en: { name, summary, terms }, fr: {…} } }. Past orders keep the texts they were sold with.

DELETE/api/v1/usage-rights/{key}products:write

Only when no product sells it (409 otherwise).

GET/api/v1/products/{ref}/usage-rightsproducts:read

The rights a product sells, and the price of every edition under each.

PUT/api/v1/products/{ref}/usage-rightsproducts:write

Replace them. Body: { rights: ["desktop-web", "app"], prices?: { app: { family: 22900 } } }; the price key is product without editions. An empty list sells the product as before. ?dryRun=1 prices everything and writes nothing. Terms are required in English and French.

Font styles

The type tester of a typeface: one .ttf / .otf per style (Regular, Bold Italic…), or a single variable file whose weight becomes a slider. Upload each file with /api/v1/uploads, then add its key here. The server opens the file once and keeps what it offers — weight axis, OpenType features (stylistic sets with their names, small caps, figures…), writing systems. Visitors only ever receive PNG images of their text, drawn at /api/fonts/{styleId}/render; the font file never leaves the server. A published product with a fontGenre and at least one style appears on /p/{store}/fonts. Up to 40 styles, 8 MB each.

GET/api/v1/products/{ref}/font-stylesproducts:read

The styles in order, with axis, features, scripts and a previewUrl.

POST/api/v1/products/{ref}/font-stylesmedia:write

{ storageKey, fileName, name?, weight?, italic? } — name, weight and italic default to what the file says. Safe to retry: the same key returns the existing style (200). 400 unsupported_format for WOFF / WOFF2, not_a_font otherwise; 409 limit_reached past 40.

PATCH/api/v1/products/{ref}/font-stylesmedia:write

Reorder: { order: [styleId, …] } with every id, once.

PATCH/api/v1/products/{ref}/font-styles/{styleId}media:write

{ name?, weight?, italic? }.

DELETE/api/v1/products/{ref}/font-styles/{styleId}media:write

Deletes the style, and its file once nothing else uses that key.

# 1. Upload the TTF, then add it as a style
curl -X POST https://sell.thinkspark.dev/api/v1/uploads \
  -H "Authorization: Bearer $SELL_API_KEY" -H "Content-Type: application/json" \
  -d '{"fileName":"MyFont-Bold.ttf","contentType":"font/ttf","contentLength":81234}'
curl -X PUT "$URL" -H "Content-Type: font/ttf" --data-binary @MyFont-Bold.ttf
curl -X POST https://sell.thinkspark.dev/api/v1/products/my-font/font-styles \
  -H "Authorization: Bearer $SELL_API_KEY" -H "Content-Type: application/json" \
  -d '{"storageKey":"sellers/…/api/1779…-MyFont-Bold.ttf","fileName":"MyFont-Bold.ttf"}'

# 2. Put the typeface on the fonts page
curl -X PATCH https://sell.thinkspark.dev/api/v1/products/my-font \
  -H "Authorization: Bearer $SELL_API_KEY" -H "Content-Type: application/json" \
  -d '{"fontGenre":"DISPLAY","fontSample":"The quick brown fox"}'

Translations

A product is written in one language (locale on the product) and can carry the other one: name, description, requirements, trial notes, edition texts and a cover of its own. The store page shows it with ?lang= and falls back field by field to the product's own text.

GET/api/v1/products/{ref}/translationsproducts:read

The product's locale and each translation.

PUT/api/v1/products/{ref}/translations/{locale}translations:write

Create or update one language: { name?, description?, requirements?, trialNotes?, coverImage?, editions?: { [editionKey]: { name?, description? } } }. Fields left out keep their value, null clears one; editions replaces every edition text of that language. 409 own_language for the product's own language.

DELETE/api/v1/products/{ref}/translations/{locale}translations:write
curl -X PUT https://sell.thinkspark.dev/api/v1/products/my-font/translations/fr \
  -H "Authorization: Bearer $SELL_API_KEY" -H "Content-Type: application/json" \
  -d '{"name":"Ma Fonte","description":"Une linéale à chasse fixe…",
       "editions":{"family":{"name":"La famille","description":"Les dix styles"}}}'

FAQ

Questions shown on the product page and emitted as Schema.org FAQPage.

GET/api/v1/products/{ref}/faqproducts:read
PUT/api/v1/products/{ref}/faqproducts:write

Replace them all: { items: [{ question, answer }, …] } (50 max).

POST/api/v1/products/{ref}/faqproducts:write

Add one at the end: { question, answer }.

PATCH/api/v1/products/{ref}/faqproducts:write

Reorder: { order: [faqId, …] } with every id, once.

PATCH/api/v1/products/{ref}/faq/{faqId}products:write
DELETE/api/v1/products/{ref}/faq/{faqId}products:write
curl -X PUT https://sell.thinkspark.dev/api/v1/products/my-font/faq \
  -H "Authorization: Bearer $SELL_API_KEY" -H "Content-Type: application/json" \
  -d '{"items":[{"question":"Can I use it in a logo?","answer":"Yes, the desktop licence covers logos."}]}'

Uploads

POST/api/v1/uploadsuploads:write

Returns a 15-minute presigned PUT URL. Body: { fileName, contentType, contentLength, folder? }. After uploading, use the returned key: a release file, the cover, a gallery image, a translation's cover or the type tester font.

Outbound webhooks

Subscribe an HTTP endpoint to events from your store. Configure one or more in Dashboard → Webhooks. We POST a JSON envelope with HMAC-SHA256 signing — verify it before trusting the body.

Event types

  • order.paid — Buyer completed a one-shot purchase
  • order.refunded — Refund issued (full or partial)
  • release.published — A new release was promoted to current
  • subscription.created — Recurring subscription started
  • subscription.updated — Subscription period renewed or modified
  • subscription.canceled — Subscription canceled (immediate or at period end)

Request shape

POST https://your-app.com/webhooks/sell
content-type: application/json
user-agent:   ThinksparkSell-Webhooks/1.0
x-sell-event: order.paid
x-sell-event-id: evt_a1b2c3…
x-sell-signature: t=1779800000,v1=<hex>

{
  "id":       "evt_a1b2c3…",
  "type":     "order.paid",
  "created":  1779800000,
  "livemode": true,
  "data": {
    "orderId":     "clk…",
    "productId":   "clk…",
    "customerEmail": "buyer@example.com",
    "amountCents": 1900,
    "currency":    "USD",
    "paidAt":      "2026-05-26T12:34:56.000Z"
  }
}

Verifying the signature (Node.js)

import crypto from "node:crypto";

// In your /webhooks/sell route, read the RAW body — never parse it first.
function verify(rawBody, header, secret) {
  // header looks like: t=1779800000,v1=ab12cd...
  const parts = Object.fromEntries(
    header.split(",").map((p) => p.split("="))
  );
  const expected = crypto
    .createHmac("sha256", secret)
    .update(parts.t + "." + rawBody)
    .digest("hex");
  // Constant-time compare to avoid timing attacks
  return crypto.timingSafeEqual(
    Buffer.from(expected, "hex"),
    Buffer.from(parts.v1, "hex")
  );
}

Retries & auto-pause

  • Up to 3 attempts on 5xx or network failure, with backoff (0s, 2s, 8s).
  • Any 4xx response is final — we treat it as "don't bother retrying".
  • Each request has a 10s timeout. Return 2xx fast; queue heavy work async.
  • After 10 consecutive failures, the endpoint is auto-paused — reactivate it once you've fixed the cause.

Need an endpoint that isn't here yet? Tell us what you're building.