{"openapi":"3.1.0","info":{"title":"SDR Autopilot Public API","version":"1.0.0","description":"Project-scoped REST API for SDR Autopilot outreach. Load /llms.txt (or /llms-full.txt) first. Retail pricing is by new prospects reached (Free Explore / Founder / Growth + optional top-ups). daily_budget_cents fields are an internal spend safety budget in cents, not retail capacity. Identity/inbox/hot-leads/reply/start require CURRENT ACTIVE paid Founder/Growth (HTTP 402 code paid_required). Hosted MCP: /mcp."},"servers":[{"url":"https://sdrautopilot.com"}],"paths":{"/api/v1/projects":{"get":{"summary":"List projects for this API key","description":"API keys are project-scoped. Returns the single project the key belongs to (id, name, domain, daily_budget_cents internal spend safety budget, autopilot). Creating keys requires a CURRENT ACTIVE paid Founder/Growth plan.","tags":["SDR Autopilot"],"security":[{"ApiKey":[]},{"Bearer":[]}],"responses":{"200":{"description":"{ \"projects\": [{ \"id\", \"name\", \"domain\", \"daily_budget_cents\", \"autopilot_enabled\" }] }","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Created"},"400":{"description":"Validation error"},"401":{"description":"Missing or invalid API key"},"404":{"description":"Not found in this project"},"409":{"description":"Conflict"}}}},"/api/v1/projects/{project_id}/analytics":{"get":{"summary":"Project analytics","description":"Totals for the period plus a per-campaign breakdown (same stats as the dashboard).","tags":["SDR Autopilot"],"security":[{"ApiKey":[]},{"Bearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"description":"today | 7d | 30d | all (default all)","schema":{"type":"string"}}],"responses":{"200":{"description":"{ \"project_id\", \"period\", \"emails_sent\", \"total_replies\", \"reply_rate_pct\", \"hot_leads\", \"spend_cents\", \"daily_budget_cents\", \"campaigns\": [...] }","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Created"},"400":{"description":"Validation error"},"401":{"description":"Missing or invalid API key"},"404":{"description":"Not found in this project"},"409":{"description":"Conflict"}}}},"/api/v1/projects/{project_id}/budget":{"get":{"summary":"Get project daily budget","description":"Internal daily spend safety budget in cents (estimated vendor-action ledger). 0 pauses further vendor spend for the day. This is not retail subscription pricing — retail capacity is billed by new prospects reached (Founder/Growth included + optional top-ups).","tags":["SDR Autopilot"],"security":[{"ApiKey":[]},{"Bearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"{ \"project_id\", \"daily_budget_cents\" }","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Created"},"400":{"description":"Validation error"},"401":{"description":"Missing or invalid API key"},"404":{"description":"Not found in this project"},"409":{"description":"Conflict"}}},"patch":{"summary":"Set project daily budget","description":"Integer cents, 0–1000000. Sets the internal daily spend safety budget (not prospect capacity). 0 pauses vendor spend once the daily cap is hit (immediately if already spent).","tags":["SDR Autopilot"],"security":[{"ApiKey":[]},{"Bearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"daily_budget_cents: integer"}}}},"responses":{"200":{"description":"{ \"project_id\", \"daily_budget_cents\" }","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Created"},"400":{"description":"Validation error"},"401":{"description":"Missing or invalid API key"},"404":{"description":"Not found in this project"},"409":{"description":"Conflict"}}}},"/api/v1/projects/{project_id}/autopilot":{"get":{"summary":"Get autopilot setting","description":"Autopilot here is the project flag that lets the auto-scaler pause/scale campaigns. Start/stop and budget edits still work while it is ON (unlike Explee).","tags":["SDR Autopilot"],"security":[{"ApiKey":[]},{"Bearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"{ \"project_id\", \"autopilot_enabled\" }","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Created"},"400":{"description":"Validation error"},"401":{"description":"Missing or invalid API key"},"404":{"description":"Not found in this project"},"409":{"description":"Conflict"}}},"patch":{"summary":"Set autopilot","description":"Turns the project autopilot / auto-scaler flag on or off.","tags":["SDR Autopilot"],"security":[{"ApiKey":[]},{"Bearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"autopilot_enabled: boolean"}}}},"responses":{"200":{"description":"{ \"project_id\", \"autopilot_enabled\" }","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Created"},"400":{"description":"Validation error"},"401":{"description":"Missing or invalid API key"},"404":{"description":"Not found in this project"},"409":{"description":"Conflict"}}}},"/api/v1/campaigns":{"get":{"summary":"List campaigns","description":"Every campaign in the key's project with status and stats for a short 'how each is doing' summary.","tags":["SDR Autopilot"],"security":[{"ApiKey":[]},{"Bearer":[]}],"responses":{"200":{"description":"{ \"campaigns\": [{ \"id\", \"name\", \"status\", \"substatus\", \"emails_sent\", \"total_replies\", \"reply_rate_pct\", \"hot_leads\", \"spend_cents\", \"daily_budget_cents\" }] }","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Created"},"400":{"description":"Validation error"},"401":{"description":"Missing or invalid API key"},"404":{"description":"Not found in this project"},"409":{"description":"Conflict"}}}},"/api/v1/campaigns/{campaign_id}":{"get":{"summary":"Get campaign definition","description":"Offer, audience, budget, status. Read-only — edit targeting in the app.","tags":["SDR Autopilot"],"security":[{"ApiKey":[]},{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"{ \"id\", \"name\", \"status\", \"offer\", \"audience\", \"daily_budget_cents\", \"auto_scaling_enabled\" }","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Created"},"400":{"description":"Validation error"},"401":{"description":"Missing or invalid API key"},"404":{"description":"Not found in this project"},"409":{"description":"Conflict"}}}},"/api/v1/campaigns/{campaign_id}/leads":{"get":{"summary":"List campaign leads","description":"People enrolled in the campaign (identities). Requires CURRENT ACTIVE paid Founder/Growth; Free / past_due / canceled return 402 paid_required.","tags":["SDR Autopilot"],"security":[{"ApiKey":[]},{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"{ \"leads\": [{ \"person_id\", \"name\", \"email\", \"job_title\", \"company_name\", \"company_domain\" }] }","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Created"},"400":{"description":"Validation error"},"401":{"description":"Missing or invalid API key"},"402":{"description":"Paid plan required — JSON body `{ \"error\": string, \"code\": \"paid_required\" }`"},"404":{"description":"Not found in this project"},"409":{"description":"Conflict"}}}},"/api/v1/campaigns/{campaign_id}/analytics":{"get":{"summary":"Campaign analytics","description":"Period-filtered send/reply/hot-lead/spend totals.","tags":["SDR Autopilot"],"security":[{"ApiKey":[]},{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"description":"today | 7d | 30d | all (default all)","schema":{"type":"string"}}],"responses":{"200":{"description":"{ \"campaign_id\", \"period\", \"emails_sent\", \"total_replies\", \"reply_rate_pct\", \"hot_leads\", \"spend_cents\" }","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Created"},"400":{"description":"Validation error"},"401":{"description":"Missing or invalid API key"},"404":{"description":"Not found in this project"},"409":{"description":"Conflict"}}}},"/api/v1/campaigns/{campaign_id}/budget":{"patch":{"summary":"Set campaign daily budget","description":"Per-campaign internal daily spend safety budget in cents (not retail prospect capacity). Works with autopilot ON.","tags":["SDR Autopilot"],"security":[{"ApiKey":[]},{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"daily_limit_cents: integer"}}}},"responses":{"200":{"description":"{ \"campaign_id\", \"daily_limit_cents\" }","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Created"},"400":{"description":"Validation error"},"401":{"description":"Missing or invalid API key"},"404":{"description":"Not found in this project"},"409":{"description":"Conflict"}}}},"/api/v1/campaigns/{campaign_id}/start":{"post":{"summary":"Start or resume a campaign","description":"not_started → launches the pipeline; paused → resumes sending; failed → retries failed stages; already running → idempotent accepted. Requires current paid send entitlement (Free / past_due → 402 paid_required). Always available re: autopilot (no 409 for autopilot).","tags":["SDR Autopilot"],"security":[{"ApiKey":[]},{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"{ \"accepted\": true }","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Created"},"400":{"description":"Validation error"},"401":{"description":"Missing or invalid API key"},"402":{"description":"Paid plan required — JSON body `{ \"error\": string, \"code\": \"paid_required\" }`"},"404":{"description":"Not found in this project"},"409":{"description":"Conflict"}}}},"/api/v1/campaigns/{campaign_id}/stop":{"post":{"summary":"Pause a campaign","description":"Stops new sends; inbound replies are still watched. Idempotent.","tags":["SDR Autopilot"],"security":[{"ApiKey":[]},{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"{ \"accepted\": true }","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Created"},"400":{"description":"Validation error"},"401":{"description":"Missing or invalid API key"},"404":{"description":"Not found in this project"},"409":{"description":"Conflict"}}}},"/api/v1/campaigns/{campaign_id}/inbox":{"get":{"summary":"List inbox conversations","description":"Threads for one campaign (identities). Requires CURRENT ACTIVE paid Founder/Growth; Free / past_due / canceled return 402 paid_required. Use person_id with the thread and reply endpoints.","tags":["SDR Autopilot"],"security":[{"ApiKey":[]},{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"tab","in":"query","required":false,"description":"need_reply (default) | got_reply | all","schema":{"type":"string"}}],"responses":{"200":{"description":"{ \"conversations\": [{ \"person_id\", \"email\", \"name\", \"latest_intent\", \"can_reply\" }] }","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Created"},"400":{"description":"Validation error"},"401":{"description":"Missing or invalid API key"},"402":{"description":"Paid plan required — JSON body `{ \"error\": string, \"code\": \"paid_required\" }`"},"404":{"description":"Not found in this project"},"409":{"description":"Conflict"}}}},"/api/v1/campaigns/{campaign_id}/inbox/{person_id}":{"get":{"summary":"Read a conversation thread","description":"Full thread plus the lead profile. Requires CURRENT ACTIVE paid Founder/Growth (402 paid_required on Free / past_due / canceled). can_reply is false for unsubscribe or no inbound yet.","tags":["SDR Autopilot"],"security":[{"ApiKey":[]},{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"person_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"{ \"person_id\", \"can_reply\", \"lead\": {...}, \"messages\": [...] }","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Created"},"400":{"description":"Validation error"},"401":{"description":"Missing or invalid API key"},"402":{"description":"Paid plan required — JSON body `{ \"error\": string, \"code\": \"paid_required\" }`"},"404":{"description":"Not found in this project"},"409":{"description":"Conflict"}}}},"/api/v1/campaigns/{campaign_id}/inbox/{person_id}/reply":{"post":{"summary":"Reply in a thread","description":"Uses the same send path as the in-app Inbox. Requires CURRENT ACTIVE paid Founder/Growth (402 paid_required on Free / past_due / canceled). You write only the body.","tags":["SDR Autopilot"],"security":[{"ApiKey":[]},{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"person_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"body_text: plain text; recipient, Re: subject, and threading are filled in"}}}},"responses":{"200":{"description":"{ \"accepted\": true, \"message_id\", \"status\" }","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Created"},"400":{"description":"Validation error"},"401":{"description":"Missing or invalid API key"},"402":{"description":"Paid plan required — JSON body `{ \"error\": string, \"code\": \"paid_required\" }`"},"404":{"description":"Not found in this project"},"409":{"description":"Conflict"}}}},"/api/v1/hot-leads":{"get":{"summary":"List hot leads","description":"Inbound replies classified as hot, oldest first. Requires CURRENT ACTIVE paid Founder/Growth (402 paid_required on Free / past_due / canceled). Poll with ?since=<newest became_hot_at you already have>. phone is always null (we do not store phone numbers). reason/campaign/detected_at are kept for older clients.","tags":["SDR Autopilot"],"security":[{"ApiKey":[]},{"Bearer":[]}],"parameters":[{"name":"since","in":"query","required":false,"description":"ISO 8601 exclusive lower bound on became_hot_at (preferred for polling)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"alias for since (older clients)","schema":{"type":"string"}},{"name":"campaign_id","in":"query","required":false,"description":"optional campaign filter","schema":{"type":"string"}}],"responses":{"200":{"description":"{ \"leads\": [{ \"person_id\", \"campaign_id\", \"project_id\", \"name\", \"email\", \"job_title\", \"company_name\", \"company_domain\", \"linkedin_url\", \"country\", \"phone\", \"why_hot\", \"became_hot_at\" }], \"next_cursor\" }","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Created"},"400":{"description":"Validation error"},"401":{"description":"Missing or invalid API key"},"402":{"description":"Paid plan required — JSON body `{ \"error\": string, \"code\": \"paid_required\" }`"},"404":{"description":"Not found in this project"},"409":{"description":"Conflict"}}}},"/api/v1/suppressions":{"post":{"summary":"Add a suppression","description":"Project-wide suppress list (not named lists). Cancels queued sends that match. type is required.","tags":["SDR Autopilot"],"security":[{"ApiKey":[]},{"Bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"type: \"person\" | \"domain\" (required); email: for type=person; domain: for type=domain; linkedin_url: optional person identifier; name_company: optional person identifier"}}}},"responses":{"200":{"description":"{ \"ok\": true }","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Created"},"400":{"description":"Validation error"},"401":{"description":"Missing or invalid API key"},"404":{"description":"Not found in this project"},"409":{"description":"Conflict"}}}}},"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"X-API-Key"},"Bearer":{"type":"http","scheme":"bearer"}}},"security":[{"ApiKey":[]},{"Bearer":[]}]}