API Reference

Mongeflow API Documentation

Everything you need to integrate Mongeflow into your workflows. REST API, webhooks, connectors, and structured outputs.

Authentication

All API requests require a Bearer token in the Authorization header. Generate API keys from your dashboard at Settings → API Keys.

bash
curl https://mongeflow.com/api/v1/analyses \
  -H "Authorization: Bearer mf_live_your_key_here"

Keys use the mf_live_ prefix for production and mf_test_ for testing. Keys are hashed with SHA-256 and never stored in plaintext.

Rate Limits

API requests are rate limited per key using a sliding window counter.

PlanRate Limit
Starter30 req/min
Pro120 req/min
Enterprise600 req/min

Rate limit headers are included in every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.

Endpoints

List analyses

GET/api/v1/analyses

Returns all analyses for your organization. Supports ?status=, ?limit=, ?offset= query params.

bash
curl https://mongeflow.com/api/v1/analyses?status=solved&limit=10 \
  -H "Authorization: Bearer mf_live_your_key"

Get analysis

GET/api/v1/analyses/:id

Returns a single analysis. Use ?include=features,savings,intake,output for nested data.

bash
curl https://mongeflow.com/api/v1/analyses/abc-123?include=output,features \
  -H "Authorization: Bearer mf_live_your_key"

Create export

POST/api/v1/exports

Generate an export file. Formats: PDF, DOCX, PPTX, XLSX, JSON, CSV, Code Bundle.

bash
curl -X POST https://mongeflow.com/api/v1/exports \
  -H "Authorization: Bearer mf_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"analysis_id": "abc-123", "format": "pdf"}'

Warehouse export

GET/api/v1/warehouse

Bulk export for data warehouses. NDJSON (BigQuery), CSV (Snowflake), JSON. Supports ?since= for incremental sync.

bash
# BigQuery
curl https://mongeflow.com/api/v1/warehouse?format=ndjson \
  -H "Authorization: Bearer mf_live_your_key" > analyses.ndjson

# Snowflake
curl https://mongeflow.com/api/v1/warehouse?format=csv \
  -H "Authorization: Bearer mf_live_your_key" > analyses.csv

Structured Output

The structured output layer provides machine-readable summaries designed for downstream tools. Request it with ?include=output on the analysis endpoint.

json
{
  "structured_output": {
    "classification_summary": "This analysis matched the routing domain with 85% confidence.",
    "recommendation": "Recommended workflow: E-VRPTW",
    "assumptions": [
      { "parameter": "Fleet size", "value": "45 vehicles", "provenance": "YOUR DATA", "needs_attention": false },
      { "parameter": "Cost per km", "value": null, "provenance": "MISSING", "needs_attention": true }
    ],
    "savings_narrative": "Estimated savings of $142,000 based on industry benchmarks.",
    "data_completeness": { "total_features": 12, "user_provided": 8, "inferred": 2, "missing": 1, "defaulted": 1 }
  }
}

Webhooks

Subscribe to real-time events. Configure endpoints in Dashboard → Settings → Webhooks.

EventTrigger
analysis.createdNew analysis created
analysis.solvedClassification and matching complete
analysis.approvedAnalysis approved by reviewer
export.readyExport file generated
review.requestedReview assigned to reviewer
review.completedReview decision made
team.member_addedNew team member invited
team.member_removedTeam member removed

Webhook Signing

Every webhook delivery includes an X-Mongeflow-Signature header for verification. Each endpoint gets a unique signing secret (whsec_...) shown once at creation.

python
# Header format: t=timestamp,v1=signature
# Verify: HMAC-SHA256(signing_secret, "timestamp.payload_json")

import hmac, hashlib

def verify(payload, header, secret):
    parts = dict(p.split("=", 1) for p in header.split(","))
    expected = hmac.new(
        secret.encode(), f"{parts['t']}.{payload}".encode(), hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(expected, parts['v1'])

Connectors

Pre-built connectors for common tools. Configure in Dashboard → Settings → Integrations.

Slack

Delivers rich notifications to Slack channels via Incoming Webhooks. No OAuth app needed — just paste your Slack webhook URL.

GitHub

Pushes Code Bundle exports to a GitHub repository using a Personal Access Token. Configure the repo, branch, and path.

Scheduled Exports

Automate recurring exports. Schedules: daily, weekly, monthly, or on-solve (triggers when an analysis is solved). Destinations: download, webhook, email.

OpenAPI Schema

The full OpenAPI 3.1 specification is available for Postman, Swagger UI, and other tools.

bash
curl https://mongeflow.com/api/v1/openapi.json

SDKs & Tools

No SDK needed — the API uses standard REST with JSON. Works with curl, fetch, Axios, or any HTTP client. For complex integrations, use the OpenAPI spec to generate typed clients.

javascript
# JavaScript / Node.js
const res = await fetch("https://mongeflow.com/api/v1/analyses", {
  headers: { Authorization: "Bearer mf_live_your_key" },
});
const { data: analyses } = await res.json();

Ready to build?

Get your API key and start integrating in minutes.