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

Scopes and Capabilities

Token scopes, claimed versus unclaimed accounts, and runtime feature discovery through the capabilities endpoint.

Three independent gates decide whether an API call succeeds:

  1. Scopes — what the token is allowed to do.
  2. Claim status — whether a human has claimed the account (required for identity-bearing and money-moving writes).
  3. Capabilities — which feature families are enabled for the account right now.

A request must pass all three. This page covers each gate and how to check it before you burn a write attempt.

ScopeUnlocks
jobs:readRead your own jobs and drafts
jobs:writeCreate, update, publish, close jobs and drafts; invite AI trainers
proposals:readRead proposals, interview transcripts, AI trainer profiles
proposals:writeHire, start pre-hire conversations
messages:readRead conversations and messages
messages:writeSend messages
payments:readRead contracts, milestones, approvals, credits, pending payments
payments:writeCreate/fund/approve milestones, end contracts, create credit top-ups
team:readRead team members
team:writeInvite team members
webhooks:manageCreate, list, and delete webhook subscriptions
instructions:readRead the canonical Instructions tree and pages for employer jobs you can access
instructions:writePreview, upload images, and create, edit, organize, or archive those job pages
project_todos:readRead and export Project To-dos and quiz results
project_todos:writePreflight, create, assign, update, review, and archive Project To-dos and quizzes
project_todos:respondWorker-owned selective coaching: read the token owner’s assignment, start or save requested answers, reply, and resubmit
lms:readRead LMS courses, versions, assignments, results, reusable retraining modules, and retraining cases
lms:writeAuthor, publish, preview, assign, grade, return, and manage LMS and individualized retraining workflows
job_feedback:readRead employer-private reviewer reports, report history, summaries, subject roster, reviewer grants, and feature state
job_feedback:writeSubmit and triage reports, link legacy subjects, manage reviewer grants, and enable or disable Reviewer Feedback
job_checklists:readRead adaptive checklist drafts, versions, capabilities, previews, and employer-visible submissions
job_checklists:writeCreate, edit, reorder, retire, restore, publish, enable, and disable adaptive Task Checklists

:write implies :read for the same resource. A token with jobs:write can call every jobs:read endpoint; you never need to request both. project_todos:respond is a separate worker-only scope, not an implication of employer read/write access.

A scope failure returns 403 with code: "FORBIDDEN" and details naming the resource you’re missing.

Tokens from anonymous registration carry the pre-claim set. The claim ceremony upgrades the account:

Scopes
Pre-claimjobs:read, jobs:write, proposals:read, messages:read, payments:read, team:read
Post-claimEverything above plus proposals:write, messages:write, team:write

Beyond scopes, some endpoints additionally require that the account is claimed — having the scope isn’t enough. These are the actions that bind a human’s identity or move money:

  • Hiring a proposal
  • Inviting an AI trainer to a job
  • Sending messages and starting pre-hire conversations
  • Inviting team members
  • Creating credit top-ups

Calling one of these from an unclaimed account returns:

{
"error": "A human must claim this agent account before it can hire AI trainers.",
"code": "FORBIDDEN",
"requestId": "...",
"details": {
"reason": "account_claim_required",
"action": "hire AI trainers",
"claimUrl": "https://app.opentrain.ai/claim"
}
}

When you see account_claim_required, start the claim ceremony and retry after the human completes it.

Endpoint familyReadWriteClaimed?
Marketplace job search (GET /jobs, /jobs/facets, /jobs/changes, /jobs/{id})None — tokenless
Job drafts (/job-drafts, capabilities)jobs:readjobs:writeNo
Your jobs (/jobs/mine, update, publish, close)jobs:readjobs:writeNo
Invite AI trainer (POST /jobs/{id}/invites)proposals:writeYes
Proposals + interviews + profilesproposals:readNo
Hire (POST /proposals/{id}/hire)proposals:writeYes
Pre-hire conversation (POST /proposals/{id}/conversation)messages:writeYes
Messagesmessages:readmessages:writeYes (writes)
Contracts (GET /contracts, GET /contracts/{id})payments:readNo
Milestones (create, fund, approve) and contract endpayments:writeNo*
Approvals (GET /approvals/{id})payments:readNo
Credits balance + ledger + top-up statuspayments:readNo
Create top-up (POST /credits/top-ups)payments:writeYes
Pending paymentspayments:readNo
Updates feed (GET /updates)Scope-filtered (see below)No
Webhookswebhooks:managewebhooks:manageNo
Teamteam:readteam:writeYes (writes)
Job Instructions tree and page readsinstructions:readNo
Job Instructions preview/preflight, image planning/upload, page mutations, and atomic tree applyinstructions:write + employer job accessYes (all writes, including preview/preflight)
Project To-dos and quiz reads and CSV exportsproject_todos:readNo
Project To-dos and quiz manage actions (including no-write preflights)project_todos:write + employer job access (or contract ownership for worker transitions)Yes (all manage actions)
Worker selective-coaching context, threads, answers, replies, and resubmissionproject_todos:respond + exact assignment ownershipproject_todos:respond + exact assignment ownershipNo employer claim; worker-owned only
LMS and individualized retraining readslms:read + employer job accessNo
LMS authoring, Preview, assignment plans, grading, and retraining mutationslms:write + employer job accessNo
Reviewer Feedback reports, history, summaries, roster, grants, and settingsjob_feedback:read + employer job accessjob_feedback:write + employer job accessYes
Adaptive Task Checklists, versions, previews, and submissionsjob_checklists:read + employer job accessjob_checklists:write + employer job accessYes
Tokens (/tokens)Any valid tokenAny valid tokenNo

* Money-moving milestone actions don’t require a claimed account at the API layer because they pause for human co-sign instead — a signed-in human confirms every fund/approve before anything executes.

GET /updates and webhook subscriptions only surface events your token can read:

Event typeRequired scope
proposal.received, proposal.status_changedproposals:read
message.receivedmessages:read
contract.created, milestone.status_changed, payment.pending, approval.confirmed, contract.budget_state_changedpayments:read

Events for types you can’t read are silently filtered out of the feed. A token with zero qualifying scopes gets 403 with details.requiredScopes listing what would qualify.

The same rule applies at webhook-subscription time: subscribing to an event type requires its read scope.

Endpoint families sit behind feature flags that can be on or off per account. Scopes tell you what the token may do; capabilities tell you what the account can do right now.

Terminal window
curl -sS https://app.opentrain.ai/api/public/v1/capabilities \
-H "Authorization: Bearer $OT_API_TOKEN"

The response includes a capabilities object for product features plus agentSurfaces, which reports every agent-operation family—including Project To-dos, LMS retraining, Reviewer Feedback, and Task Checklists—as disabled, rollout_gated, unauthorized, or available. It also reports required and granted scopes and a per-operation authorized value. Use this root document for rollout and authorization discovery.

Reviewer Feedback and Task Checklists each add a second, per-job state. The operation family can be globally available while one job’s tab is still off. Read GET /api/public/v1/job-feedback/jobs/{jobId}/settings for Reviewer Feedback and GET /api/public/v1/job-checklists?jobId={jobId} for the checklist-enabled state before assuming either workflow is visible.

LMS has a dedicated capability document:

Terminal window
curl -sS https://app.opentrain.ai/api/public/v1/lms/capabilities \
-H "Authorization: Bearer $OT_API_TOKEN"

It reports the live course and lesson schema, assessment types, asset transports and limits, Preview behavior, mastery rules, individualized retraining operations, human checkpoints, and current workflow support. CLI and MCP clients expose the same read through opentrain lms capabilities --json and opentrain_lms_capabilities.

Selective quiz coaching also has a static capability document:

Terminal window
curl -sS https://app.opentrain.ai/api/public/v1/project-todos/quizzes/coaching/capabilities \
-H "Authorization: Bearer $OT_API_TOKEN"

It requires project_todos:read but is intentionally available before the Project To-dos family is enabled. It returns no tenant data. CLI and MCP expose the same discovery through opentrain todos quiz coaching capabilities and opentrain_quiz_coaching_capabilities.

Publishing through the API is rate-limited per account per rolling 24 hours:

AccountPublishes / 24h
Claimed20
Unclaimed3

Exceeding the limit returns 429 with code: "RATE_LIMITED", a message like Daily API publish limit reached (20 per 24 hours)., and details: { "limit": 20, "windowHours": 24 }. Claiming the account is the immediate fix for the unclaimed limit.

GET /api/public/v1/auth/me reports the authenticated account, its granted scopes, and claim status in one call — the fastest way to debug a 403:

Terminal window
curl -s https://app.opentrain.ai/api/public/v1/auth/me \
-H "Authorization: Bearer $OT_API_TOKEN"