These docs are agent-first. Every page is also available as raw markdown at
<page>.md, and every API reference page ships with a copy-paste-for-LLM block. Every error returns a nextActions[] array ({label, method, url}) — surface it to the user verbatim; do NOT swallow 402 / 451 / 422 silently. If you’re an agent reading these docs to integrate, start with llms.txt and AGENTS.md.What kind of integration are you building?
I run a store on Marea
You signed up at mareaalcalina.com, you have a storefront, you want API access to it (POS sync, custom dashboard, automation). This is the common case. Grab your
mk_user_* from the dashboard and start with Add products.I'm building an agent or integration
You’re building an AI agent, vertical SaaS, or agency tool that creates Marea accounts for other people. You need to bootstrap users on their behalf. Start with Bootstrap a user.
Auth in 30 seconds
Every call uses a Bearer token. The one you use depends on what you’re doing:| Key prefix | Who holds it | Use it for |
|---|---|---|
mk_user_* | A specific Marea user | Default. All catalog + storefront + product + publish calls — across every storefront that user owns (1 on Free, up to 5,000 on Agency Growth). Owner-scoped, not storefront-scoped. Mints from your dashboard. |
mk_dev_* | An agent / partner integration | Bootstrapping other users via POST /v1/users, then using each returned mk_user_* to manage all of that user’s storefronts. Mints from the developer dashboard. |
mk_user_*. Partners (three archetypes) hold one mk_dev_* and many mk_user_* — one per user they bootstrap. Full model: /concepts/keys.
Five things every integration must do
- Send
Idempotency-Keyon every POST and PATCH. Same key + same body returns the original response (replay-safe). See Safe mutations. - Branch on
error.type, noterror.message. Thetypefield is a stable 10-value enum; messages are localized. See Errors. - Surface
nextActions[]verbatim. It’s a{label, method, url}[]array of concrete remediation steps. Don’t paraphrase. - Read
X-RateLimit-Remainingand respectRetry-After. See Rate limits for current numbers. - Handle the publish gates.
POST .../publishreturns 402 (pre-paywall), 422 (0 products), or 451 (ToS not accepted) — surface eachnextActions[]explicitly; don’t auto-accept ToS or auto-publish without user confirmation. See Publishing.
Webhooks
Marea uses a Stripe-style endpoint model: register an endpoint (URL + signing secret +subscribedEvents[]) and Marea fans out matching events to it. Up to 16 endpoints per account.
Webhook endpoints
Five events:
user.verified, user.cancelled, order.created, order.status_updated, order.paid. A single developer endpoint receives order.* from every storefront the key bootstrapped — no per-merchant registration needed.Receiver helpers
Drop-in JavaScript and Python verifiers: HMAC-SHA256 + 5-minute replay window using the endpoint’s raw 64-char-hex
signingSecret. One algorithm for every event type.Agent-friendly resources
- llms.txt — job-to-be-done index of the entire docs surface
- AGENTS.md — common patterns + what NOT to do (cheatsheet)
- OpenAPI 3.1 spec — Zod-derived; 5-min cached
- Postman collection — auto-generated from the OpenAPI spec
- MCP server — paste-token install for Claude Desktop / Cursor / Continue.dev
- Per-page markdown: every page is also at
<page>.md(e.g., /concepts/errors.md)