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

# Get survey details

> Retrieve a specific survey by ID, including questions and delivery instances. Only accessible if the user is an admin of the survey.



## OpenAPI

````yaml /openapi.json get /v1/surveys/{surveyId}
openapi: 3.0.3
info:
  title: Doozy Public API
  version: 1.0.0
  description: >-
    The Doozy Public API allows you to programmatically access your
    organization's data.


    ## Authentication


    All API requests require an API key passed in the `x-api-key` header.


    ```

    x-api-key: dzy_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    ```


    API keys can be generated and managed through the Doozy dashboard. Each key
    is associated with a user account and inherits that user's permissions.


    ## Rate Limiting


    API requests are rate limited. Rate limiting is handled by Cloudflare. If
    you exceed the rate limit, you'll receive a 429 Too Many Requests response.


    ## Pagination


    List endpoints support cursor-based pagination using `limit` and
    `starting_after` query parameters.
  contact:
    name: Doozy Support
    email: support@doozy.live
    url: https://help.doozy.live/api
servers:
  - url: https://api.doozy.live
    description: Production
security:
  - apiKey: []
tags:
  - name: Quizzes
    description: Quiz analytics and reporting endpoints
  - name: Tracks
    description: Track management and analytics endpoints
  - name: Surveys
    description: Survey and poll analytics endpoints
  - name: Introductions
    description: Doozy Roulette and Matchmaking introduction endpoints
paths:
  /v1/surveys/{surveyId}:
    get:
      tags:
        - Surveys
      summary: Get survey details
      description: >-
        Retrieve a specific survey by ID, including questions and delivery
        instances. Only accessible if the user is an admin of the survey.
      parameters:
        - schema:
            type: string
            minLength: 1
            description: The unique identifier of the survey
            example: survey_abc123
          required: true
          description: The unique identifier of the survey
          name: surveyId
          in: path
      responses:
        '200':
          description: Survey details with questions and instances
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SurveyDetail'
        '401':
          description: Authentication required - missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Survey not found or user does not have access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
components:
  schemas:
    SurveyDetail:
      allOf:
        - $ref: '#/components/schemas/SurveySummary'
        - type: object
          properties:
            questions:
              type: array
              items:
                $ref: '#/components/schemas/SurveyQuestion'
              description: Questions in the survey
          required:
            - questions
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - api_error
                - authentication_error
                - invalid_request_error
                - rate_limit_error
              description: The type of error returned
              example: invalid_request_error
            code:
              type: string
              nullable: true
              description: Machine-readable error code for specific error conditions
              example: resource_not_found
            message:
              type: string
              description: Human-readable error message
              example: 'No such quiz: quiz_abc123'
            param:
              type: string
              nullable: true
              description: The parameter related to the error, if applicable
              example: id
            doc_url:
              type: string
              format: uri
              description: URL to documentation about this error
              example: https://docs.doozy.live/api/errors#resource_not_found
          required:
            - type
            - code
            - message
      required:
        - error
    SurveySummary:
      type: object
      properties:
        object:
          type: string
          enum:
            - survey
          description: Object type identifier
          example: survey
        id:
          type: string
          description: Unique survey identifier
          example: survey_abc123
        title:
          type: string
          description: Survey title
          example: Employee Satisfaction Survey
        description:
          type: string
          nullable: true
          description: Survey description
          example: Monthly check-in on team satisfaction
        mode:
          allOf:
            - $ref: '#/components/schemas/SurveyMode'
            - description: Survey mode (poll or survey)
              example: survey
        response_type:
          allOf:
            - $ref: '#/components/schemas/ResponseType'
            - description: How responses are collected
              example: anonymous
        results_visibility:
          allOf:
            - $ref: '#/components/schemas/ResultsVisibility'
            - description: Who can view results
              example: owner
        status:
          allOf:
            - $ref: '#/components/schemas/SurveyStatus'
            - description: Current survey status
              example: scheduled
        question_count:
          type: integer
          description: Number of questions in the survey
          example: 5
        track:
          allOf:
            - $ref: '#/components/schemas/TrackReference'
            - nullable: true
              description: Track reference if survey belongs to a track
        instances:
          type: array
          items:
            $ref: '#/components/schemas/SurveyInstance'
          description: Delivery instances of this survey
        created_at:
          type: string
          nullable: true
          description: When the survey was created (ISO 8601 format)
          example: '2026-01-15T10:30:00.000Z'
        updated_at:
          type: string
          nullable: true
          description: When the survey was last updated (ISO 8601 format)
          example: '2026-01-20T14:00:00.000Z'
      required:
        - object
        - id
        - title
        - description
        - mode
        - response_type
        - results_visibility
        - status
        - question_count
        - track
        - instances
        - created_at
        - updated_at
    SurveyQuestion:
      type: object
      properties:
        object:
          type: string
          enum:
            - survey_question
          description: Object type identifier
          example: survey_question
        id:
          type: string
          description: Unique question identifier
          example: q_abc123
        text:
          type: string
          description: The question text
          example: How satisfied are you with your onboarding experience?
        type:
          $ref: '#/components/schemas/SurveyQuestionType'
        hint:
          type: string
          nullable: true
          description: Optional hint text for the question
          example: 1 = Very dissatisfied, 10 = Very satisfied
        allow_comments:
          type: boolean
          description: Whether respondents can add comments to their answer
          example: true
        choices:
          type: array
          nullable: true
          items:
            type: string
          description: Available choices for multiple choice questions
          example:
            - Option A
            - Option B
            - Option C
        allow_multiple:
          type: boolean
          nullable: true
          description: Whether multiple choices can be selected (multiple choice only)
          example: false
      required:
        - object
        - id
        - text
        - type
        - hint
        - allow_comments
        - choices
        - allow_multiple
    SurveyMode:
      type: string
      enum:
        - poll
        - survey
    ResponseType:
      type: string
      enum:
        - anonymous
        - user
    ResultsVisibility:
      type: string
      enum:
        - owner
        - everyone
    SurveyStatus:
      type: string
      enum:
        - draft
        - scheduled
        - archived
    TrackReference:
      type: object
      properties:
        id:
          type: string
          description: Track ID
          example: wf_abc123
        name:
          type: string
          description: Track name
          example: Onboarding Program
      required:
        - id
        - name
    SurveyInstance:
      type: object
      properties:
        object:
          type: string
          enum:
            - survey_instance
          description: Object type identifier
          example: survey_instance
        id:
          type: string
          description: Unique instance identifier
          example: inst_xyz789
        scheduled_at:
          type: string
          nullable: true
          description: When the survey was sent (ISO 8601 format)
          example: '2026-01-15T10:30:00.000Z'
        end_at:
          type: string
          nullable: true
          description: When the survey closes for responses (ISO 8601 format)
          example: '2026-01-22T10:30:00.000Z'
        total_recipients:
          type: integer
          description: Number of users who received this instance
          example: 50
        total_responses:
          type: integer
          description: Number of responses received
          example: 35
        response_rate:
          type: number
          description: Percentage of recipients who responded (0-100)
          example: 70
        track_instance_id:
          type: string
          nullable: true
          description: Track instance ID if part of a track delivery
          example: wf_inst_abc123
      required:
        - object
        - id
        - scheduled_at
        - end_at
        - total_recipients
        - total_responses
        - response_rate
        - track_instance_id
    SurveyQuestionType:
      type: string
      enum:
        - scale_1_to_10
        - scale_1_to_5
        - emoji_1_to_5
        - agree_disagree
        - enps
        - open_ended
        - multiple_choice
      description: Type of question
      example: scale_1_to_10
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication. Generate keys in the Doozy dashboard.

````