# cancel_subscriber_export

Cancel a queued or running export

`POST /v1/subscriber-exports/{export_id}/cancel`

| | |
| --- | --- |
| Risk | write |
| Authentication | API key or OAuth access token |
| Scopes | `subscribers:export` |
| Idempotency | natural: repeating the call gives the same result |
| Dry run | not applicable |
| Success status | 200 |
| Response type | application/json |

## What it does

- Use when: You started an export by mistake; the build stops and its partial file is deleted.
- Do not use when: it is already ready (it expires on its own after 24 hours).
- Side effects: Stops the build; the build still counts against your daily limit.
- Reversible: No.
- Required scope: subscribers:export.
- Idempotency: safe to repeat (same result).
- Typical next step: call create_subscriber_export when you are ready to try again.

## Scopes

- `subscribers:export`: Download the whole subscriber list as a CSV file.

## Side effects

- Stops the build; the build still counts against your daily limit

## Request

### Path parameters

| Field | Type | Description |
| --- | --- | --- |
| `export_id` | string |  |

### Query parameters

None.

## Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes |  |
| `state` | one of "queued", "running", "ready", "failed", "expired", "canceled" | yes |  |
| `reused` | boolean | yes | true when an identical export built in the last 15 minutes was returned instead of building a new one. |
| `filter` | object | yes | The normalized filter this export was built from. |
| `columns` | one of "standard", "with_consent" | yes |  |
| `estimated_rows` | integer, min -9007199254740991, max 9007199254740991 or null | yes |  |
| `row_count` | integer, min -9007199254740991, max 9007199254740991 or null | yes | Set when the export is ready. |
| `created_at` | string | yes |  |
| `finished_at` | string or null | yes |  |
| `expires_at` | string or null | yes | The export and its file are deleted at this time. |
| `downloads_remaining` | integer, min 0, max 9007199254740991 | yes |  |
| `problem` | object or null | yes | Why a build failed, in words that name no reader. |
| `poll_after_seconds` | integer, max 9007199254740991 or null | yes |  |

## Examples

### canceled

Request:

```bash
curl -X POST 'https://api.seemly.com/v1/subscriber-exports/exp_0123456789abcdefghjkmnpq/cancel' \
  -H "Authorization: Bearer $SEEMLY_API_KEY"
```

Response: `200`:

```json
{
  "id": "exp_0123456789abcdefghjkmnpq",
  "state": "canceled",
  "reused": false,
  "filter": {
    "statuses": [
      "confirmed"
    ],
    "lists": [],
    "tags": [],
    "tag_match": "any",
    "sources": [],
    "confirmed_between": {
      "from": null,
      "to": null
    },
    "created_between": {
      "from": null,
      "to": null
    },
    "columns": "standard"
  },
  "columns": "standard",
  "estimated_rows": null,
  "row_count": null,
  "created_at": "2026-02-01T10:00:00Z",
  "finished_at": "2026-02-01T10:00:20Z",
  "expires_at": null,
  "downloads_remaining": 5,
  "problem": null,
  "poll_after_seconds": null
}
```

## Errors

| Status | Codes |
| --- | --- |
| 400 | [`validation_failed`](/developers/md/errors/validation_failed) |
| 401 | [`unauthenticated`](/developers/md/errors/unauthenticated), [`credential_revoked`](/developers/md/errors/credential_revoked), [`credential_expired`](/developers/md/errors/credential_expired) |
| 403 | [`insufficient_scope`](/developers/md/errors/insufficient_scope), [`plan_does_not_include`](/developers/md/errors/plan_does_not_include), [`workspace_paused`](/developers/md/errors/workspace_paused), [`api_suspended`](/developers/md/errors/api_suspended), [`consent_required`](/developers/md/errors/consent_required) |
| 404 | [`not_found`](/developers/md/errors/not_found) |
| 409 | [`conflict`](/developers/md/errors/conflict) |
| 429 | [`rate_limited`](/developers/md/errors/rate_limited), [`quota_exceeded`](/developers/md/errors/quota_exceeded) |
| 503 | [`service_unavailable`](/developers/md/errors/service_unavailable) |

Every error is an `application/problem+json` body with a `code`, a `fix` sentence and `next_actions`. See [reading a problem response](/developers/md/guides/agents#reading-a-problem-response).

## Typical next steps

- [`create_subscriber_export`](/developers/md/operations/create_subscriber_export)

## Related

- [OpenAPI document](https://api.seemly.com/v1/openapi.json)
- [Agent guide](/developers/md/guides/agents)
