# get_operation

Get an async operation's progress

`GET /v1/operations/{operation_id}`

| | |
| --- | --- |
| Risk | read |
| Authentication | API key or OAuth access token |
| Scopes | none (any valid credential) |
| 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: A bulk call answered 202; poll until state is succeeded, failed or canceled.
- Do not use when: the call answered 200 (the results are already in the response).
- Side effects: None.
- Reversible: Not applicable, nothing changes.
- Required scope: none (any valid credential).
- Idempotency: safe to repeat.
- Typical next step: wait poll_after_seconds, or call cancel_operation to stop.

## Request

### Path parameters

| Field | Type | Description |
| --- | --- | --- |
| `operation_id` | string |  |

### Query parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | one of "true", "false", default "false" | no | true adds a page of per-item results; needs subscribers:read. |
| `limit` | integer, min 1, max 200, default 50 | no | Page size, 1 to 200. Default 50. |
| `cursor` | string, max 1024 characters | no | Opaque cursor from next_cursor of the previous page. Valid only with the same filters. |

Every read also accepts `fields=a,b,c` to return only those top-level fields.

## Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes |  |
| `kind` | string | yes |  |
| `state` | one of "queued", "running", "succeeded", "failed", "canceled" | yes |  |
| `progress` | object | yes |  |
| `progress.total` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `progress.done` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `progress.counts` | object | yes |  |
| `result` | any or null | yes |  |
| `problem` | any or null | yes |  |
| `created_at` | string (date-time) | yes |  |
| `finished_at` | string (date-time) or null | yes |  |
| `poll_after_seconds` | integer, min -9007199254740991, max 9007199254740991 or null | yes | Suggested wait before asking again; null once finished |
| `items` | object | no |  |
| `items.data` | array of object | yes |  |
| `items.data[].ordinal` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `items.data[].result` | object | yes |  |
| `items.next_cursor` | string or null | yes |  |
| `items.has_more` | boolean | yes |  |

## Examples

### running

Request:

```bash
curl 'https://api.seemly.com/v1/operations/opn_0123456789abcdefghjkmnpq' \
  -H "Authorization: Bearer $SEEMLY_API_KEY"
```

Response: `200`:

```json
{
  "id": "opn_0123456789abcdefghjkmnpq",
  "kind": "bulk_upsert_subscribers",
  "state": "running",
  "progress": {
    "total": 500,
    "done": 120,
    "counts": {
      "added_pending": 118,
      "invalid": 2
    }
  },
  "result": null,
  "problem": null,
  "created_at": "2026-02-01T10:00:00Z",
  "finished_at": null,
  "poll_after_seconds": 2
}
```

## 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 | [`plan_does_not_include`](/developers/md/errors/plan_does_not_include), [`api_suspended`](/developers/md/errors/api_suspended), [`consent_required`](/developers/md/errors/consent_required) |
| 404 | [`not_found`](/developers/md/errors/not_found) |
| 429 | [`rate_limited`](/developers/md/errors/rate_limited) |
| 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

- [`cancel_operation`](/developers/md/operations/cancel_operation)
- [`list_subscribers`](/developers/md/operations/list_subscribers)

## Related

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