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.
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: ...}.
object
Structured import source.
string
Top-level alternative to source.type — same supported values. Pair with job (canonical), jsonLd (schema.org), or xml (feeds).
object
OpenTrain canonical job object when format is opentrain_canonical — keys like title, description, paymentType, rateAmount, languages, countries, labelTypes, tools, experienceLevel.
string
Top-level equivalent of source.externalId.
string
Top-level equivalent of source.idempotencyKey.

Response

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

Errors