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

# Submit a response

> Text, a rating, answer options or a file, depending on the question type. Only the participant may answer — the key must act as that person; anyone else is a 403. For upload questions the result carries a pre-signed upload URL for `fileName`. A survey that is not launched is a 409.

**Requires scope:** `surveys:write`.



## OpenAPI

````yaml /api-docs/openapi.v1.json post /api/v1/surveys/{id}/people/{personId}/responses
openapi: 3.0.0
info:
  title: SkillsDB Public API
  description: >-
    The SkillsDB public REST API. Authenticate every request with an API key
    created in Settings → API Credentials, sent as `Authorization: Bearer
    sdb_live_…`. Errors follow RFC 9457 problem details; every `type` URI
    resolves under https://help.skillsdb.com/api-docs/errors/.
  version: '1'
  contact: {}
servers:
  - url: https://prod.skillsdbnext.com
    description: Production
  - url: https://staging.skillsdbnext.com
    description: Staging
security: []
tags: []
paths:
  /api/v1/surveys/{id}/people/{personId}/responses:
    post:
      tags:
        - Survey
      summary: Submit a response
      description: >-
        Text, a rating, answer options or a file, depending on the question
        type. Only the participant may answer — the key must act as that person;
        anyone else is a 403. For upload questions the result carries a
        pre-signed upload URL for `fileName`. A survey that is not launched is a
        409.


        **Requires scope:** `surveys:write`.
      operationId: submitSurveyResponse
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            Any unique string (at most 200 characters). Retrying with the same
            key and identical content replays the stored response for 24h
            instead of executing twice.
          schema:
            type: string
            maxLength: 200
        - name: id
          required: true
          in: path
          schema:
            type: string
          description: Opaque resource id.
        - name: personId
          required: true
          in: path
          description: >-
            The person's email address — or the opaque person id from any
            response.
          schema:
            type: string
            example: ada@example.com
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitResponseDto'
      responses:
        '201':
          description: The created resource, enveloped.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/SubmitResponseResultDto'
          headers:
            X-Request-Id:
              description: Unique id for this request — quote it when contacting support.
              schema:
                type: string
            RateLimit-Limit:
              description: The bucket's hourly allowance.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests left in the current window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the window resets.
              schema:
                type: integer
            Idempotency-Replayed:
              description: >-
                `true` when this response was replayed from a previous execution
                under the same Idempotency-Key.
              schema:
                type: string
        '400':
          description: >-
            Validation failed
            (`https://help.skillsdb.com/api-docs/errors/validation-error`)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetailsDto'
          headers:
            X-Request-Id:
              description: Unique id for this request — quote it when contacting support.
              schema:
                type: string
            RateLimit-Limit:
              description: The bucket's hourly allowance.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests left in the current window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the window resets.
              schema:
                type: integer
        '401':
          description: >-
            Invalid credential
            (`https://help.skillsdb.com/api-docs/errors/invalid-credential`)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetailsDto'
          headers:
            X-Request-Id:
              description: Unique id for this request — quote it when contacting support.
              schema:
                type: string
            RateLimit-Limit:
              description: The bucket's hourly allowance.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests left in the current window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the window resets.
              schema:
                type: integer
        '403':
          description: >-
            Insufficient permissions
            (`https://help.skillsdb.com/api-docs/errors/insufficient-permissions`)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetailsDto'
          headers:
            X-Request-Id:
              description: Unique id for this request — quote it when contacting support.
              schema:
                type: string
            RateLimit-Limit:
              description: The bucket's hourly allowance.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests left in the current window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the window resets.
              schema:
                type: integer
        '404':
          description: Not found (`https://help.skillsdb.com/api-docs/errors/not-found`)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetailsDto'
          headers:
            X-Request-Id:
              description: Unique id for this request — quote it when contacting support.
              schema:
                type: string
            RateLimit-Limit:
              description: The bucket's hourly allowance.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests left in the current window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the window resets.
              schema:
                type: integer
        '409':
          description: >-
            Conflict (`https://help.skillsdb.com/api-docs/errors/conflict`) ·
            Idempotency key reused with different content
            (`https://help.skillsdb.com/api-docs/errors/idempotency-key-reused`)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetailsDto'
          headers:
            X-Request-Id:
              description: Unique id for this request — quote it when contacting support.
              schema:
                type: string
            RateLimit-Limit:
              description: The bucket's hourly allowance.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests left in the current window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the window resets.
              schema:
                type: integer
        '429':
          description: >-
            Rate limit exceeded
            (`https://help.skillsdb.com/api-docs/errors/rate-limit-exceeded`)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetailsDto'
          headers:
            X-Request-Id:
              description: Unique id for this request — quote it when contacting support.
              schema:
                type: string
            RateLimit-Limit:
              description: The bucket's hourly allowance.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests left in the current window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the window resets.
              schema:
                type: integer
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
        '500':
          description: >-
            Internal error
            (`https://help.skillsdb.com/api-docs/errors/internal-error`)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetailsDto'
          headers:
            X-Request-Id:
              description: Unique id for this request — quote it when contacting support.
              schema:
                type: string
            RateLimit-Limit:
              description: The bucket's hourly allowance.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests left in the current window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the window resets.
              schema:
                type: integer
      security:
        - apiKey:
            - surveys:write
components:
  schemas:
    SubmitResponseDto:
      type: object
      properties:
        questionId:
          type: string
          example: '7001'
          description: A question id from the survey's question set.
        text:
          type: string
          example: More pairing time with senior riggers.
          maxLength: 8000
        rating:
          type: number
          example: 4
        optionIds:
          description: Answer option ids for choice questions.
          type: array
          items:
            type: string
        conditionalAnswers:
          type: array
          items:
            $ref: '#/components/schemas/ConditionalAnswerDto'
        fileName:
          type: string
          example: evidence.pdf
          maxLength: 255
          description: 'For upload questions: the file to PUT to the returned uploadUrl.'
      required:
        - questionId
    SubmitResponseResultDto:
      type: object
      properties:
        response:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/SurveyResponseDto'
        uploadUrl:
          type: string
          nullable: true
          description: >-
            Pre-signed PUT URL for the file named in the submission, valid for a
            short time.
      required:
        - response
        - uploadUrl
    ProblemDetailsDto:
      type: object
      properties:
        type:
          type: string
          example: https://help.skillsdb.com/api-docs/errors/validation-error
          description: >-
            A URI identifying the problem type — always resolves to a
            documentation page.
        title:
          type: string
          example: Validation failed
        status:
          type: number
          example: 400
        detail:
          type: string
          example: limit must be between 1 and 200
          description: Human-readable explanation specific to this occurrence.
        instance:
          type: string
          example: /api/v1/people
        requestId:
          type: string
          example: 0192c2f1-6f4e-7ab3-b1c4-5f6a7b8c9d0e
          description: >-
            Matches the X-Request-Id response header — quote it when contacting
            support.
        errors:
          description: Field-level failures, present on validation-error problems.
          type: array
          items:
            $ref: '#/components/schemas/ProblemFieldErrorDto'
        error:
          type: string
          example: trial_expired
          enum:
            - trial_expired
          description: >-
            Present only on a 403 when the workspace's trial has expired, so API
            access is suspended.
        upgrade_url:
          type: string
          example: https://app.skillsdb.com/settings/billing
          description: >-
            Present only alongside `error: trial_expired`: where a workspace
            admin upgrades to restore API access.
      required:
        - type
        - title
        - status
        - detail
        - instance
        - requestId
    ConditionalAnswerDto:
      type: object
      properties:
        optionId:
          type: string
          example: '5003'
        value:
          type: string
          example: 'Other: night shift'
          maxLength: 2000
          nullable: true
      required:
        - optionId
        - value
    SurveyResponseDto:
      type: object
      properties:
        id:
          type: string
          example: '9001'
        personId:
          type: string
          example: '1042'
        question:
          description: The question as it stood when answered.
          allOf:
            - $ref: '#/components/schemas/ResponseQuestionRefDto'
        answer:
          $ref: '#/components/schemas/AnswerDto'
        createdAt:
          type: string
          example: '2026-07-02T10:00:00.000Z'
          nullable: true
        updatedAt:
          type: string
          example: null
          nullable: true
      required:
        - id
        - personId
        - question
        - answer
        - createdAt
        - updatedAt
    ProblemFieldErrorDto:
      type: object
      properties:
        field:
          type: string
          example: email
        code:
          type: string
          example: max_length
        message:
          type: string
          example: email must be shorter than or equal to 75 characters
      required:
        - field
        - code
        - message
    ResponseQuestionRefDto:
      type: object
      properties:
        id:
          type: string
          example: '7001'
        questionVersionId:
          type: string
          example: '410'
        name:
          type: string
          example: Manager support
        text:
          type: string
          example: My manager supports my development.
        version:
          type: string
          example: '1.0'
        type:
          type: string
          enum:
            - multiple_choice
            - drop_down
            - rating
            - text
            - document_upload
            - certification_update
        position:
          type: number
          example: 1
      required:
        - id
        - questionVersionId
        - name
        - text
        - version
        - type
        - position
    AnswerDto:
      type: object
      properties:
        kind:
          type: string
          enum:
            - text
            - rating
            - file
            - choices
            - certification
            - empty
          example: text
        text:
          type: string
          example: More pairing time with senior riggers.
          nullable: true
        rating:
          type: number
          example: null
          nullable: true
        fileName:
          type: string
          example: null
          nullable: true
          description: The uploaded file's name; fetch it with the download-url operation.
        options:
          type: array
          items:
            $ref: '#/components/schemas/ChosenOptionDto'
        certificationCount:
          type: number
          example: 0
          description: Certifications recorded through a certification-update question.
      required:
        - kind
        - text
        - rating
        - fileName
        - options
        - certificationCount
    ChosenOptionDto:
      type: object
      properties:
        id:
          type: string
          example: '5001'
        label:
          type: string
          example: Strongly agree
        conditionalValue:
          type: string
          example: null
          nullable: true
          description: The free-text value given for a conditional option.
      required:
        - id
        - label
        - conditionalValue
  securitySchemes:
    apiKey:
      scheme: bearer
      type: http
      description: >-
        An API key issued by a company administrator — an environment prefix
        (production: `sdb_live_`) followed by 32 characters. The prefix
        identifies the environment and MUST NOT be hard-coded or validated by
        clients; treat the whole key as opaque. Shown exactly once at creation;
        only a one-way hash is stored.


        **Scopes** (granted per key on the create screen; `:write` never implies
        `:read`):


        - `skills:read`

        - `skills:write`

        - `people:read`

        - `people:write`

        - `careers:read`

        - `careers:write`

        - `training:read`

        - `training:write`

        - `flags:read`

        - `flags:write`

        - `org:read`

        - `org:write`

        - `assessments:read`

        - `learning:read`

        - `learning:write`

        - `certifications:read`

        - `certifications:write`

        - `assessments:write`

        - `proficiency:read`

        - `proficiency:write`

        - `surveys:read`

        - `surveys:write`

        - `labels:read`

        - `labels:write`

````