REST API Reference

The complete HTTP surface of mmm-framework-server — the FastAPI application behind the platform — grouped by functional area and generated from the live OpenAPI schema at v1.0.0.

mmm-framework-server is the separate server package that hosts the agent, sessions, projects, and every job endpoint. Start it with uvicorn mmm_framework_server.main:app (default port :8000); in development the React frontend proxies /api to it. Model fits run in-kernel, so no Redis or external worker is required.

For machine consumption, the raw schema this page is built from is published at shared/openapi.json. A running server also serves the interactive Swagger UI at /docs and the same schema at /openapi.json.

Authentication. In the default single-user development posture the API is open — no route carries an authentication dependency, so a default install should be treated as trusting everyone who can reach its ports and deployed behind your own perimeter. In the hosted multi-user posture (MMM_AGENT_HOSTED=1) sessions must be server-minted via POST /sessions and the unguessable session ID acts as a bearer capability scoping plots, files, and kernels, while the /auth/* routes provide the built-in organization/JWT layer used by the frontend. See Security & Deployment Posture and Trust & Security for the full picture.

This page is generated

Do not edit the reference sections by hand. Regenerate with python3 tools/build_rest_docs.py run from docs/ after re-exporting shared/openapi.json from the live app. The generator asserts that every operation in the schema is rendered.

Conventions

Generated from shared/openapi.jsonMMM Agent API v1.0.0 — 202 operations across 167 paths. Do not edit this section by hand; re-run python3 tools/build_rest_docs.py.

Sessions & Chat 25

The Oracle: the streaming /chat loop plus per-session lifecycle and state — model spec, causal DAG, assumptions, workflow tracker, history, rewind, and export.

DELETE/assumption/{thread_id}/{key}Retract Assumption Endpoint

Parameters

NameInTypeRequired
keypathstringrequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — RetractAssumptionBody

FieldTypeRequiredNotes
reasonstringrequired

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/assumption_history/{thread_id}/{key}Get Assumption History Endpoint

Distinct route prefix so {key:path} can't shadow the list endpoint.

Parameters

NameInTypeRequired
keypathstringrequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/assumptions/{thread_id}List Assumptions Endpoint

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
historyquerybooleanoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/assumptions/{thread_id}Record Assumption Endpoint

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — RecordAssumptionBody

FieldTypeRequiredNotes
keystringrequired
valueanyrequired
rationalestringrequired
categorystring = "other"optional
change_notestring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/chatChat Endpoint

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional
x-api-keyheaderstring, nullableoptional
x-base-urlheaderstring, nullableoptional
x-expert-api-keyheaderstring, nullableoptional
x-expert-base-urlheaderstring, nullableoptional
x-expert-modelheaderstring, nullableoptional
x-expert-providerheaderstring, nullableoptional
x-model-nameheaderstring, nullableoptional
x-providerheaderstring, nullableoptional

Request body

application/json (required) — ChatRequest

FieldTypeRequiredNotes
messagestringrequired
thread_idstring = "default_thread"optional
page_contextstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/dag/{thread_id}Dag Endpoint

Return the current DAG (if any) plus a fresh identifiability report. Pulls DAG from dashboard_data['dag']['spec'] which propose_dag writes.

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

PUT/dag/{thread_id}Update Dag

Manually update the DAG for a session.

Accepts React Flow node/edge format, converts to DAGSpec, validates, and persists into the agent state dashboard_data.dag.

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — DAGUpdateRequest

FieldTypeRequiredNotes
nodesarray of objectrequired
edgesarray of objectrequired

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/history/{thread_id}Get History

Return the checkpoint timeline for this thread, newest first.

Each entry includes the checkpoint id, parent id, a short label derived from the next node, and the count of messages at that point. The frontend uses this to drive Back and Retry.

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/rewind/{thread_id}Rewind

Fork the thread back to an earlier checkpoint.

update_state(target_config, {}) writes a new checkpoint whose parent is target_config's checkpoint_id and inherits its values. The thread's tip moves to this fork, so subsequent reads return the rewound state.

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — RewindRequest

FieldTypeRequiredNotes
checkpoint_idstringrequired

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/sessionsList Sessions Endpoint

Parameters

NameInTypeRequired
limitqueryintegeroptional
project_idquerystring, nullableoptional
skipqueryintegeroptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/sessionsCreate Session Endpoint

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — CreateSessionRequest

FieldTypeRequiredNotes
namestring, nullableoptional
project_idstring, nullableoptional
modeling_modestring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/sessions/{thread_id}Get Session Endpoint

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

PATCH/sessions/{thread_id}Update Session Endpoint

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — UpdateSessionRequest

FieldTypeRequiredNotes
namestring, nullableoptional
project_idstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

DELETE/sessions/{thread_id}Delete Session Endpoint

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/sessions/{thread_id}/artifactsList Artifacts Endpoint

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/sessions/{thread_id}/exportExport Session Endpoint

Download the session's Python work as a standalone, runnable script.

Synthesizes a preamble that reconstitutes tool-injected state (dataset, fitted model, helpers), then replays the conversation's tool calls (fits as build_and_fit with the fitted spec embedded, model ops, EDA) and execute_python cells in order — so the download is a real, portable reproduction of the session, not a code dump that NameErrors. scope narrows to last (final user turn) or turn:<k> (1-based); invalid values export everything. See agents/session_export.build_session_script.

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
scopequerystringoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/sessions/{thread_id}/filesList Files Endpoint

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/sessions/{thread_id}/load-modelLoad Model Endpoint

Load a saved fitted model into the session directly. UI buttons call this instead of asking the agent to run the load_fitted_model tool.

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — LoadModelRequest

FieldTypeRequiredNotes
namestringrequired

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

PATCH/sessions/{thread_id}/modeSet Session Mode Endpoint

Switch a session's modeling mode (mmm | causal_inference | general_bayes | descriptive). The next /chat turn reads it to select the prompt framing + tools.

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — SetSessionModeRequest

FieldTypeRequiredNotes
modeling_modestringrequired

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

PATCH/spec/{thread_id}Update Spec

Server-authoritative manual edit of the model configuration.

Writes the edited model_spec directly into the agent state and locks the leaf fields the user actually changed (diffed server-side) so the LLM can no longer silently overwrite them. unlock_paths hands fields back to the LLM.

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — SpecUpdateRequest

FieldTypeRequiredNotes
model_specobjectrequired
lock_pathsarray of string, nullableoptional
unlock_pathsarray of string, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/spec/{thread_id}/resolveResolve Spec Change

Confirm or decline an LLM-proposed change to a user-locked field.

approve applies the proposed value (and keeps the field locked at the new value). reject keeps the user's value and writes a note into the thread so the LLM has decline-memory and won't re-propose the same change next turn.

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — SpecResolveRequest

FieldTypeRequiredNotes
pathstringrequired
actionstringrequired

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/state/{thread_id}Get State

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

DELETE/state/{thread_id}Clear State

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/workflow/{thread_id}Workflow Status Endpoint

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

PATCH/workflow/{thread_id}/{step}Update Workflow Step Endpoint

Parameters

NameInTypeRequired
steppathintegerrequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — WorkflowStepBody

FieldTypeRequiredNotes
statusstringrequired
notesstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

Data: Upload, EDA & Data Studio 9

Getting data into a session: raw upload, dataset preview, outlier-treatment actions, and the staged Data Studio pipeline (upload → interactive EDA → clean → commit as the working dataset).

GET/data-studio/{thread_id}Data Studio State

The current staging manifest + a fresh preview (for hydration on reopen).

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/data-studio/{thread_id}/commitData Studio Commit

Promote the cleaned staged frame to the session's working dataset. Writes MFF-long CSV, sets dataset_path + spec roles via a STATE-ONLY aupdate_state (no ToolMessage — same pattern as /outliers/apply).

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — StudioCommitRequest

FieldTypeRequiredNotes
reasonstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/data-studio/{thread_id}/discardData Studio Discard

Discard the staging area. Does NOT touch a prior committed dataset_path.

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/data-studio/{thread_id}/edaData Studio Eda

Run the requested EDA analyses on the current staged + transformed frame. Figures are returned INLINE (never pushed to the session Plots tab).

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — StudioEdaRequest

FieldTypeRequiredNotes
analysesarray of string, nullableoptional
variablesarray of string, nullableoptional
sensitivitystring = "default"optional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

PUT/data-studio/{thread_id}/pipelineData Studio Pipeline

Replace the whole transform pipeline (+ roles) and re-preview the frame.

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — StudioPipelineRequest

FieldTypeRequiredNotes
stepsarray of object = []optional
rolesobject, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/data-studio/{thread_id}/uploadData Studio Upload

Stage a raw upload (.csv/.xlsx/.parquet) for the Data Studio. Lands under thread_dir/data_studio/raw/, (re)initialises the staging manifest with heuristic default roles, and returns the columns + a preview. Does NOT set the session's working dataset — that happens on commit.

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Request body

multipart/form-data (required) — Body_data_studio_upload_data_studio__thread_id__upload_post

FieldTypeRequiredNotes
filestring (binary)required

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/dataset/preview/{thread_id}Dataset Preview

Return a time-series for one MFF variable, optionally filtered by one dimension.

Query params: variable — value of VariableName (e.g. 'TV', 'Sales') dim — dimension column to filter on (e.g. 'Geography') value — the dimension value; pass '(national)' to filter NaN rows

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
dimquerystring, nullableoptional
valuequerystring, nullableoptional
variablequerystringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/outliers/{thread_id}/applyApply Outliers Endpoint

Apply confirmed outlier-treatment actions from the UI (EDA tab confirm buttons), without a chat round-trip.

Applies a STATE-ONLY update via aupdate_state (same pattern as PUT /dag): no ToolMessage/AIMessage is appended — an orphan tool message injected outside a real tool call corrupts Anthropic message threads.

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — OutlierApplyRequest

FieldTypeRequiredNotes
action_idsarray of stringrequired
reasonstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/uploadUpload File

Upload a file scoped to a session. Files land in the session WORKSPACE directory (so execute_python and the Files tab share one location), are registered in data_files, and an ABSOLUTE path is returned so the agent can read it from any tool (execute_python runs in the workspace; fit/inspect run in the server cwd).

Parameters

NameInTypeRequired
thread_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Request body

multipart/form-data (required) — Body_upload_file_upload_post

FieldTypeRequiredNotes
filestring (binary)required

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

Projects, Team & Knowledge Base 35

Project CRUD and everything scoped to a project: members, onboarding, the guide session, knowledge-base ingest/search, data connections, deliverables, scorecards, sign-offs, pacing, and history.

DELETE/kb/{document_id}Kb Delete Endpoint

Parameters

NameInTypeRequired
document_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projectsList Projects Endpoint

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projectsCreate Project Endpoint

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — ProjectCreateRequest

FieldTypeRequiredNotes
namestringrequired
descriptionstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}Get Project Endpoint

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

PATCH/projects/{project_id}Update Project Endpoint

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — ProjectUpdateRequest

FieldTypeRequiredNotes
namestring, nullableoptional
descriptionstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

DELETE/projects/{project_id}Delete Project Endpoint

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/data-connectionsList Data Connections Endpoint

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/data-connectionsCreate Data Connection Endpoint

Save a reusable data-source connection (a non-secret bucket/query/table reference; credentials stay ambient via ADC).

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — DataConnectionCreate

FieldTypeRequiredNotes
namestringrequired
kindstringrequired
configobject = {}optional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

PATCH/projects/{project_id}/data-connections/{connection_id}Update Data Connection Schedule Endpoint

Set or clear a connection's auto-sync interval.

Parameters

NameInTypeRequired
connection_idpathstringrequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — ConnectionScheduleUpdate

FieldTypeRequiredNotes
sync_interval_minutesnumber, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

DELETE/projects/{project_id}/data-connections/{connection_id}Delete Data Connection Endpoint

Parameters

NameInTypeRequired
connection_idpathstringrequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/data-connections/{connection_id}/previewPreview Data Connection Endpoint

Read the first rows of a connection (capped) for a UI preview.

Gated as a write: it executes the connection's (billable) query/read and stamps last_synced.

Parameters

NameInTypeRequired
connection_idpathstringrequired
project_idpathstringrequired
rowsqueryintegeroptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/data-connections/{connection_id}/testTest Data Connection Endpoint

Parameters

NameInTypeRequired
connection_idpathstringrequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/data-qualityData Quality Endpoint

Latest pre-fit data-quality summary for a project (from the agent's EDA), surfaced inline at the onboarding 'add data' step. Reads the most-recently updated session that has an EDA envelope; returns {found: false} otherwise.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/deliveryList Delivery Endpoint

Actual in-flight delivery rows stored for the project (issue #123).

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/deliveryUpload Delivery Endpoint

Ingest actual delivery (CSV/TSV or JSON: spend by channel/period) into the delivery registry (issue #123), so pacing compares against the saved plan without spend passed inline. A CSV may be LONG (channel/period/spend columns) or WIDE (a date/period column + one column per channel); re-uploading a period overwrites it.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

multipart/form-data (required) — Body_upload_delivery_endpoint_projects__project_id__delivery_post

FieldTypeRequiredNotes
filestring (binary)required

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

DELETE/projects/{project_id}/deliveryDelete Delivery Endpoint

Clear stored delivery for the project (optionally one channel).

Parameters

NameInTypeRequired
project_idpathstringrequired
channelquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/estimandsProject Estimands Endpoint

Declarative estimands for every fitted model in the project, grouped into (estimand × KPI) comparability clusters for the Performance page. Models on the same estimand+KPI sit side-by-side; different-KPI models stay separate (not directly comparable). Assembled from estimand rows persisted on each model_run artifact at fit time — no model loads. Older runs need the backfill (python -m mmm_framework.platform.backfill --what estimands).

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/guideProject Guide Session Endpoint

The project's global guide thread: one persistent session per project that the floating chat bubble talks to (full agent + project KB). Created on first use, reused after — it's a normal session, so it also shows up in the Workspace if the user wants the full view.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/historyProject History Endpoint

Cycle-over-cycle trajectory series for the Performance page: per-channel ROI posteriors (CI contraction), spend shares (allocation migration), share gaps, calibration status, and the portfolio series (misallocation proxy, marginal ROI, EVPI). Assembled purely from stored run_metrics rows — no model loads.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/kbKb List Endpoint

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/kbKb Upload Endpoint

Add a document to a project's knowledge base: store it, then chunk + embed it (in a threadpool) so it becomes searchable. Pass template=true to tag it as a template document (surfaced by the agent's list_templates).

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

multipart/form-data (required) — Body_kb_upload_endpoint_projects__project_id__kb_post

FieldTypeRequiredNotes
filestring (binary)required
templateboolean = falseoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/membersList Members Endpoint

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

PUT/projects/{project_id}/membersSet Members Endpoint

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — MembersRequest

FieldTypeRequiredNotes
membersarray of objectrequired

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/onboardingProject Onboarding Endpoint

Save the client/project profile, assign team members, and render the profile into a project_brief.md in the project's knowledge base — so both the global guide chat and every session chat can retrieve it. Safe to re-run: the meta merges and the brief is replaced.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — OnboardingRequest

FieldTypeRequiredNotes
client_namestring, nullableoptional
industrystring, nullableoptional
websitestring, nullableoptional
marketsstring, nullableoptional
goalsstring, nullableoptional
kpisstring, nullableoptional
channelsstring, nullableoptional
constraintsstring, nullableoptional
audiencestring, nullableoptional
notesstring, nullableoptional
membersarray of object, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/onboarding-statusOnboarding Status Endpoint

Self-serve onboarding checklist + next action for a project.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/pacingProject Pacing Endpoint

In-flight pacing for the project (issue #123): the stored actual delivery vs the planned series auto-sourced from the latest saved budget plan, with per-channel divergence, off-pace flags, and an alert digest. Model-free (no fit load) — the expected-outcome delta comes from the check_pacing agent tool. Returns available: false with a reason when there is no saved plan or no delivery yet.

Parameters

NameInTypeRequired
project_idpathstringrequired
thresholdquerynumber, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/pacing/alertProject Pacing Alert Endpoint

The most recently persisted off-pace alert for the project (issue #123), written by the background pacing-alert sweep. Returns {alert: null} when the project is on pace or the sweep has never run — a cheap poll the FE can use to badge the Pacing tab without recomputing on every page load.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/platform-figuresList Platform Figures Endpoint

Platform-reported attribution figures stored for the project (issue #120).

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/platform-figuresUpload Platform Figures Endpoint

Ingest platform-reported attribution (CSV/TSV or JSON) into the registry (issue #120), so triangulation re-uses it without an inline dict. A CSV has a channel + value column (+ optional source/metric/ attribution_window/incremental/period). Figures are stored **non-incremental** (last-touch) unless a row sets incremental true.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

multipart/form-data (required) — Body_upload_platform_figures_endpoint_projects__project_id__platform_figures_post

FieldTypeRequiredNotes
filestring (binary)required

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

DELETE/projects/{project_id}/platform-figuresDelete Platform Figures Endpoint

Clear stored platform figures for the project (optionally one channel).

Parameters

NameInTypeRequired
project_idpathstringrequired
channelquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/scorecardProject Scorecard Endpoint

Recommendation scorecard (issue #109): each channel's realized experiment readout joined to the ROI the model predicted for it (with its credible interval), the error, and whether the realized value landed inside the predicted interval — the model's interval calibration over time. Joined server-side from persisted estimands + the experiment registry; no model loads.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/signoffCreate Signoff Endpoint

Record a formal sign-off approving the model's current assumptions/priors (issue #110): who approved, when, and a hash-chained, tamper-evident audit entry over the assumption snapshot. The accountability chain a procurement / audit reviewer asks for ('who approved these priors?').

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — SignoffRequest

FieldTypeRequiredNotes
approverstringrequired
rolestring, nullableoptional
notestring = ""optional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/signoffsList Signoffs Endpoint

The project's sign-off audit trail (newest first) + a chain-integrity check (verification.intact is false if a past record was tampered with).

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/triangulationProject Triangulation Endpoint

Triangulation panel — MMM × experiment (× platform) — for the project's channels, reconciled server-side from persisted data (issue #119). Joins the per-channel contribution_roi estimands persisted at fit time with the calibrated/completed experiment readouts in the registry; no model loads. kpi/run_id pin which fitted model's MMM numbers are used (default: the latest contribution_roi model). Any platform-attribution figures ingested for the project (issue #120) are folded in as the third source.

Parameters

NameInTypeRequired
project_idpathstringrequired
kpiquerystring, nullableoptional
run_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

Experiments & Design 20

The experiment registry with its lifecycle transitions, the Design Studio (design / identify / optimize / simulate jobs), ghost-ads power, and pre-registered analysis plans.

GET/analysis-plansList Analysis Plans Endpoint

Parameters

NameInTypeRequired
limitqueryintegeroptional
thread_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/analysis-plansLock Analysis Plan Endpoint

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — LockPlanRequest

FieldTypeRequiredNotes
thread_idstringrequired
namestring = "Analysis Plan"optional
dagobject, nullableoptional
research_questionobject, nullableoptional
assumptionsarray of any, nullableoptional
extraobject, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/analysis-plans/{plan_id}Get Analysis Plan Endpoint

Parameters

NameInTypeRequired
plan_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

DELETE/analysis-plans/{plan_id}Delete Analysis Plan Endpoint

Parameters

NameInTypeRequired
plan_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/experimentsList Experiments Endpoint

Parameters

NameInTypeRequired
channelquerystring, nullableoptional
project_idquerystring, nullableoptional
statusquerystring, nullableoptional
subchannelquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/experimentsUpsert Experiment Endpoint

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — ExperimentUpsertRequest

FieldTypeRequiredNotes
idstring, nullableoptional
project_idstring, nullableoptional
thread_idstring, nullableoptional
channelstring, nullableoptional
subchannelstring, nullableoptional
design_typestring, nullableoptional
statusstring, nullableoptional
start_datestring, nullableoptional
end_datestring, nullableoptional
estimandstring, nullableoptional
valuenumber, nullableoptional
senumber, nullableoptional
notesstring, nullableoptional
recommending_run_idstring, nullableoptional
designobject, nullableoptional
readoutobject, nullableoptional
… 1 more fields (see openapi.json)

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/experiments/{experiment_id}Get Experiment Endpoint

Parameters

NameInTypeRequired
experiment_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

DELETE/experiments/{experiment_id}Delete Experiment Endpoint

Parameters

NameInTypeRequired
experiment_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/experiments/{experiment_id}/transitionTransition Experiment Endpoint

Validated lifecycle move (draft→planned→running→completed→calibrated, abandoned from any active state). 409 on an illegal transition so the UI can distinguish state-machine conflicts from bad input.

Parameters

NameInTypeRequired
experiment_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — ExperimentTransitionRequest

FieldTypeRequiredNotes
statusstringrequired
notestring, nullableoptional
valuenumber, nullableoptional
senumber, nullableoptional
estimandstring, nullableoptional
start_datestring, nullableoptional
end_datestring, nullableoptional
readoutobject, nullableoptional
calibrated_run_idstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/calibration-coverageCalibration Coverage Endpoint

Channels × evidence tier (calibrated / stale / model_only) with information decay applied at read time, plus coverage percentages. The in-flight pacing signal is folded in (issue #123): a channel drifting off-pace is a reason to re-look even when its evidence is fresh — the T5 re-evaluation surface reads pacing_status/off_pace per channel + the top-level pacing_alert.

Parameters

NameInTypeRequired
project_idpathstringrequired
as_ofquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/experiment-designExperiment Design Endpoint

Compute a runnable experiment design: randomized matched-pair geo lift (or observational matched-market DiD) with DiD power/MDE curves, or a budget-neutral randomized flighting schedule for national data. Pure data computation — no model load.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — ExperimentDesignRequest

FieldTypeRequiredNotes
channelstringrequired
design_keystring, nullableoptional
methodstring, nullableoptional
designstring = "scaling"optional
intensity_pctnumber = 50.0optional
n_pairsinteger, nullableoptional
durationinteger = 8optional
amplitude_pctnumber = 50.0optional
block_weeksinteger = 2optional
levelsarray of number, nullableoptional
seedinteger = 42optional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/experiment-design/identifyStart Structural Identification

Start a NON-BLOCKING structural-identification analysis: designs a multi-level flighting schedule and reports how well its refit would identify the channel's saturation (psi), adstock carryover (alpha) and coefficient (beta) — an optimistic Laplace upper bound, never a guarantee. Poll the returned job_id.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — ExperimentIdentifyRequest

FieldTypeRequiredNotes
channelstringrequired
levelsarray of number, nullableoptional
block_weeksinteger, nullableoptional
durationinteger = 12optional
max_drawsinteger = 200optional
seedinteger = 42optional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/experiment-design/identify/{job_id}Get Structural Identification

Poll a structural-identification job: {status, result|null, error|null}.

Parameters

NameInTypeRequired
job_idpathstringrequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/experiment-design/optimizeStart Experiment Optimization

Start a NON-BLOCKING experiment-setup optimization: explores the design grid and returns the Pareto front (MDE × short-term cost × duration) + a recommended setup with cool-down. Poll the returned job_id.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — ExperimentOptimizeRequest

FieldTypeRequiredNotes
channelstringrequired
marginnumber, nullableoptional
pricenumber, nullableoptional
kpi_kindstring = "revenue"optional
duration_mininteger = 4optional
duration_maxinteger = 12optional
intensity_minnumber = 50.0optional
intensity_maxnumber = 100.0optional
include_holdoutboolean = trueoptional
durationsarray of integer, nullableoptional
scaling_intensitiesarray of number, nullableoptional
net_value_axisboolean = trueoptional
response_horizon_weeksinteger = 26optional
max_drawsinteger = 80optional
seedinteger = 42optional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/experiment-design/optimize/{job_id}Get Experiment Optimization

Poll an experiment-optimization job: {status, result|null, error|null}.

Parameters

NameInTypeRequired
job_idpathstringrequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/experiment-design/optionsExperiment Design Options Endpoint

What designs the project's data supports (geo designs need >= 4 geos), plus the recommended one.

Parameters

NameInTypeRequired
project_idpathstringrequired
channelquerystringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/experiment-design/simulateStart Experiment Simulation

Start a NON-BLOCKING model-anchored economics + A/A·A/B simulation. Loads the project's latest saved model in the background and runs the experiment_economics op; poll the returned job_id for the result.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — ExperimentSimulateRequest

FieldTypeRequiredNotes
channelstringrequired
design_keystring, nullableoptional
designstring = "scaling"optional
intensity_pctnumber = 50.0optional
n_pairsinteger, nullableoptional
durationinteger = 8optional
amplitude_pctnumber = 50.0optional
block_weeksinteger = 2optional
levelsarray of number, nullableoptional
marginnumber, nullableoptional
pricenumber, nullableoptional
kpi_kindstring = "revenue"optional
seedinteger = 42optional
max_drawsinteger = 100optional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/experiment-design/simulate/{job_id}Get Experiment Simulation

Poll an experiment-simulation job: {status, result|null, error|null}.

Parameters

NameInTypeRequired
job_idpathstringrequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/experiment-prioritiesExperiment Priorities Endpoint

The latest EIG/EVOI priority grid with decay + registry state applied at read time. 404 when the project has no run metrics yet (fit a model first, or backfill: python -m mmm_framework.platform.backfill).

Parameters

NameInTypeRequired
project_idpathstringrequired
as_ofquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/ghost-ads/powerGhost Ads Power Endpoint

User-level ghost-ads power calculator — stateless (no dataset or model load): two-proportion / count / revenue MDE, ITT vs treatment-on-treated dilution, users-required inversion, and an optional simulation check of the normal approximation.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — GhostAdsPowerRequest

FieldTypeRequiredNotes
users_reachedintegerrequired
baseline_ratenumber = 0.02optional
treated_fractionnumber = 0.5optional
outcomestring = "binary"optional
baseline_meannumber, nullableoptional
baseline_dispersionnumber = 1.0optional
value_sdnumber, nullableoptional
alphanumber = 0.05optional
power_targetnumber = 0.8optional
two_sidedboolean = trueoptional
exposure_ratenumber = 1.0optional
cost_per_usernumber, nullableoptional
value_per_conversionnumber, nullableoptional
target_lift_absnumber, nullableoptional
simulateboolean = falseoptional
n_simsinteger = 2000optional
… 1 more fields (see openapi.json)

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

Validation & Model QA 5

Non-blocking validation jobs on the project’s latest saved model (validate / PPC / residuals / channels / refutation / cross-validation / SBC / coverage), persisted run history, and the specification curve.

POST/projects/{project_id}/spec-curveStart Spec Curve

Start a NON-BLOCKING spec-curve / model-averaging sweep (issue #118): fit a pre-registered set of defensible specs against the project's dataset and LOO-stack them, so the robustness of each channel's ROI to the modelling choices is auditable. The declared spec set is pre-registered to the assumption log BEFORE the sweep so it provably was not chosen after seeing the answers. Multi-fit NUTS — poll the returned job_id for the result.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — SpecCurveRequest

FieldTypeRequiredNotes
variantsarray of object, nullableoptional
rationalestring = ""optional
max_drawsinteger = 400optional
compute_looboolean = trueoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/spec-curve/{job_id}Get Spec Curve

Poll a spec-curve job: {status, result|null, error|null, n_specs}.

Parameters

NameInTypeRequired
job_idpathstringrequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/validateStart Model Validation

Start a NON-BLOCKING validation run on the project's latest saved model. check selects which validation to run (validate / ppc / residuals / channels / refutation / cross_validation). Poll the returned job_id.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — ValidationRunRequest

FieldTypeRequiredNotes
checkstring = "validate"optional
thread_idstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/validate/{job_id}Get Model Validation

Poll a validation job: {status, check, result|null, error|null}. result is {content, tables:[ref], plots:[ref]} — fetch refs via /tables/{id} and /plots/{id}.

Parameters

NameInTypeRequired
job_idpathstringrequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/validationsList Model Validations

History of validation runs for a project — every completed/pending run survives reload: UI-started jobs AND chat-run checks (the agent's validate_model / run_* / run_calibration_check tools persist here too). Pass ?thread_id= to scope the list to the session that launched each run (rows persisted before session stamping existed are excluded). Summary rows only; fetch a run's full result via GET /projects/{id}/validate/{job_id}.

Parameters

NameInTypeRequired
project_idpathstringrequired
thread_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

Planner & Budget 9

Budget plans (create, list, fetch, delete, CSV export) and the non-blocking planner optimize / scenario jobs behind the Almanac page.

GET/budget-plansList Budget Plans Endpoint

List saved budget plans for the caller's org, optionally filtered.

Parameters

NameInTypeRequired
model_idquerystring, nullableoptional
project_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/budget-plansUpsert Budget Plan Endpoint

Create or update a saved budget plan (no model load — the FE persists an already-computed studio result).

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — BudgetPlanUpsertRequest

FieldTypeRequiredNotes
plan_idstring, nullableoptional
project_idstring, nullableoptional
namestringrequired
descriptionstring, nullableoptional
model_idstring, nullableoptional
kindstring = "optimization"optional
spend_changesobject, nullableoptional
baseline_outcomenumber, nullableoptional
scenario_outcomenumber, nullableoptional
outcome_changenumber, nullableoptional
outcome_change_pctnumber, nullableoptional
channel_detailsobject, nullableoptional
plan_payloadobject, nullableoptional

Responses

201 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/budget-plans/{plan_id}Get Budget Plan Endpoint

Parameters

NameInTypeRequired
plan_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

DELETE/budget-plans/{plan_id}Delete Budget Plan Endpoint

Parameters

NameInTypeRequired
plan_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/budget-plans/{plan_id}/export.csvExport Budget Plan Csv

Download a saved plan as a CSV flight plan (allocation + geo + flighting) — the executable deliverable a planner hands a partner (B5).

Parameters

NameInTypeRequired
plan_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/planner/optimizeStart Planner Optimization

Start a NON-BLOCKING budget plan: optimal allocation (national or per-geo) + an optional forward flighting calendar. Poll the returned job_id.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — PlannerOptimizeRequest

FieldTypeRequiredNotes
total_budgetnumber, nullableoptional
budget_change_pctnumber, nullableoptional
min_multipliernumber = 0.0optional
max_multipliernumber = 2.0optional
channel_boundsobject, nullableoptional
by_geoboolean = falseoptional
flightingobject, nullableoptional
max_drawsinteger = 120optional
abs_boundsobject, nullableoptional
groupsarray of object, nullableoptional
min_channel_spendnumber | object, nullableoptional
objectivestring = "mean"optional
modestring = "fixed"optional
value_per_kpinumber = 1.0optional
frontierboolean | object, nullableoptional
target_kpinumber, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/planner/optimize/{job_id}Get Planner Optimization

Poll a planner optimization job: {status, result|null, error|null}.

Parameters

NameInTypeRequired
job_idpathstringrequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/planner/scenarioStart Planner Scenario

Start a NON-BLOCKING what-if scenario (uncertainty included). Poll the returned job_id.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — PlannerScenarioRequest

FieldTypeRequiredNotes
spend_changesobjectrequired
time_periodarray of integer, nullableoptional
max_drawsinteger = 120optional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/planner/scenario/{job_id}Get Planner Scenario

Poll a planner scenario job: {status, result|null, error|null}.

Parameters

NameInTypeRequired
job_idpathstringrequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

Learning Programs (Sextant) 8

Model-free continuous-learning programs: geo response-surface experiments run in waves — create programs, ingest waves, fit posteriors, and design the next wave.

GET/projects/{project_id}/learning-programsList Learning Programs Endpoint

The project's continuous-learning programs (each row carries its latest fit SNAPSHOT under summary).

Parameters

NameInTypeRequired
project_idpathstringrequired
statusquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/learning-programsCreate Learning Program Endpoint

Create a learning program: validate the config (dollars), build + save the initial LearningState, insert the sessions row.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — LearningProgramCreateRequest

FieldTypeRequiredNotes
namestring, nullableoptional
configobjectrequired

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/learning-programs/{program_id}Get Learning Program Endpoint

One program + its wave timeline (design/observation/snapshot rows).

Parameters

NameInTypeRequired
program_idpathstringrequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

DELETE/projects/{project_id}/learning-programs/{program_id}Delete Learning Program Endpoint

Delete a program (cascades its waves) AND reap its on-disk directory (state.npz holds the client's accumulated panel + posterior draws).

Parameters

NameInTypeRequired
program_idpathstringrequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/learning-programs/{program_id}/design-waveDesign Learning Wave Endpoint

Design the next central-composite wave around the program's current center (no fit; optimize=true runs the bounded Laplace-KG scoring in a worker thread so the event loop never blocks). Stores a 'designed' wave row.

Parameters

NameInTypeRequired
program_idpathstringrequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — LearningDesignWaveRequest

FieldTypeRequiredNotes
deltanumber = 0.6optional
probe_pairsarray of array of integer, nullableoptional
n_geointeger, nullableoptional
n_holdoutinteger = 0optional
seedinteger = 0optional
optimizeboolean = falseoptional
candidate_deltasarray of number, nullableoptional
kg_n_outcomesinteger = 32optional
stratifyboolean = trueoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/learning-programs/{program_id}/fitRefit Learning Program Endpoint

Pure refit on the evidence already accumulated (e.g. with overridden ENBS economics). 202 + job_id. 409 while another fit job for this program is still pending/running.

Parameters

NameInTypeRequired
program_idpathstringrequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — LearningFitRequest

FieldTypeRequiredNotes
marginnumber, nullableoptional
populationnumber, nullableoptional
wave_costnumber, nullableoptional
fit_kwargsobject, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/learning-programs/{program_id}/jobs/{job_id}Get Learning Job Endpoint

Poll a learning-fit job: {status: pending|running|done|error, result: SNAPSHOT|null, error|null, project_id, program_id}.

Parameters

NameInTypeRequired
job_idpathstringrequired
program_idpathstringrequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/learning-programs/{program_id}/wavesIngest Learning Wave Endpoint

Ingest wave evidence (rows / CSV text / registry experiment ids) and refit in the background. 202 + job_id; poll .../jobs/{job_id} — the done payload's result is the fit SNAPSHOT. 409 while a fit job for the same program is still pending/running (concurrent fits race on state.npz).

Parameters

NameInTypeRequired
program_idpathstringrequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — LearningWaveIngestRequest

FieldTypeRequiredNotes
rowsarray of object, nullableoptional
experiment_idsarray of string, nullableoptional
csv_textstring, nullableoptional
economicsobject, nullableoptional
fit_kwargsobject, nullableoptional
period_colstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

Reports, Decks & Artifacts 23

Every generated document — fit report, pre-fit design readout, interactive results report, client report and slides, project report and slides, model defense, slide decks — plus stored session artifacts.

DELETE/artifacts/{artifact_id}Delete Artifact Endpoint

Parameters

NameInTypeRequired
artifact_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/artifacts/{artifact_id}/downloadDownload Artifact Endpoint

Parameters

NameInTypeRequired
artifact_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/artifacts/{thread_id}List Artifacts Endpoint deprecated

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/client-reportView Client Report

Serve the client-ready HTML report (no diagnostics, with nav + confidentiality notice).

Parameters

NameInTypeRequired
thread_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/client-report/downloadDownload Client Report

Parameters

NameInTypeRequired
thread_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/client-slidesView Client Slides

Serve the client-ready Reveal.js slideshow (no MCMC stats, with confidentiality footer).

Parameters

NameInTypeRequired
thread_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/client-slides/downloadDownload Client Slides

Parameters

NameInTypeRequired
thread_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/model-defenseView Model Defense

Serve the model-defense (causal-rigor) report.

Parameters

NameInTypeRequired
thread_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/model-defense/downloadDownload Model Defense

Parameters

NameInTypeRequired
thread_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/prefit-reportView Prefit Report

Serve the pre-fit Model Design Readout (priors, assumptions, prior predictive checks, SBC, change record) generated by the agent's generate_model_design_readout tool.

Parameters

NameInTypeRequired
thread_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/prefit-report/downloadDownload Prefit Report

Parameters

NameInTypeRequired
thread_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/project-reportView Project Report

Serve the project findings HTML report.

Parameters

NameInTypeRequired
thread_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/project-report/downloadDownload Project Report

Parameters

NameInTypeRequired
thread_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/project-slidesView Project Slides

Serve the Reveal.js project slideshow.

Parameters

NameInTypeRequired
thread_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/project-slides/downloadDownload Project Slides

Parameters

NameInTypeRequired
thread_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/generate-deckStart Deck Generation

Start a NON-BLOCKING PowerPoint slide-deck build from the project's latest saved model. Poll the returned job_id; download the .pptx when done.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional
x-api-keyheaderstring, nullableoptional
x-base-urlheaderstring, nullableoptional
x-model-nameheaderstring, nullableoptional
x-providerheaderstring, nullableoptional

Request body

application/json (required) — GenerateDeckRequest

FieldTypeRequiredNotes
clientstring, nullableoptional
kpi_namestring = "Revenue"optional
currencystring = "$"optional
break_evennumber = 1.0optional
marginnumber, nullableoptional
hdi_probnumber = 0.8optional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/generate-deck/{job_id}Get Deck Job

Poll a slide-deck job: {status, stage, result|null, error|null}.

Parameters

NameInTypeRequired
job_idpathstringrequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/generate-deck/{job_id}/downloadDownload Deck

Download the generated .pptx for a completed deck job.

Parameters

NameInTypeRequired
job_idpathstringrequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/reportView Report

Serve the generated HTML report inline for embedding.

Parameters

NameInTypeRequired
thread_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/report/downloadDownload Report

Download the generated HTML report.

Parameters

NameInTypeRequired
thread_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/results-reportView Results Report

Serve the interactive MMM Results Report (embedded-posterior, recompute-in-browser) generated by the agent's generate_interactive_report tool.

Parameters

NameInTypeRequired
thread_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/results-report/downloadDownload Results Report

Parameters

NameInTypeRequired
thread_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/slide-deck/downloadDownload Slide Deck

Download the PowerPoint deck generated by the chat agent's generate_slide_deck tool for a session (the project-scoped UI button uses /projects/{id}/generate-deck/{job_id}/download).

Parameters

NameInTypeRequired
thread_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

Models, Runs & Portfolio 7

Saved fitted models and their dashboards, run history and cross-run comparison, and the portfolio / benchmark views.

GET/modelsList Models Endpoint

Return model_run artifacts from all sessions as lightweight ModelInfo stubs.

Parameters

NameInTypeRequired
limitqueryintegeroptional
project_idquerystring, nullableoptional
statusquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/models/{model_id}Get Model Endpoint

Parameters

NameInTypeRequired
model_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/models/{model_id}/dashboardGet Model Dashboard Endpoint

Return roi_metrics + decomposition + summary from the model's LangGraph thread.

Parameters

NameInTypeRequired
model_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/portfolioPortfolio Endpoint

Everything the home page tracks in one call: model-run history, the experiment log, the latest budget/experiment-design recommendations, and computed next actions (calibrate completed experiments / refresh a stale model / run the recommended next experiment).

Parameters

NameInTypeRequired
project_idquerystring, nullableoptional
stale_after_daysqueryintegeroptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/portfolio-benchmarkPortfolio Benchmark Endpoint

Cross-brand benchmarking + governance over the org's projects' run metrics (the agency/holding-co view: rank a brand's channel ROIs against the portfolio, see model freshness + calibration coverage).

Parameters

NameInTypeRequired
stale_after_daysqueryintegeroptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/runsList Runs Endpoint

The model-run lineage timeline: every fit with dataset fingerprint, spec diff vs the previous run, and the assumptions added/revised (the versioned data + model + rationale record).

Parameters

NameInTypeRequired
project_idquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/runs/compareCompare Runs Endpoint

Per-channel ROI/spend delta between two runs (B vs A) — the structured answer to "why did this channel change since the last refresh?".

Parameters

NameInTypeRequired
run_aquerystringrequired
run_bquerystringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

Model Garden & Atelier 20

The versioned custom-model registry (register, promote, test, fetch source) and the Atelier IDE services: lint, format, copilot, and the per-model notebook.

GET/model-gardenList Garden Models Endpoint

List the org's Model Garden models (latest version per name by default).

Parameters

NameInTypeRequired
all_versionsquerybooleanoptional
namequerystring, nullableoptional
statusquerystring, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/model-gardenRegister Garden Model Endpoint

Register a bespoke model (source defining a BayesianMMM subclass) as a DRAFT. Analyst+ role. The source is AST-validated (never executed here) and stored in the org's garden; POST the test endpoint next to fit + grade it.

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — GardenRegisterRequest

FieldTypeRequiredNotes
source_codestringrequired
namestringrequired
docsstring = ""optional
versioninteger, nullableoptional
tagsarray of any, nullableoptional
dataset_schemaobject, nullableoptional
recommended_fitobject, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/model-garden/copilotGarden Copilot Endpoint

Stream a Bayesian-modeling copilot answer (SSE) for the Atelier editor.

Stateless: the client sends the running chat + the current editor source each turn; the server grounds a focused expert system prompt (the oracle contract + PyMC/MMM authoring knowledge) on that source and streams the model's tokens using the SAME data: {...}\n\n / [DONE] framing as /chat. Analyst+ role.

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional
x-api-keyheaderstring, nullableoptional
x-base-urlheaderstring, nullableoptional
x-model-nameheaderstring, nullableoptional
x-providerheaderstring, nullableoptional

Request body

application/json (required) — GardenCopilotRequest

FieldTypeRequiredNotes
messagesarray of CopilotTurn = []optional
source_codestring = ""optional
notebookNotebookCopilotContext, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/model-garden/copilot/chatGet Copilot Chat

The persisted Atelier copilot chat for this (model, version, surface), or an empty chat when none exists yet. Analyst+ role.

Parameters

NameInTypeRequired
namequerystringrequired
surfacequerystringoptional
versionqueryinteger, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

PUT/model-garden/copilot/chatSave Copilot Chat

Upsert the Atelier copilot chat (one artifact per model/version/surface). PUT an empty messages to clear it. Analyst+ role.

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — CopilotChatSaveRequest

FieldTypeRequiredNotes
namestringrequired
versioninteger, nullableoptional
surfacestring = "editor"optional
messagesarray of object = []optional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/model-garden/formatGarden Format Endpoint

Format the editor source (ruff, black fallback) for the IDE *Format* button. Returns the formatted source or a one-line error. Analyst+ role.

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — GardenSourceRequest

FieldTypeRequiredNotes
source_codestring = ""optional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/model-garden/lintGarden Lint Endpoint

"Problems" check for the Atelier editor: real Python diagnostics (ruff — undefined names, unused imports, redefinitions, syntax, with line/column spans) merged with the AST-only garden-contract conventions. Neither path executes the source. Analyst+ role.

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — GardenSourceRequest

FieldTypeRequiredNotes
source_codestring = ""optional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/model-garden/notebookGet Notebook

The persisted notebook doc for this (model, source), or a seeded starter when none exists yet. Analyst+ role.

Parameters

NameInTypeRequired
namequerystringrequired
versionqueryinteger, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

PUT/model-garden/notebookSave Notebook

Upsert the notebook doc (one atelier_notebook artifact per notebook). Outputs are stored as content-addressed refs, so they survive. Analyst+.

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — NotebookSaveRequest

FieldTypeRequiredNotes
namestring = "untitled"optional
versioninteger, nullableoptional
cellsarray of object = []optional
datasetobject, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/model-garden/notebook/cellStart Notebook Cell

Start a NON-BLOCKING run of one code cell against the model. Returns a job_id to poll. Analyst+ role.

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — NotebookCellRequest

FieldTypeRequiredNotes
namestring = "untitled"optional
versioninteger, nullableoptional
source_codestring, nullableoptional
source_revstring = ""optional
codestring = ""optional
dataset_pathstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/model-garden/notebook/cell/{job_id}Get Notebook Cell

Poll a notebook cell run: {status, result|null, error|null}. result = {stdout, plots:[{id,title}], tables:[{id,title,...}], is_error}.

Parameters

NameInTypeRequired
job_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/model-garden/notebook/datasetNotebook Upload Dataset

Stage a dataset into the notebook's workspace (so cells auto-bind it as df). Analyst+ role; org-scoped synthetic thread (not a session, so no _sess_write).

Parameters

NameInTypeRequired
namequerystringrequired
versionqueryinteger, nullableoptional
authorizationheaderstring, nullableoptional

Request body

multipart/form-data (required) — Body_notebook_upload_dataset_model_garden_notebook_dataset_post

FieldTypeRequiredNotes
filestring (binary)required

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/model-garden/{name}/versionsList Garden Versions Endpoint

Every version of one garden model, newest first.

Parameters

NameInTypeRequired
namepathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/model-garden/{name}/{version}Get Garden Model Endpoint

One garden model version (incl. its manifest + compatibility report).

Parameters

NameInTypeRequired
namepathstringrequired
versionpathintegerrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

PATCH/model-garden/{name}/{version}Update Garden Docs Endpoint

Edit a garden version's docs (markdown) IN PLACE — no new version. Analyst+ role. Docs are metadata, so this does not touch the source, manifest, or compatibility status. PUBLISHED versions are immutable (the store rejects the edit -> 409); use "Edit as new version" to change a published model's docs.

Parameters

NameInTypeRequired
namepathstringrequired
versionpathintegerrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — GardenDocsRequest

FieldTypeRequiredNotes
docsstring = ""optional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

DELETE/model-garden/{name}/{version}Delete Garden Model Endpoint

Delete a draft/deprecated garden model (org admin/owner only). Published history is immutable — deprecate instead.

Parameters

NameInTypeRequired
namepathstringrequired
versionpathintegerrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/model-garden/{name}/{version}/promotePromote Garden Model

Human publish gate: promote a TESTED model to PUBLISHED so every project in the org can load it. Org admin/owner only; the model must be tested.

Parameters

NameInTypeRequired
namepathstringrequired
versionpathintegerrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — GardenPromoteRequest

FieldTypeRequiredNotes
notestring = ""optional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/model-garden/{name}/{version}/sourceGet Garden Source

The stored model source text (for the Atelier editor).

Parameters

NameInTypeRequired
namepathstringrequired
versionpathintegerrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/model-garden/{name}/{version}/testStart Garden Test

Start a NON-BLOCKING compatibility test; on pass the model is promoted draft→tested. Returns a job_id to poll.

Parameters

NameInTypeRequired
namepathstringrequired
versionpathintegerrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/model-garden/{name}/{version}/test/{job_id}Get Garden Test

Poll a garden test job: {status, result|null, error|null}.

Parameters

NameInTypeRequired
job_idpathstringrequired
namepathstringrequired
versionpathintegerrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

Preferences & Branding 5

Global operator preferences and per-project client branding, including SSRF-guarded extraction of brand colors from a client website.

GET/preferencesGet Preferences Endpoint

Global (deployment-wide) user preference defaults.

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

PUT/preferencesPut Preferences Endpoint

Set global preference(s). 403 in the hosted multi-tenant profile — there is no per-user identity, so 'global' would leak across tenants (project-scoped branding remains available: project ids are capabilities).

Request body

application/json (required) — PreferenceUpdateRequest

FieldTypeRequiredNotes
keystring, nullableoptional
valueanyoptional
preferencesobject, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/projects/{project_id}/brandingGet Branding Endpoint

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

PUT/projects/{project_id}/brandingPut Branding Endpoint

Validate + save project branding. A manual PUT counts as confirmation unless the payload explicitly says otherwise.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required)

Schema: object

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

POST/projects/{project_id}/branding/extractExtract Branding Endpoint

Extract a branding proposal from a client website (SSRF-guarded, server-side). Saved with confirmed=false — the UI/user must confirm before it styles any output.

Parameters

NameInTypeRequired
project_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — BrandingExtractRequest

FieldTypeRequiredNotes
urlstringrequired
saveboolean = trueoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

Files, Tables & Plots 6

Content-addressed session resources: uploaded files, streamed dashboard tables, captured plots, and workspace file listings.

DELETE/files/{file_id}Delete File Endpoint

Parameters

NameInTypeRequired
file_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/files/{file_id}/downloadDownload File Endpoint

Parameters

NameInTypeRequired
file_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/files/{thread_id}List Files Endpoint deprecated

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/plots/{plot_id}Get Plot Endpoint

Serve a content-addressed Plotly figure JSON. Because the id is a content hash, the response is immutable — the browser caches it permanently, so each plot crosses the wire at most once per client (instead of the full plot list being re-streamed every turn).

Parameters

NameInTypeRequired
plot_idpathstringrequired

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/tables/{table_id}Get Table Endpoint

Serve a content-addressed structured table payload (same immutable-cache contract as /plots/{id} — refs stream, rows are fetched once).

Parameters

NameInTypeRequired
table_idpathstringrequired

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/workspace/{thread_id}/filesWorkspace Files Endpoint

List the session's registered files (uploads + generated), each with a download id.

Parameters

NameInTypeRequired
thread_idpathstring, nullablerequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

Auth, Orgs & Users 23

The built-in organization auth layer (signup, login, JWT refresh, invites, members, password reset, usage, audit export) and the project-team user roster.

POST/auth/accept-inviteAccept Invite

Request body

application/json (required) — AcceptInviteRequest

FieldTypeRequiredNotes
tokenstringrequired
passwordstringrequired
namestring, nullableoptional

Responses

200 Successful Response — application/json, TokenResponse

FieldTypeRequiredNotes
access_tokenstringrequired
refresh_tokenstringrequired
token_typestring = "bearer"optional
expires_inintegerrequired

Also: 422 (Validation Error).

GET/auth/audit-exportAudit Export

Parameters

NameInTypeRequired
limitqueryintegeroptional
sincequerynumber, nullableoptional
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, object

Also: 422 (Validation Error).

POST/auth/change-passwordChange Password

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — ChangePasswordRequest

FieldTypeRequiredNotes
current_passwordstringrequired
new_passwordstringrequired

Responses

200 Successful Response — application/json, TokenResponse

FieldTypeRequiredNotes
access_tokenstringrequired
refresh_tokenstringrequired
token_typestring = "bearer"optional
expires_inintegerrequired

Also: 422 (Validation Error).

POST/auth/inviteInvite

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — InviteRequest

FieldTypeRequiredNotes
emailstringrequired
roleRole = "analyst"optional

Responses

200 Successful Response — application/json, InviteOut

FieldTypeRequiredNotes
tokenstringrequired
emailstringrequired
roleRolerequired
org_idstringrequired
expires_atnumberrequired

Also: 422 (Validation Error).

GET/auth/invitesList Invites

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, object

Also: 422 (Validation Error).

DELETE/auth/invites/{token}Revoke Invite

Parameters

NameInTypeRequired
tokenpathstringrequired
authorizationheaderstring, nullableoptional

Responses

204 — no content.

Also: 422 (Validation Error).

POST/auth/loginLogin

Request body

application/json (required) — LoginRequest

FieldTypeRequiredNotes
emailstringrequired
passwordstringrequired

Responses

200 Successful Response — application/json, TokenResponse

FieldTypeRequiredNotes
access_tokenstringrequired
refresh_tokenstringrequired
token_typestring = "bearer"optional
expires_inintegerrequired

Also: 422 (Validation Error).

POST/auth/logoutLogout

Request body

application/json (required) — LogoutRequest

FieldTypeRequiredNotes
refresh_tokenstringrequired

Responses

204 — no content.

Also: 422 (Validation Error).

POST/auth/logout-allLogout All

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional

Responses

204 — no content.

Also: 422 (Validation Error).

GET/auth/meMe

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, UserOut

FieldTypeRequiredNotes
user_idstringrequired
emailstringrequired
namestring, nullableoptional
org_idstringrequired
org_roleRolerequired

Also: 422 (Validation Error).

GET/auth/membersList Members

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, object

Also: 422 (Validation Error).

PATCH/auth/members/{user_id}Set Member Role

Parameters

NameInTypeRequired
user_idpathstringrequired
authorizationheaderstring, nullableoptional

Request body

application/json (required) — RoleUpdate

FieldTypeRequiredNotes
roleRolerequired

Responses

200 Successful Response — application/json, object

Also: 422 (Validation Error).

DELETE/auth/members/{user_id}Remove Member

Parameters

NameInTypeRequired
user_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

204 — no content.

Also: 422 (Validation Error).

POST/auth/password-reset/confirmPassword Reset Confirm

Request body

application/json (required) — PasswordResetConfirm

FieldTypeRequiredNotes
tokenstringrequired
new_passwordstringrequired

Responses

204 — no content.

Also: 422 (Validation Error).

POST/auth/password-reset/requestPassword Reset Request

Request body

application/json (required) — PasswordResetRequest

FieldTypeRequiredNotes
emailstringrequired

Responses

202 Successful Response — application/json, object

Also: 422 (Validation Error).

POST/auth/refreshRefresh

Request body

application/json (required) — RefreshRequest

FieldTypeRequiredNotes
refresh_tokenstringrequired

Responses

200 Successful Response — application/json, TokenResponse

FieldTypeRequiredNotes
access_tokenstringrequired
refresh_tokenstringrequired
token_typestring = "bearer"optional
expires_inintegerrequired

Also: 422 (Validation Error).

POST/auth/signupSignup

Request body

application/json (required) — SignupRequest

FieldTypeRequiredNotes
organizationstringrequired
emailstringrequired
passwordstringrequired
namestring, nullableoptional

Responses

200 Successful Response — application/json, TokenResponse

FieldTypeRequiredNotes
access_tokenstringrequired
refresh_tokenstringrequired
token_typestring = "bearer"optional
expires_inintegerrequired

Also: 422 (Validation Error).

GET/auth/usageUsage

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, object

Also: 422 (Validation Error).

POST/auth/users/{user_id}/deactivateDeactivate User

Parameters

NameInTypeRequired
user_idpathstringrequired
authorizationheaderstring, nullableoptional

Responses

204 — no content.

Also: 422 (Validation Error).

GET/usersList Users Endpoint

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

POST/usersCreate User Endpoint

Request body

application/json (required) — UserCreateRequest

FieldTypeRequiredNotes
namestringrequired
emailstring, nullableoptional
rolestring = "analyst"optional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

PATCH/users/{user_id}Update User Endpoint

Parameters

NameInTypeRequired
user_idpathstringrequired

Request body

application/json (required) — UserUpdateRequest

FieldTypeRequiredNotes
namestring, nullableoptional
emailstring, nullableoptional
rolestring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

DELETE/users/{user_id}Delete User Endpoint

Parameters

NameInTypeRequired
user_idpathstringrequired

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

Health & Platform Meta 7

Liveness and observability probes plus platform discovery: model configuration and the LM Studio / Vertex model lists and the integrations catalog.

GET/healthHealth Check

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

GET/integrations/catalogIntegrations Catalog Endpoint

List available data-source + ad-platform integrations (non-secret).

Powers the Settings "Data connections" section: which connectors exist, whether their optional SDK is installed, the auth story, and (for ad platforms) the recommended ingestion path. No credentials are returned.

Requires an authenticated principal: the installed-SDK flags reveal deployment topology, so the endpoint is gated like its neighbours rather than left open for reconnaissance.

Parameters

NameInTypeRequired
authorizationheaderstring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/lmstudio-modelsLmstudio Models Endpoint

List models currently loaded in LM Studio (its OpenAI-compatible /v1/models). Returns an empty list if LM Studio isn't running, so the frontend can still offer free-text model entry.

Parameters

NameInTypeRequired
base_urlquerystring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).

GET/metricsMetrics Endpoint

Prometheus metrics (Phase 4d): per-event audit counters, live kernel count, and the active-fit gauge the autoscaler scales on (§5.1). Sourced from the mmm_audit events so the audit log is the single source of truth.

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

GET/model-configModel Config Endpoint

Report the active LLM provider/model (non-secret).

Lets the frontend decide whether to prompt for an API key: when the server authenticates via Vertex AI / ADC (or a server-side env key), requires_api_key is False and the login key prompt can be skipped. Never returns the API key or credentials contents.

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

GET/observabilityObservability Endpoint

Reliability signals for operators: audit-chain integrity, off-host ship backlog, and recent fit activity. No tenant data.

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

GET/vertex-modelsVertex Models Endpoint

List selectable Vertex models for the configured (or given) project/region.

Combines live-discovered Gemini models, a best-effort Claude catalog, and any configured extra_models. Results are cached briefly. The frontend should still offer a free-text field for ids not in the list (e.g. versioned Claude ids pasted from the Vertex console).

Parameters

NameInTypeRequired
locationquerystring, nullableoptional
projectquerystring, nullableoptional

Responses

200 Successful Response — application/json, JSON (shape not declared in the schema)

Also: 422 (Validation Error).