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

# Adds a new question to an existing questionnaire.



## OpenAPI

````yaml https://raw.githubusercontent.com/FooBarBizarre/docs/refs/heads/main/api-reference/openapi.json post /questionnaires/{id}/questions
openapi: 3.0.1
info:
  title: Maia Backend API
  version: v1
servers: []
security: []
paths:
  /questionnaires/{id}/questions:
    post:
      tags:
        - Questionnaire
      summary: Adds a new question to an existing questionnaire.
      parameters:
        - name: id
          in: path
          description: The unique identifier of the questionnaire.
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: The question data including position, type, prompt, and metadata.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateQuestion'
          text/json:
            schema:
              $ref: '#/components/schemas/CreateQuestion'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreateQuestion'
      responses:
        '200':
          description: OK
        '204':
          description: Question added successfully.
components:
  schemas:
    CreateQuestion:
      type: object
      properties:
        position:
          type: integer
          format: int32
        prompt:
          type: string
          nullable: true
        type:
          type: string
          nullable: true
        metadata:
          type: string
          nullable: true
      additionalProperties: false

````