Skip to content
OpenTrain AIOpenTrain AIOpenTrain AIDocs

Ask OpenTrain

Answers from the documentation, with sources.

What would you like to do with OpenTrain?

AI answers can be mistaken. Check the linked sources. Don’t include private account information.

Open app

DEVELOPER DOCUMENTATION

Update Job

Edit a live (published) job. Edits are re-moderated.

PATCH/api/public/v1/jobs/{id}

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.

idstringpathrequired

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.

okboolean

true on success.

jobIdstring

The job ID.

statusstring

OPEN — the job stayed live.

moderationobject

{decision: "ALLOW", reasons: []} when the edit passed moderation.

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"}