Skip to content

Cancel a running async operation

On this page
POST/v1/operations/{operation_id}/cancelcancel_operation
Riskwrite
AuthenticationAPI key or OAuth access token
Scopesnone (any valid credential)
Idempotencynatural: repeating the call gives the same result
Dry runnot applicable
Success status200
Response typeapplication/json

What it does#

  • Use when: You started a bulk call by mistake; items not yet applied are skipped.
  • Do not use when: it already finished (nothing changes) or you want to undo applied items.
  • Side effects: Skips pending items; Items already applied stay applied.
  • Reversible: No.
  • Required scope: none (any valid credential).
  • Idempotency: safe to repeat (same result).
  • Typical next step: call get_operation to see what was applied.

Side effects#

  • Skips pending items
  • Items already applied stay applied

Request#

Path parameters#

FieldTypeDescription
operation_idstring

Query parameters#

None.

Response#

FieldTypeRequiredDescription
idstringyes
kindstringyes
stateone of "queued", "running", "succeeded", "failed", "canceled"yes
progressobjectyes
progress.totalinteger, min -9007199254740991, max 9007199254740991yes
progress.doneinteger, min -9007199254740991, max 9007199254740991yes
progress.countsobjectyes
resultany or nullyes
problemany or nullyes
created_atstring (date-time)yes
finished_atstring (date-time) or nullyes
poll_after_secondsinteger, min -9007199254740991, max 9007199254740991 or nullyesSuggested wait before asking again; null once finished

Examples#

canceled#

Request:

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

Response: 200:

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

Errors#

Every error is an application/problem+json body with a code, a fix sentence and next_actions. See reading a problem response.

Typical next steps#

View this page as MarkdownReport a problem with this page

Type to search. Try a method and path, an operation name or an error code.