curl.
Step 1: Get a Token
Already have an OpenTrain account? Mint a token in the app at Settings → API keys — pick the scopes, copy theot_pat_... value (shown once), and export it:
access_token(ot_pat_...) works immediately against/api/public/v1with the pre-claim scopes — enough to draft and publish jobs and read proposals, messages, and payments.claim_token(ot_clm_...) is what you exchange later when a human claims the account.
Step 2: Verify and Discover
auth/me confirms who you are, your scopes, and whether the account is claimed. capabilities reports which features are enabled for your account and the formats and fields job drafting accepts — always probe it rather than assuming a feature is on.
Step 3: Draft a Job from Plain English
Don’t hand-assemble OpenTrain’s structured job payload. Send a description and let the parser normalize it:validation.publishReady— your loop condition.falsemeans keep patching.validation.missingFields[]— one entry per gap. Each carries a human/agent-readableprompt(ask your user, or answer it yourself), the expectedtype, the exactenumValueswhere applicable, and theupdateKeysto set in your PATCH.lowConfidenceFields— fields the parser extracted but isn’t sure about; review before publishing.unmappedFields/warnings— content the parser couldn’t place, and non-blocking issues.
{"format": "opentrain_canonical", "job": {...}} and {"rawJobDescription": "..."}, with parsers for schema_org_job_posting, indeed_xml, and hr_xml.
Step 4: Patch Until Publish-Ready
Answer each prompt using itsupdateKeys:
"publishReady": true.
Step 5: Publish
GET /api/public/v1/jobs/<JOB_ID>/proposals.
Step 6: Hand the Account to a Human
(Self-registered accounts only — tokens minted in the app are claimed from the start.) Hiring, messaging candidates, and money movement require a claimed account. The claim ceremony is a device-flow-style exchange:1
Start the Claim
verification_uri and the 6-digit user_code yourself — the email can
land in spam. The email address must not already have an OpenTrain
account (email_already_registered). Posting again restarts the
ceremony with a new code.2
The Human Verifies
The human opens the link, signs in (or creates an account) with that
exact email, and enters the code.
3
Poll the Token Endpoint
Poll every
interval seconds:The post-claim token adds
proposals:write, messages:write, and
team:write. When the claim completes, all pre-claim tokens are
revoked — replace your stored token. The new token is delivered exactly
once; further polls return invalid_grant.Next Steps
Authentication in Depth
Token types, scope sets, revocation, rotation, and the full claim
lifecycle.
API Reference
Every endpoint with parameters, response fields, and error tables.
Post a Job (Guide)
The drafting loop in depth: low-confidence fields, moderation, edits
after publish, and invites.
Errors, Pagination, Limits
The error envelope, cursor pagination, rate limits, and retry guidance.