---
title: "Cancel a seeding run"
canonical: "https://bird.com/docs/api/reference/cancel-automatic-seeding-run"
---

# Cancel a seeding run

`POST /v1/email/inbox-insights/automatic-seeding/runs/{run_id}/stop`

Stop future seed admissions for this run. Already granted copies may still send; registration uncertainty and late registration results remain visible. The original email, schedule or broadcast is unchanged. Repeating stop is safe; finished or failed runs keep their terminal state. Requires Inbox Insights write permission. Reuse the same idempotency key after a lost response.

## Servers

- `https://{region}.platform.bird.com`: Regional API endpoint. Use the host for the region your organization is hosted in. Official Bird SDKs and the CLI select it automatically from your API key, so you rarely need to set it by hand.
  - `region`: `us1`, `eu1`. Default: `us1`. The region your organization's data is hosted in.

## Authentication

Use one authentication option:

- `BearerAuth`: HTTP bearer authentication. Pass the API key as a bearer token in the `Authorization` header. Workspace
keys use `bk_{region}_*`; organization master keys use `bm_{region}_*`.
The prefix identifies the region and selects the
API endpoint. Official Bird SDKs and the CLI derive the region from the key.

## Code samples

**TypeScript**

```ts
// Requires inbox_insights:write permission in the target workspace.
const run = await bird.email.seeding.runs.cancel("esrun_01krdgeqcxet5s7t44vh8rt9mg");
console.log(run.state, run.progress);
```

Examples: [TypeScript](/docs/api/reference/cancel-automatic-seeding-run.ts.md) · [Python](/docs/api/reference/cancel-automatic-seeding-run.py.md) · [Go](/docs/api/reference/cancel-automatic-seeding-run.go.md) · [PHP](/docs/api/reference/cancel-automatic-seeding-run.php.md) · [CLI](/docs/api/reference/cancel-automatic-seeding-run.cli.md) · [MCP](/docs/api/reference/cancel-automatic-seeding-run.mcp.md) · [cURL](/docs/api/reference/cancel-automatic-seeding-run.curl.md)

## Example response `200`

```json
{
  "id": "esrun_01krdgeqcxet5s7t44vh8rt9mg",
  "state": "stopped",
  "source": {
    "kind": "api",
    "email_id": "em_01krdgeqcxet5s7t44vh8rt9mg"
  },
  "label": "spring-launch",
  "source_created_at": "2026-05-20T09:14:52Z",
  "retain_until": "2027-06-19T09:14:52Z",
  "progress": {
    "planned": 48,
    "admitted": 30,
    "provider_accepted": 30,
    "delivered": 28,
    "failed": 0,
    "not_sent": 18,
    "unknown": 0,
    "pending": 2
  },
  "sending_domain": "mail.example.com",
  "list_type": "private",
  "engagement_profile": "all",
  "regions": [
    "North America - US"
  ],
  "registration_started_at": "2026-05-20T09:14:55Z",
  "registration_finished_at": "2026-05-20T09:15:02Z",
  "dispatch_deadline": "2026-05-20T10:14:52Z",
  "stop_requested_at": "2026-05-20T09:22:40Z",
  "reason": "run_stopped",
  "issues": [],
  "created_at": "2026-05-20T09:14:53Z",
  "updated_at": "2026-05-20T09:22:40Z"
}
```

## Path parameters

- `run_id` (string, required): Automatic seeding run to read or stop.

## Header parameters

- `Idempotency-Key` (string, optional)

  Client-supplied key. On operations supporting request deduplication, a retained
  response is replayed for duplicate requests with the same key within the
  idempotency window (3 hours by default). This protection requires a workspace,
  organization, or staff-account scope. User-only and unscoped unauthenticated operations,
  streams, and operations with a separate replay contract do not use this
  response replay.

  On a supported operation, if idempotency protection is unavailable before execution, the API returns
  `503 IdempotencyUnavailable` (E01033) without executing this attempt. Retry with
  backoff using the same key and request. An operation that takes effect before
  its response is retained can still execute again on retry.

  Two distinct 409 errors signal misuse:

  - `request_in_progress` (E01004): The same key is currently being
    processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
  - `idempotency_key_reuse` (E01005): The same key has already completed
    against a different request body or method. Generate a new key.

  Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
- `X-Workspace-Id` (string, optional): Workspace context for the request. Required for dashboard authentication and master keys. Workspace keys and access tokens already identify their workspace; send that workspace or omit the header. A different one is rejected.
- `X-Organization-Id` (string, optional): Organization context for the request. Required for dashboard authentication. An API key or access token carries its own organization, so send either that organization or no header at all; a different one is rejected.

## Response body

- `id` (string, required)
- `state` (string, required)

  Execution state, separate from delivery and inbox placement:
  - `pending`: the run is recorded and registration has not started.
  - `registering`: registration is in progress. A stop request can coexist with an in-flight registration.
  - `registration_uncertain`: the registration result is unknown. Registration is not automatically repeated, and uncertainty remains visible after a stop.
  - `ready`: registration has produced a retained seed plan; dispatch scheduling has not started.
  - `dispatching`: the scheduler is admitting planned copies or recovering earlier handoffs.
  - `dispatch_complete`: scheduler work is acknowledged. Uncertain admission and pending delivery can remain.
  - `stopped`: new admissions are closed by a stop request, settings or trigger changes, or the dispatch deadline. Already granted copies may still send.
  - `failed`: registration failed or the source control was refused. New admissions cannot proceed; retained progress describes any copies already granted.
  Inspect progress and stop_requested_at alongside this state. A terminal run state does not recall previously granted or queued copies.

  Possible values: `pending`, `registering`, `registration_uncertain`, `ready`, `dispatching`, `dispatch_complete`, `stopped`, `failed`
- `source` (object, required): Original customer source. This never identifies a generated seed copy. Scheduled means an API-scheduled email.
  - Variant `email_id`
    - `source.kind` (string, required)

      Original source kind for this reference.

      Possible values: `api`, `smtp`, `scheduled`
    - `source.email_id` (string, required)
  - Variant `broadcast_id`
    - `source.kind` (string, required)

      Original source kind for this reference.

      Possible values: `broadcast`
    - `source.broadcast_id` (string, required)
- `label` (string): Label from a trigger address, such as `spring-launch` in `<token>+spring-launch@...`. It is a display name and selects nothing.
- `source_created_at` (string, required): Original source execution time.
- `retain_until` (string, required): Time after which this run is no longer available.
- `progress` (object, required): Delivered, failed, not_sent, unknown and pending partition planned copies. Admitted and provider_accepted overlap those buckets and must not be added to them. Late outcomes can move a copy between buckets.
- `progress.planned` (integer, required): Number of retained planned copies.
- `progress.admitted` (integer, required): Copies admitted to Bird email processing. Independent milestone; not provider acceptance.
- `progress.provider_accepted` (integer, required): Copies explicitly accepted by the sending provider. Independent milestone; not delivery or placement.
- `progress.delivered` (integer, required): Copies with receiving-server delivery or complaint evidence. Does not establish inbox placement.
- `progress.failed` (integer, required): Copies with terminal bounce, rejection or block evidence.
- `progress.not_sent` (integer, required): Copies refused or canceled before sending, including ungranted copies after a run fence.
- `progress.unknown` (integer, required): Copies with unresolved admission or provider outcome uncertainty.
- `progress.pending` (integer, required): Remaining copies awaiting admission or a delivery outcome.
- `sending_domain` (string): Present after registration establishes the sending domain.
- `list_type` (string)

  List type frozen at run admission.

  Possible values (may grow over time): `private`, `public`, `exclusive`
- `engagement_profile` (string)

  Engagement profile frozen at run admission.

  Possible values (may grow over time): `all`, `engaging`, `non_engaging`
- `regions` (array of string): Regions frozen at run admission.
- `registration_started_at` (string): Registration admission time.
- `registration_finished_at` (string): Time the registration response was persisted.
- `dispatch_deadline` (string): Fixed deadline for new seed admissions.
- `dispatch_finished_at` (string): Time scheduler work completed; uncertain admission or delivery may remain.
- `stop_requested_at` (string): First durable stop, whether requested explicitly or imposed automatically. Already granted copies may still send.
- `reason` (string)

  Sanitized reason code. Unknown stored details become unavailable; provider error text is never returned.

  Possible values (may grow over time): `registration_rejected`, `allowance_exhausted`, `selection_unavailable`, `sending_domain_not_measured`, `vendor_outcome_unknown`, `invalid_registration_response`, `canceled_or_expired`, `run_stopped`, `settings_disabled`, `trigger_rotated`, `dispatch_deadline_exceeded`, `control_rejected`, `source_stopped`, `conflicting_examples`, `unsupported_source`, `mixed_recipients`, `invalid_trigger`, `seeding_unavailable`, `contact_template_unsupported`, `source_not_authorized`, `content_blocked`, `capture_expired`, `capture_failed`, `preparation_unavailable`, `policy_refused`, `unavailable`, `bounced`, `rejected`, `blocked`, `canceled`, `provider_outcome_unknown`, `admission_uncertain`, `admission_refused`
- `issues` (array of object, required): Counts of sanitized terminal or uncertain copy outcomes. No seed addresses or provider error text. Counts overlap the progress buckets.
- `issues.code` (string, required)

  A reason or delivery status affecting these copies. Unrecognized persisted reasons become unavailable.

  Possible values (may grow over time): `registration_rejected`, `allowance_exhausted`, `selection_unavailable`, `sending_domain_not_measured`, `vendor_outcome_unknown`, `invalid_registration_response`, `canceled_or_expired`, `run_stopped`, `settings_disabled`, `trigger_rotated`, `dispatch_deadline_exceeded`, `control_rejected`, `source_stopped`, `conflicting_examples`, `unsupported_source`, `mixed_recipients`, `invalid_trigger`, `seeding_unavailable`, `contact_template_unsupported`, `source_not_authorized`, `content_blocked`, `capture_expired`, `capture_failed`, `preparation_unavailable`, `policy_refused`, `unavailable`, `bounced`, `rejected`, `blocked`, `canceled`, `provider_outcome_unknown`, `admission_uncertain`, `admission_refused`
- `issues.count` (integer, required)
- `created_at` (string, required)
- `updated_at` (string, required)

## Related resources

- [Should I use a Bird SDK or call the API directly?](/explained/platform/should-i-use-an-sdk-or-call-the-api-directly) (answer)
- [Build your first integration](/learn/paths/integration) (course)
- [Send your first email](/docs/get-started/send-your-first-email) (docs)

[Get an implementation brief](/learn/workspace?topic=api-basics)
