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

# Create or update a pre-screening position

> Creates a new pre-screening position (and optionally activates it) or, when update_position_def_set_id is provided, updates an existing pre-screening position. Only merchant_owner, merchant, or admin users may call this.



## OpenAPI

````yaml https://cool.jobmojito.com/functions/v1/openapi post /pre-screening-create
openapi: 3.1.0
info:
  title: JobMojito API
  version: 1.0.0
  description: >-
    Public API for JobMojito, served by Supabase Edge Functions. Authenticate
    with a Supabase JWT access token via the Authorization header.
servers:
  - url: https://cool.jobmojito.com/functions/v1
    description: Production
security: []
tags:
  - name: Interviews
    description: >-
      Create, configure and manage interview / coaching / assessment
      definitions.
  - name: Results
    description: >-
      Interview results, transcripts, reports, re-attempt requests and
      analytics.
  - name: Candidates
    description: List and manage candidates.
  - name: Knowledge base
    description: Upload documents used to generate knowledge-base interviews.
  - name: Resume & Form verification
    description: Pre-screen candidates from resumes and forms.
  - name: Admin
    description: >-
      Account administration — invite team/coaching users, manage sub-merchants
      and avatar templates.
paths:
  /pre-screening-create:
    post:
      tags:
        - Resume & Form verification
      summary: Create or update a pre-screening position
      description: >-
        Creates a new pre-screening position (and optionally activates it) or,
        when update_position_def_set_id is provided, updates an existing
        pre-screening position. Only merchant_owner, merchant, or admin users
        may call this.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreScreeningCreateRequest'
      responses:
        '200':
          description: The pre-screening position was created or updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreScreeningCreateResponse'
        '401':
          description: Missing, expired or invalid access token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Pre-screening step not found for the given position (update path).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation error or unresolved merchant_id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error (includes authorization failures).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    PreScreeningCreateRequest:
      type: object
      properties:
        update_position_def_set_id:
          type: string
          nullable: true
          description: >-
            When set to an existing position id, the request updates that
            pre-screening position instead of creating a new one. When
            absent/empty, a new pre-screening position is created and the
            create-only mandatory fields are required.
          example: 00000000-0000-0000-0000-000000000000
        position_name:
          type: string
          nullable: true
          description: >-
            Position name. Required when creating (no
            update_position_def_set_id).
          example: Customer Support Specialist
        position_location:
          type: string
          nullable: true
          description: Interview/position location. Required when creating.
          example: Remote
        position_country_code:
          type: string
          nullable: true
          description: ISO country code; stored upper-cased. Required when creating.
          example: US
        position_description:
          type: string
          nullable: true
          description: Short position description.
          example: Handle inbound customer requests.
        position_description_long:
          type: string
          nullable: true
          description: Long position description.
        mojito_language_code:
          type: string
          nullable: true
          enum:
            - ar
            - bg
            - zh
            - hr
            - cs
            - da
            - nl
            - en
            - fil
            - fi
            - fr
            - de
            - el
            - hi
            - hu
            - id
            - it
            - ja
            - ko
            - ms
            - 'no'
            - pl
            - pt
            - br
            - ro
            - ru
            - sk
            - es
            - sv
            - ta
            - th
            - tr
            - uk
            - vi
          description: >-
            Mojito language code (one of the platform-languages.json codes).
            Required when creating.
          example: en
        merchant_id:
          type: string
          nullable: true
          description: >-
            Target merchant id. Only honored for admin or sub-merchant users;
            otherwise the caller's own merchant is used.
        type:
          type: string
          nullable: true
          enum:
            - resume
            - form
            - resume_with_form
          description: Pre-screening type. Defaults to "resume" on create.
        status:
          type: string
          nullable: true
          enum:
            - draft
            - active
          description: >-
            When "active", the pre-screening position is activated after
            create/update.
        assessment_rules:
          nullable: true
          description: >-
            Assessment rules — an array of rule objects stored on the
            pre-screening definition.
          example:
            - id: form_nationality
              type: required
              action: mark_for_review
            - id: form_education
              type: required
              action: mark_for_review
              education: bachelors
            - id: resume_match
              resume_score_accept: 10
              resume_score_reject: 0
        form_fields:
          nullable: true
          description: >-
            Form fields definition (any JSON shape) stored on the pre-screening
            definition.
        candidate_expectations:
          type: string
          nullable: true
          description: Candidate expectations text.
        visibility:
          type: string
          nullable: true
          description: Position visibility. Defaults to "merchant_invite" on create.
        kombo_parameters:
          nullable: true
          description: Kombo integration parameters (any JSON).
          example:
            kombo_job_id: 7QzbCBaxX6fa4BMXBRuD7Lwm
            kombo_stage_id: CVjhZwxbtcer5P15gakmEhsM
            kombo_sync_all_results: true
            kombo_selected_stage_id: null
            kombo_sync_all_results_stage_id: 9c5VZXrcMRmyr5vr1nvZWXSX
        interview_available_till:
          type: string
          nullable: true
          description: Timestamp until which the interview is available.
        creation_parameters:
          nullable: true
          description: Creation parameters, any JSON (create only).
    PreScreeningCreateResponse:
      type: object
      properties:
        created:
          type: boolean
          description: True when a new pre-screening position was created.
        updated:
          type: boolean
          description: True when an existing pre-screening position was updated.
        position_def_set_id:
          type: string
          nullable: true
          description: The position_def_set id created or updated.
        interview_pre_screening_id:
          type: string
          nullable: true
          description: The pre-screening definition id created or updated.
      description: >-
        On create returns `{ created: true, position_def_set_id,
        interview_pre_screening_id }`; on update returns `{ updated: true,
        position_def_set_id, interview_pre_screening_id }`.
    Error:
      type: object
      properties:
        error:
          type: string
          example: Field is required.
        name:
          type: string
          example: interview_result_id
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Supabase JWT access token, passed as `Authorization: Bearer <token>`.'

````