Cancel Enrichment
Enrichment
Cancel Enrichment
Best-effort cancellation for queued or running Enrichment work.
POST
Cancel Enrichment
CLI:
Overview
Marks an in-flight Enrichment ascancelled and stops pending items from being picked up. Items already executing continue to completion — cancellation is best-effort, not a hard kill.
Returns { run: { id, status: "cancelled", cancelledAt } } on success.
Allowed states
Onlypending and running work can be cancelled. Anything else returns 409 with a reason discriminator:
run_not_cancellable— the Enrichment is alreadycompleted,failed, orcancelled.run_status_changed— status changed between read and write (e.g. completed while you were cancelling). Re-check status with Enrichment status.
AI agent notes
Side effects:
- The execution row is updated with
status: "cancelled",cancelled_at, andcompleted_atset to the same timestamp. - All
pendingitems are bulk-updated tostatus: "skipped"withskipped_reason: "run_cancelled". - Items already
runningare left alone; they complete or fail naturally.
404: the Enrichment does not exist for the effective user.On 409: check the reason discriminator. If run_status_changed, re-fetch with Enrichment status — the Enrichment may already have finished.A second call after success returns 409 with run_not_cancellable; treat that as idempotent success.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Minimum string length:
1Response
Enrichment cancelled.
Minimal Enrichment Run projection returned by the cancel endpoint.