> ## 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.

# Submit Questionnaire

> A `POST` to the `/questionnaires/{questionnaireId}/submissions` endpoint allows your application to submit answers for a questionnaire.



## OpenAPI

````yaml post /v3/questionnaires/{questionnaire}/submissions
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}/submissions:
    post:
      tags:
        - Questionnaire Submission
      summary: Submit Questionnaire
      description: >-
        A `POST` to the `/questionnaires/{questionnaireId}/submissions` endpoint
        allows your application to submit answers for a questionnaire.
      operationId: questionnaireSubmission.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/SubmitQuestionnaire'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      submission_id:
                        type: integer
                      questionnaire_id:
                        type: integer
                      submitted_count:
                        type: integer
                      answerable:
                        type: object
                        properties:
                          type:
                            type: string
                          id:
                            type: string
                        required:
                          - type
                          - id
                      context:
                        type:
                          - array
                          - 'null'
                        items: {}
                      submitted_at:
                        type: string
                      answers:
                        type: array
                        items:
                          $ref: '#/components/schemas/QuestionnaireAnswer'
                    required:
                      - submission_id
                      - questionnaire_id
                      - submitted_count
                      - answerable
                      - context
                      - submitted_at
                      - answers
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    SubmitQuestionnaire:
      type: object
      properties:
        profile_id:
          type: string
        context:
          type:
            - array
            - 'null'
          items:
            type: string
        answerable:
          type: object
          properties:
            type:
              type: string
              enum:
                - profile
                - product
                - transaction
                - reward
                - benefit
                - point
                - user
                - tenant
                - list
                - listItem
                - target
                - automation
                - trigger
                - aggregation
                - comms_attribute
                - appearance_attribute
                - webhook
                - identity
                - tier
                - address
                - location
                - product_variant
                - benefit_definition
                - reward_definition
                - tier_definition
                - transaction_item
                - order
                - redemption
                - tier_point
                - interaction
                - status
                - organisation
                - role_definition
                - credit_definition
                - credit
                - product_list_reservation
                - appointment_definition
                - appointment
                - question
                - questionnaire
                - questionnaire_answer
                - questionnaire_submission
                - rating
                - custom_attribute
                - connection
            id:
              type: string
          required:
            - type
            - id
        answers:
          type: array
          items:
            type: object
            properties:
              questionnaire_question_id:
                type: integer
              question_id:
                type: integer
              question_handle:
                type: string
              value:
                type: string
            required:
              - value
          minItems: 1
      required:
        - profile_id
        - answerable
        - answers
      title: SubmitQuestionnaire
    QuestionnaireAnswer:
      type: object
      properties:
        id:
          type: integer
        questionnaire_id:
          type: integer
        questionnaire_question_id:
          type: integer
        question_id:
          type: integer
        question_handle:
          type: string
        question_version_id:
          type: integer
        profile_id:
          type:
            - string
            - 'null'
        answerable_type:
          type:
            - string
            - 'null'
        answerable_id:
          type:
            - string
            - 'null'
        mapping_key:
          type: string
        link_type:
          type: string
        link_target:
          type:
            - string
            - 'null'
        link_write_policy:
          type:
            - string
            - 'null'
        question_label:
          type: string
        question_type:
          type: string
        question_required:
          type: boolean
        answer_type:
          type: string
        value:
          anyOf:
            - type: boolean
            - type: string
            - type: 'null'
            - type: array
              items: {}
        mappable_type:
          type:
            - string
            - 'null'
        mappable_id:
          type:
            - string
            - 'null'
        mapped_field:
          type:
            - string
            - 'null'
        mapping_status:
          type: string
        mapping_error:
          type:
            - string
            - 'null'
        mapped_at:
          type:
            - string
            - 'null'
        meta:
          type:
            - array
            - 'null'
          items: {}
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - questionnaire_id
        - questionnaire_question_id
        - question_id
        - question_version_id
        - profile_id
        - answerable_type
        - answerable_id
        - mapping_key
        - link_type
        - link_target
        - link_write_policy
        - question_label
        - question_type
        - question_required
        - answer_type
        - value
        - mappable_type
        - mappable_id
        - mapped_field
        - mapping_status
        - mapping_error
        - mapped_at
        - meta
        - created_at
        - updated_at
      title: QuestionnaireAnswer
  responses:
    AuthenticationException:
      description: Unauthenticated
      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

````