> ## 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.

# List quiz instances

> List all instances for a specific quiz. Results are paginated and sorted by creation date (newest first).



## OpenAPI

````yaml /openapi.json get /v1/quizzes/{quizId}/instances
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/quizzes/{quizId}/instances:
    get:
      tags:
        - Quiz Instances
      summary: List quiz instances
      description: >-
        List all instances for a specific quiz. Results are paginated and sorted
        by creation date (newest first).
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 128
            pattern: ^[A-Za-z0-9_-]+$
            description: The ID of the quiz
            example: quiz_abc123
          required: true
          description: The ID of the quiz
          name: quizId
          in: path
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            description: Maximum number of results to return (1-100, default 25)
            example: 25
          required: false
          description: Maximum number of results to return (1-100, default 25)
          name: limit
          in: query
        - schema:
            type: string
            maxLength: 256
            description: Cursor for pagination. Returns results after this instance ID.
            example: inst_xyz789
          required: false
          description: Cursor for pagination. Returns results after this instance ID.
          name: starting_after
          in: query
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            description: >-
              Filter by whether the instance was created by a track. When false,
              only standalone instances are returned. When true, only
              track-created instances are returned.
            example: 'false'
          required: false
          description: >-
            Filter by whether the instance was created by a track. When false,
            only standalone instances are returned. When true, only
            track-created instances are returned.
          name: scheduled_by_track
          in: query
      responses:
        '200':
          description: List of quiz instances
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuizInstanceListResponse'
        '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: Quiz not found or user does not have access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
components:
  schemas:
    QuizInstanceListResponse:
      type: object
      properties:
        object:
          type: string
          enum:
            - list
          description: Object type identifier
          example: list
        data:
          type: array
          items:
            $ref: '#/components/schemas/QuizInstanceResponse'
          description: Array of quiz schedule objects
        has_more:
          type: boolean
          description: Whether there are more results available
          example: false
        url:
          type: string
          description: The URL for this list endpoint
          example: /v1/quizzes/quiz_abc123/instances
        next_cursor:
          type: string
          nullable: true
          description: Cursor for the next page of results
          example: null
        tracks:
          type: array
          items:
            $ref: '#/components/schemas/QuizInstanceTrackSummary'
          description: >-
            Tracks that deliver this quiz. Only included when scheduled_by_track
            is false.
      required:
        - object
        - data
        - has_more
        - url
        - next_cursor
    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
    QuizInstanceResponse:
      type: object
      properties:
        object:
          type: string
          enum:
            - quiz_instance
          description: Object type identifier
          example: quiz_instance
        id:
          type: string
          description: Unique instance identifier
          example: sched_xyz789
        quiz_id:
          type: string
          description: The quiz this schedule is for
          example: quiz_abc123
        status:
          type: string
          enum:
            - active
            - paused
            - cancelled
            - completed
          description: Current status of the schedule
          example: active
        timezone:
          type: string
          description: IANA timezone identifier
          example: America/New_York
        schedule:
          $ref: '#/components/schemas/RecurringSchedule'
        recipients:
          $ref: '#/components/schemas/ActivityDestination'
        schedule_at:
          type: string
          nullable: true
          format: date-time
          description: >-
            UTC datetime for one-off schedules (ISO 8601), or null for recurring
            schedules
          example: '2026-06-15T09:00:00Z'
        play_mode:
          type: string
          enum:
            - one_question_per_day
            - one_round_per_day
            - full_quiz
          description: >-
            Controls how quiz questions are delivered: one question per
            scheduled day, one round per day, or the entire quiz at once.
          example: one_question_per_day
        speed:
          $ref: '#/components/schemas/QuizSpeed'
        lateness:
          $ref: '#/components/schemas/QuizLateness'
        participant_standings:
          type: string
          enum:
            - leaderboard
            - own_progress
            - hidden
          description: >-
            How people see standings. leaderboard: full ranked board for
            everyone. own_progress: each person sees their own rank (#3 of 24),
            not the board. hidden: results only — no rank, no board.
        challenge_id:
          type: string
          nullable: true
          description: Challenge this schedule belongs to, or null.
          example: cmp_abc123
        expiry:
          $ref: '#/components/schemas/DelayConfig'
        due:
          allOf:
            - $ref: '#/components/schemas/DelayConfig'
            - description: Answer due window, or null if no deadline
        intro_message:
          type: string
          nullable: true
          description: Intro message sent with the first question
        mandatory_completion:
          $ref: '#/components/schemas/MandatoryCompletion'
        feedback_survey:
          $ref: '#/components/schemas/FeedbackSurveyConfig'
        next_trigger_at:
          type: string
          nullable: true
          description: >-
            When the next question will be delivered (ISO 8601), or null if
            paused/cancelled
          example: '2026-02-01T09:00:00.000Z'
        created_at:
          type: string
          description: When the schedule was created (ISO 8601)
          example: '2026-01-15T10:30:00.000Z'
        updated_at:
          type: string
          description: When the schedule was last updated (ISO 8601)
          example: '2026-01-20T14:00:00.000Z'
        meta:
          allOf:
            - $ref: '#/components/schemas/ActivityMeta'
            - description: >-
                What the requesting user can do with this quiz instance (edit,
                pause, resume, delete, activate, manage admins). Use these to
                drive UI affordances.
      required:
        - object
        - id
        - quiz_id
        - status
        - timezone
        - schedule
        - recipients
        - schedule_at
        - play_mode
        - speed
        - lateness
        - participant_standings
        - challenge_id
        - expiry
        - due
        - intro_message
        - mandatory_completion
        - feedback_survey
        - next_trigger_at
        - created_at
        - updated_at
        - meta
    QuizInstanceTrackSummary:
      type: object
      properties:
        id:
          type: string
          description: Track (workflow) ID
          example: wf_abc123
        name:
          type: string
          description: Track name
          example: Onboarding Track
        instance_count:
          type: integer
          description: Number of quiz instances delivered by this track
          example: 5
      required:
        - id
        - name
        - instance_count
    RecurringSchedule:
      type: object
      nullable: true
      properties:
        days:
          type: array
          items:
            $ref: '#/components/schemas/TriggerDay'
          minItems: 1
          description: Days of the week to deliver questions.
          example:
            - monday
            - wednesday
            - friday
        time:
          type: string
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
          description: Time of day to deliver in HH:mm format (24-hour)
          example: '09:00'
      required:
        - days
        - time
      additionalProperties: false
      description: Recurring schedule (days + time), or null for full_quiz instances
    ActivityDestination:
      oneOf:
        - $ref: '#/components/schemas/ChannelDestination'
        - $ref: '#/components/schemas/ChannelMembersDestination'
        - $ref: '#/components/schemas/GroupsDestination'
        - $ref: '#/components/schemas/IndividualsDestination'
        - $ref: '#/components/schemas/NewHiresDestination'
        - $ref: '#/components/schemas/ManagersDestination'
        - $ref: '#/components/schemas/ManagersDirectReportsDestination'
        - $ref: '#/components/schemas/ManagersAllReportsDestination'
        - $ref: '#/components/schemas/EmailsDestination'
        - $ref: '#/components/schemas/GroupDMDestination'
      discriminator:
        propertyName: type
        mapping:
          slackChannel:
            $ref: '#/components/schemas/ChannelDestination'
          slackChannelMembers:
            $ref: '#/components/schemas/ChannelMembersDestination'
          groups:
            $ref: '#/components/schemas/GroupsDestination'
          individuals:
            $ref: '#/components/schemas/IndividualsDestination'
          newHires:
            $ref: '#/components/schemas/NewHiresDestination'
          managers:
            $ref: '#/components/schemas/ManagersDestination'
          managersDirectReports:
            $ref: '#/components/schemas/ManagersDirectReportsDestination'
          managersAllReports:
            $ref: '#/components/schemas/ManagersAllReportsDestination'
          emails:
            $ref: '#/components/schemas/EmailsDestination'
          groupDM:
            $ref: '#/components/schemas/GroupDMDestination'
    QuizSpeed:
      type: object
      properties:
        mode:
          type: string
          enum:
            - none
            - time_fraction
          description: >-
            Speed bonus mode. "none" = no bonus (default). "time_fraction" = a
            fraction of each question's value, scaled by how quickly it was
            answered.
          example: none
        cap:
          type: number
          minimum: 0
          maximum: 1
          description: >-
            Maximum speed bonus as a fraction of the question's value
            (time_fraction only). Defaults to 0.5.
          example: 0.5
        window_minutes:
          type: integer
          nullable: true
          minimum: 1
          maximum: 43200
          description: >-
            Bonus window in minutes from when each question posts (time_fraction
            only). The bonus decays from full to zero across this window,
            independent of the quiz's own deadline. Omit to decay over the
            quiz's deadline instead.
          example: 60
      required:
        - mode
      additionalProperties: false
      description: Speed bonus for this schedule (off by default).
    QuizLateness:
      type: object
      properties:
        mode:
          type: string
          enum:
            - none
            - partial
          description: >-
            Late-submission penalty. "none" = late answers earn full points
            (default). "partial" = late correct answers earn a fraction of their
            value and no speed bonus.
          example: none
        credit:
          type: number
          minimum: 0
          maximum: 1
          description: >-
            Fraction of a correct answer's value kept when answered after the
            due date (partial only). E.g. 0.5 = half points. Defaults to 0.5.
            Has no effect unless the schedule sets a due date.
          example: 0.5
      required:
        - mode
      additionalProperties: false
      description: Late-submission penalty for this schedule (off by default).
    DelayConfig:
      type: object
      nullable: true
      properties:
        amount:
          type: integer
          minimum: 1
          description: Number of units for the delay
          example: 24
        unit:
          type: string
          enum:
            - minutes
            - hours
            - days
            - weeks
            - months
          description: Unit of time for the delay
          example: hours
      required:
        - amount
        - unit
      additionalProperties: false
      description: Question expiry window, or null if no expiry
    MandatoryCompletion:
      type: object
      nullable: true
      properties:
        enabled:
          type: boolean
          description: Whether mandatory completion is enabled
          example: false
        reminder_interval_days:
          type: integer
          minimum: 1
          maximum: 31
          description: Days between reminder messages
          example: 3
        max_reminder_window_days:
          type: integer
          minimum: 1
          maximum: 365
          description: Stop sending reminders after this many days
          example: 30
        custom_reminder_message:
          type: string
          nullable: true
          description: Custom reminder message override. Null uses the default message.
          example: null
      required:
        - enabled
        - reminder_interval_days
        - max_reminder_window_days
        - custom_reminder_message
      additionalProperties: false
      description: Mandatory completion settings, or null if completion is optional
    FeedbackSurveyConfig:
      type: object
      nullable: true
      properties:
        enabled:
          type: boolean
          description: Whether post-quiz feedback collection is enabled
          example: false
        question_text:
          type: string
          description: The feedback question shown to participants
          example: How was this quiz?
        question_type:
          $ref: '#/components/schemas/SurveyQuestionType'
        choices:
          type: array
          items:
            type: string
          default: []
          description: Answer choices (only used when question_type is multiple_choice)
          example:
            - Too easy
            - Just right
            - Too hard
        allow_multiple:
          type: boolean
          default: false
          description: Whether multiple choices can be selected (multiple_choice only)
          example: false
        allow_comments:
          type: boolean
          description: Whether respondents can add a free-text comment
          example: true
        question_hint:
          type: string
          nullable: true
          description: Optional hint text shown below the question
          example: null
      required:
        - enabled
        - question_text
        - question_type
        - allow_comments
        - question_hint
      additionalProperties: false
      description: Post-quiz feedback survey config, or null if no feedback is collected
    ActivityMeta:
      type: object
      properties:
        permissions:
          $ref: '#/components/schemas/ActivityPermissions'
      required:
        - permissions
      description: >-
        What the requesting user can do with this quiz (edit, pause, resume,
        delete, activate, manage admins). Use these to drive UI affordances.
    TriggerDay:
      type: string
      enum:
        - sunday
        - monday
        - tuesday
        - wednesday
        - thursday
        - friday
        - saturday
    ChannelDestination:
      type: object
      properties:
        type:
          type: string
          enum:
            - slackChannel
          description: Destination type
          example: slackChannel
        slackChannelId:
          type: string
          minLength: 1
          maxLength: 128
          pattern: ^[A-Za-z0-9_-]+$
          description: Slack channel ID
          example: C1234567890
        excludeUserWithValues:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdvancedFilterRule'
          description: >-
            Exclude users whose profile values match these rules (AND across
            rules).
        includeUserWithValues:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdvancedFilterRule'
          description: >-
            Restrict to users whose profile values match these rules (AND across
            rules).
        filters:
          type: object
          nullable: true
          properties:
            groups:
              type: array
              nullable: true
              items:
                type: string
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9_-]+$
            managerStatus:
              $ref: '#/components/schemas/ManagerStatus'
            countries:
              type: array
              nullable: true
              items:
                type: string
            workLocations:
              type: array
              nullable: true
              items:
                type: string
            excludeUsers:
              type: array
              nullable: true
              items:
                type: string
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9_-]+$
          description: >-
            Group / country / work-location / per-user exclusion filters layered
            on top of the destination's primary selector.
      required:
        - type
        - slackChannelId
      additionalProperties: false
    ChannelMembersDestination:
      type: object
      properties:
        type:
          type: string
          enum:
            - slackChannelMembers
          description: Destination type
          example: slackChannelMembers
        slackChannelId:
          type: string
          minLength: 1
          maxLength: 128
          pattern: ^[A-Za-z0-9_-]+$
          description: Slack channel ID
          example: C1234567890
        excludeUserWithValues:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdvancedFilterRule'
          description: >-
            Exclude users whose profile values match these rules (AND across
            rules).
        includeUserWithValues:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdvancedFilterRule'
          description: >-
            Restrict to users whose profile values match these rules (AND across
            rules).
        filters:
          type: object
          nullable: true
          properties:
            groups:
              type: array
              nullable: true
              items:
                type: string
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9_-]+$
            managerStatus:
              $ref: '#/components/schemas/ManagerStatus'
            countries:
              type: array
              nullable: true
              items:
                type: string
            workLocations:
              type: array
              nullable: true
              items:
                type: string
            excludeUsers:
              type: array
              nullable: true
              items:
                type: string
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9_-]+$
          description: >-
            Group / country / work-location / per-user exclusion filters layered
            on top of the destination's primary selector.
      required:
        - type
        - slackChannelId
      additionalProperties: false
    GroupsDestination:
      type: object
      properties:
        type:
          type: string
          enum:
            - groups
          description: Destination type
          example: groups
        groups:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 128
            pattern: ^[A-Za-z0-9_-]+$
          maxItems: 50
          description: Group IDs
          example:
            - group_abc123
            - group_def456
        excludeUserWithValues:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdvancedFilterRule'
          description: >-
            Exclude users whose profile values match these rules (AND across
            rules).
        includeUserWithValues:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdvancedFilterRule'
          description: >-
            Restrict to users whose profile values match these rules (AND across
            rules).
        filters:
          type: object
          nullable: true
          properties:
            groups:
              type: array
              nullable: true
              items:
                type: string
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9_-]+$
            managerStatus:
              $ref: '#/components/schemas/ManagerStatus'
            countries:
              type: array
              nullable: true
              items:
                type: string
            workLocations:
              type: array
              nullable: true
              items:
                type: string
            excludeUsers:
              type: array
              nullable: true
              items:
                type: string
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9_-]+$
          description: >-
            Group / country / work-location / per-user exclusion filters layered
            on top of the destination's primary selector.
      required:
        - type
        - groups
      additionalProperties: false
    IndividualsDestination:
      type: object
      properties:
        type:
          type: string
          enum:
            - individuals
          description: Destination type
          example: individuals
        slackUserIds:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 128
            pattern: ^[A-Za-z0-9_-]+$
          maxItems: 500
          description: Slack user IDs
          example:
            - U1234567890
            - U0987654321
        excludeUserWithValues:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdvancedFilterRule'
          description: >-
            Exclude users whose profile values match these rules (AND across
            rules).
        includeUserWithValues:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdvancedFilterRule'
          description: >-
            Restrict to users whose profile values match these rules (AND across
            rules).
        filters:
          type: object
          nullable: true
          properties:
            groups:
              type: array
              nullable: true
              items:
                type: string
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9_-]+$
            managerStatus:
              $ref: '#/components/schemas/ManagerStatus'
            countries:
              type: array
              nullable: true
              items:
                type: string
            workLocations:
              type: array
              nullable: true
              items:
                type: string
            excludeUsers:
              type: array
              nullable: true
              items:
                type: string
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9_-]+$
          description: >-
            Group / country / work-location / per-user exclusion filters layered
            on top of the destination's primary selector.
      required:
        - type
        - slackUserIds
      additionalProperties: false
    NewHiresDestination:
      type: object
      properties:
        type:
          type: string
          enum:
            - newHires
          description: Destination type
          example: newHires
        maxWeeksSinceJoining:
          type: number
          nullable: true
          description: Maximum weeks since joining to be considered a new hire
          example: 4
        excludeUserWithValues:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdvancedFilterRule'
          description: >-
            Exclude users whose profile values match these rules (AND across
            rules).
        includeUserWithValues:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdvancedFilterRule'
          description: >-
            Restrict to users whose profile values match these rules (AND across
            rules).
        filters:
          type: object
          nullable: true
          properties:
            groups:
              type: array
              nullable: true
              items:
                type: string
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9_-]+$
            managerStatus:
              $ref: '#/components/schemas/ManagerStatus'
            countries:
              type: array
              nullable: true
              items:
                type: string
            workLocations:
              type: array
              nullable: true
              items:
                type: string
            excludeUsers:
              type: array
              nullable: true
              items:
                type: string
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9_-]+$
          description: >-
            Group / country / work-location / per-user exclusion filters layered
            on top of the destination's primary selector.
      required:
        - type
        - maxWeeksSinceJoining
      additionalProperties: false
    ManagersDestination:
      type: object
      properties:
        type:
          type: string
          enum:
            - managers
          description: Destination type
          example: managers
        excludeUserWithValues:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdvancedFilterRule'
          description: >-
            Exclude users whose profile values match these rules (AND across
            rules).
        includeUserWithValues:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdvancedFilterRule'
          description: >-
            Restrict to users whose profile values match these rules (AND across
            rules).
        filters:
          type: object
          nullable: true
          properties:
            groups:
              type: array
              nullable: true
              items:
                type: string
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9_-]+$
            managerStatus:
              $ref: '#/components/schemas/ManagerStatus'
            countries:
              type: array
              nullable: true
              items:
                type: string
            workLocations:
              type: array
              nullable: true
              items:
                type: string
            excludeUsers:
              type: array
              nullable: true
              items:
                type: string
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9_-]+$
          description: >-
            Group / country / work-location / per-user exclusion filters layered
            on top of the destination's primary selector.
      required:
        - type
      additionalProperties: false
    ManagersDirectReportsDestination:
      type: object
      properties:
        type:
          type: string
          enum:
            - managersDirectReports
          description: Destination type
          example: managersDirectReports
        doozyUserIds:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 128
            pattern: ^[A-Za-z0-9_-]+$
          maxItems: 500
          description: Doozy user IDs
          example:
            - user_abc123
        slackUserIds:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 128
            pattern: ^[A-Za-z0-9_-]+$
          maxItems: 500
          description: Slack user IDs
          example:
            - U1234567890
        excludeUserWithValues:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdvancedFilterRule'
          description: >-
            Exclude users whose profile values match these rules (AND across
            rules).
        includeUserWithValues:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdvancedFilterRule'
          description: >-
            Restrict to users whose profile values match these rules (AND across
            rules).
        filters:
          type: object
          nullable: true
          properties:
            groups:
              type: array
              nullable: true
              items:
                type: string
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9_-]+$
            managerStatus:
              $ref: '#/components/schemas/ManagerStatus'
            countries:
              type: array
              nullable: true
              items:
                type: string
            workLocations:
              type: array
              nullable: true
              items:
                type: string
            excludeUsers:
              type: array
              nullable: true
              items:
                type: string
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9_-]+$
          description: >-
            Group / country / work-location / per-user exclusion filters layered
            on top of the destination's primary selector.
      required:
        - type
        - doozyUserIds
        - slackUserIds
      additionalProperties: false
    ManagersAllReportsDestination:
      type: object
      properties:
        type:
          type: string
          enum:
            - managersAllReports
          description: Destination type
          example: managersAllReports
        doozyUserIds:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 128
            pattern: ^[A-Za-z0-9_-]+$
          maxItems: 500
          description: Doozy user IDs
          example:
            - user_abc123
        slackUserIds:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 128
            pattern: ^[A-Za-z0-9_-]+$
          maxItems: 500
          description: Slack user IDs
          example:
            - U1234567890
        excludeUserWithValues:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdvancedFilterRule'
          description: >-
            Exclude users whose profile values match these rules (AND across
            rules).
        includeUserWithValues:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdvancedFilterRule'
          description: >-
            Restrict to users whose profile values match these rules (AND across
            rules).
        filters:
          type: object
          nullable: true
          properties:
            groups:
              type: array
              nullable: true
              items:
                type: string
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9_-]+$
            managerStatus:
              $ref: '#/components/schemas/ManagerStatus'
            countries:
              type: array
              nullable: true
              items:
                type: string
            workLocations:
              type: array
              nullable: true
              items:
                type: string
            excludeUsers:
              type: array
              nullable: true
              items:
                type: string
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9_-]+$
          description: >-
            Group / country / work-location / per-user exclusion filters layered
            on top of the destination's primary selector.
      required:
        - type
        - doozyUserIds
        - slackUserIds
      additionalProperties: false
    EmailsDestination:
      type: object
      properties:
        type:
          type: string
          enum:
            - emails
          description: Destination type
          example: emails
        emailAddresses:
          type: array
          items:
            type: string
            maxLength: 254
            format: email
          maxItems: 200
          description: Email addresses
          example:
            - john@example.com
            - jane@example.com
        excludeUserWithValues:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdvancedFilterRule'
          description: >-
            Exclude users whose profile values match these rules (AND across
            rules).
        includeUserWithValues:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdvancedFilterRule'
          description: >-
            Restrict to users whose profile values match these rules (AND across
            rules).
        filters:
          type: object
          nullable: true
          properties:
            groups:
              type: array
              nullable: true
              items:
                type: string
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9_-]+$
            managerStatus:
              $ref: '#/components/schemas/ManagerStatus'
            countries:
              type: array
              nullable: true
              items:
                type: string
            workLocations:
              type: array
              nullable: true
              items:
                type: string
            excludeUsers:
              type: array
              nullable: true
              items:
                type: string
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9_-]+$
          description: >-
            Group / country / work-location / per-user exclusion filters layered
            on top of the destination's primary selector.
      required:
        - type
        - emailAddresses
      additionalProperties: false
    GroupDMDestination:
      type: object
      properties:
        type:
          type: string
          enum:
            - groupDM
          description: Destination type
          example: groupDM
        slackUserIds:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 128
            pattern: ^[A-Za-z0-9_-]+$
          maxItems: 500
          description: Slack user IDs in the group DM
          example:
            - U1234567890
            - U0987654321
        slackChannelId:
          type: string
          nullable: true
          minLength: 1
          maxLength: 128
          pattern: ^[A-Za-z0-9_-]+$
          description: Slack channel ID if already created
          example: null
        excludeUserWithValues:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdvancedFilterRule'
          description: >-
            Exclude users whose profile values match these rules (AND across
            rules).
        includeUserWithValues:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdvancedFilterRule'
          description: >-
            Restrict to users whose profile values match these rules (AND across
            rules).
        filters:
          type: object
          nullable: true
          properties:
            groups:
              type: array
              nullable: true
              items:
                type: string
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9_-]+$
            managerStatus:
              $ref: '#/components/schemas/ManagerStatus'
            countries:
              type: array
              nullable: true
              items:
                type: string
            workLocations:
              type: array
              nullable: true
              items:
                type: string
            excludeUsers:
              type: array
              nullable: true
              items:
                type: string
                minLength: 1
                maxLength: 128
                pattern: ^[A-Za-z0-9_-]+$
          description: >-
            Group / country / work-location / per-user exclusion filters layered
            on top of the destination's primary selector.
      required:
        - type
        - slackUserIds
        - slackChannelId
      additionalProperties: false
    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 feedback question
      example: emoji_1_to_5
    ActivityPermissions:
      type: object
      properties:
        can_view_results:
          type: boolean
        can_clone:
          type: boolean
        can_manage:
          type: boolean
        can_edit:
          type: boolean
        can_pause:
          type: boolean
        can_resume:
          type: boolean
        can_delete:
          type: boolean
        can_activate:
          type: boolean
        can_manage_admins:
          type: boolean
      required:
        - can_view_results
        - can_clone
        - can_manage
        - can_edit
        - can_pause
        - can_resume
        - can_delete
        - can_activate
        - can_manage_admins
    AdvancedFilterRule:
      type: object
      properties:
        key:
          type: string
          description: Member profile field name to match against
          example: team
        value:
          type: string
          description: Value to match against
          example: Engineering
        matchMethod:
          $ref: '#/components/schemas/MatchMethod'
      required:
        - key
        - value
        - matchMethod
    ManagerStatus:
      type: string
      nullable: true
      enum:
        - isManager
        - isNotManager
        - null
    MatchMethod:
      type: string
      enum:
        - equals
        - includes
      description: How to compare key/value
      example: equals
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication. Generate keys in the Doozy dashboard.

````