> ## Documentation Index
> Fetch the complete documentation index at: https://opentrain.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Drafting Capabilities

> Discover supported job fields, enums, and feature availability for the authenticated account.

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

<ResponseField name="featureKey" type="string">
  Always `public_api_job_drafting`.
</ResponseField>

<ResponseField name="namespace" type="string">
  Always `job-drafts`.
</ResponseField>

<ResponseField name="rolloutMode" type="string">
  How the drafting feature is rolled out for this account (e.g. `ALL`, `ALLOWLIST`).
</ResponseField>

<ResponseField name="actorIsAdmin" type="boolean">
  Whether the account is a platform admin.
</ResponseField>

<ResponseField name="capabilities" type="object">
  Per-feature booleans for this account. Any `false` here means the matching endpoints return `403` until the feature is enabled.

  <Expandable title="capabilities fields">
    <ResponseField name="draftImport" type="boolean">
      Structured imports via [`POST /job-drafts`](/docs/developers/api-reference/job-drafts/create).
    </ResponseField>

    <ResponseField name="draftCreate" type="boolean">
      Draft creation.
    </ResponseField>

    <ResponseField name="draftUpdate" type="boolean">
      Draft patching via [`PATCH /job-drafts/{jobId}`](/docs/developers/api-reference/job-drafts/update).
    </ResponseField>

    <ResponseField name="draftUrlRead" type="boolean">
      Draft/review URL reads.
    </ResponseField>

    <ResponseField name="publish" type="boolean">
      [Publishing](/docs/developers/api-reference/jobs/publish), [closing](/docs/developers/api-reference/jobs/close), and [editing live jobs](/docs/developers/api-reference/jobs/update) (`public_api_job_publishing`).
    </ResponseField>

    <ResponseField name="hiring" type="boolean">
      [Hiring](/docs/developers/api-reference/proposals/hire) and [inviting](/docs/developers/api-reference/jobs/invite) (`public_api_hiring`).
    </ResponseField>

    <ResponseField name="messagingWrites" type="boolean">
      [Sending messages](/docs/developers/api-reference/messages/send) (`public_api_messaging_writes`).
    </ResponseField>

    <ResponseField name="team" type="boolean">
      [Team invites](/docs/developers/api-reference/team/invite) (`public_api_team`).
    </ResponseField>

    <ResponseField name="paymentsWrite" type="boolean">
      [Milestone funding/approval](/docs/developers/api-reference/milestones/fund) (`public_api_payments_write`).
    </ResponseField>

    <ResponseField name="credits" type="boolean">
      [Credits endpoints](/docs/developers/api-reference/credits/balance) (`public_api_credits`).
    </ResponseField>

    <ResponseField name="webhooks" type="boolean">
      [Webhook subscriptions](/docs/developers/api-reference/webhooks/create) (`public_api_webhooks`).
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="draft" type="object">
  Machine-readable drafting contract.

  <Expandable title="draft fields">
    <ResponseField name="importFormats" type="string[]">
      Accepted import formats: `text`, `opentrain_canonical`, `schema_org_job_posting`, `indeed_xml`, `hr_xml`.
    </ResponseField>

    <ResponseField name="updateKeys" type="string[]">
      Every key accepted by [`PATCH /job-drafts/{jobId}`](/docs/developers/api-reference/job-drafts/update) — \~50 keys including `jobTitle`, `jobDescription`, `paymentType`, `pricePerHour`, `pricePerLabel`, `fixedPrice`, `experienceLevel`, `languages`, `countries`, `headcount`.
    </ResponseField>

    <ResponseField name="enums" type="object">
      Canonical enum values: `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`).
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="authBootstrap" type="string">
  `token` when authenticated by bearer token, `session` when by in-app session.
</ResponseField>

<ResponseField name="enabled" type="boolean">
  Always `true` on a `200` (a disabled drafting feature returns `403` instead).
</ResponseField>

## Errors

| Status | `code`         | Meaning                                                                                       |
| ------ | -------------- | --------------------------------------------------------------------------------------------- |
| `401`  | `UNAUTHORIZED` | Missing, invalid, expired, or revoked token (and no session)                                  |
| `403`  | `FORBIDDEN`    | `public_api_job_drafting` not enabled for this account (`details.featureKey`, `details.mode`) |

<RequestExample>
  ```bash curl theme={null}
  curl -sS https://app.opentrain.ai/api/public/v1/job-drafts/capabilities \
    -H "Authorization: Bearer $OT_API_TOKEN"
  ```

  ```json MCP: opentrain_capabilities theme={null}
  {}
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "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
  }
  ```

  ```json 403 theme={null}
  {
    "error": "Public API feature not enabled for actor",
    "code": "FORBIDDEN",
    "requestId": "<REQUEST_ID>",
    "details": {
      "featureKey": "public_api_job_drafting",
      "mode": "OFF"
    }
  }
  ```
</ResponseExample>
