Skip to content
Support

Change a job's status

Owner, AdminLast checked 25 November 20262 min readArticle ID: developers-change-job-status
On this page

Send the status name to PATCH /jobs/{id}/status. Take valid names from /job-lookups.

Your app needs write:jobs (and read:jobs to look up the names). In the examples, $SKEDULER_API is your Skeduler API address. Contact Skeduler support if you don't have it. In the JavaScript and PHP tabs, the same names in capitals (SKEDULER_API, ACCESS_TOKEN and so on) are variables you set.

Who can do this: Owners and Admins with the Manage Developer Tools permission.

1. Find the status names

curl

curl -s "$SKEDULER_API/api/v1/job-lookups" -H "Authorization: Bearer $ACCESS_TOKEN"

job_statuses lists the organisation's active statuses in its own order. Archived ones are left out. Use the status's name, for example Completed.

2. Change the status

curl

curl -s -X PATCH "$SKEDULER_API/api/v1/jobs/$JOB_ID/status" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" -H "Content-Type: application/json" \
  -d '{"status":"Completed"}'

The answer is the updated job, with status showing the new name, for example Completed.

If it fails

  • 422 validation_failed: the name isn't one of the organisation's active statuses. Check the spelling against job_statuses.
  • 404 not_found: no such job in your organisation (an archived job looks the same).
  • 403 insufficient_scope: your app lacks write:jobs. See The API says insufficient_scope.

Statuses are the organisation's own, so names can differ between businesses. Look them up rather than hard-coding them.

In this section