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 Draft

Fill in or correct draft fields in response to validation prompts.

PATCH/api/public/v1/job-drafts/{jobId}

Patches any subset of fields on an unpublished draft and returns refreshed validation. This is the second half of the gap-filling loop: take each missing field’s updateKeys and enumValues from the create response, ask your human the prompt, and patch the answers. Repeat until validation.publishReady is true, then publish.

The accepted keys and enum values are machine-discoverable at GET /job-drafts/capabilities (draft.updateKeys and draft.enums).

Requirements: jobs:write scope + the public_api_job_drafting feature. The job must be an unpublished draft you own — to edit a live job use PATCH /jobs/{id}.

jobIdstringpathrequired

The draft job ID from the create response.

The body is a JSON object with one or more draft fields. Unknown keys are rejected (400 with zod issue details). Commonly patched keys:

jobTitlestringbody

Job title.

jobDescriptionstringbody

Full description text.

paymentTypestringbody

PAY_PER_LABEL, PAY_PER_HOUR, or FIXED_PRICE. Pair with the matching rate field below.

pricePerHournumberbody

Hourly rate in USD (for PAY_PER_HOUR).

pricePerLabelnumberbody

Per-label rate in USD (for PAY_PER_LABEL).

fixedPricenumberbody

Total fixed price in USD (for FIXED_PRICE).

experienceLevelstringbody

EXPERT, ENTRY_LEVEL, INTERMEDIATE, or ANY_EXPERIENCE_LEVEL.

dataVolumeUnitstringbody

HOURS_OF_RECORDING_AUDIO_VIDEO, NUMBER_OF_FILES, NUMBER_OF_WORDS, or UNKNOWN_NOT_SPECIFIED.

languagesstring[]body

Required languages.

countriesstring[]body

Allowed countries.

labelTypesstring[]body

Label/annotation types.

headcountnumberbody

Number of AI trainers to hire.

dataVolumenumberbody

Quantity of data, in dataVolumeUnit units.

The full key list also includes labelingOverview, datasetDescription, dataType, subjectMatter, labelingSoftware, aiInterviewRequirements, budgetRange, workloadDesc, timeRequirement, projectDuration, freelancerType, projectScope, visibility, and more — fetch draft.updateKeys from capabilities for the authoritative set. Enum fields must use the exact canonical values above.

okboolean

true on success.

jobIdstring

The draft job ID.

statusstring

Still DRAFT.

draftUrlstring

In-app URL of the draft editor.

validationobject

Refreshed validation — same shape as the create response: publishReady, issueCount, missingFieldCount, missingFields[] (with prompt/type/enumValues/updateKeys), issues[].

StatuscodeMeaning
400BAD_REQUESTEmpty body, invalid JSON, unknown keys or wrong types (details carries zod issues), or no fields set
401UNAUTHORIZEDMissing or invalid token
403FORBIDDENMissing jobs:write scope, feature disabled, or the job belongs to another account
404NOT_FOUNDNo such job