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

# Open an exam

> Opens a draft exam so it accepts submissions. The exam needs at least one question, and every rubric must add up to its question's max marks. Opening an exam that is already open changes nothing.

**Scope:** `evaluation:write`



## OpenAPI

````yaml /api-reference/openapi.json post /exams/{examId}/open
openapi: 3.0.1
info:
  title: Evalezy AI Evaluation API
  version: v1
  description: >-
    Create exams, register candidates, submit scanned answer copies or typed
    answers, and read question-wise AI marks with feedback. Results are drafts
    until you finalize them.


    Server-to-server only: never ship an API key inside a browser or mobile app.
    English answers only for now (Hindi and regional languages are on the
    roadmap).
  contact:
    name: Evalezy
    email: hello@evalezy.com
    url: https://evalezy.com
servers:
  - url: https://api.evalezy.com/v1
    description: Production
security:
  - ApiKey: []
tags:
  - name: Exams
    description: Create, open, edit and look up exams.
  - name: Questions
    description: Add, edit and remove the questions of an exam.
  - name: Rubrics
    description: Marking criteria and model answers for long-answer questions.
  - name: Choice groups
    description: Internal choice ("attempt any N of M"). Beta, enabled on request.
  - name: Candidates
    description: >-
      Your students, keyed by your own external_id, and their exam
      registrations.
  - name: Uploads
    description: Presigned uploads for scanned answer copies (PDF).
  - name: Submissions
    description: Submit a copy or typed answers for a candidate and track its evaluation.
  - name: Results
    description: Question-wise marks, feedback and the checked (annotated) copy.
  - name: Review
    description: Teacher overrides, approval, finalize and unfinalize.
  - name: Credits
    description: Credit balance, rate card and price quotes.
  - name: Account
    description: Check which institute and scopes an API key has.
paths:
  /exams/{examId}/open:
    post:
      tags:
        - Exams
      summary: Open an exam
      description: >-
        Opens a draft exam so it accepts submissions. The exam needs at least
        one question, and every rubric must add up to its question's max marks.
        Opening an exam that is already open changes nothing.


        **Scope:** `evaluation:write`
      operationId: openExam
      parameters:
        - name: examId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Exam id (UUID).
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
            maxLength: 255
            example: exam-cbse-sci-10a-2026-10-14
          description: >-
            Optional. Any unique string of 1-255 printable ASCII characters (a
            UUID works). Retrying with the same key within 48 hours replays the
            first response with `Idempotent-Replayed: true`.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exam'
        '401':
          $ref: '#/components/responses/Error401'
        '403':
          $ref: '#/components/responses/Error403'
        '404':
          $ref: '#/components/responses/Error404'
        '409':
          $ref: '#/components/responses/Error409'
        '422':
          $ref: '#/components/responses/Error422'
        '429':
          $ref: '#/components/responses/Error429'
components:
  schemas:
    Exam:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
        mode:
          type: string
        title:
          type: string
        external_ref:
          type: string
        conducted_on:
          type: string
        subject:
          type: string
        level:
          type: string
        board:
          type: string
        answer_language:
          type: string
        feedback_language:
          type: string
        instructions:
          type: string
        blind:
          type: boolean
        total_marks:
          type: number
          format: double
        paper_max:
          type: number
          format: double
        question_count:
          type: integer
          format: int32
        dashboard_url:
          type: string
        questions:
          type: array
          items:
            $ref: '#/components/schemas/Question'
        choice_groups:
          type: array
          items:
            $ref: '#/components/schemas/ChoiceGroup'
        candidates:
          type: array
          items:
            type: object
            additionalProperties:
              type: object
        rubric:
          $ref: '#/components/schemas/RubricSummary'
        quote:
          type: object
          additionalProperties:
            type: object
        stats:
          type: object
          additionalProperties:
            type: object
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/Warning'
        opened_at:
          type: string
        finalized_at:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
        class:
          type: string
    Question:
      type: object
      properties:
        id:
          type: string
        label:
          type: string
        parent_label:
          type: string
        section:
          type: string
        type:
          type: string
        text:
          type: string
        max_marks:
          type: number
          format: double
        negative_marks:
          type: number
          format: double
        options:
          type: array
          items:
            $ref: '#/components/schemas/Option'
        correct_options:
          type: array
          items:
            type: string
        answer:
          type: object
        model_answer:
          type: string
        rubric:
          type: object
          additionalProperties:
            type: object
        word_limit:
          type: integer
          format: int32
        expects_diagram:
          type: boolean
        assess_language:
          type: boolean
        tags:
          type: object
          additionalProperties:
            type: object
        external_id:
          type: string
        rubric_version:
          type: integer
          format: int32
        rubric_sync:
          type: string
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/Warning'
    ChoiceGroup:
      type: object
      properties:
        id:
          type: string
        label:
          type: string
        question_labels:
          type: array
          items:
            type: string
        question_ids:
          type: array
          items:
            type: string
        attempt:
          type: integer
          format: int32
        policy:
          type: string
    RubricSummary:
      type: object
      properties:
        version:
          type: integer
          format: int32
        locked:
          type: boolean
        questions_with_rubric:
          type: integer
          format: int32
        questions_without_rubric:
          type: integer
          format: int32
        sync:
          type: string
        sync_error:
          type: object
          additionalProperties:
            type: object
    Warning:
      type: object
      description: >-
        A non-fatal note about the request, e.g. `auto_rubric` or
        `pages_beyond_vision_limit`.
      properties:
        code:
          type: string
        message:
          type: string
        field:
          type: string
          nullable: true
    Error:
      type: object
      description: >-
        Every error uses this envelope. Branch on `error.code`; the message is
        for humans.
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Stable machine code, e.g. `validation_failed`.
              example: validation_failed
            message:
              type: string
              description: Human-readable explanation.
              example: questions[1].max_marks must be a multiple of 0.5.
            request_id:
              type: string
              description: >-
                Quote this when you contact support (also sent as the
                X-Request-Id header).
            details:
              type: object
              description: >-
                Extra context. For `validation_failed`, `details.errors` lists
                every failing field.
              additionalProperties: true
    Option:
      type: object
      properties:
        label:
          type: string
        option_id:
          type: string
        text:
          type: string
  responses:
    Error401:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_api_key
              message: The API key is not valid.
              request_id: req_4f9c2a7e1b3d4c8a9e6f0b2d5a7c1e3f
    Error403:
      description: >-
        The key lacks the required scope, or the API is not enabled for the
        institute.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: insufficient_scope
              message: This API key lacks the evaluation:write scope.
              request_id: req_4f9c2a7e1b3d4c8a9e6f0b2d5a7c1e3f
              details:
                required_scope: evaluation:write
    Error404:
      description: Not found (ids of other institutes are also 404).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: not_found
              message: The resource was not found.
              request_id: req_4f9c2a7e1b3d4c8a9e6f0b2d5a7c1e3f
    Error409:
      description: Conflict with the current state.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: conflict
              message: The request conflicts with the current state.
              request_id: req_4f9c2a7e1b3d4c8a9e6f0b2d5a7c1e3f
    Error422:
      description: The request is valid JSON but breaks a rule.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: validation_failed
              message: questions[0].max_marks is required.
              request_id: req_4f9c2a7e1b3d4c8a9e6f0b2d5a7c1e3f
              details:
                errors:
                  - field: questions[0].max_marks
                    code: required
                    message: max_marks is required.
    Error429:
      description: Rate limit or daily quota reached. Retry after the Retry-After header.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: rate_limited
              message: Too many requests. Retry after 2 s.
              request_id: req_4f9c2a7e1b3d4c8a9e6f0b2d5a7c1e3f
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Your institute's API key, `vak_eval_` followed by 48 hex characters. An
        institute admin creates keys in the dashboard under Settings ->
        Integrations -> API keys.

````

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