Mocart API
The Mocart API is one REST API, one base URL, one key type. It gives you programmatic access to everything a brand keeps in Mocart, plus the ability to generate new product creatives on demand.
It is built for two kinds of callers:
- Developers integrating Mocart into another system — a PIM, a marketing tool, an internal dashboard, a script that runs on a schedule.
- AI agents that read a machine-readable version of these docs (
llms.txtandllms-full.txt, at the root of this site) and drive the API directly from a task description.
Everything below applies equally to both. If you're an agent: the quickstart is a complete, runnable sequence — start there.
One API, four resource groups
| Group | What it holds | Read or write? |
|---|---|---|
| Catalog | Products and assets synced from your store | Read, plus edit, archive and delete assets |
| Campaigns & Creatives | Campaigns and the creatives generated under them | Read, plus create and manage campaigns, and review, edit and delete creatives |
| Deliveries | Publish runs that pushed creatives to ad platforms or storefronts | Read-only |
| Generation | Presets, and runs that generate new creatives from a product and a style | Read + write |
Catalog, Campaigns & Creatives, and Deliveries are mostly for reading: you list and fetch records that already exist. You can also manage what's in them, just as you would in the dashboard — review creatives (Reviewing creatives), edit and delete them (Managing creatives), edit, archive and delete assets (Managing assets), and create and manage campaigns (Managing campaigns). Deliveries are read-only. Generation is where you spend credits to create something new — a run takes a product and a style, and produces one or more creatives. To hear about changes without polling, see Webhooks.
The 60-second tour
- Create an API key in the Mocart dashboard, under Settings → API keys.
- Call
GET /productsto find a product you want a creative for. - Call
POST /runs/estimate(estimateRun) to price a run against that product — this writes nothing and costs nothing. - Call
POST /runs(createRun) with anIdempotency-Keyto actually generate creatives. - Poll
GET /runs/{id}(getRun) until the run reaches a terminal status, then callGET /runs/{id}/items(listRunItems) to collect the results.
That whole sequence, with runnable code, is the Quickstart. If you're new to the API, read Authentication and Try it safely first — they cover how keys and spend limits work, which matters before you make your first paid call.
Conventions used throughout these docs
- Base URL:
https://api.mocart.io/api/public/v1— every path in these guides is relative to it. - Auth:
Authorization: Bearer mcf_…on every request. - Every endpoint name is followed by its
operationIdin parentheses, e.g.GET /products(listProducts) — the same id used in the API reference and in generated SDKs. - Responses are open documents. Treat any field you don't recognize as something to ignore, not an error — see Versioning.