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

Publish Job

Publish a draft job to the marketplace.

POST/api/public/v1/jobs/{id}/publish

Takes a publishReady draft live on the marketplace. The final step of the posting loop: creategap-fill → publish. Idempotent — publishing an already-open job returns 200 with alreadyPublished: true.

Every publish passes content moderation, and accounts have a daily publish limit (20/day claimed, 3/day unclaimed). A draft that is not publish-ready is rejected with the same validation detail the draft endpoints return — go back and patch the missing fields.

Requirements: jobs:write scope + the public_api_job_publishing feature (check capabilitiescapabilities.publish). Works pre-claim within the lower daily limit.

idstringpathrequired

The draft job ID.

No body.

okboolean

true on success.

jobIdstring

The job ID.

statusstring

OPEN — the job is live.

alreadyPublishedboolean

true when the job was already open (no-op).

jobUrlstring

Public listing URL.

publishAttemptIdstring | null

Internal attempt identifier for support/audit, when available.

warningsstring[]

Non-blocking warnings (e.g. fields worth improving).

sideEffectsobject

{dispatched, status} — whether post-publish side effects (distribution, notifications) were kicked off.

StatuscodeMeaning
400BAD_REQUESTDraft is not publish-ready — details.validation carries the same missingFields/issues shape as the draft endpoints
401UNAUTHORIZEDMissing or invalid token
403FORBIDDENMissing scope, feature disabled, or moderation block (details.reason: "moderation_blocked" with details.reasons[])
404NOT_FOUNDNo such job, or not yours
429RATE_LIMITEDDaily publish limit reached — details carries {limit, windowHours: 24}