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

# Enviar Resposta Pública

> Submete resposta da pesquisa pública sem autenticação

# Enviar Resposta Pública

Submete uma resposta de quest pública para o estabelecimento e quest informados.
Este endpoint suporta fluxo anônimo com validações de segurança e anti-abuso.


## OpenAPI

````yaml POST /api/v1/public/quests/{estabelecimento_ref}/{quest_id}/responses
openapi: 3.1.0
info:
  contact:
    email: support@indiqai.com
    name: IndiqAI Support
    url: https://indiqai.com/
  description: Especificação OpenAPI da API Pública IndiqAI.
  license:
    name: Proprietary
    url: https://indiqai.com/license
  title: IndiqAI API Pública
  version: 1.5.0
servers:
  - description: Produção
    url: https://api.indiqai.com
security: []
paths:
  /api/v1/public/quests/{estabelecimento_ref}/{quest_id}/responses:
    post:
      tags:
        - Public Quests
        - public-quests
      summary: Submeter resposta pública sem autenticação
      operationId: >-
        submit_public_quest_response_api_v1_public_quests__estabelecimento_ref___quest_id__responses_post
      parameters:
        - in: path
          name: estabelecimento_ref
          required: true
          schema:
            title: Estabelecimento Ref
            type: string
        - in: path
          name: quest_id
          required: true
          schema:
            format: uuid
            title: Quest Id
            type: string
        - in: header
          name: X-Idempotency-Key
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Idempotency-Key
        - in: header
          name: X-Public-Quest-Visitor-Id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Public-Quest-Visitor-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuestResponseSubmit'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicQuestSubmitResponse'
          description: Successful Response
        '404':
          description: Pesquisa pública não encontrada
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '429':
          description: Rate limit excedido
components:
  schemas:
    QuestResponseSubmit:
      description: Schema para submeter resposta de usuário a uma quest
      properties:
        response:
          additionalProperties: true
          description: 'Respostas do usuário (field_id: valor)'
          title: Response
          type: object
      required:
        - response
      title: QuestResponseSubmit
      type: object
    PublicQuestSubmitResponse:
      description: Resultado da submissão pública da pesquisa.
      properties:
        cta_google_enabled:
          default: false
          description: Se CTA do Google deve ser exibido
          title: Cta Google Enabled
          type: boolean
        cta_google_url:
          anyOf:
            - type: string
            - type: 'null'
          description: URL do CTA Google quando elegível
          title: Cta Google Url
        empresa_id:
          format: uuid
          title: Empresa Id
          type: string
        low_score_alert_sent:
          default: false
          description: Se alerta de nota baixa foi enviado
          title: Low Score Alert Sent
          type: boolean
        quest_id:
          format: uuid
          title: Quest Id
          type: string
        response_id:
          format: uuid
          title: Response Id
          type: string
        reward_claim_available:
          default: false
          description: Indica se uma promessa de recompensa foi emitida para resgate futuro
          title: Reward Claim Available
          type: boolean
        reward_claim_expires_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Data/hora de expiração do token de resgate
          title: Reward Claim Expires At
        reward_claim_message:
          anyOf:
            - type: string
            - type: 'null'
          description: Mensagem sobre a promessa de recompensa
          title: Reward Claim Message
        reward_claim_status:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Status da promessa no submit/contact (issued, blocked_by_antifraud,
            disabled, not_applicable, expired, already_issued, already_claimed,
            not_available)
          title: Reward Claim Status
        reward_claim_token:
          anyOf:
            - type: string
            - type: 'null'
          description: Token temporário de resgate da promessa (quando disponível)
          title: Reward Claim Token
        reward_name:
          anyOf:
            - type: string
            - type: 'null'
          description: Nome legível do prêmio
          title: Reward Name
        submitted_at:
          format: date-time
          title: Submitted At
          type: string
      required:
        - response_id
        - quest_id
        - empresa_id
        - submitted_at
      title: PublicQuestSubmitResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````