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

# Create Question

> Create a question in your org's private question bank.

The question is stamped with `organization_id` (the calling org) and no
`user_id` — org-owned content survives individual tutor turnover. It then
appears in the default `GET /v1/questions` union for this org (and in the
in-app Question Bank's "Org Bank" scope), but never in the shared catalogue.
Honours `Idempotency-Key`. Requires `coursework:write` (the coarse `write`
umbrella grants it).



## OpenAPI

````yaml /openapi.json post /v1/questions
openapi: 3.1.0
info:
  title: ClassQuill Public API
  description: >-
    REST API for ClassQuill tutoring organisations. Pipe your sessions,
    invoices, payments, tutor earnings, students, and more into your own tools.
    Most endpoints are reads; a focused set of writes (each gated by a *:write
    scope) create or update data, including creating student/tutor/parent
    accounts.


    Authenticate every request with an org API key:

        Authorization: Token token=cq_live_...

    Mint keys in the ClassQuill app under Settings → Developers.
  version: 1.0.0
servers: []
security:
  - ApiKeyAuth: []
tags:
  - name: General
  - name: Sessions
  - name: Tutors
  - name: Students & Parents
  - name: Billing
  - name: Curriculum
  - name: Coursework
  - name: Operations
  - name: Pricing
  - name: Bookings
  - name: Blog
  - name: Reports
paths:
  /v1/questions:
    post:
      tags:
        - Coursework
      summary: Create Question
      description: >-
        Create a question in your org's private question bank.


        The question is stamped with `organization_id` (the calling org) and no

        `user_id` — org-owned content survives individual tutor turnover. It
        then

        appears in the default `GET /v1/questions` union for this org (and in
        the

        in-app Question Bank's "Org Bank" scope), but never in the shared
        catalogue.

        Honours `Idempotency-Key`. Requires `coursework:write` (the coarse
        `write`

        umbrella grants it).
      operationId: create_question_v1_questions_post
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Idempotency-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuestionCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Question'
        '401':
          description: Missing, malformed, revoked, or expired credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: The credential lacks the scope this endpoint requires.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: Validation error — `error.details.errors` lists the fields.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: >-
            Rate limit exceeded — honour Retry-After and the RateLimit-*
            headers.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    QuestionCreate:
      properties:
        intro_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Intro Text
        topic:
          anyOf:
            - type: string
            - type: 'null'
          title: Topic
          description: math_level_id, e.g. 'methods_34'
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        parts:
          items:
            $ref: '#/components/schemas/QuestionPartCreate'
          type: array
          minItems: 1
          title: Parts
      additionalProperties: false
      type: object
      required:
        - parts
      title: QuestionCreate
      description: >-
        POST /v1/questions → questions_v2 (+ question_parts). Creates a question
        in

        the key's org private bank: organization_id is server-set to the key's
        org,

        user_id is NULL (org-owned), and `source` stays NULL (never a platform

        label). At least one part is required.
    Question:
      properties:
        id:
          type: string
          title: Id
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        topic:
          anyOf:
            - type: string
            - type: 'null'
          title: Topic
        tags:
          items:
            type: string
          type: array
          title: Tags
          default: []
        intro_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Intro Text
        is_official_vce:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Official Vce
        is_current_study_design:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Current Study Design
        question_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Question Number
        total_marks:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Marks
        owned_by_org:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Owned By Org
        author_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Author Id
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
      type: object
      required:
        - id
      title: Question
    ApiError:
      description: Canonical error envelope for every /v1 error response (4xx/5xx).
      properties:
        error:
          $ref: '#/components/schemas/ApiErrorBody'
      required:
        - error
      title: ApiError
      type: object
    QuestionPartCreate:
      properties:
        content:
          type: string
          minLength: 1
          title: Content
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        position:
          anyOf:
            - type: integer
            - type: 'null'
          title: Position
        marks:
          anyOf:
            - type: integer
            - type: 'null'
          title: Marks
        difficulty:
          anyOf:
            - type: string
              enum:
                - Easy
                - Medium
                - Hard
            - type: 'null'
          title: Difficulty
        answer:
          anyOf:
            - type: string
            - type: 'null'
          title: Answer
        solution:
          anyOf:
            - type: string
            - type: 'null'
          title: Solution
        is_multi_choice:
          type: boolean
          title: Is Multi Choice
          default: false
        mcq_options:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Mcq Options
        curriculum_level_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Curriculum Level Id
      additionalProperties: false
      type: object
      required:
        - content
      title: QuestionPartCreate
      description: >-
        One part of a question created via POST /v1/questions. `difficulty` is

        validated here (Literal) so an invalid value 422s at the API boundary
        rather

        than being silently dropped by the create pipeline (the question_parts

        difficulty CHECK is the DB backstop). `content` is required.
    ApiErrorBody:
      description: The `error` object every /v1 error response carries.
      properties:
        code:
          description: >-
            Stable machine-readable error code: bad_request, unauthorized,
            forbidden, not_found, conflict, validation_error, rate_limited, or
            internal_error.
          examples:
            - not_found
          title: Code
          type: string
        message:
          description: Human-readable explanation, safe to surface to end users.
          examples:
            - Session not found
          title: Message
          type: string
        status:
          description: The HTTP status code, repeated in the body.
          examples:
            - 404
          title: Status
          type: integer
        details:
          additionalProperties: true
          description: >-
            Error-specific context. 422 carries the field errors under `errors`;
            429 carries `retry_after_seconds`.
          title: Details
          type: object
      required:
        - code
        - message
        - status
      title: ApiErrorBody
      type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Org API key as `Token token=cq_live_...`

````

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