REST API
Drive MadMax from CI, scripts, or your own services — the same workflows, runs, and lifecycle verbs as the canvas. Paste a token below and every endpoint on this page is live.
Authentication
Every request carries a bearer token minted in Settings → developer. Tokens are pinned to ONE workspace — all reads and writes happen there, no matter what else your account can see. Read-scope tokens may only GET; the build scope unlocks the write verbs. Two headers are mandatory on every call:
Stays in this browser (localStorage) and is sent ONLY as the Authorization header of requests you fire from this page — never to our servers otherwise. Every endpoint card below gets a try it panel.
Conventions
Token
Token introspection — the authenticated user, the pinned workspace (id, name, slug), and the token's scopes + expiry. The first call to make when wiring up a client.
try it ›
Store transfer
Whole-store dump and restore. These two routes stream — constant memory at any row count — so they live outside the JSON:API surface. The read routes for stores and rows are under Stores below.
Streamed dump. format=ndjson (default) is the lossless MadMax dump — a self-describing header line (name, slug, schema), then one row per line; the only format that re-imports. format=csv and format=json are for humans and BI tools.
Restore an NDJSON dump (build-scope token). Always creates a NEW store — a taken slug is refused, never merged into. Rows write through schema validation with per-row failures reported. slug= names the new store.
Workflows
List, create (bare or from a document), rename, export, edit the graph, activate/deactivate, run, duplicate, and delete workflows.
Workflows in the token's workspace, newest first.
| param | in | type | required |
|---|---|---|---|
| filter | query | — | no |
| sort | query | string | no |
| page | query | object | no |
| include | query | string | no |
| fields | query | object | no |
curl -X GET https://madmax.build/api/v1/workflows \ -H "Authorization: Bearer $MADMAX_API_TOKEN" \ -H "Content-Type: application/vnd.api+json"
try it ›
Create a workflow — bare (name only) or from a document: a madmax/v1 export, an n8n export, or a bare {nodes, edges} graph. Returns a summary + placeholder/requirement report for document imports.
curl -X POST https://madmax.build/api/v1/workflows \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json" \
-d '{"data":{"description":"","document":"","name":""}}'
try it ›
The workspace's call graph laid out as the index's graph view: `systems` (connected groups of ≥2 workflows — columns per call depth, drawn edges, folder label, strays) and `standalone`. Optional `search` / `status` narrow before layout.
| param | in | type | required |
|---|---|---|---|
| search | query | string | no |
| status | query | string | no |
curl -X GET https://madmax.build/api/v1/workflows/map \ -H "Authorization: Bearer $MADMAX_API_TOKEN" \ -H "Content-Type: application/vnd.api+json"
try it ›
One workflow by id, pinned-workspace only.
| param | in | type | required |
|---|---|---|---|
| id | path | string | yes |
| include | query | string | no |
| fields | query | object | no |
curl -X GET https://madmax.build/api/v1/workflows/{id} \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json"
try it ›
Rename and/or set the description. Nothing else is PATCHable.
| param | in | type | required |
|---|---|---|---|
| id | path | string | yes |
| include | query | string | no |
| fields | query | object | no |
curl -X PATCH https://madmax.build/api/v1/workflows/{id} \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json" \
-d '{"data":{"attributes":{},"id":"{id}","type":"workflow"}}'
try it ›
/workflows/:id operation on workflow resource
| param | in | type | required |
|---|---|---|---|
| id | path | string | yes |
| include | query | string | no |
| fields | query | object | no |
curl -X DELETE https://madmax.build/api/v1/workflows/{id} \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json"
try it ›
Freeze the canvas into a snapshot and start firing triggers.
| param | in | type | required |
|---|---|---|---|
| id | path | string | yes |
curl -X POST https://madmax.build/api/v1/workflows/{id}/activate \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json"
try it ›
The call graph around one workflow: `callers` (workflows whose call_workflow steps target it) and `callees` (workflows it calls). Distinct, pinned-workspace only.
| param | in | type | required |
|---|---|---|---|
| id | path | string | yes |
curl -X GET https://madmax.build/api/v1/workflows/{id}/calls \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json"
try it ›
Stop firing triggers; the snapshot survives for audit.
| param | in | type | required |
|---|---|---|---|
| id | path | string | yes |
curl -X POST https://madmax.build/api/v1/workflows/{id}/deactivate \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json"
try it ›
Copy into the same workspace as "<name> (copy)"; connection bindings reset.
| param | in | type | required |
|---|---|---|---|
| id | path | string | yes |
curl -X POST https://madmax.build/api/v1/workflows/{id}/duplicate \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json"
try it ›
The workflow as a portable madmax/v1 document (env ids stripped).
| param | in | type | required |
|---|---|---|---|
| id | path | string | yes |
curl -X GET https://madmax.build/api/v1/workflows/{id}/export \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json"
try it ›
Replace the live canvas graph (same write path as autosave). Runs auto-layout afterwards unless layout: false — positions in the payload are then kept.
| param | in | type | required |
|---|---|---|---|
| id | path | string | yes |
curl -X PUT https://madmax.build/api/v1/workflows/{id}/graph \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json" \
-d '{"data":{"graph":{},"layout":""}}'
try it ›
Move a workflow into a folder (folder_id, null = root) and/or reorder it (before_id / after_id).
| param | in | type | required |
|---|---|---|---|
| id | path | string | yes |
| include | query | string | no |
| fields | query | object | no |
curl -X PATCH https://madmax.build/api/v1/workflows/{id}/move \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json" \
-d '{"data":{"attributes":{},"id":"{id}","type":"workflow"}}'
try it ›
Execute now. Active workflows run their pinned snapshot; draft: true runs the live canvas.
| param | in | type | required |
|---|---|---|---|
| id | path | string | yes |
curl -X POST https://madmax.build/api/v1/workflows/{id}/run \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json" \
-d '{"data":{"draft":""}}'
try it ›
Executions
Run history. Heavy payloads (inputs, output, error) are opt-in via ?fields[execution]=status,output,error.
Executions across the token's workspace, newest first.
| param | in | type | required |
|---|---|---|---|
| filter | query | — | no |
| sort | query | string | no |
| page | query | object | no |
| include | query | string | no |
| fields | query | object | no |
curl -X GET https://madmax.build/api/v1/executions \ -H "Authorization: Bearer $MADMAX_API_TOKEN" \ -H "Content-Type: application/vnd.api+json"
try it ›
One execution by id, pinned-workspace only.
| param | in | type | required |
|---|---|---|---|
| id | path | string | yes |
| include | query | string | no |
| fields | query | object | no |
curl -X GET https://madmax.build/api/v1/executions/{id} \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json"
try it ›
Terminal stop for a pending/running/waiting execution — flips the row to :cancelled and kills the underlying Oban jobs (same path as the canvas Stop button). Fail-closed: the execution is re-fetched under the actor + pinned-workspace lens first.
| param | in | type | required |
|---|---|---|---|
| id | path | string | yes |
curl -X POST https://madmax.build/api/v1/executions/{id}/cancel \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json"
try it ›
Executions for one workflow, newest first, pinned-workspace only.
| param | in | type | required |
|---|---|---|---|
| workflow_id | path | string | yes |
| filter | query | — | no |
| sort | query | string | no |
| page | query | object | no |
| include | query | string | no |
| fields | query | object | no |
curl -X GET https://madmax.build/api/v1/workflows/{workflow_id}/executions \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json"
try it ›
Execution steps
Per-node results within one run — status, timing, and (opt-in) input/output.
/executions/:workflow_execution_id/steps operation on execution-step resource
| param | in | type | required |
|---|---|---|---|
| workflow_execution_id | path | string | yes |
| filter | query | — | no |
| sort | query | string | no |
| page | query | object | no |
| include | query | string | no |
| fields | query | object | no |
curl -X GET https://madmax.build/api/v1/executions/{workflow_execution_id}/steps \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json"
try it ›
Step templates
The primitive catalog (webhook, http, agent, code, …) with each template's config schema — everything needed to author graph nodes.
Globally readable. Sorts by `sort_order` so the catalog renders in the same order as the canvas palette.
| param | in | type | required |
|---|---|---|---|
| filter | query | — | no |
| sort | query | string | no |
| include | query | string | no |
| fields | query | object | no |
curl -X GET https://madmax.build/api/v1/step-templates \ -H "Authorization: Bearer $MADMAX_API_TOKEN" \ -H "Content-Type: application/vnd.api+json"
try it ›
Folders
Organize workflows into folders (one level deep). Move a workflow with PATCH /workflows/:id/move; export/import a whole folder as one madmax-folder/v1 document.
Folders in the token's workspace.
| param | in | type | required |
|---|---|---|---|
| filter | query | — | no |
| sort | query | string | no |
| include | query | string | no |
| fields | query | object | no |
curl -X GET https://madmax.build/api/v1/folders \ -H "Authorization: Bearer $MADMAX_API_TOKEN" \ -H "Content-Type: application/vnd.api+json"
try it ›
Create a folder (one level deep — parent_id is optional).
| param | in | type | required |
|---|---|---|---|
| include | query | string | no |
| fields | query | object | no |
curl -X POST https://madmax.build/api/v1/folders \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json" \
-d '{"data":{"attributes":{},"relationships":{},"type":""}}'
try it ›
Folders in the token's workspace.
| param | in | type | required |
|---|---|---|---|
| id | path | string | yes |
| include | query | string | no |
| fields | query | object | no |
curl -X GET https://madmax.build/api/v1/folders/{id} \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json"
try it ›
Rename a folder.
| param | in | type | required |
|---|---|---|---|
| id | path | string | yes |
| include | query | string | no |
| fields | query | object | no |
curl -X PATCH https://madmax.build/api/v1/folders/{id} \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json" \
-d '{"data":{"attributes":{},"id":"{id}","type":"workflow-folder"}}'
try it ›
Delete a folder; its workflows move back to the root.
| param | in | type | required |
|---|---|---|---|
| id | path | string | yes |
| include | query | string | no |
| fields | query | object | no |
curl -X DELETE https://madmax.build/api/v1/folders/{id} \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json"
try it ›
Reorder a folder among its siblings — before_id / after_id (the neighbouring folders at the drop point) compute the sparse position server-side; a raw position is also accepted. parent_id reparents (one level deep).
| param | in | type | required |
|---|---|---|---|
| id | path | string | yes |
| include | query | string | no |
| fields | query | object | no |
curl -X PATCH https://madmax.build/api/v1/folders/{id}/reorder \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json" \
-d '{"data":{"attributes":{},"id":"{id}","type":"workflow-folder"}}'
try it ›
Stores
Workspace data tables your workflows fill (the Save to store step) and your systems read and write. Row writes over the API go through the same validated path as the step (schema, row cap, workspace). :id is the store's UUID, shown in Settings → stores.
Stores in the token's workspace, oldest first.
| param | in | type | required |
|---|---|---|---|
| filter | query | — | no |
| sort | query | string | no |
| page | query | object | no |
| include | query | string | no |
| fields | query | object | no |
curl -X GET https://madmax.build/api/v1/stores \ -H "Authorization: Bearer $MADMAX_API_TOKEN" \ -H "Content-Type: application/vnd.api+json"
try it ›
/stores operation on store resource
| param | in | type | required |
|---|---|---|---|
| include | query | string | no |
| fields | query | object | no |
curl -X POST https://madmax.build/api/v1/stores \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json" \
-d '{"data":{"attributes":{},"relationships":{},"type":""}}'
try it ›
Store descriptor — name, slug, schema shape, row count.
| param | in | type | required |
|---|---|---|---|
| id | path | string | yes |
| include | query | string | no |
| fields | query | object | no |
curl -X GET https://madmax.build/api/v1/stores/{id} \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json"
try it ›
/stores/:id operation on store resource
| param | in | type | required |
|---|---|---|---|
| id | path | string | yes |
| include | query | string | no |
| fields | query | object | no |
curl -X PATCH https://madmax.build/api/v1/stores/{id} \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json" \
-d '{"data":{"attributes":{},"id":"{id}","type":"store"}}'
try it ›
/stores/:id operation on store resource
| param | in | type | required |
|---|---|---|---|
| id | path | string | yes |
| include | query | string | no |
| fields | query | object | no |
curl -X DELETE https://madmax.build/api/v1/stores/{id} \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json"
try it ›
Store rows
Keyed rows within a store, ascending by update time. Poll by following links.next (a durable keyset cursor), or restart from a timestamp with ?updated_since=. ?workflow_id= filters to rows a workflow last wrote.
Rows ascending by update time. Poll by following links.next, or restart from a timestamp with ?updated_since=.
| param | in | type | required |
|---|---|---|---|
| store_id | path | string | yes |
| filter | query | — | no |
| sort | query | string | no |
| page | query | object | no |
| include | query | string | no |
| fields | query | object | no |
| updated_since | query | — | no |
| workflow_id | query | string | no |
curl -X GET https://madmax.build/api/v1/stores/{store_id}/rows \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json"
try it ›
One row by its caller-defined key (unique per store).
| param | in | type | required |
|---|---|---|---|
| store_id | path | string | yes |
| key | path | string | yes |
| include | query | string | no |
| fields | query | object | no |
curl -X GET https://madmax.build/api/v1/stores/{store_id}/rows/{key} \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json"
try it ›
Insert or replace one row by key. `row` must satisfy the store's schema; the row cap applies.
| param | in | type | required |
|---|---|---|---|
| key | path | string | yes |
| store_id | path | string | yes |
curl -X PUT https://madmax.build/api/v1/stores/{store_id}/rows/{key} \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json" \
-d '{"data":{"row":{}}}'
try it ›
Delete one row by key. 404 when the key doesn't exist in that store.
| param | in | type | required |
|---|---|---|---|
| key | path | string | yes |
| store_id | path | string | yes |
curl -X DELETE https://madmax.build/api/v1/stores/{store_id}/rows/{key} \
-H "Authorization: Bearer $MADMAX_API_TOKEN" \
-H "Content-Type: application/vnd.api+json"
try it ›
machine-readable spec: /api/docs/openapi.json (public, OpenAPI 3 — imports into Postman/Insomnia)