Skip to main content
POST
Creates an unpublished job draft. The description-first workflow: send a plain-text job description, OpenTrain parses it into structured fields server-side, and the response tells you exactly what is still missing — each missing field carries a ready-to-ask prompt, its type, allowed enumValues, and the updateKeys to patch via PATCH /job-drafts/{jobId}. Loop until validation.publishReady is true, then publish. Structured imports (schema.org JSON-LD, Indeed-style XML, HR-XML, or OpenTrain’s canonical job object) are also accepted. See the posting guide for the full loop. Requirements: jobs:write scope + the public_api_job_drafting feature (check capabilities).

Request

Send one of the body shapes below. All are JSON objects.
rawJobDescription
string
Plain-text job description or project brief (max 60,000 characters). The simplest and recommended input — OpenTrain parses it into structured fields. Equivalent shorthand for source: {type: "text", text: ...}.
source
object
Structured import source.
format
string
Top-level alternative to source.type — same supported values. Pair with job (canonical), jsonLd (schema.org), or xml (feeds).
job
object
OpenTrain canonical job object when format is opentrain_canonical — keys like title, description, paymentType, rateAmount, languages, countries, labelTypes, tools, experienceLevel.
externalId
string
Top-level equivalent of source.externalId.
idempotencyKey
string
Top-level equivalent of source.idempotencyKey.

Response

ok
boolean
true on success.
jobId
string
The new draft’s job ID — use it for every subsequent PATCH and the publish call.
status
string
Always DRAFT (this endpoint never auto-publishes).
draftUrl
string
In-app URL of the draft editor.
reviewUrl
string
In-app URL where a human can review the draft.
validation
object
Publish-readiness summary.
missingFields
object[]
The gap-filling work list. Relay each prompt to your human, then patch the answer.
normalizedFields
object
The structured fields OpenTrain extracted from your input.
warnings
string[]
Non-blocking warnings.
unmappedFields
object[]
Input keys that could not be mapped — {path, reason, valuePreview}.
lowConfidenceFields
object[]
Parsed fields worth double-checking with your human — {path, reason}.
import
object
Audit echo: {format, externalId, idempotencyKey, rawSourcePreserved, autoPublished: false}.
parser
object
Parser metadata: {source, warnings, parsedFields}.

Errors