Skip to main content

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.txt and llms-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​

GroupWhat it holdsRead or write?
CatalogProducts and assets synced from your storeRead, plus edit, archive and delete assets
Campaigns & CreativesCampaigns and the creatives generated under themRead, plus create and manage campaigns, and review, edit and delete creatives
DeliveriesPublish runs that pushed creatives to ad platforms or storefrontsRead-only
GenerationPresets, and runs that generate new creatives from a product and a styleRead + 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​

  1. Create an API key in the Mocart dashboard, under Settings → API keys.
  2. Call GET /products to find a product you want a creative for.
  3. Call POST /runs/estimate (estimateRun) to price a run against that product — this writes nothing and costs nothing.
  4. Call POST /runs (createRun) with an Idempotency-Key to actually generate creatives.
  5. Poll GET /runs/{id} (getRun) until the run reaches a terminal status, then call GET /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 operationId in 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.