Skip to main content
PATCH
/
api
/
public
/
v1
/
jobs
/
{id}
curl -sS -X PATCH https://app.opentrain.ai/api/public/v1/jobs/<JOB_ID> \
  -H "Authorization: Bearer $OT_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "headcount": 8,
    "pricePerHour": 14
  }'
{
  "ok": true,
  "jobId": "<JOB_ID>",
  "status": "OPEN",
  "moderation": {
    "decision": "ALLOW",
    "reasons": []
  }
}
Patches a published, open job — same field keys and types as PATCH /job-drafts/{jobId} (the authoritative key list is draft.updateKeys in capabilities). For unpublished drafts use the draft endpoint instead; this one requires the job to be OPEN. Every edit to a live job is re-moderated. If moderation rejects the edited content, the update is still applied but the job is unpublished back to DRAFT — fix the flagged content and publish again. Requirements: jobs:write scope + the public_api_job_publishing feature. The job must be yours and OPEN.

Request

id
string
required
The published job’s ID.
Body: a JSON object with one or more job fields — identical schema to the draft update endpoint. Unknown keys → 400 with zod issue details.

Response

ok
boolean
true on success.
jobId
string
The job ID.
status
string
OPEN — the job stayed live.
moderation
object
{decision: "ALLOW", reasons: []} when the edit passed moderation.

Errors

StatuscodeMeaning
400BAD_REQUESTEmpty body, invalid JSON, unknown keys, or wrong types (details carries zod issues)
401UNAUTHORIZEDMissing or invalid token
403FORBIDDENMissing jobs:write scope or feature disabled
404NOT_FOUNDNo such job, or not yours
409CONFLICTJob is not OPENdetails: {jobId, status, requiredStatus: "OPEN"}; for DRAFT jobs the message points you to PATCH /job-drafts/{jobId}
409CONFLICTModeration rejected the edit — the update was applied but the job was unpublished to DRAFT; details: {jobId, reason: "moderation_blocked", reasons: [...], status: "DRAFT"}
curl -sS -X PATCH https://app.opentrain.ai/api/public/v1/jobs/<JOB_ID> \
  -H "Authorization: Bearer $OT_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "headcount": 8,
    "pricePerHour": 14
  }'
{
  "ok": true,
  "jobId": "<JOB_ID>",
  "status": "OPEN",
  "moderation": {
    "decision": "ALLOW",
    "reasons": []
  }
}