Skip to main content
DELETE
/
jobs
/
{job_id}
Cancel Job
curl --request DELETE \
  --url https://trio.machinefi.com/api/jobs/{job_id} \
  --header 'Authorization: Bearer <token>'
{
  "job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "pending",
  "message": "<string>",
  "final_stats": {}
}
Stops a running job and returns its final state snapshot. Use cancellation when conditions or stream context change and the current run is no longer useful.

Common Uses

  • Stop stale jobs after client disconnects.
  • Enforce custom business-time windows.
  • Abort runs that are spending budget without value.

Workflow

  1. Find active jobs with List Jobs.
  2. Confirm details with Get Job Details.
  3. Issue DELETE /jobs/{job_id}.

Notes

  • Cancellation ends future monitoring activity for that job.
  • Use Get Job Details after canceling if you need to verify terminal state in a separate call.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

job_id
string<uuid>
required

Response

Successful Response

Response for canceling a job.

job_id
string<uuid>
required
status
enum<string>
required

Job status enum.

Available options:
pending,
running,
stopped,
completed,
failed
message
string
required
final_stats
Final Stats · object