> ## 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 an interview from an array of questions

> Creates a new interview definition set from a caller-provided array of questions, builds its default and generated steps, optionally activates it, and optionally creates an embed key.



## OpenAPI

````yaml https://cool.jobmojito.com/functions/v1/openapi post /job-interview-create-from-array
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-create-from-array:
    post:
      tags:
        - Interviews
      summary: Create an interview from an array of questions
      description: >-
        Creates a new interview definition set from a caller-provided array of
        questions, builds its default and generated steps, optionally activates
        it, and optionally creates an embed key.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobInterviewCreateFromArrayRequest'
      responses:
        '200':
          description: Interview created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobInterviewCreateFromArrayResponse'
        '401':
          description: Missing, expired or invalid access token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: >-
            Server error (includes authorization failures and unresolved
            template/knowledge-base/language ids).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    JobInterviewCreateFromArrayRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          description: Interview/position name.
          example: Project manager
        location:
          type: string
          minLength: 1
          description: Interview location.
          example: remote
        interview_template_id:
          type: string
          minLength: 1
          description: >-
            Id of the interview template to use. Must reference an existing
            interview_templates row.
          example: 46b98d37-1557-4391-beca-03037ead19f2
        mojito_language_code:
          type: string
          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: >-
            Platform language code (one of the platform-languages.json codes);
            must also resolve to a supported language with an Azure speech
            mapping.
          example: en
        description:
          type: string
          minLength: 1
          description: Short interview description.
          example: Project manager role
        status:
          type: string
          enum:
            - draft
            - active
          description: >-
            Lifecycle status of the interview. Options — `draft`: Created but
            not published — not visible to candidates and cannot be run yet. Use
            to stage an interview before going live. | `active`: Published and
            live — candidates can run it..
          example: active
        type:
          type: string
          enum:
            - interview
            - coaching
            - assessment
          description: >-
            Product type of the interview. Options — `interview`: Standard
            candidate interview for a role — answers are AI-scored and produce a
            hiring recommendation. | `coaching`: Practice/coaching session —
            candidate-facing feedback to help them improve; not a hiring
            evaluation. Only available on the coaching portal, NOT the interview
            portal. | `assessment`: Skills/knowledge assessment — evaluates
            competencies and is scored like an interview..
          example: interview
        visibility:
          type: string
          enum:
            - merchant_public
            - merchant_invite
            - merchant_unlisted
          description: >-
            Who can discover and access the interview. Options —
            `merchant_public`: Listed on the merchant's public interview list —
            anyone with the merchant link can find and start it. |
            `merchant_invite`: Invite-only — only candidates explicitly invited
            (by email/link) can access it; not listed anywhere. |
            `merchant_unlisted`: Reachable only via a direct link — not listed
            anywhere; share the link manually..
          example: merchant_public
        questions:
          type: array
          items:
            $ref: '#/components/schemas/JobInterviewCreateFromArrayQuestion'
          minItems: 1
          description: Ordered list of interview questions to create as steps.
        recording:
          type: string
          nullable: true
          enum:
            - audio_first_5_answers
            - audio_all
            - video_all
            - video_first_5_answers
          description: >-
            Cheating/proctoring detection mode for candidate answers — this is
            NOT a full session recording. Video options also record the
            candidate. Omit/null to disable. Options — `audio_first_5_answers`:
            Audio-only cheating detection, first 5 answers only. | `audio_all`:
            Audio-only cheating detection on every answer. | `video_all`: Audio
            + video cheating detection on every answer (candidate is recorded
            for all answers). | `video_first_5_answers`: Audio + video cheating
            detection, first 5 answers only..
          example: video_all
        recording_full_session:
          type: string
          nullable: true
          enum:
            - audio_all
            - video_all
          description: >-
            Full interview-session recording (includes the avatar and voice)
            produced as a single file. Independent of `recording`. Omit/null to
            disable. Options — `audio_all`: Record the whole session audio
            (avatar + candidate voice) into a single file. Adds +0.2 credits. |
            `video_all`: Record the whole session video + audio (avatar +
            candidate) into a single file. Adds +0.4 credits..
          example: video_all
        interview_type:
          type: string
          nullable: true
          enum:
            - pre-screening
            - pre-screening-with-test-questions
            - second-interview
            - remote-freelancer-verification
            - strength-based-interview
            - potential-based-interview
            - process-verification-from-knowledge-base
          description: >-
            Interview style — configures the AI avatar and the follow-up
            questions it generates during the interview. The base `questions`
            you supply are used as-is and are NOT affected by this setting.
            Options — `pre-screening`: Pre-screening — quick qualification check
            focusing on basic requirements and availability. |
            `pre-screening-with-test-questions`: Pre-screening with test
            questions — pre-screening plus practical questions to test relevant
            skills. | `second-interview`: Second round interview — deeper dive
            for candidates who passed initial screening. |
            `remote-freelancer-verification`: Remote worker verification —
            verify remote work capabilities and communication skills. |
            `strength-based-interview`: Strength-based interview — focus on what
            candidates enjoy and excel at to predict job satisfaction. |
            `potential-based-interview`: Potential-based interview — assess
            learning ability and growth potential rather than past experience. |
            `process-verification-from-knowledge-base`: Knowledge Base interview
            — generate questions from your knowledge base documents..
          example: pre-screening-with-test-questions
        seniority_level:
          type: string
          nullable: true
          enum:
            - entry-level
            - intermediate
            - senior
            - managerial
            - director
            - executive
          description: >-
            Target seniority level for the role; auto-detected from the job
            description when omitted. Options — `entry-level`: Early-career or
            graduate roles. | `intermediate`: Some experience required. |
            `senior`: Experienced professional. | `managerial`: Team or
            department lead. | `director`: Director-level responsibility. |
            `executive`: C-suite or executive role..
          example: senior
        result_view:
          type: string
          nullable: true
          enum:
            - none
            - minimal
            - minimal_with_score
            - advanced
            - full
            - full_expand_scores
          description: >-
            Result screen shown to the candidate after finishing. With any value
            other than `none`, the candidate sees a results screen where they
            can provide feedback, record an intro video and edit the transcript,
            and must then submit the result; the value sets how much
            score/result detail is shown. Options — `none`: No results screen at
            all — the interview is submitted immediately when the candidate
            finishes (no feedback, intro video, transcript edit or manual submit
            step). | `minimal`: Minimal results layout, no score shown. |
            `minimal_with_score`: Minimal results layout including the overall
            score. | `advanced`: Advanced results layout with more detail. |
            `full`: Full results layout with all sections. |
            `full_expand_scores`: Full results with every score breakdown
            expanded..
          example: full
        candidate_video_introduction:
          type: string
          nullable: true
          enum:
            - optional
            - required
          description: Whether a candidate video introduction is optional or required.
        interview_tone:
          type: string
          nullable: true
          description: >-
            Tone — configures the AI avatar's speaking style and the follow-up
            questions it generates; the base `questions` you supply are not
            affected. Omit to default to relaxed. Suggested values — `relaxed`:
            Friendly and conversational tone that helps candidates feel at ease.
            | `simple`: Plain language at CEFR A2 level — short sentences and
            simple words. | `professional`: Formal and business-like approach
            suitable for senior roles. | `persuasive`: Engaging style that
            encourages candidates to elaborate.. Case-insensitive; other strings
            are accepted but unknown tones fall back to the default.
          example: professional
        interview_attempts:
          type: number
          nullable: true
          description: Allowed attempts, 1-20.
          example: 1
        questions_random_subset:
          type: number
          nullable: true
          description: Fraction of questions to randomly ask, between 0.01 and 0.9.
        code:
          type: string
          nullable: true
          description: Optional external code/reference.
        cover_image_url:
          type: string
          nullable: true
          description: Cover image URL.
        knowledge_base_store_id:
          type: string
          nullable: true
          description: Optional knowledge base store id; validated for existence.
        merchant_id:
          type: string
          nullable: true
          description: Target merchant id (admins / sub-merchant only).
        description_long:
          type: string
          nullable: true
          description: Long-form interview description.
        candidate_expectations:
          type: string
          nullable: true
          description: Free-text candidate expectations.
        candidate_expectations_json:
          type: object
          nullable: true
          additionalProperties:
            nullable: true
          description: >-
            Pre-generated candidate expectations object; auto-generated when
            omitted for type=interview.
        custom_scoring:
          type: object
          nullable: true
          additionalProperties:
            nullable: true
          description: Custom scoring overrides merged with defaults.
        additional_context:
          type: object
          nullable: true
          additionalProperties:
            nullable: true
          description: Extra context forwarded to expectation generation.
        instructional_video:
          type: boolean
          nullable: true
          description: Enable an instructional video before approval.
        instructional_video_custom_text:
          type: string
          nullable: true
          description: Custom text for the instructional video.
        disable_deduplication:
          type: boolean
          nullable: true
          description: When true, skip step deduplication on insert.
        welcome_message:
          type: string
          nullable: true
          description: Custom welcome message.
        thank_you_message:
          type: string
          nullable: true
          description: Custom thank-you message.
        is_embedded:
          type: boolean
          nullable: true
          description: >-
            Set true when the interview will be embedded as an iframe on an
            external page. Creates an embed key and returns
            embed_id/embed_signing_key, used to authenticate/sign the iframe
            embed.
      required:
        - name
        - location
        - interview_template_id
        - mojito_language_code
        - description
        - status
        - type
        - visibility
        - questions
    JobInterviewCreateFromArrayResponse:
      type: object
      properties:
        interview_def_set_id:
          type: string
          description: Id of the newly created interview definition set.
        embed_id:
          type: string
          description: Embed id, present only when is_embedded=true.
        embed_signing_key:
          type: string
          description: Embed signing key, present only when is_embedded=true.
      required:
        - interview_def_set_id
      description: >-
        The created interview definition set id, plus embed credentials when
        is_embedded=true.
    Error:
      type: object
      properties:
        error:
          type: string
          example: Field is required.
        name:
          type: string
          example: interview_result_id
      required:
        - error
    JobInterviewCreateFromArrayQuestion:
      type: object
      properties:
        question:
          type: string
          description: The question text shown to the candidate.
        id:
          type: string
          description: >-
            Caller-local identifier for this question. Only needed when another
            question references it via conditional_question_main_id (the mapping
            is resolved within this array).
        duration:
          type: number
          nullable: true
          description: Answer duration in seconds for this question.
        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: >-
            Per-question language override (one of the platform-languages.json
            codes). Inherits the interview language when omitted.
          example: en
        label:
          type: string
          nullable: true
          description: Optional label/tag stored on the question.
        is_conditional:
          type: boolean
          nullable: true
          description: >-
            Conditional follow-up question (view 'with listening conditional').
            Use with conditional_question_main_id.
        is_without_scoring:
          type: boolean
          nullable: true
          description: Question is asked but not scored (view 'without scoring').
        is_candidate_asking_recruiter:
          type: boolean
          nullable: true
          description: Candidate-asks-recruiter prompt (view 'candidate asking recruiter').
        is_expert:
          type: boolean
          nullable: true
          description: Expert listening question (view 'with listening expert').
        is_multiple_choice:
          type: boolean
          nullable: true
          description: Multiple-choice question (view 'multiple choice').
        question_alternatives:
          type: array
          nullable: true
          items:
            type: string
          description: Alternative phrasings for the question.
        conditional_question_main_id:
          type: string
          nullable: true
          description: >-
            For a conditional question, the id (the local "id" field above) of
            the parent question in this same array that triggers it.
        knowledge_base_id:
          type: string
          nullable: true
          description: Knowledge-base store id (uuid) the question draws context from.
        external_id:
          type: string
          nullable: true
          description: External identifier stored on the question.
        external_data:
          type: object
          nullable: true
          additionalProperties:
            nullable: true
          description: Arbitrary JSON metadata stored on the question.
        candidate_expectations_json:
          type: object
          nullable: true
          additionalProperties:
            nullable: true
          description: Per-question candidate expectations object.
      required:
        - question
      additionalProperties:
        nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Supabase JWT access token, passed as `Authorization: Bearer <token>`.'

````