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

# Submit a response to a question

> This endpoint allows you to submit a response to a question.



## OpenAPI

````yaml /api-reference/openapi.documented.json post /api/loyalty/questions_responses
openapi: 3.0.2
info:
  title: Snag Solutions - API Docs
  description: >-
    Documentation for Loyalty & Socials APIs. Some endpoints require an API key
    to authenticate. To obtain a key, reach out to the Snag Solutions team at
    support@snagsolutions.io.
  version: '0.1'
servers:
  - url: https://admin.snagsolutions.io/
    description: Production
security: []
paths:
  /api/loyalty/questions_responses:
    post:
      tags:
        - Question
      summary: Submit a response to a question
      description: This endpoint allows you to submit a response to a question.
      parameters: []
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              type: object
              properties:
                loyaltyQuestionChoiceId:
                  type: string
                  format: uuid
                  title: Question Choice ID
                  description: UUID of the selected choice
                  example: 123e4567-e89b-12d3-a456-426614174001
                websiteId:
                  type: string
                  format: uuid
                  title: Website ID
                  description: UUID of the website to filter responses
                  example: 123e4567-e89b-12d3-a456-426614174001
                organizationId:
                  type: string
                  format: uuid
                  title: Organization ID
                  description: UUID of the organization to filter responses
                  example: 123e4567-e89b-12d3-a456-426614174001
                userId:
                  type: string
                  format: uuid
                  title: User ID
                  description: UUID of the user who submitted the response
                  example: 123e4567-e89b-12d3-a456-426614174003
              required:
                - loyaltyQuestionChoiceId
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        title: Response ID
                        description: UUID of the response
                        example: 123e4567-e89b-12d3-a456-426614174002
                      userId:
                        type: string
                        format: uuid
                        title: User ID
                        description: UUID of the user who submitted the response
                        example: 123e4567-e89b-12d3-a456-426614174003
                      loyaltyQuestionId:
                        type: string
                        format: uuid
                        title: Question ID
                        description: UUID of the question being answered
                        example: 123e4567-e89b-12d3-a456-426614174004
                      loyaltyQuestionChoiceId:
                        type: string
                        format: uuid
                        title: Choice ID
                        description: UUID of the selected choice
                        example: 123e4567-e89b-12d3-a456-426614174005
                    required:
                      - id
                      - userId
                      - loyaltyQuestionId
                      - loyaltyQuestionChoiceId
                  isCorrect:
                    type: boolean
                    title: Is Correct
                    description: Whether the submitted answer was correct
                    example: true
                  alreadySubmitted:
                    type: boolean
                    title: Already Submitted
                    description: >-
                      Whether the user had already submitted an answer to this
                      question
                    example: false
                required:
                  - response
                  - isCorrect
                  - alreadySubmitted
                title: Question Response Result
                description: Response returned when submitting an answer to a question
        '401':
          description: '401'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '403':
          description: '403'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    title: Message
                    description: Error message
                    example: Forbidden, Could not validate api key
                required:
                  - message
                title: Forbidden Response
                description: Schema for forbidden response
                example: Forbidden, Could not validate api key
        '404':
          description: '404'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '500':
          description: '500'
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    title: Success
                    description: Indicates operation success
                    example: false
                  message:
                    type: string
                    title: Message
                    description: Error message
                    example: Internal server error
                  debugInfo:
                    type: string
                    title: Debug Info
                    description: Optional debug information
                    example: Stack trace or additional error details
                required:
                  - success
                  - message
                title: Internal Server Error Response
                description: Schema for internal server error response
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````