> ## 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.

# Run pre-screening on a plaintext resume

> Stores a plaintext candidate resume, runs AI pre-screening against the position definition, records the result and returns the AI recommendation and analysis. If the candidate is not in the pre-screening candidate_action state, an early `{ decision_status, message }` object is returned with HTTP 200.



## OpenAPI

````yaml https://cool.jobmojito.com/functions/v1/openapi post /job-interview-pre-screening-api-resume-text
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:
  /job-interview-pre-screening-api-resume-text:
    post:
      tags:
        - Resume & Form verification
      summary: Run pre-screening on a plaintext resume
      description: >-
        Stores a plaintext candidate resume, runs AI pre-screening against the
        position definition, records the result and returns the AI
        recommendation and analysis. If the candidate is not in the
        pre-screening candidate_action state, an early `{ decision_status,
        message }` object is returned with HTTP 200.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreScreeningResumeTextRequest'
      responses:
        '200':
          description: >-
            Pre-screening completed, or an early `{ decision_status, message }`
            result when the candidate is not in the pre-screening
            candidate_action state.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/PreScreeningResumeTextResponse'
                  - $ref: '#/components/schemas/PreScreeningNotApplicable'
        '401':
          description: Missing or invalid authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Authenticated user is not a merchant user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Position not found or does not belong to this merchant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation error (missing required field or unresolved merchant_id).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    PreScreeningResumeTextRequest:
      type: object
      properties:
        position_id:
          type: string
          minLength: 1
          description: >-
            Position (position_def_set) id the candidate is being screened
            against.
          example: 00000000-0000-0000-0000-000000000000
        candidate_name:
          type: string
          minLength: 1
          description: Candidate full name.
          example: Jane Doe
        candidate_email:
          type: string
          minLength: 1
          description: Candidate email (normalised to trimmed lowercase).
          example: jane.doe@example.com
        candidate_country_code:
          type: string
          minLength: 1
          description: Candidate country code, used as default residency/nationality.
          example: US
        candidate_resume:
          type: string
          minLength: 1
          description: Plaintext candidate resume.
          example: Experienced software engineer with 8 years ...
        candidate_external_id:
          type: string
          description: Optional external identifier stored on the candidate profile.
          example: ATS-12345
        candidate_linkedin_url:
          type: string
          description: Optional LinkedIn profile URL stored on the candidate profile.
          example: https://www.linkedin.com/in/jane-doe
        form:
          type: object
          properties:
            education:
              type: string
              description: Highest education level key.
              example: masters_degree
            languages:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                    description: Language code.
                    example: en
                  level:
                    type: string
                    description: Proficiency level key.
                    example: c2
              description: Candidate language proficiencies.
            residency:
              type: string
              description: >-
                Country code of residency. Defaults to candidate_country_code
                when omitted.
              example: US
            nationality:
              type: string
              description: >-
                Country code of nationality. Defaults to candidate_country_code
                when omitted.
              example: US
            visa:
              type: string
              description: Visa status key.
              example: has_visa
            age:
              type: integer
              description: Candidate age in years.
              example: 30
            gender:
              type: string
              description: 'Candidate gender (free text; standard values: male, female).'
              example: male
          additionalProperties:
            nullable: true
          description: >-
            Optional structured pre-screening form used by the assessment rules.
            Custom fields (defined via form_fields) are also accepted.
      required:
        - position_id
        - candidate_name
        - candidate_email
        - candidate_country_code
        - candidate_resume
    PreScreeningResumeTextResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        decision_status:
          type: string
          description: Applied decision status for the pre-screening step.
          example: recruiter_action
        recommendation:
          type: string
          enum:
            - ai_accept
            - ai_reject
            - recruiter_action
          description: AI recommendation derived from the pre-screening status.
          example: recruiter_action
        profile_interview_id:
          type: string
          description: Candidate profile_interview id.
        interview_result_pre_screening_id:
          type: string
          description: Inserted interview_result_pre_screening id.
        interview_file_id:
          type: string
          description: Stored resume interview_file id.
        pre_screening_score:
          type: number
          nullable: true
          description: AI match score.
        resume_ai_analysis:
          type: string
          nullable: true
          description: AI resume analysis feedback.
        resume_ai_education:
          type: string
          nullable: true
          description: AI-detected education level of the candidate.
        resume_ai_technical_experience:
          type: number
          nullable: true
          description: AI-estimated years of relevant experience.
        resume_ai_is_switching_profession:
          type: boolean
          nullable: true
          description: Whether the candidate is switching profession.
        processing_reason:
          type: string
          nullable: true
          description: Reason the candidate failed screening, when applicable.
      required:
        - success
        - decision_status
        - recommendation
        - profile_interview_id
        - interview_result_pre_screening_id
        - interview_file_id
        - pre_screening_score
        - resume_ai_analysis
        - resume_ai_education
        - resume_ai_technical_experience
        - resume_ai_is_switching_profession
        - processing_reason
      description: >-
        Result of the pre-screening analysis. When the candidate is not in the
        pre-screening candidate_action state, a `{ decision_status, message }`
        object is returned instead.
    PreScreeningNotApplicable:
      type: object
      properties:
        decision_status:
          type: string
          example: unknown
        message:
          type: string
      required:
        - decision_status
        - message
    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>`.'

````