Skip to main content
POST
/
api
/
public
/
v1
/
jobs
/
{id}
/
close
curl -sS -X POST https://app.opentrain.ai/api/public/v1/jobs/<JOB_ID>/close \
  -H "Authorization: Bearer $OT_API_TOKEN"
{
  "ok": true,
  "jobId": "<JOB_ID>",
  "status": "ARCHIVED",
  "alreadyClosed": false
}
Closes a job — it leaves the public marketplace and stops accepting proposals. Existing contracts on the job are unaffected (end those separately via POST /contracts/{id}/end). Idempotent: closing an already-closed job returns 200 with alreadyClosed: true. Requirements: jobs:write scope + the public_api_job_publishing feature. The job must be yours.

Request

id
string
required
The job ID.
No body.

Response

ok
boolean
true on success.
jobId
string
The job ID.
status
string
ARCHIVED.
alreadyClosed
boolean
true when the job was already closed (no-op).

Errors

StatuscodeMeaning
401UNAUTHORIZEDMissing or invalid token
403FORBIDDENMissing jobs:write scope or feature disabled
404NOT_FOUNDNo such job, or not yours
curl -sS -X POST https://app.opentrain.ai/api/public/v1/jobs/<JOB_ID>/close \
  -H "Authorization: Bearer $OT_API_TOKEN"
{
  "ok": true,
  "jobId": "<JOB_ID>",
  "status": "ARCHIVED",
  "alreadyClosed": false
}