Skip to main content
GET
/
api
/
public
/
v1
/
job-drafts
/
capabilities
curl -sS https://app.opentrain.ai/api/public/v1/job-drafts/capabilities \
  -H "Authorization: Bearer $OT_API_TOKEN"
{
  "featureKey": "public_api_job_drafting",
  "namespace": "job-drafts",
  "rolloutMode": "ALL",
  "actorIsAdmin": false,
  "capabilities": {
    "draftImport": true,
    "draftCreate": true,
    "draftUpdate": true,
    "draftUrlRead": true,
    "publish": true,
    "hiring": true,
    "messagingWrites": true,
    "team": true,
    "paymentsWrite": true,
    "credits": true,
    "webhooks": true
  },
  "draft": {
    "importFormats": [
      "text",
      "opentrain_canonical",
      "schema_org_job_posting",
      "indeed_xml",
      "hr_xml"
    ],
    "updateKeys": [
      "jobTitle",
      "jobDescription",
      "labelingOverview",
      "datasetDescription",
      "dataType",
      "subjectMatter",
      "dataVolume",
      "dataVolumeUnit",
      "labelingSoftware",
      "headcount",
      "experienceLevel",
      "paymentType",
      "pricePerHour",
      "pricePerLabel",
      "fixedPrice",
      "countries",
      "languages",
      "labelTypes",
      "..."
    ],
    "enums": {
      "paymentType": ["PAY_PER_LABEL", "PAY_PER_HOUR", "FIXED_PRICE"],
      "experienceLevel": ["EXPERT", "ENTRY_LEVEL", "INTERMEDIATE", "ANY_EXPERIENCE_LEVEL"],
      "dataVolumeUnit": [
        "HOURS_OF_RECORDING_AUDIO_VIDEO",
        "NUMBER_OF_FILES",
        "NUMBER_OF_WORDS",
        "UNKNOWN_NOT_SPECIFIED"
      ]
    }
  },
  "authBootstrap": "token",
  "enabled": true
}
Runtime feature discovery: which Public API features are enabled for this account, plus the accepted draft import formats, the full list of patchable draft keys, and the canonical enum values. Features are rolled out per account, so probe this endpoint before planning a multi-step flow — and re-check it when a write returns a feature-disabled 403. Requirements: any valid token — no specific scope. (An in-app session also works.) The public_api_job_drafting feature itself must be enabled for the account, otherwise 403.

Request

No parameters.

Response

featureKey
string
Always public_api_job_drafting.
namespace
string
Always job-drafts.
rolloutMode
string
How the drafting feature is rolled out for this account (e.g. ALL, ALLOWLIST).
actorIsAdmin
boolean
Whether the account is a platform admin.
capabilities
object
Per-feature booleans for this account. Any false here means the matching endpoints return 403 until the feature is enabled.
draft
object
Machine-readable drafting contract.
authBootstrap
string
token when authenticated by bearer token, session when by in-app session.
enabled
boolean
Always true on a 200 (a disabled drafting feature returns 403 instead).

Errors

StatuscodeMeaning
401UNAUTHORIZEDMissing, invalid, expired, or revoked token (and no session)
403FORBIDDENpublic_api_job_drafting not enabled for this account (details.featureKey, details.mode)
curl -sS https://app.opentrain.ai/api/public/v1/job-drafts/capabilities \
  -H "Authorization: Bearer $OT_API_TOKEN"
{
  "featureKey": "public_api_job_drafting",
  "namespace": "job-drafts",
  "rolloutMode": "ALL",
  "actorIsAdmin": false,
  "capabilities": {
    "draftImport": true,
    "draftCreate": true,
    "draftUpdate": true,
    "draftUrlRead": true,
    "publish": true,
    "hiring": true,
    "messagingWrites": true,
    "team": true,
    "paymentsWrite": true,
    "credits": true,
    "webhooks": true
  },
  "draft": {
    "importFormats": [
      "text",
      "opentrain_canonical",
      "schema_org_job_posting",
      "indeed_xml",
      "hr_xml"
    ],
    "updateKeys": [
      "jobTitle",
      "jobDescription",
      "labelingOverview",
      "datasetDescription",
      "dataType",
      "subjectMatter",
      "dataVolume",
      "dataVolumeUnit",
      "labelingSoftware",
      "headcount",
      "experienceLevel",
      "paymentType",
      "pricePerHour",
      "pricePerLabel",
      "fixedPrice",
      "countries",
      "languages",
      "labelTypes",
      "..."
    ],
    "enums": {
      "paymentType": ["PAY_PER_LABEL", "PAY_PER_HOUR", "FIXED_PRICE"],
      "experienceLevel": ["EXPERT", "ENTRY_LEVEL", "INTERMEDIATE", "ANY_EXPERIENCE_LEVEL"],
      "dataVolumeUnit": [
        "HOURS_OF_RECORDING_AUDIO_VIDEO",
        "NUMBER_OF_FILES",
        "NUMBER_OF_WORDS",
        "UNKNOWN_NOT_SPECIFIED"
      ]
    }
  },
  "authBootstrap": "token",
  "enabled": true
}