FleetDeckDocs

API reference / Jobs

Request job cancellation

Queued jobs become cancelled immediately.

DELETE/api/v1/jobs/{jobId}

Authorization

Bearer tokenjobs:write; same key that created the job

Send Authorization: Bearer <FLEETDECK_API_KEY> with the scope above. The key must also grant access to the target device. Authentication guide ↗

Request example
Request · cURL
curl --request DELETE \
  --url 'https://fleetdeck.co/api/v1/jobs/job_123' \
  --header "Authorization: Bearer $FLEETDECK_API_KEY"

Replace example IDs with returned values. Read credentials from your private environment.

Response examples
200 · success
{
  "cancelled": true
}

Path parameters

jobIdstringrequired

Job ID returned by Schedule a job or List jobs, owned by the current key.

min 1 charactersmax 128 characters
Example: "job_123"
Validation pattern^[A-Za-z0-9._:-]+$

Request body

This endpoint does not require a request body.

Behavior and limits

Queued jobs become cancelled immediately. Running jobs set cancelRequested, revoke their child token and close child sessions; the worker must stop the process on its next heartbeat. Returns cancelled:true as acknowledgement, not proof that all physical effects stopped or were reversed. No request body.

Response 200

Cancelled · application/json

cancelledbooleanalways present

True when the cancellation request has been acknowledged.

Allowed:true

Errors

Expand a code for its recovery steps. Responses use error and code; validation errors also include issues.

401UNAUTHORIZEDMissing, malformed, expired or revoked credential; user verification/password state can also deny access.

Recovery: Use Authorization: Bearer with a valid scoped key. For dashboard routes, sign in. Job children require an active parent job and timely renewal.

Full error reference ↗
403FORBIDDENRequired scope, device grant, account membership or worker identity is missing.

Recovery: Check the endpoint’s scopes, exact device, owning key and workerId. A different key cannot access the original key’s sessions or jobs.

Full error reference ↗
404NOT_FOUNDUnknown route or resource unavailable to this caller.

Recovery: Check method/path and use returned IDs from this account/key. Do not guess IDs.

Full error reference ↗
500INTERNALUnexpected service error.

Recovery: Save nonsecret request context and time for support. Query action status before repeating a mutation; never assume it did not execute.

Full error reference ↗

Example error messages are illustrative. Match the code and HTTP status; do not depend on exact message wording.