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

# Record an answer

> Stores a "how did you hear about us?" answer and classifies it in the background. Send an `Idempotency-Key` header so retries never create duplicates. Works with a secret key from your server or a publishable key from the browser.



## OpenAPI

````yaml /openapi.json post /v1/responses
openapi: 3.1.0
info:
  title: Rumorly API
  version: 1.0.0
  description: >-
    Send "how did you hear about us?" answers in; get channels, named entities
    and revenue out. All JSON is snake_case.
servers:
  - url: https://api.rumorly.io
    description: Production
  - url: http://localhost:4100
    description: Local development
security: []
tags:
  - name: Basics
  - name: Responses
    description: Answers and their classification.
  - name: People
    description: The people who answered.
  - name: Reports
    description: Revenue by self-reported channel.
  - name: Snippet
    description: Endpoints the JS snippet calls.
paths:
  /v1/responses:
    post:
      tags:
        - Responses
      summary: Record an answer
      description: >-
        Stores a "how did you hear about us?" answer and classifies it in the
        background. Send an `Idempotency-Key` header so retries never create
        duplicates. Works with a secret key from your server or a publishable
        key from the browser.
      parameters:
        - schema:
            type: string
            maxLength: 200
            description: Any unique string per answer, e.g. your signup id.
          required: false
          name: Idempotency-Key
          in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  maxLength: 320
                  format: email
                external_id:
                  type: string
                  minLength: 1
                  maxLength: 200
                name:
                  type: string
                  maxLength: 200
                answer:
                  type: string
                  minLength: 1
                  maxLength: 2000
                question:
                  type: string
                  maxLength: 500
                source:
                  type: string
                  enum:
                    - api
                    - widget
                    - csv
                    - attio
                    - tally
                    - webhook
                metadata:
                  type: object
                  properties:
                    utm_source:
                      type: string
                      maxLength: 200
                    utm_medium:
                      type: string
                      maxLength: 200
                    utm_campaign:
                      type: string
                      maxLength: 200
                    referrer:
                      type: string
                      maxLength: 2000
                    landing_page:
                      type: string
                      maxLength: 2000
                  additionalProperties:
                    anyOf:
                      - type: string
                        maxLength: 2000
                      - type: number
                      - type: boolean
                      - type: 'null'
                      - type: 'null'
                answered_at:
                  type: string
                  format: date-time
              required:
                - answer
              additionalProperties: false
              example:
                email: maya@northwind.io
                answer: Heard Jake on Lenny's Podcast
                question: How did you hear about us?
                metadata:
                  utm_source: podcast
      responses:
        '200':
          description: >-
            Replay: a response with this `Idempotency-Key` already exists, so
            nothing new was created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  status:
                    type: string
                    enum:
                      - pending
                      - classified
                      - needs_review
                      - failed
                required:
                  - id
                  - status
        '202':
          description: Accepted; classification follows within seconds.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  status:
                    type: string
                    enum:
                      - pending
                required:
                  - id
                  - status
        '400':
          description: The body or query failed validation; `issues` says which field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: >-
            `plan_required`: your plan doesn't include API access (Growth and
            up; the signup trial does). `quota_exceeded` (POST only): this
            month's response allowance is used up.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The key is not allowed to do this (e.g. a publishable key reading
            data).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Publishable keys only: more than 10 submissions in a burst (then 1
            every 6 seconds) from one key and IP. See `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - secretKey: []
        - publishableKey: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          example: invalid body
        code:
          type: string
        issues:
          type: array
          items:
            type: object
            properties:
              path:
                type: array
                items:
                  anyOf:
                    - type: string
                    - type: number
              message:
                type: string
            required:
              - path
              - message
      required:
        - error
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      description: >-
        A secret key (`sk_live_…` / `sk_test_…`) from Settings → API keys.
        Server-side only.
    publishableKey:
      type: http
      scheme: bearer
      description: >-
        A publishable key (`pk_live_…`). Safe in the browser: it can only create
        responses, and only from the origins you allow-listed.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.