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

# Draft criteria from a job description

> Revcenter's reading of a job description as criteria, the way the app drafts a search: review it, change what the person asks, then launch it as criteria. Launches nothing. The same reading the app's composer makes: titles and their closest synonyms, the role's own place and radius, years, and requirements as short terms, with the rest as scored context. `review.warnings` names anything to check before launching (a place wider than the role's own); `compiled_query` is the exact query the criteria will send. Pass `project_id` to check the place against the project's name too. Does not use credits.

Needs scope `searches:write`.



## OpenAPI

````yaml /openapi.json post /criteria/draft
openapi: 3.1.0
info:
  title: Revcenter API
  version: v1
  description: >-
    Projects, searches, scored candidates and shortlists. Generated from the
    agent API's registry.
servers:
  - url: https://api.revcenter.ai/v1
security:
  - bearer: []
tags:
  - name: Login
  - name: Account
  - name: Actions
  - name: Reference
  - name: Projects
  - name: Searches
  - name: Scoring
  - name: Shortlists
  - name: Candidates
  - name: Webhooks
  - name: Health
paths:
  /criteria/draft:
    post:
      tags:
        - Reference
      summary: Draft criteria from a job description
      description: >-
        Revcenter's reading of a job description as criteria, the way the app
        drafts a search: review it, change what the person asks, then launch it
        as criteria. Launches nothing. The same reading the app's composer
        makes: titles and their closest synonyms, the role's own place and
        radius, years, and requirements as short terms, with the rest as scored
        context. `review.warnings` names anything to check before launching (a
        place wider than the role's own); `compiled_query` is the exact query
        the criteria will send. Pass `project_id` to check the place against the
        project's name too. Does not use credits.


        Needs scope `searches:write`.
      operationId: draft_criteria
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jd_text
              properties:
                jd_text:
                  type: string
                  description: >-
                    The job description or the client's request, at least 40
                    characters.
                project_id:
                  type: string
                  description: 'Optional: the project the search is for.'
            example: {}
      responses:
        '200':
          description: OK
          headers:
            X-RateLimit-Limit:
              description: >-
                Requests allowed this minute (the tighter of the key's and the
                workspace's).
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests left this minute.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: When the minute resets, in Unix seconds.
              schema:
                type: integer
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      criteria:
                        $ref: '#/components/schemas/Criteria'
                      review:
                        $ref: '#/components/schemas/CriteriaReview'
                      compiled_query:
                        type: object
                  meta:
                    $ref: '#/components/schemas/Meta'
              example:
                data:
                  criteria:
                    title_variants:
                      - Plant Controller
                      - Controller
                    metro: Camden, NJ
                    geo_radius_mi: 40
                    years_experience:
                      min: 8
                      enforcement: hard
                    must_have:
                      - CPA
                  review:
                    changes: []
                    warnings: []
                  compiled_query:
                    titles:
                      - Plant Controller
                      - Controller
                    locations:
                      - Camden, NJ
                meta:
                  request_id: req_01JABCDEF
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '402':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/Error'
        '500':
          $ref: '#/components/responses/Error'
        '503':
          $ref: '#/components/responses/Error'
components:
  schemas:
    Criteria:
      type: object
      description: See the Criteria guide and GET /reference/criteria for every field.
      properties:
        title_variants:
          type: array
          items:
            type: string
        metro:
          type: string
        allowed_metros:
          type: array
          items:
            type: string
        remote_ok:
          type: boolean
        seniority:
          type: string
          enum:
            - c_suite
            - vp
            - director
            - manager
            - ic
        years_experience:
          type: object
          properties:
            min:
              type: number
            max:
              type: number
            enforcement:
              type: string
              enum:
                - hard
                - preferred
        current_industries:
          type: array
          items:
            type: string
        exclude_industries:
          type: array
          items:
            type: string
        functions:
          type: array
          items:
            type: string
        employers:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              temporal:
                type: string
                enum:
                  - current
                  - past
                  - either
              flag:
                type: string
                enum:
                  - must
                  - prefer
                  - exclude
        schools:
          type: array
          items:
            type: string
        must_have:
          type: array
          items:
            type: string
        skills:
          type: array
          items:
            type: string
        shortlist_min_score:
          type: integer
      additionalProperties: true
    CriteriaReview:
      type: object
      description: >-
        What Revcenter changed in criteria before running them, and what to
        check: the rules the app's composer applies.
      properties:
        changes:
          type: array
          items:
            type: string
          description: >-
            Corrections made, e.g. a requirement sentence moved from must_have
            to must_have_context.
        warnings:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                enum:
                  - location_wider_than_role
                  - location_nationwide
              message:
                type: string
          description: Not corrected; show them to the person before launching.
    Meta:
      type: object
      properties:
        request_id:
          type: string
        total:
          type: integer
          description: On lists that count everything that matched.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - request_id
          properties:
            code:
              type: string
              description: 'Stable: every code is on the Errors page.'
            message:
              type: string
            details:
              type:
                - object
                - 'null'
              description: >-
                Structured specifics, when there are any (for example
                retry_after_seconds).
            request_id:
              type: string
        meta:
          $ref: '#/components/schemas/Meta'
      example:
        error:
          code: search_not_found
          message: No search with that id in this workspace.
          details: null
          request_id: req_01JABCDEF
        meta:
          request_id: req_01JABCDEF
  responses:
    Error:
      description: 'An error: one envelope everywhere. A 429 carries Retry-After.'
      headers:
        X-RateLimit-Limit:
          description: >-
            Requests allowed this minute (the tighter of the key's and the
            workspace's).
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Requests left this minute.
          schema:
            type: integer
        X-RateLimit-Reset:
          description: When the minute resets, in Unix seconds.
          schema:
            type: integer
        Retry-After:
          description: Seconds to wait (on 429 and 503).
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: An API key from Settings → Usage → API (rvc_live_…).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.