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

# Add Questionnaire Question

> A `POST` to the `/questionnaires/{questionnaireId}/questions` endpoint allows your application to assign a question to a questionnaire.

Returns the FULL parent Questionnaire (same shape as POST /questionnaires)
so the client can refresh its view of every page/slot in one round-trip.



## OpenAPI

````yaml post /v3/questionnaires/{questionnaire}/questions
openapi: 3.1.0
info:
  title: Omneo
  version: 0.0.1
servers:
  - url: https://api.{tenant}.getomneo.com/api
    variables:
      tenant:
        default: example
security: []
paths:
  /v3/questionnaires/{questionnaire}/questions:
    post:
      tags:
        - Questionnaire Question
      summary: Add Questionnaire Question
      description: >-
        A `POST` to the `/questionnaires/{questionnaireId}/questions` endpoint
        allows your application to assign a question to a questionnaire.


        Returns the FULL parent Questionnaire (same shape as POST
        /questionnaires)

        so the client can refresh its view of every page/slot in one round-trip.
      operationId: questionnaires.questions.store
      parameters:
        - name: questionnaire
          in: path
          required: true
          description: The questionnaire ID
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreQuestionnaireQuestion'
      responses:
        '201':
          description: '`Questionnaire`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Questionnaire'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    StoreQuestionnaireQuestion:
      type: object
      properties:
        question_id:
          type: integer
        question_version_id:
          type:
            - integer
            - 'null'
        questionnaire_page_id:
          type:
            - integer
            - 'null'
        mapping_key:
          type: string
          pattern: ^[a-z0-9_]+$
          maxLength: 255
        sort_order:
          type: integer
          minimum: 0
        is_required:
          type: boolean
        visibility_condition:
          type:
            - array
            - 'null'
          items:
            type: string
        is_active:
          type: boolean
      required:
        - question_id
        - mapping_key
      title: StoreQuestionnaireQuestion
    Questionnaire:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        handle:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        questionnaireable_type:
          type:
            - string
            - 'null'
        questionnaireable_id:
          type:
            - string
            - 'null'
        profile_id:
          type:
            - string
            - 'null'
        purpose:
          type: string
        is_active:
          type: boolean
        meta:
          type:
            - array
            - 'null'
          items: {}
        pages:
          type: array
          items:
            $ref: '#/components/schemas/QuestionnairePage'
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - name
        - handle
        - description
        - questionnaireable_type
        - questionnaireable_id
        - profile_id
        - purpose
        - is_active
        - meta
        - created_at
        - updated_at
      title: Questionnaire
    QuestionnairePage:
      type: object
      properties:
        id:
          type: integer
        questionnaire_version_id:
          type: integer
        sort_order:
          type: integer
        title:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        section_header:
          type:
            - string
            - 'null'
        questions:
          type: array
          items:
            $ref: '#/components/schemas/QuestionnaireQuestion'
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - questionnaire_version_id
        - sort_order
        - title
        - description
        - image_url
        - section_header
        - created_at
        - updated_at
      title: QuestionnairePage
    QuestionnaireQuestion:
      type: object
      properties:
        id:
          type: integer
        questionnaire_question_id:
          type: integer
        questionnaire_id:
          type: string
        questionnaire_page_id:
          type:
            - integer
            - 'null'
        question_id:
          type: integer
        question_version_id:
          type: integer
        mapping_key:
          type: string
        sort_order:
          type: integer
        is_required:
          type: boolean
        visibility_condition:
          type:
            - array
            - 'null'
          items: {}
        visibility_dependencies:
          type: array
          items: {}
        is_active:
          type: boolean
        question:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            handle:
              type: string
            name:
              type: string
            link_type:
              type: string
            link_target:
              type: string
            link_write_policy:
              type: string
          required:
            - id
            - handle
            - name
            - link_type
            - link_target
            - link_write_policy
        version:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            version:
              type: string
            label:
              type: string
            description:
              type: string
            help_text:
              type: string
            icon:
              type: string
            image_url:
              type: string
            type:
              type: string
            options:
              type: string
            validation:
              type: string
            default_value:
              type: string
          required:
            - id
            - version
            - label
            - description
            - help_text
            - icon
            - image_url
            - type
            - options
            - validation
            - default_value
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - questionnaire_question_id
        - questionnaire_id
        - questionnaire_page_id
        - question_id
        - question_version_id
        - mapping_key
        - sort_order
        - is_required
        - visibility_condition
        - visibility_dependencies
        - is_active
        - question
        - version
        - created_at
        - updated_at
      title: QuestionnaireQuestion
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors

````