MinoGAN API Documentation

The MinoGAN API lets you manage your autonomous agent swarm programmatically. Create leads, fetch analytics, configure webhooks, and monitor agent health.

This API is available to all MinoGAN customers. Enterprise plans get higher rate limits and priority support.

Authentication

Authenticate requests using an API key in the X-API-Key header. You'll receive your key after onboarding.

# Example authenticated request
curl -H "X-API-Key: your_api_key_here" \
     https://your-instance.minogan.ai/api/metrics

Base URL

Each MinoGAN instance gets a dedicated subdomain:

https://your-instance.minogan.ai/api/

Rate Limits

PlanRequests/minRequests/day
Starter6010,000
Growth30050,000
Enterprise1,000Unlimited

Create Lead

POST /api/leads
Create or merge a lead. Deduplicates by email automatically.

Request Body

FieldTypeRequiredDescription
emailstringYes*Lead email address
phonestringYes*Phone number (*email or phone required)
namestringNoFull name
sourcestringNoLead source (e.g., "website", "chatbot")
metadataobjectNoCustom key-value data
curl -X POST https://api.minogan.ai/api/leads \
  -H "Content-Type: application/json" \
  -d '{
    "email": "jane@example.com",
    "name": "Jane Doe",
    "source": "landing_page",
    "metadata": {"channel": "google_ads", "campaign": "q1-2026"}
  }'

# Response
{"ok": true, "lead_id": "LEAD-00042", "score": 65}

List Leads

GET /api/leads/data
Returns all leads with scores, sources, and metadata.

Lead Timeline

GET /leads/{lead_id}/timeline
Returns the full lifecycle timeline for a specific lead.
curl https://api.minogan.ai/leads/LEAD-00042/timeline

# Response
{
  "lead_id": "LEAD-00042",
  "events": [
    {"type": "created", "timestamp": "2026-04-12T14:43:17Z", "details": {"source": "web", "channel": "form"}},
    {"type": "re_engaged", "timestamp": "2026-04-13T10:22:05Z", "details": {"source": "chatbot"}},
    {"type": "converted", "timestamp": "2026-04-15T09:15:33Z", "details": {"by": "manual"}}
  ],
  "count": 3
}

Export Leads CSV

GET /api/leads/export
Download all leads as CSV. Requires API key.

Lead Stats

GET /stats
Summary statistics: total leads, by source, by score tier, by day.

System Metrics

GET /api/metrics
Real-time system metrics: service count, lead count, page views, uptime.

Attribution Report

GET /api/metrics/attribution
Lead source attribution with conversion funnels per channel.

Agent Performance

GET /api/metrics/performance
Per-agent resource usage: CPU, memory, uptime, restart count.

Agent Status

GET /api/metrics/agents
Live status of all agents: active, sub-state, and health indicators.

Webhook Events

MinoGAN can send real-time notifications to your endpoints when key events occur:

EventDescriptionPayload
lead.createdNew lead capturedLead object with score
lead.hotLead scored 80+Lead object + score details
health.degradedAgent failure detectedService name + error
health.healedAgent auto-recoveredService name + restart count
revenue.conversionPayment receivedAmount + lead ID
reports.dailyDaily briefing generatedSummary text

Webhook Configuration

Configure webhooks in your notification hub config (/srv/swarm/data/notification_config.json) or via your admin dashboard:

{
  "webhooks": [
    {
      "url": "https://hooks.slack.com/services/...",
      "events": ["lead.hot", "health.degraded"],
      "format": "slack"
    },
    {
      "url": "https://discord.com/api/webhooks/...",
      "events": ["reports.daily"],
      "format": "discord"
    }
  ]
}

Agent Lifecycle

Each agent in your swarm follows this lifecycle:

pending → starting → active → [degraded ↔ healing] → stopped

The Auto-Healer agent monitors all services and automatically restarts failed agents (up to 3x per hour). Persistent failures trigger webhook alerts.

Agent Departments

DepartmentPurposeAgents
COMMANDOrchestration & schedulingQueen, Coordinator, Cron
GROWTHContent, SEO, trafficContent Factory, Keywords, SEO, Links
REVENUELeads, nurture, paymentsLead API, Email, SMS, WhatsApp, Stripe
FABRICUI, copy, testingFrontend, Copywriter, QA, A/B
INTELAnalytics & reportingDashboard, Daily Report, Pixels, Profiler
SUPPORTCustomer-facingChatbot, Notifications, Exit Intent
OPSInfrastructureHealer, Backup, Health, NATS, Caddy
Need help? Book a demo or email api@minogan.ai