Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.moda.app/llms.txt

Use this file to discover all available pages before exploring further.

Endpoints

Compressed catalog of every 2026-05-01 endpoint by router, with scope and a one-line purpose. Not a substitute for the OpenAPI spec — a scannable index. Base URL: https://api.moda.app/v1

Tasks

VerbPathOperationScopePurpose
POST/tasksstartTasktasks:writeStart an AI design task. Returns Task envelope immediately; poll or webhook.
GET/tasks/{id}getTasktasks:readFetch current task envelope.
GET/taskslistTaskstasks:readCursor-paginated list of team’s tasks.
POST/tasks/{id}/cancelcancelTasktasks:cancelRequest cancellation. Returns 202 + updated envelope.
Prefer: wait=<s> accepted on POST /tasks and POST /tasks/{id}/cancel. Max 30s. See task-envelope.md.

Remix

VerbPathOperationScopePurpose
POST/remixremixCanvastasks:writeDuplicate canvas and optionally run a design task on the copy. Always returns a Task envelope (kind: "remix").
Without a prompt: completes synchronously, returns status: "succeeded" inline. With a prompt: queues a task, returns non-terminal envelope; poll.

Canvases

VerbPathOperationScopePurpose
GET/canvaseslistCanvasescanvases:readCursor-paginated list of team canvases.
GET/canvases/searchsearchCanvasescanvases:readFull-text search by name/content.
GET/canvases/{id}getCanvasdesigns:readFetch canvas spec (pseudo-HTML + CSS). share_token query param for public reads.
GET/canvases/{id}/tokensgetCanvasTokensdesigns:readExtract design variables / colors / fonts / radii only.
GET/canvases/{id}/pageslistCanvasPagesdesigns:readList page metadata (name, dimensions, node_count).
POST/canvases/{id}/exportexportCanvasdesigns:exportSynchronous export to PNG / JPEG / PDF / PPTX. Returns {url, format}. 409 + Retry-After: 10 when an active design task runs on this canvas.
POST/canvases/{id}/sharemakeCanvasPubliccanvases:writeCreate / retrieve a public share link. Blocks on thumbnail generation by default; pass wait_for_thumbnail=false to skip.
See canvases-and-exports.md for the export semantics and the share-token read pattern.

Brand kits

VerbPathOperationScopePurpose
GET/brand-kitslistBrandKitsbrand_kits:readCursor-paginated list. Team is implicit from the API key context.
POST/brand-kitscreateBrandKitbrand_kits:writeExtract brand data from a URL (Firecrawl-backed). Returns the kit record.
PATCH/brand-kits/{id}updateBrandKitbrand_kits:writePartial update. Array fields (colors, fonts) replace wholesale.
DELETE/brand-kits/{id}deleteBrandKitbrand_kits:writeSoft delete. Returns 204.
POST/brand-kits/{id}/imagesaddBrandKitImagebrand_kits:writeAttach an uploaded file (logo / reference / asset). Requires file_id from POST /uploads.
See brand-kits.md for update semantics.

Uploads

VerbPathOperationScopePurpose
POST/uploadsuploadFileuploads:writeMultipart upload. Returns {id: "file_...", url, filename, mime_type, size_bytes, was_duplicate}.
POST/uploads/from-urluploadFromUrluploads:writeServer fetches from a public URL, validates MIME, stores. SSRF-validated.
Deduplicates by content hash. See uploads.md.

Organizations

VerbPathOperationScopePurpose
GET/organizationslistOrganizationsorganizations:readCursor-paginated list of orgs + teams the key’s owner belongs to.
Role scoped: admins see all, members see their own.

Credits

VerbPathOperationScopePurpose
GET/creditsgetCreditscredits:readCurrent balance, plan, reset date. null fields when billing is disabled.
VerbPathOperationScopePurpose
POST/share_links/resolveresolveShareLink(none — public-ish)Parse a moda.app/s/… URL into {canvas_id, share_token, permission, expires_at}. Distinguishes share_link_revoked from share_link_not_found.

Usage / events (observability)

VerbPathOperationScopePurpose
GET/usagegetApiUsage(admin)Summary + daily / per-key / per-operation aggregates. 7-day default, 90-day max window.
GET/eventslistApiEvents(admin)Cursor-paginated activity log. Rows include HTTP status, operation_id, timestamp, trigger_source (api / mcp).
Admins see everything; members see only their own keys’ events.

Cross-cutting request headers

HeaderRequiredNotes
Authorization: Bearer moda_live_…Yes (except /share_links/resolve)See authentication.md
Moda-Version: 2026-05-01ShouldPin in production. Omitting resolves to default.
Content-Type: application/jsonPOST / PATCH
Prefer: wait=<seconds>NoOn task-shaped POSTs. Max 30s.
Idempotency-Key (header)No — not yet implementedBody field idempotency_key instead.

Cross-cutting response headers

HeaderAlways present
Moda-VersionYes — the resolved version
X-Request-IDYes — matches the request_id in error envelopes
Retry-AfterOn 429 rate_limited and 409 canvas_active_job

Common wrong guesses

  • Using the operation ID (startTask) as the path. Operation IDs are for SDKs; the HTTP path is what matters.
  • Expecting /tasks/{id}/cancel to be a DELETE. It’s a POST.
  • Confusing POST /canvases/{id}/share with generating a share link on every call. It creates one if missing, returns the existing one otherwise. It also blocks on thumbnail generation by default.
  • Calling GET /canvases/{id} without share_token= on a share-only-visible canvas. You’ll get 404 — the call resolves through the key’s team access, not the share link.
  • Treating POST /canvases/{id}/export as async. It’s synchronous. No Task envelope. 409 + Retry-After: 10 is the retry signal when a design task is running on the canvas.

Upstream