> For the complete documentation index, see [llms.txt](https://run.emailchaser.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://run.emailchaser.com/api-reference/autopilot.md).

# Autopilot

## Size an autopilot budget plan (read-only)

> Turns a monthly budget into a concrete outbound setup: domains, mailboxes, sending volume, prospects and costs. expectedMeetingsPerMonth is a planning ESTIMATE on pessimistic funnel assumptions, not a promise. Creates nothing.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.AutopilotPlanResponse":{"type":"object","properties":{"credits":{"type":"integer"},"creditsUsd":{"type":"number"},"domains":{"type":"integer"},"expectedMeetingsPerMonth":{"description":"ExpectedMeetingsPerMonth is a planning ESTIMATE on pessimistic funnel\nassumptions, not a promise.","type":"number"},"feasible":{"description":"Feasible reports whether the budget covers a usable setup at all.","type":"boolean"},"firstMonthUsd":{"description":"FirstMonthUsd includes the one-off setup on top of the recurring cost.","type":"number"},"mailboxes":{"type":"integer"},"mailboxesMonthlyUsd":{"type":"number"},"monthlySends":{"type":"integer"},"notes":{"description":"Notes explains anything worth surfacing to a human.","type":"array","items":{"type":"string"}},"prospectsPerMonth":{"type":"integer"},"recurringUsd":{"description":"RecurringUsd is the steady-state monthly cost.","type":"number"},"setupUsd":{"description":"SetupUsd is the one-off cost in the first month (mailbox setup fees and\nannual domain registrations).","type":"number"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.AutopilotPlanRequest":{"type":"object","properties":{"budgetUsd":{"description":"BudgetUsd is the total monthly budget in dollars, inclusive of the\nplatform subscription. Required, must be greater than zero.","type":"number"},"maxMailboxes":{"description":"MaxMailboxes caps infrastructure regardless of budget. 0 means no cap.","type":"integer"},"platformUsd":{"description":"PlatformUsd is the subscription cost to reserve before sizing\ninfrastructure. Defaults to 0.","type":"number"}}}}},"paths":{"/autopilot/plan":{"post":{"description":"Turns a monthly budget into a concrete outbound setup: domains, mailboxes, sending volume, prospects and costs. expectedMeetingsPerMonth is a planning ESTIMATE on pessimistic funnel assumptions, not a promise. Creates nothing.","tags":["Autopilot"],"summary":"Size an autopilot budget plan (read-only)","responses":{"200":{"description":"The sized plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.AutopilotPlanResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.AutopilotPlanRequest"}}},"description":"Monthly budget in dollars","required":true}}}}}
```

## List autopilot runs

> Lists the workspace's autopilot runs, newest first.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.ListAutopilotRunsResponse":{"type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/models.AutopilotRunResponse"}},"total":{"type":"integer"}}},"models.AutopilotRunResponse":{"type":"object","properties":{"approvedAt":{"description":"ApprovedAt is when a human approved the run (RFC3339), or null.","type":"string"},"approvedByUserId":{"description":"ApprovedByUserID is who approved the run, or null.","type":"integer"},"audit":{"type":"array","items":{"$ref":"#/components/schemas/models.AutopilotAuditEvent"}},"autoOptimizeVariants":{"type":"boolean"},"autoTopupProspects":{"type":"boolean"},"campaignId":{"type":"integer"},"createdAt":{"type":"string"},"icpId":{"type":"integer"},"id":{"type":"integer"},"killSwitch":{"description":"KillSwitch reports whether the run has been permanently halted.","type":"boolean"},"lastAdvancedAt":{"description":"LastAdvancedAt is when the run last made progress (RFC3339), or null.","type":"string"},"lastError":{"type":"string"},"prospectSearchId":{"type":"integer"},"replyMode":{"type":"string"},"status":{"description":"Status is one of: pending, building_icp, writing_sequence,\nsourcing_prospects, awaiting_approval, provisioning_infrastructure,\nrunning, paused, completed, failed. A run is at sourcing_prospects twice:\nbefore approval it checks for free that prospects match, after approval\n(approvedAt set) it reveals the first batch, which spends credits.","type":"string"},"targetProspectCount":{"type":"integer"},"website":{"type":"string"}}},"models.AutopilotAuditEvent":{"type":"object","properties":{"actor":{"type":"string"},"at":{"type":"string"},"message":{"type":"string"},"stage":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/autopilot/runs":{"get":{"description":"Lists the workspace's autopilot runs, newest first.","tags":["Autopilot"],"summary":"List autopilot runs","parameters":[{"schema":{"type":"integer"},"description":"Page size (default 50, max 200)","name":"limit","in":"query"},{"schema":{"type":"integer"},"description":"Page number, 1-based (default 1)","name":"page","in":"query"}],"responses":{"200":{"description":"Runs and total count","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ListAutopilotRunsResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"500":{"description":"Failed to retrieve autopilot runs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}}}}}}
```

## Start an autopilot run

> Creates an autopilot run for the given website. The run works autonomously up to the approval gate: it builds the customer profile, drafts the sequence and checks, without spending credits, that prospects match the profile. Nothing is spent, bought or sent before a human approves the run: no credits are reserved and no prospect is revealed until then, and approving is what reveals the first batch of prospects. When budgetUsd is given the sized budget plan is returned and snapshotted on the run, and targetProspects defaults to the plan's monthly prospect capacity. The plan's domain and mailbox counts are a ceiling, not a quote: one infrastructure order buys at most 10 domains, can place fewer mailboxes than the plan, and buys nothing when the workspace already has a connected sending account. Its dollar figures are an estimate, and an order is charged at the prices in force when it is placed. replyMode controls how inbound replies are handled (off, draft, approve, auto; default draft); auto sends AI reply drafts for interested replies without review. Available on every plan, and requires an active subscription. A workspace may have only one run awaiting approval at a time, and a limited number of starts per day.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.AutopilotRunResult":{"type":"object","properties":{"plan":{"$ref":"#/components/schemas/models.AutopilotPlanResponse"},"run":{"$ref":"#/components/schemas/models.AutopilotRunResponse"}}},"models.AutopilotPlanResponse":{"type":"object","properties":{"credits":{"type":"integer"},"creditsUsd":{"type":"number"},"domains":{"type":"integer"},"expectedMeetingsPerMonth":{"description":"ExpectedMeetingsPerMonth is a planning ESTIMATE on pessimistic funnel\nassumptions, not a promise.","type":"number"},"feasible":{"description":"Feasible reports whether the budget covers a usable setup at all.","type":"boolean"},"firstMonthUsd":{"description":"FirstMonthUsd includes the one-off setup on top of the recurring cost.","type":"number"},"mailboxes":{"type":"integer"},"mailboxesMonthlyUsd":{"type":"number"},"monthlySends":{"type":"integer"},"notes":{"description":"Notes explains anything worth surfacing to a human.","type":"array","items":{"type":"string"}},"prospectsPerMonth":{"type":"integer"},"recurringUsd":{"description":"RecurringUsd is the steady-state monthly cost.","type":"number"},"setupUsd":{"description":"SetupUsd is the one-off cost in the first month (mailbox setup fees and\nannual domain registrations).","type":"number"}}},"models.AutopilotRunResponse":{"type":"object","properties":{"approvedAt":{"description":"ApprovedAt is when a human approved the run (RFC3339), or null.","type":"string"},"approvedByUserId":{"description":"ApprovedByUserID is who approved the run, or null.","type":"integer"},"audit":{"type":"array","items":{"$ref":"#/components/schemas/models.AutopilotAuditEvent"}},"autoOptimizeVariants":{"type":"boolean"},"autoTopupProspects":{"type":"boolean"},"campaignId":{"type":"integer"},"createdAt":{"type":"string"},"icpId":{"type":"integer"},"id":{"type":"integer"},"killSwitch":{"description":"KillSwitch reports whether the run has been permanently halted.","type":"boolean"},"lastAdvancedAt":{"description":"LastAdvancedAt is when the run last made progress (RFC3339), or null.","type":"string"},"lastError":{"type":"string"},"prospectSearchId":{"type":"integer"},"replyMode":{"type":"string"},"status":{"description":"Status is one of: pending, building_icp, writing_sequence,\nsourcing_prospects, awaiting_approval, provisioning_infrastructure,\nrunning, paused, completed, failed. A run is at sourcing_prospects twice:\nbefore approval it checks for free that prospects match, after approval\n(approvedAt set) it reveals the first batch, which spends credits.","type":"string"},"targetProspectCount":{"type":"integer"},"website":{"type":"string"}}},"models.AutopilotAuditEvent":{"type":"object","properties":{"actor":{"type":"string"},"at":{"type":"string"},"message":{"type":"string"},"stage":{"type":"string"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.InsufficientCreditsErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"error":{"type":"string"},"have":{"type":"integer"},"need":{"type":"integer"}}},"models.ErrorForbidden":{"type":"object","properties":{"error":{"type":"string"}}},"models.StartAutopilotRunRequest":{"type":"object","required":["website"],"properties":{"budgetUsd":{"description":"BudgetUsd, when given, sizes a budget plan that is snapshotted on the\nrun. The plan's domain and mailbox counts are a ceiling for what the run\nbuys after approval (one order holds at most 10 domains and can place\nfewer mailboxes), and its dollar figures are an estimate.","type":"number"},"maxMailboxes":{"description":"MaxMailboxes caps the budget plan's infrastructure. 0 means no cap.","type":"integer"},"replyMode":{"description":"ReplyMode is how inbound replies are handled: off, draft (default),\napprove, or auto. Auto sends AI reply drafts for interested replies\nwithout review - opt in deliberately.","type":"string"},"targetProspects":{"description":"TargetProspects is how many prospects the run reveals per sourcing\nbatch: the first batch once the run is approved, then each top-up. No\nprospect is revealed and no credit is spent before approval. When\nomitted and a budget is given, it is derived from the budget plan; when\n0 or omitted without a budget, the runner default batch applies.","type":"integer"},"website":{"description":"Website is the company website the run is seeded from.","type":"string"}}}}},"paths":{"/autopilot/runs":{"post":{"description":"Creates an autopilot run for the given website. The run works autonomously up to the approval gate: it builds the customer profile, drafts the sequence and checks, without spending credits, that prospects match the profile. Nothing is spent, bought or sent before a human approves the run: no credits are reserved and no prospect is revealed until then, and approving is what reveals the first batch of prospects. When budgetUsd is given the sized budget plan is returned and snapshotted on the run, and targetProspects defaults to the plan's monthly prospect capacity. The plan's domain and mailbox counts are a ceiling, not a quote: one infrastructure order buys at most 10 domains, can place fewer mailboxes than the plan, and buys nothing when the workspace already has a connected sending account. Its dollar figures are an estimate, and an order is charged at the prices in force when it is placed. replyMode controls how inbound replies are handled (off, draft, approve, auto; default draft); auto sends AI reply drafts for interested replies without review. Available on every plan, and requires an active subscription. A workspace may have only one run awaiting approval at a time, and a limited number of starts per day.","tags":["Autopilot"],"summary":"Start an autopilot run","responses":{"201":{"description":"The created run, with the plan when a budget was given","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.AutopilotRunResult"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"402":{"description":"The workspace does not hold enough prospect credits for the first batch the run reveals once approved: the run's prospect target, capped at what a single increment can reserve, priced at credits.ActionProspectReveal credits per prospect. A pre-flight check only; starting reserves nothing (code insufficient_credits, with have/need counts)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.InsufficientCreditsErrorResponse"}}}},"403":{"description":"Autopilot requires an active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorForbidden"}}}},"429":{"description":"A run is already awaiting approval, or too many runs have been started today","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Failed to start the autopilot run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.StartAutopilotRunRequest"}}},"description":"Website and optional budget","required":true}}}}}
```

## Get an autopilot run

> Returns one run, including its audit trail. Runs belonging to other workspaces are reported as not found.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.AutopilotRunResult":{"type":"object","properties":{"plan":{"$ref":"#/components/schemas/models.AutopilotPlanResponse"},"run":{"$ref":"#/components/schemas/models.AutopilotRunResponse"}}},"models.AutopilotPlanResponse":{"type":"object","properties":{"credits":{"type":"integer"},"creditsUsd":{"type":"number"},"domains":{"type":"integer"},"expectedMeetingsPerMonth":{"description":"ExpectedMeetingsPerMonth is a planning ESTIMATE on pessimistic funnel\nassumptions, not a promise.","type":"number"},"feasible":{"description":"Feasible reports whether the budget covers a usable setup at all.","type":"boolean"},"firstMonthUsd":{"description":"FirstMonthUsd includes the one-off setup on top of the recurring cost.","type":"number"},"mailboxes":{"type":"integer"},"mailboxesMonthlyUsd":{"type":"number"},"monthlySends":{"type":"integer"},"notes":{"description":"Notes explains anything worth surfacing to a human.","type":"array","items":{"type":"string"}},"prospectsPerMonth":{"type":"integer"},"recurringUsd":{"description":"RecurringUsd is the steady-state monthly cost.","type":"number"},"setupUsd":{"description":"SetupUsd is the one-off cost in the first month (mailbox setup fees and\nannual domain registrations).","type":"number"}}},"models.AutopilotRunResponse":{"type":"object","properties":{"approvedAt":{"description":"ApprovedAt is when a human approved the run (RFC3339), or null.","type":"string"},"approvedByUserId":{"description":"ApprovedByUserID is who approved the run, or null.","type":"integer"},"audit":{"type":"array","items":{"$ref":"#/components/schemas/models.AutopilotAuditEvent"}},"autoOptimizeVariants":{"type":"boolean"},"autoTopupProspects":{"type":"boolean"},"campaignId":{"type":"integer"},"createdAt":{"type":"string"},"icpId":{"type":"integer"},"id":{"type":"integer"},"killSwitch":{"description":"KillSwitch reports whether the run has been permanently halted.","type":"boolean"},"lastAdvancedAt":{"description":"LastAdvancedAt is when the run last made progress (RFC3339), or null.","type":"string"},"lastError":{"type":"string"},"prospectSearchId":{"type":"integer"},"replyMode":{"type":"string"},"status":{"description":"Status is one of: pending, building_icp, writing_sequence,\nsourcing_prospects, awaiting_approval, provisioning_infrastructure,\nrunning, paused, completed, failed. A run is at sourcing_prospects twice:\nbefore approval it checks for free that prospects match, after approval\n(approvedAt set) it reveals the first batch, which spends credits.","type":"string"},"targetProspectCount":{"type":"integer"},"website":{"type":"string"}}},"models.AutopilotAuditEvent":{"type":"object","properties":{"actor":{"type":"string"},"at":{"type":"string"},"message":{"type":"string"},"stage":{"type":"string"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/autopilot/runs/{id}":{"get":{"description":"Returns one run, including its audit trail. Runs belonging to other workspaces are reported as not found.","tags":["Autopilot"],"summary":"Get an autopilot run","parameters":[{"schema":{"type":"integer"},"description":"Run ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"The run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.AutopilotRunResult"}}}},"400":{"description":"Invalid run id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"404":{"description":"Run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Failed to retrieve the run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}}}}}}
```

## Approve an autopilot run

> Approves a run that is awaiting approval, recording who approved it. Approval authorises the run's spend: the run moves to sourcing\_prospects and reveals its first batch of prospects into the campaign, which spends prospect credits, then moves to provisioning\_infrastructure to buy the budgeted sending infrastructure (if any), and then launches unattended. Nothing is spent, bought or sent before this call. A batch that delivers no prospects fails the run before any infrastructure is bought.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.AutopilotRunResult":{"type":"object","properties":{"plan":{"$ref":"#/components/schemas/models.AutopilotPlanResponse"},"run":{"$ref":"#/components/schemas/models.AutopilotRunResponse"}}},"models.AutopilotPlanResponse":{"type":"object","properties":{"credits":{"type":"integer"},"creditsUsd":{"type":"number"},"domains":{"type":"integer"},"expectedMeetingsPerMonth":{"description":"ExpectedMeetingsPerMonth is a planning ESTIMATE on pessimistic funnel\nassumptions, not a promise.","type":"number"},"feasible":{"description":"Feasible reports whether the budget covers a usable setup at all.","type":"boolean"},"firstMonthUsd":{"description":"FirstMonthUsd includes the one-off setup on top of the recurring cost.","type":"number"},"mailboxes":{"type":"integer"},"mailboxesMonthlyUsd":{"type":"number"},"monthlySends":{"type":"integer"},"notes":{"description":"Notes explains anything worth surfacing to a human.","type":"array","items":{"type":"string"}},"prospectsPerMonth":{"type":"integer"},"recurringUsd":{"description":"RecurringUsd is the steady-state monthly cost.","type":"number"},"setupUsd":{"description":"SetupUsd is the one-off cost in the first month (mailbox setup fees and\nannual domain registrations).","type":"number"}}},"models.AutopilotRunResponse":{"type":"object","properties":{"approvedAt":{"description":"ApprovedAt is when a human approved the run (RFC3339), or null.","type":"string"},"approvedByUserId":{"description":"ApprovedByUserID is who approved the run, or null.","type":"integer"},"audit":{"type":"array","items":{"$ref":"#/components/schemas/models.AutopilotAuditEvent"}},"autoOptimizeVariants":{"type":"boolean"},"autoTopupProspects":{"type":"boolean"},"campaignId":{"type":"integer"},"createdAt":{"type":"string"},"icpId":{"type":"integer"},"id":{"type":"integer"},"killSwitch":{"description":"KillSwitch reports whether the run has been permanently halted.","type":"boolean"},"lastAdvancedAt":{"description":"LastAdvancedAt is when the run last made progress (RFC3339), or null.","type":"string"},"lastError":{"type":"string"},"prospectSearchId":{"type":"integer"},"replyMode":{"type":"string"},"status":{"description":"Status is one of: pending, building_icp, writing_sequence,\nsourcing_prospects, awaiting_approval, provisioning_infrastructure,\nrunning, paused, completed, failed. A run is at sourcing_prospects twice:\nbefore approval it checks for free that prospects match, after approval\n(approvedAt set) it reveals the first batch, which spends credits.","type":"string"},"targetProspectCount":{"type":"integer"},"website":{"type":"string"}}},"models.AutopilotAuditEvent":{"type":"object","properties":{"actor":{"type":"string"},"at":{"type":"string"},"message":{"type":"string"},"stage":{"type":"string"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/autopilot/runs/{id}/approve":{"post":{"description":"Approves a run that is awaiting approval, recording who approved it. Approval authorises the run's spend: the run moves to sourcing_prospects and reveals its first batch of prospects into the campaign, which spends prospect credits, then moves to provisioning_infrastructure to buy the budgeted sending infrastructure (if any), and then launches unattended. Nothing is spent, bought or sent before this call. A batch that delivers no prospects fails the run before any infrastructure is bought.","tags":["Autopilot"],"summary":"Approve an autopilot run","parameters":[{"schema":{"type":"integer"},"description":"Run ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"The approved run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.AutopilotRunResult"}}}},"400":{"description":"Invalid run id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"404":{"description":"Run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"409":{"description":"The run is not waiting for approval, or has been halted by the kill switch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Failed to approve the run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}}}}}}
```

## Kill an autopilot run

> Engages the kill switch: the run halts wherever it is and cannot be resumed, and a campaign the run launched is paused so nothing more sends. The optional reason is recorded in the audit trail.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.AutopilotRunResult":{"type":"object","properties":{"plan":{"$ref":"#/components/schemas/models.AutopilotPlanResponse"},"run":{"$ref":"#/components/schemas/models.AutopilotRunResponse"}}},"models.AutopilotPlanResponse":{"type":"object","properties":{"credits":{"type":"integer"},"creditsUsd":{"type":"number"},"domains":{"type":"integer"},"expectedMeetingsPerMonth":{"description":"ExpectedMeetingsPerMonth is a planning ESTIMATE on pessimistic funnel\nassumptions, not a promise.","type":"number"},"feasible":{"description":"Feasible reports whether the budget covers a usable setup at all.","type":"boolean"},"firstMonthUsd":{"description":"FirstMonthUsd includes the one-off setup on top of the recurring cost.","type":"number"},"mailboxes":{"type":"integer"},"mailboxesMonthlyUsd":{"type":"number"},"monthlySends":{"type":"integer"},"notes":{"description":"Notes explains anything worth surfacing to a human.","type":"array","items":{"type":"string"}},"prospectsPerMonth":{"type":"integer"},"recurringUsd":{"description":"RecurringUsd is the steady-state monthly cost.","type":"number"},"setupUsd":{"description":"SetupUsd is the one-off cost in the first month (mailbox setup fees and\nannual domain registrations).","type":"number"}}},"models.AutopilotRunResponse":{"type":"object","properties":{"approvedAt":{"description":"ApprovedAt is when a human approved the run (RFC3339), or null.","type":"string"},"approvedByUserId":{"description":"ApprovedByUserID is who approved the run, or null.","type":"integer"},"audit":{"type":"array","items":{"$ref":"#/components/schemas/models.AutopilotAuditEvent"}},"autoOptimizeVariants":{"type":"boolean"},"autoTopupProspects":{"type":"boolean"},"campaignId":{"type":"integer"},"createdAt":{"type":"string"},"icpId":{"type":"integer"},"id":{"type":"integer"},"killSwitch":{"description":"KillSwitch reports whether the run has been permanently halted.","type":"boolean"},"lastAdvancedAt":{"description":"LastAdvancedAt is when the run last made progress (RFC3339), or null.","type":"string"},"lastError":{"type":"string"},"prospectSearchId":{"type":"integer"},"replyMode":{"type":"string"},"status":{"description":"Status is one of: pending, building_icp, writing_sequence,\nsourcing_prospects, awaiting_approval, provisioning_infrastructure,\nrunning, paused, completed, failed. A run is at sourcing_prospects twice:\nbefore approval it checks for free that prospects match, after approval\n(approvedAt set) it reveals the first batch, which spends credits.","type":"string"},"targetProspectCount":{"type":"integer"},"website":{"type":"string"}}},"models.AutopilotAuditEvent":{"type":"object","properties":{"actor":{"type":"string"},"at":{"type":"string"},"message":{"type":"string"},"stage":{"type":"string"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}},"models.KillAutopilotRunRequest":{"type":"object","properties":{"reason":{"description":"Reason is recorded in the run's audit trail. Trimmed and capped at 200\ncharacters.","type":"string"}}}}},"paths":{"/autopilot/runs/{id}/kill":{"post":{"description":"Engages the kill switch: the run halts wherever it is and cannot be resumed, and a campaign the run launched is paused so nothing more sends. The optional reason is recorded in the audit trail.","tags":["Autopilot"],"summary":"Kill an autopilot run","parameters":[{"schema":{"type":"integer"},"description":"Run ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"The halted run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.AutopilotRunResult"}}}},"400":{"description":"Invalid run id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"404":{"description":"Run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Failed to stop the run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.KillAutopilotRunRequest"}}},"description":"Optional reason"}}}}}
```

## Pause an autopilot run

> Suspends a run that is still in flight. A paused run can be resumed; pausing never skips the approval gate. A completed or failed run cannot be paused.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.AutopilotRunResult":{"type":"object","properties":{"plan":{"$ref":"#/components/schemas/models.AutopilotPlanResponse"},"run":{"$ref":"#/components/schemas/models.AutopilotRunResponse"}}},"models.AutopilotPlanResponse":{"type":"object","properties":{"credits":{"type":"integer"},"creditsUsd":{"type":"number"},"domains":{"type":"integer"},"expectedMeetingsPerMonth":{"description":"ExpectedMeetingsPerMonth is a planning ESTIMATE on pessimistic funnel\nassumptions, not a promise.","type":"number"},"feasible":{"description":"Feasible reports whether the budget covers a usable setup at all.","type":"boolean"},"firstMonthUsd":{"description":"FirstMonthUsd includes the one-off setup on top of the recurring cost.","type":"number"},"mailboxes":{"type":"integer"},"mailboxesMonthlyUsd":{"type":"number"},"monthlySends":{"type":"integer"},"notes":{"description":"Notes explains anything worth surfacing to a human.","type":"array","items":{"type":"string"}},"prospectsPerMonth":{"type":"integer"},"recurringUsd":{"description":"RecurringUsd is the steady-state monthly cost.","type":"number"},"setupUsd":{"description":"SetupUsd is the one-off cost in the first month (mailbox setup fees and\nannual domain registrations).","type":"number"}}},"models.AutopilotRunResponse":{"type":"object","properties":{"approvedAt":{"description":"ApprovedAt is when a human approved the run (RFC3339), or null.","type":"string"},"approvedByUserId":{"description":"ApprovedByUserID is who approved the run, or null.","type":"integer"},"audit":{"type":"array","items":{"$ref":"#/components/schemas/models.AutopilotAuditEvent"}},"autoOptimizeVariants":{"type":"boolean"},"autoTopupProspects":{"type":"boolean"},"campaignId":{"type":"integer"},"createdAt":{"type":"string"},"icpId":{"type":"integer"},"id":{"type":"integer"},"killSwitch":{"description":"KillSwitch reports whether the run has been permanently halted.","type":"boolean"},"lastAdvancedAt":{"description":"LastAdvancedAt is when the run last made progress (RFC3339), or null.","type":"string"},"lastError":{"type":"string"},"prospectSearchId":{"type":"integer"},"replyMode":{"type":"string"},"status":{"description":"Status is one of: pending, building_icp, writing_sequence,\nsourcing_prospects, awaiting_approval, provisioning_infrastructure,\nrunning, paused, completed, failed. A run is at sourcing_prospects twice:\nbefore approval it checks for free that prospects match, after approval\n(approvedAt set) it reveals the first batch, which spends credits.","type":"string"},"targetProspectCount":{"type":"integer"},"website":{"type":"string"}}},"models.AutopilotAuditEvent":{"type":"object","properties":{"actor":{"type":"string"},"at":{"type":"string"},"message":{"type":"string"},"stage":{"type":"string"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/autopilot/runs/{id}/pause":{"post":{"description":"Suspends a run that is still in flight. A paused run can be resumed; pausing never skips the approval gate. A completed or failed run cannot be paused.","tags":["Autopilot"],"summary":"Pause an autopilot run","parameters":[{"schema":{"type":"integer"},"description":"Run ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"The paused run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.AutopilotRunResult"}}}},"400":{"description":"Invalid run id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"404":{"description":"Run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"409":{"description":"The run has finished and cannot be paused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Failed to pause the run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}}}}}}
```

## Resume an autopilot run

> Resumes a paused run. A run paused before approval goes back to awaiting approval — resuming can never skip the gate. A failed run resumes to the stage it failed from once the cause (e.g. insufficient credits) is fixed.

```json
{"openapi":"3.1.1","info":{"title":"Emailchaser API","version":"1.0"},"servers":[{"url":"https://api.emailchaser.com/r"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"models.AutopilotRunResult":{"type":"object","properties":{"plan":{"$ref":"#/components/schemas/models.AutopilotPlanResponse"},"run":{"$ref":"#/components/schemas/models.AutopilotRunResponse"}}},"models.AutopilotPlanResponse":{"type":"object","properties":{"credits":{"type":"integer"},"creditsUsd":{"type":"number"},"domains":{"type":"integer"},"expectedMeetingsPerMonth":{"description":"ExpectedMeetingsPerMonth is a planning ESTIMATE on pessimistic funnel\nassumptions, not a promise.","type":"number"},"feasible":{"description":"Feasible reports whether the budget covers a usable setup at all.","type":"boolean"},"firstMonthUsd":{"description":"FirstMonthUsd includes the one-off setup on top of the recurring cost.","type":"number"},"mailboxes":{"type":"integer"},"mailboxesMonthlyUsd":{"type":"number"},"monthlySends":{"type":"integer"},"notes":{"description":"Notes explains anything worth surfacing to a human.","type":"array","items":{"type":"string"}},"prospectsPerMonth":{"type":"integer"},"recurringUsd":{"description":"RecurringUsd is the steady-state monthly cost.","type":"number"},"setupUsd":{"description":"SetupUsd is the one-off cost in the first month (mailbox setup fees and\nannual domain registrations).","type":"number"}}},"models.AutopilotRunResponse":{"type":"object","properties":{"approvedAt":{"description":"ApprovedAt is when a human approved the run (RFC3339), or null.","type":"string"},"approvedByUserId":{"description":"ApprovedByUserID is who approved the run, or null.","type":"integer"},"audit":{"type":"array","items":{"$ref":"#/components/schemas/models.AutopilotAuditEvent"}},"autoOptimizeVariants":{"type":"boolean"},"autoTopupProspects":{"type":"boolean"},"campaignId":{"type":"integer"},"createdAt":{"type":"string"},"icpId":{"type":"integer"},"id":{"type":"integer"},"killSwitch":{"description":"KillSwitch reports whether the run has been permanently halted.","type":"boolean"},"lastAdvancedAt":{"description":"LastAdvancedAt is when the run last made progress (RFC3339), or null.","type":"string"},"lastError":{"type":"string"},"prospectSearchId":{"type":"integer"},"replyMode":{"type":"string"},"status":{"description":"Status is one of: pending, building_icp, writing_sequence,\nsourcing_prospects, awaiting_approval, provisioning_infrastructure,\nrunning, paused, completed, failed. A run is at sourcing_prospects twice:\nbefore approval it checks for free that prospects match, after approval\n(approvedAt set) it reveals the first batch, which spends credits.","type":"string"},"targetProspectCount":{"type":"integer"},"website":{"type":"string"}}},"models.AutopilotAuditEvent":{"type":"object","properties":{"actor":{"type":"string"},"at":{"type":"string"},"message":{"type":"string"},"stage":{"type":"string"}}},"models.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"models.ErrorUnauthorized":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/autopilot/runs/{id}/resume":{"post":{"description":"Resumes a paused run. A run paused before approval goes back to awaiting approval — resuming can never skip the gate. A failed run resumes to the stage it failed from once the cause (e.g. insufficient credits) is fixed.","tags":["Autopilot"],"summary":"Resume an autopilot run","parameters":[{"schema":{"type":"integer"},"description":"Run ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"The resumed run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.AutopilotRunResult"}}}},"400":{"description":"Invalid run id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorUnauthorized"}}}},"404":{"description":"Run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"409":{"description":"The run has been halted by the kill switch, or cannot be resumed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Failed to resume the run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}}}}}}
```
