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

# Create Assessment



## OpenAPI

````yaml POST /assessments
openapi: 3.1.0
info:
  title: Edpire API
  description: >
    Edpire is a headless assessment engine. This API lets you manage
    assessments,

    submit answers for grading, retrieve results, manage collections, and
    configure

    webhooks for real-time notifications.


    All responses use a consistent envelope: `{ data, error, meta }`.
  version: 1.0.0
  contact:
    name: Edpire Support
    url: https://edpire.com
  license:
    name: Proprietary
servers:
  - url: https://edpire.com/api/v1
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Assessments
    description: Create, list, update, publish, and grade assessments
  - name: Submissions
    description: Retrieve submission details
  - name: Learners
    description: Query learner results
  - name: Collections
    description: Manage ordered groups of assessments
  - name: Webhooks
    description: Register and manage webhook endpoints
  - name: Embed
    description: Mint tokens and load assessments for browser-side rendering
  - name: OpenAPI
    description: API specification
paths:
  /assessments:
    post:
      tags:
        - Assessments
      summary: Create an assessment
      operationId: createAssessment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAssessmentRequest'
      responses:
        '201':
          description: Assessment created
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Envelope'
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          status:
                            type: string
                            example: draft
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      security:
        - BearerAuth:
            - write:assessments
components:
  schemas:
    CreateAssessmentRequest:
      type: object
      required:
        - title
      properties:
        title:
          type: string
          minLength: 1
          maxLength: 200
        description:
          type: string
          maxLength: 2000
        type:
          type: string
          enum:
            - quiz
            - exam
            - practice
          default: quiz
        settings:
          type: object
          properties:
            time_limit_minutes:
              type: integer
              minimum: 1
            passing_score_percent:
              type: number
              minimum: 0
              maximum: 100
            allowed_attempts:
              type: integer
              minimum: 0
            shuffle_exercises:
              type: boolean
            show_solutions:
              type: string
              enum:
                - never
                - after_due
                - immediate
        exercises:
          type: array
          minItems: 1
          items:
            type: object
            required:
              - questions
            properties:
              shared_context:
                type: object
                nullable: true
              questions:
                type: array
                minItems: 1
                items:
                  type: object
                  required:
                    - content_ast
                    - answer_keys
                  properties:
                    content_ast:
                      type: object
                    answer_keys:
                      type: array
                      items:
                        type: object
                    points:
                      type: number
                      minimum: 0
                      default: 1
    Envelope:
      type: object
      properties:
        data: {}
        error:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ErrorObject'
        meta:
          oneOf:
            - type: 'null'
            - type: object
    ErrorObject:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ErrorResponse:
      type: object
      properties:
        data:
          type: 'null'
        error:
          $ref: '#/components/schemas/ErrorObject'
        meta:
          type: 'null'
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing or invalid authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Missing required scope
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >
        API key starting with `edp_live_`. Pass via `Authorization: Bearer
        edp_live_xxx`.


        Scopes: `read:assessments`, `write:assessments`, `read:results`,
        `write:submissions`.

````