Skip to main content
POST
Cancel a pending job
Cancel a PENDING job. Running or terminal jobs cannot be canceled. Only a pending job (not yet claimed by the worker) can be canceled; it transitions to canceled and stops being drained. A running or already-terminal (succeeded/failed/canceled) job returns 409 job_not_cancelable — cancellation never interrupts in-flight work. A job that is not in the caller’s visible set returns 404 job_not_found (a job owned by another member is a 404, not a 409 — admin keys act org-wide;).

Authorization

This route requires the write scope. A missing or invalid credential returns 401 authentication_error. A valid credential without the scope returns 403 permission_denied, and the problem body names the exact scope required.

Headers

These are request conventions the contract does not declare as parameters, so they do not appear in the schema tables below.

Success responses

Errors

Beyond the shared statuses, this route can answer with job_not_cancelable, job_not_found. Every problem body names its own code, and the type URI always resolves to the matching page. Every error is an RFC 9457 application/problem+json body carrying a stable code, a requestId, and a suggestedAction where Exo has one. See Errors.

Notes

  • Only a pending job can be cancelled. A job the worker has already claimed returns 409 job_not_cancelable. Cancellation never interrupts work in flight.
  • A job you cannot see returns 404, not 409. The visibility check runs before the state check.

Authorizations

X-Exo-API-Key
string
header
required

An Exo API key (exo_...) sent as the X-Exo-API-Key header.

Path Parameters

job_id
string
required

The job id (a UUID) returned by an ingest or import call.

Response

Successful Response

A pollable ingest/import/session job (spec 4.3).

status is one of pending | running | succeeded | failed | canceled (documented as a string, not a closed enum, so a future internal status never breaks a tolerant reader). error is the human failure reason, non-null only on failed. result is the server's interpretation of a finished job (nodes/edges/domains created), null until the worker reports it.

createdAt
string<date-time>
required
id
string
required
jobType
string
required
status
string
required
completedAt
string<date-time> | null
error
string | null
result
JobResult · object | null

The server's interpretation of a finished job: what it created.

Populated from the worker's result block in payload_inline once the job completes; any field the worker did not report stays null.