Skip to content

Mark a job done

POST
/jobs/{id}/complete

Marks a job you hold as done and stores result, if you send one.

Send the worker_id you claimed with. You get 409 if the job isn’t running under that worker_id, which also covers an unknown id and a job you’ve already completed, and 401 if worker_id is missing or empty. A lease that has run out still lets you complete the job until the server puts it back on the queue. Any signed-in account can make this call: worker_id is just the label stored with the claim, not proof that you made it.

The server records what you send; it doesn’t check that the work was done.

id
required
string format: uuid

The job’s id, from POST /jobs/claim.

object
worker_id
required

The worker_id you claimed the job with.

string
>= 1 characters <= 200 characters
result

Your output, as a JSON object. Leave it out to store none.

object
key
additional properties
any

The job is done.

Authentication required, missing, or invalid

object
error
required

Human-readable error summary

string
Example
the request could not be completed
Example
{
"error": "authentication required: sign in and retry with a valid session or API token"
}

The job isn’t running under this worker_id, or doesn’t exist.