Skip to content
API v1 · 1.0.0-draft.1
Go to console
Contents ↓

API reference / Documents

POST

Cancel a document

POST /v1/documents/{document_id}/cancel

Cancel a document that is not finished

Parameters

document_idstringpathrequired
Idempotency-Keystringheaderoptional
Unique string (UUID recommended), kept 24 hours per API key. Same key + same body returns the stored response with Idempotent-Replayed: true. Same key + different body returns 422 idempotency_conflict. Same key while the first request is still running returns 409 idempotency_in_progress. (draft-ietf-httpapi-idempotency-key-header-08)

Possible errors

403forbiddenThis key isn't allowed to do this.
404not_foundNot found.
409invalid_stateThis action isn't possible in the current state.
409idempotency_in_progressThe same request is still in progress; retry shortly.
409result_not_readyThe result isn't ready yet.
Last updated: 23 Nov 2026