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
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 | bashRestart 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 tostatus=DRAFTand 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 keypermission_denied· 403 — key lacks the required scoperate_limited· 429 — slow down (see below)not_found· 404 — unknown id or externalIdconflict· 409 — duplicate externalId / sluginvalid_request· 400 — validation failedinternal_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
/api/v1/productsproducts:readList products. Cursor-paginated via ?cursor=<last-id>&limit=20. Filter with ?status=PUBLISHED or ?externalId=….
/api/v1/productsproducts:writeCreate or upsert (if externalId matches an existing product). Test-mode keys force status=DRAFT.
/api/v1/products/{ref}products:read{ref} may be the Thinkspark id or your externalId.
/api/v1/products/{ref}products:writePartial 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.
/api/v1/products/{ref}/preview-fontmedia:writeType 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.
/api/v1/products/{ref}/preview-fontmedia:write/api/v1/products/{ref}/publishproducts:writeGates: priceCents > 0; DIGITAL_DOWNLOAD needs a current release with at least one file; SUBSCRIPTION needs a billingInterval. Refused for test-mode keys.
/api/v1/products/{ref}/archiveproducts:write/api/v1/products/{ref}products:writeSoft-delete — archives the product to preserve past orders. Use POST .../archive for the explicit verb.
Releases & files
/api/v1/products/{ref}/releasesproducts:read/api/v1/products/{ref}/releasesreleases:writeCreate or upsert by externalId. Accepts publish: true to auto-promote after registering files, or markCurrent: true to swap the active version for rollback.
/api/v1/products/{ref}/releases/{releaseRef}/publishreleases:writeStamps publishedAt and promotes to isCurrent=true, demoting the prior current release atomically.
/api/v1/products/{ref}/releases/{releaseRef}/filesproducts:read/api/v1/products/{ref}/releases/{releaseRef}/filesreleases:writeRegister 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.
/api/v1/products/{ref}/releases/{releaseRef}/files/{fileId}releases:writeMove 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.
/api/v1/products/{ref}/editionsproducts:read/api/v1/products/{ref}/editionsproducts:writeCreate or update by key. Body: { key, name, priceCents, kind?, coversItems?, description?, sortOrder?, active? }.
/api/v1/products/{ref}/editions/{key}products:writePartial update; send key to rename it.
/api/v1/products/{ref}/editions/{key}products:writeOnly 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.
/api/v1/usage-rightsproducts:readYour catalogue.
/api/v1/usage-rights/{key}products:writeCreate or replace. Body: { multiplier, isBase?, sortOrder?, texts: { en: { name, summary, terms }, fr: {…} } }. Past orders keep the texts they were sold with.
/api/v1/usage-rights/{key}products:writeOnly when no product sells it (409 otherwise).
/api/v1/products/{ref}/usage-rightsproducts:readThe rights a product sells, and the price of every edition under each.
/api/v1/products/{ref}/usage-rightsproducts:writeReplace 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.
Gallery
The carousel on the product page: up to 16 images or video embeds, the first one is the hero. Upload an image with /api/v1/uploads, then add its key here — keys must sit in your seller folder, must not be a paid download file, and the object must already be uploaded. Images are served publicly at /api/media/{id} once the product is published. locale ("en"/"fr") shows an image only on that language's page — for images with words on them; null shows it everywhere.
/api/v1/products/{ref}/mediaproducts:readThe gallery in order, each with its public url.
/api/v1/products/{ref}/mediamedia:writeReplace the whole gallery with an ordered list — the usual call. Each item is { type: "IMAGE", storageKey, caption?, locale? }, { type: "VIDEO_EMBED", embedUrl, caption?, locale? } or { id, caption?, locale? }. Idempotent: items already there (same id, key or URL) are kept, the rest created, what you leave out deleted.
/api/v1/products/{ref}/mediamedia:writeAdd one item at the end. 409 limit_reached past 8.
/api/v1/products/{ref}/mediamedia:writeReorder: { order: [mediaId, …] } with every id, once.
/api/v1/products/{ref}/media/{mediaId}media:write{ caption?, locale? }.
/api/v1/products/{ref}/media/{mediaId}media:writeDeletes the item, and its file once nothing else uses that key.
# 1. Get an upload URL, then PUT the image to it
curl -X POST https://sell.thinkspark.dev/api/v1/uploads \
-H "Authorization: Bearer $SELL_API_KEY" -H "Content-Type: application/json" \
-d '{"fileName":"plate-1.png","contentType":"image/png","contentLength":482113}'
# → { "url": "https://…", "key": "sellers/…/api/1779…-plate-1.png", … }
curl -X PUT "$URL" -H "Content-Type: image/png" --data-binary @plate-1.png
# 2. Set the gallery, in order
curl -X PUT https://sell.thinkspark.dev/api/v1/products/my-font/media \
-H "Authorization: Bearer $SELL_API_KEY" -H "Content-Type: application/json" \
-d '{"items":[
{"type":"IMAGE","storageKey":"sellers/…/api/1779…-plate-1.png","caption":"Regular"},
{"type":"IMAGE","storageKey":"sellers/…/api/1779…-plate-2-fr.png","locale":"fr"},
{"type":"VIDEO_EMBED","embedUrl":"https://youtu.be/…"}
]}'
# 3. Move the video first: every id, in the new order
curl -X PATCH https://sell.thinkspark.dev/api/v1/products/my-font/media \
-H "Authorization: Bearer $SELL_API_KEY" -H "Content-Type: application/json" \
-d '{"order":["<videoId>","<plate1Id>","<plate2Id>"]}'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.
/api/v1/products/{ref}/font-stylesproducts:readThe styles in order, with axis, features, scripts and a previewUrl.
/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.
/api/v1/products/{ref}/font-stylesmedia:writeReorder: { order: [styleId, …] } with every id, once.
/api/v1/products/{ref}/font-styles/{styleId}media:write{ name?, weight?, italic? }.
/api/v1/products/{ref}/font-styles/{styleId}media:writeDeletes 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.
/api/v1/products/{ref}/translationsproducts:readThe product's locale and each translation.
/api/v1/products/{ref}/translations/{locale}translations:writeCreate 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.
/api/v1/products/{ref}/translations/{locale}translations:writecurl -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.
/api/v1/products/{ref}/faqproducts:read/api/v1/products/{ref}/faqproducts:writeReplace them all: { items: [{ question, answer }, …] } (50 max).
/api/v1/products/{ref}/faqproducts:writeAdd one at the end: { question, answer }.
/api/v1/products/{ref}/faqproducts:writeReorder: { order: [faqId, …] } with every id, once.
/api/v1/products/{ref}/faq/{faqId}products:write/api/v1/products/{ref}/faq/{faqId}products:writecurl -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
/api/v1/uploadsuploads:writeReturns 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 purchaseorder.refunded— Refund issued (full or partial)release.published— A new release was promoted to currentsubscription.created— Recurring subscription startedsubscription.updated— Subscription period renewed or modifiedsubscription.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.