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

# POST - Exam

> The POST /evaluation-platform/v1/exam endpoint allows you to create a new exam for a specific class, subject, and exam type. Once an exam is created successfully, it returns a unique examId and status. <br/>

 This API allows a teacher to create a new exam for a specific class, subject, and exam type. The newly created exam is initially empty and can be configured further by associating documents or additional metadata.

**Scenario: Creating a New Exam for a Class**

A teacher needs to set up a new exam for 'Class 10' in the subject 'Science' and exam type 'Pre Boards.'

- The teacher uses this API to create an empty exam by providing the required class, subject, and exam type.

**Response:**

- A unique `examId` (e.g., `d19e6868-98dd-4274-a2a5-4a616dd93ea7`) is returned.
- The `status` field indicates that the exam creation was successful. 

**Next Steps:**

- The teacher can use the `examId` in subsequent APIs to upload relevant documents or configure the exam further

<div
  style={{
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
borderRadius: '16px',
padding: '4px',
marginTop: '20px',
marginBottom: '20px',
boxShadow: '0 10px 40px rgba(102, 126, 234, 0.3)'
}}
>
  <iframe className="w-full aspect-video rounded-xl" src="https://www.youtube.com/embed/tUESowffLdU" title="Evaluation Platform | POST | Exam | API Reference Guide" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen />
</div>


## OpenAPI

````yaml POST /evaluation-platform/v1/exam/
openapi: 3.0.1
info:
  title: Evaluation Report API
  description: An API for retrieving evaluation reports.
  version: 1.0.0
servers:
  - url: https://api-staging.crazygoldfish.com
    description: SandBox endpoint
  - url: https://api.crazygoldfish.com
    description: Prod End Point
security: []
paths:
  /evaluation-platform/v1/exam/:
    post:
      summary: Create a new exam for a specific class, subject, and date.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                examName:
                  type: string
                  description: Name of the exam
                  example: Mid-Term Exam
                grade:
                  type: integer
                  description: Class for which the exam is intended
                  example: 10
                subject:
                  type: integer
                  description: Subject ID
                  example: 1
                examType:
                  type: integer
                  example: 1
                  description: Type of exam.
                examSet:
                  type: string
                  description: Set of the exam paper
                  example: A
                examDate:
                  type: string
                  format: date
                  description: >-
                    Date of the exam (should be in the format format -
                    'YYYY-MM-DD')
                  example: '2025-01-10'
                classSection:
                  type: string
                  description: Optional section of the class
                  example: A
              required:
                - examName
                - grade
                - subject
                - examType
                - examSet
                - examDate
      responses:
        '201':
          description: Exam created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  examId:
                    type: string
                    description: Unique identifier of the exam
                    example: 4340132f-50fa-4877-9ffa-e9b7ee59d51f
                  documents:
                    type: array
                    description: An empty array to attach further content.
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier of the document
                        status:
                          type: string
                          description: Status of the document
                        pageNo:
                          type: integer
                          description: Page number of the document
                        uploadTime:
                          type: string
                          description: Time of upload
                          format: date-time
                        url:
                          type: string
                          description: URL of the document
                        fileType:
                          type: integer
                          description: Type of the document
                    example: []
        '400':
          description: Invalid input provided.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: 400
                      message:
                        type: object
                        additionalProperties:
                          type: array
                          items:
                            type: string
                          example:
                            - This field is required.
                        example:
                          examSet:
                            - This field is required.
                          examDate:
                            - This field is required.
              example:
                error:
                  code: 400
                  message:
                    examSet:
                      - This field is required.
                    examDate:
                      - This field is required.
                    non_field_errors:
                      - 'Invalid value: 101. Must be one of [1].'
        '403':
          description: Authentication failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Token has expired
              example:
                detail: Token has expired
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````