Skip to main content
POST
/
api
/
v1
/
jobs
/
{jobId}
/
cancel
Cancel job
curl --request POST \
  --url https://pdfgorilla.io/api/v1/jobs/{jobId}/cancel \
  --header 'x-api-key: <api-key>'
{
  "jobId": "<string>",
  "status": "<string>",
  "canceled": true
}
Stops work on jobs that are still queued or processing. Jobs already finished cannot be uncanceled; create a new job instead.

Request

Path parameters

jobId
string
required
Job ID from generate-async.

Headers

x-api-key
string
required
Your API key or Authorization: Bearer.
No request body is required.

Response

HTTP 200

{
  "jobId": "cma1b2c3...",
  "status": "canceled",
  "canceled": true
}
jobId
string
The job that was addressed.
status
string
Current status after the cancel attempt (for example canceled).
canceled
boolean
true if the job was canceled. false if it had already reached a terminal state and could not be canceled.

Errors

StatusMeaning
401Auth failed
404Job not found after the cancel attempt

Example

curl -X POST https://pdfgorilla.io/api/v1/jobs/JOB_ID/cancel \
  -H "x-api-key: YOUR_API_KEY"
See current state anytime with Get job status.