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

# Get a Study layout

> Returns the entire Study in authored order, including Study metadata. The response includes an ETag header for the Study version. Every public Question appears exactly once, either at the root or nested inside a Block, and each Question includes its full content, options, and Question-owned logic. Blocks include membership, nesting, and Block-owned display and skip logic; Pages are not supported for IN_PRODUCT_SURVEY Studies. The response is not paginated. Managed AI Follow-up children are not separate nodes.



## OpenAPI

````yaml /reference/study-api-v2.json get /v2/studies/{studyId}/layout
openapi: 3.1.0
info:
  title: Sprig Public API V2 — Studies
  version: 1.0.0
  description: >-
    Programmatically create and manage Sprig Studies (surveys), their Questions,
    Blocks, invitations, and translations.
  contact:
    name: Support
    email: support@sprig.com
servers:
  - url: https://api.sprig.com
security: []
tags:
  - name: Studies
    description: The root resource for a programmatically managed survey.
  - name: Questions
    description: Questions, with their nested options, owned by a Study.
  - name: Blocks
    description: >-
      Blocks and Pages; Pages are not supported for IN_PRODUCT_SURVEY Studies.
      Group skip and display logic live on the Block. Question logic is member
      display, plus skip logic only outside a Page.
  - name: Invitations
    description: >-
      Invitation codes for SURVEY Studies; invitations are not supported for
      IN_PRODUCT_SURVEY Studies.
  - name: Translations
    description: >-
      Per-locale translated content for a Study, and the asynchronous jobs that
      generate it. Job cancellation is best-effort and does not roll back
      committed output.
  - name: Attributes
    description: Custom Attribute definitions available in the environment.
  - name: Targeting
    description: Event triggers and audience conditions for IN_PRODUCT_SURVEY Studies.
  - name: Events
    description: Existing tracked and page-URL Events available for Study targeting.
paths:
  /v2/studies/{studyId}/layout:
    get:
      tags:
        - Studies
      summary: Get a Study layout
      description: >-
        Returns the entire Study in authored order, including Study metadata.
        The response includes an ETag header for the Study version. Every public
        Question appears exactly once, either at the root or nested inside a
        Block, and each Question includes its full content, options, and
        Question-owned logic. Blocks include membership, nesting, and
        Block-owned display and skip logic; Pages are not supported for
        IN_PRODUCT_SURVEY Studies. The response is not paginated. Managed AI
        Follow-up children are not separate nodes.
      operationId: getStudyLayout
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: studyId
          in: path
      responses:
        '200':
          description: The complete Study.
          headers:
            ETag:
              description: >-
                Quoted Study version validator matching Study.version, for
                example "126300".
              schema:
                type: string
                example: '"126300"'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StudyLayout'
        '400':
          description: The request is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            The environment API key is missing or invalid, cannot access this
            resource, or the Study API is not available for the account.
        '404':
          description: Study not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: >-
            The stored Study layout or logic cannot be represented without
            changing its meaning.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - EnvironmentApiKey: []
components:
  schemas:
    StudyLayout:
      oneOf:
        - $ref: '#/components/schemas/LinkStudyLayout'
          title: Shareable survey layout
        - $ref: '#/components/schemas/InProductStudyLayout'
          title: In-product survey layout
      discriminator:
        propertyName: type
        mapping:
          SURVEY: '#/components/schemas/LinkStudyLayout'
          IN_PRODUCT_SURVEY: '#/components/schemas/InProductStudyLayout'
      description: >-
        The complete Study, including its metadata and authored layout.
        Questions include their content and Question-owned logic. Blocks include
        membership, nesting, and Block-owned logic. Managed AI Follow-up
        children are not separate nodes.
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: A machine-readable error code (e.g. STUDY_NOT_FOUND).
        message:
          type: string
          description: A human-readable description of the error.
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              path:
                type: string
              message:
                type: string
              resource:
                type: object
                properties:
                  type:
                    type: string
                  id:
                    type: string
                required:
                  - type
                  - id
                description: >-
                  The other resource this issue points at, when the issue is not
                  about the request itself.
            required:
              - code
              - message
          description: >-
            Per-field validation issues, present when the request itself was
            malformed.
      required:
        - code
        - message
      description: Error response returned by the Public API V2.
    LinkStudyLayout:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        status:
          type: string
          enum:
            - DRAFT
            - IN_PROGRESS
            - PAUSED
            - COMPLETED
            - ARCHIVED
        version:
          type: integer
          minimum: 1
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        studyUrl:
          type: string
          format: uri
          description: Link to this Study in the Sprig dashboard for authors.
        type:
          type: string
          enum:
            - SURVEY
          description: A shareable Survey Study.
        responseSettings:
          type: object
          properties:
            completion:
              $ref: '#/components/schemas/StoredStudyCompletion'
            requireIdentifiedRespondent:
              type: boolean
            allowBackwardNavigation:
              type: boolean
            retake:
              $ref: '#/components/schemas/StudyRetake'
          required:
            - completion
            - requireIdentifiedRespondent
            - allowBackwardNavigation
            - retake
          additionalProperties: false
        shareUrl:
          type:
            - string
            - 'null'
          format: uri
          description: The respondent URL, or null until the Study can be shared.
        elements:
          type: array
          items:
            $ref: '#/components/schemas/LayoutElement'
          description: >-
            The entire Study in authored order. Every public Question appears
            exactly once, at the root or nested inside a Block.
      required:
        - id
        - name
        - status
        - version
        - createdAt
        - updatedAt
        - studyUrl
        - type
        - responseSettings
        - shareUrl
        - elements
      additionalProperties: false
      description: The complete authored layout of a Survey Study.
    InProductStudyLayout:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        status:
          type: string
          enum:
            - DRAFT
            - IN_PROGRESS
            - PAUSED
            - COMPLETED
            - ARCHIVED
        version:
          type: integer
          minimum: 1
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        studyUrl:
          type: string
          format: uri
          description: Link to this Study in the Sprig dashboard for authors.
        type:
          type: string
          enum:
            - IN_PRODUCT_SURVEY
          description: An in-product Survey Study.
        platform:
          type: string
          enum:
            - WEB
            - MOBILE
          description: The SDK platform that presents the Study.
        appearance:
          anyOf:
            - $ref: '#/components/schemas/WebStudyAppearanceSettings'
              title: Web appearance
            - $ref: '#/components/schemas/MobileStudyAppearanceSettings'
              title: Mobile appearance
        responseSettings:
          $ref: '#/components/schemas/StoredInProductStudyResponseSettings'
        shareUrl:
          type: 'null'
          description: IN_PRODUCT_SURVEY Studies do not have a shareable respondent URL.
        elements:
          type: array
          items:
            $ref: '#/components/schemas/LayoutElement'
          description: >-
            The entire Study in authored order. Every public Question appears
            exactly once, at the root or nested inside a Block.
      required:
        - id
        - name
        - status
        - version
        - createdAt
        - updatedAt
        - studyUrl
        - type
        - platform
        - appearance
        - responseSettings
        - shareUrl
        - elements
      additionalProperties: false
      description: >-
        The complete authored layout of an IN_PRODUCT_SURVEY Study. Blocks are
        supported; Pages are not.
    StoredStudyCompletion:
      oneOf:
        - type: object
          properties:
            mode:
              type: string
              enum:
                - FIXED
            responseLimit:
              type: integer
              minimum: 1
              description: >-
                Total responses after which the Study completes. In-product
                FIXED Studies also use Sprig's non-configurable daily delivery
                cap of 500.
          required:
            - mode
            - responseLimit
          additionalProperties: false
          title: Response limit
        - type: object
          properties:
            mode:
              type: string
              enum:
                - UNTIL_DATE
            closeAt:
              type: string
              format: date-time
          required:
            - mode
            - closeAt
          additionalProperties: false
          title: End date
        - type: object
          properties:
            mode:
              type: string
              enum:
                - ONGOING
          required:
            - mode
          additionalProperties: false
          title: Ongoing
      description: Completion settings returned for a Study.
    StudyRetake:
      type: object
      properties:
        invitationMode:
          type: string
          enum:
            - GENERATED
            - PROVIDED
            - IDENTIFIED
          description: >-
            How respondents are told apart. `GENERATED` uses invitations created
            with the invitations endpoint, `PROVIDED` uses your own values in
            the `iid` query parameter, and `IDENTIFIED` uses the `user_id` query
            parameter.
        responseLimit:
          type: string
          enum:
            - PER_INVITATION
            - UNLIMITED
          description: >-
            `PER_INVITATION` accepts one response per invitation. `UNLIMITED`
            accepts any number.
        resume:
          type: object
          properties:
            enabled:
              type: boolean
              description: >-
                Whether a respondent who leaves mid-survey can return with the
                same link and continue where they left off. Requires
                `responseLimit` `PER_INVITATION`.
            windowDays:
              type: integer
              minimum: 1
              maximum: 31
              description: >-
                How many days a respondent has to come back and finish an
                incomplete response.
          required:
            - enabled
            - windowDays
          additionalProperties: false
      required:
        - invitationMode
        - responseLimit
        - resume
      additionalProperties: false
      description: How the Study handles respondents who come back to it.
    LayoutElement:
      oneOf:
        - $ref: '#/components/schemas/LayoutQuestionElement'
          title: Question
        - $ref: '#/components/schemas/LayoutBlockElement'
          title: Block
      discriminator:
        propertyName: type
        mapping:
          QUESTION: '#/components/schemas/LayoutQuestionElement'
          BLOCK: '#/components/schemas/LayoutBlockElement'
      description: 'One ordered node in the Study layout: a full Question or a Block.'
    WebStudyAppearanceSettings:
      type: object
      properties:
        layout:
          $ref: '#/components/schemas/StudyAppearanceLayout'
        showBranding:
          type: boolean
          description: Whether Sprig and product branding are shown.
        endCard:
          $ref: '#/components/schemas/StudyEndCardSettings'
        replayDurationSeconds:
          type:
            - integer
            - 'null'
          exclusiveMinimum: 0
          description: Replay duration, or null when disabled.
        replayDurationType:
          type:
            - string
            - 'null'
          enum:
            - BEFORE
            - AFTER
            - BEFORE_AND_AFTER
            - null
          description: Replay direction, or null when disabled.
      required:
        - layout
        - showBranding
        - endCard
        - replayDurationSeconds
        - replayDurationType
      additionalProperties: false
      description: Appearance and replay settings returned for a Web in-product survey.
    MobileStudyAppearanceSettings:
      type: object
      properties:
        layout:
          $ref: '#/components/schemas/StudyAppearanceLayout'
        showBranding:
          type: boolean
          description: Whether Sprig and product branding are shown.
        endCard:
          $ref: '#/components/schemas/StudyEndCardSettings'
        replayDurationSeconds:
          type:
            - integer
            - 'null'
          exclusiveMinimum: 0
          description: Replay duration, or null when disabled.
        replayDurationType:
          type:
            - string
            - 'null'
          enum:
            - BEFORE
            - AFTER
            - BEFORE_AND_AFTER
            - null
          description: Replay direction, or null when disabled.
        mobileLinkBehavior:
          type: string
          enum:
            - IN_APP
            - EXTERNAL
          description: Where respondent links open.
      required:
        - layout
        - showBranding
        - endCard
        - replayDurationSeconds
        - replayDurationType
        - mobileLinkBehavior
      additionalProperties: false
      description: >-
        Appearance, replay, and link settings returned for a Mobile in-product
        survey.
    StoredInProductStudyResponseSettings:
      type: object
      properties:
        completion:
          $ref: '#/components/schemas/StoredStudyCompletion'
        requireIdentifiedRespondent:
          type: boolean
        allowBackwardNavigation:
          type: boolean
        sampling:
          $ref: '#/components/schemas/StudySampling'
        recontact:
          $ref: '#/components/schemas/StudyRecontactSettings'
      required:
        - completion
        - requireIdentifiedRespondent
        - allowBackwardNavigation
        - recontact
      additionalProperties: false
      description: >-
        Canonical response and recontact settings returned for an
        IN_PRODUCT_SURVEY Study.
    LayoutQuestionElement:
      type: object
      properties:
        type:
          type: string
          enum:
            - QUESTION
        question:
          $ref: '#/components/schemas/Question'
      required:
        - type
        - question
      additionalProperties: false
      description: >-
        A Question in the Study layout. The nested question is the full Question
        resource, including title, type, options, and Question-owned logic.
      title: Question
    LayoutBlockElement:
      type: object
      properties:
        type:
          type: string
          enum:
            - BLOCK
        id:
          type: string
          format: uuid
        name:
          type: string
          description: Stable caller-defined name, unique among Blocks in the Study.
        label:
          type: string
          description: Display label for the Block.
        displayAsPage:
          type: boolean
          description: When true, the Block is shown as a single Page.
        randomizePosition:
          type: boolean
          description: Whether this Block moves inside its parent shuffle.
        subsetCount:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            How many eligible direct children each respondent sees. Null when
            the Block has no subset.
        displayLogic:
          anyOf:
            - $ref: '#/components/schemas/DisplayLogic'
              title: Display logic
            - type: 'null'
              title: No display logic
          description: >-
            Display logic owned by this Block. Null when the Block is always
            shown.
        skipLogic:
          type: array
          items:
            $ref: '#/components/schemas/SkipLogicRule'
          maxItems: 20
          description: >-
            Skip logic owned by this Block. An empty array means the Block has
            none.
        elements:
          type: array
          items:
            $ref: '#/components/schemas/LayoutElement'
          description: Ordered Questions and nested Blocks contained by this Block.
      required:
        - type
        - id
        - displayAsPage
        - randomizePosition
        - subsetCount
        - displayLogic
        - skipLogic
        - elements
      additionalProperties: false
      description: >-
        A Block and everything nested inside it. Block-owned display and skip
        logic stay on the Block; member Questions keep only their own logic.
      title: Block
    StudyAppearanceLayout:
      type: string
      enum:
        - FIXED
        - CONVERSATIONAL
      description: The respondent layout used by an in-product Study.
    StudyEndCardSettings:
      type: object
      properties:
        enabled:
          type: boolean
        headline:
          type:
            - string
            - 'null'
        subheader:
          type:
            - string
            - 'null'
      required:
        - enabled
        - headline
        - subheader
      additionalProperties: false
      description: Plain-text thank-you-card settings stored on the first Question.
    StudySampling:
      oneOf:
        - type: object
          properties:
            mode:
              type: string
              enum:
                - PERCENTAGE
            percentage:
              type: number
              exclusiveMinimum: 0
              maximum: 100
              description: Percentage of eligible users who may receive the Study.
          required:
            - mode
            - percentage
          additionalProperties: false
          title: Percentage of eligible users
        - type: object
          properties:
            mode:
              type: string
              enum:
                - DAILY_SEND_CAP
            dailySendCap:
              type: integer
              minimum: 1
              description: Maximum Study sends per day.
          required:
            - mode
            - dailySendCap
          additionalProperties: false
          title: Daily send cap
      description: >-
        How an ongoing IN_PRODUCT_SURVEY Study limits delivery: a percentage of
        eligible users or a daily send cap. Omission for an ONGOING Study
        defaults to 7 percent.
    StudyRecontactSettings:
      type: object
      properties:
        retakeSurvey:
          type: boolean
          description: Whether the same respondent can take the Study more than once.
        resurveyWindowSeconds:
          type:
            - number
            - 'null'
          minimum: 0
          description: >-
            Per-Study recontact window in seconds. Null uses the product-level
            default.
      required:
        - retakeSurvey
        - resurveyWindowSeconds
      additionalProperties: false
      description: >-
        Controls whether respondents can retake an IN_PRODUCT_SURVEY Study and
        its per-Study recontact window.
    Question:
      oneOf:
        - $ref: '#/components/schemas/OpenTextQuestion'
          title: Open text
        - $ref: '#/components/schemas/AiDynamicQuestion'
          title: AI dynamic
        - $ref: '#/components/schemas/SingleSelectQuestion'
          title: Single select
        - $ref: '#/components/schemas/MultipleSelectQuestion'
          title: Multiple select
        - $ref: '#/components/schemas/RatingScaleQuestion'
          title: Rating scale
        - $ref: '#/components/schemas/NpsQuestion'
          title: NPS
        - $ref: '#/components/schemas/ValidatedTextQuestion'
          title: Validated text
        - $ref: '#/components/schemas/RankOrderQuestion'
          title: Rank order
        - $ref: '#/components/schemas/MatrixQuestion'
          title: Matrix
        - $ref: '#/components/schemas/MaxDiffQuestion'
          title: MaxDiff
        - $ref: '#/components/schemas/TextUrlPromptQuestion'
          title: Text / URL prompt
        - $ref: '#/components/schemas/ConsentLegalQuestion'
          title: Consent / legal
        - $ref: '#/components/schemas/ConjointQuestion'
          title: Conjoint
        - $ref: '#/components/schemas/FileUploadQuestion'
          title: File upload
      discriminator:
        propertyName: type
        mapping:
          OPEN_TEXT: '#/components/schemas/OpenTextQuestion'
          AI_DYNAMIC: '#/components/schemas/AiDynamicQuestion'
          SINGLE_SELECT: '#/components/schemas/SingleSelectQuestion'
          MULTIPLE_SELECT: '#/components/schemas/MultipleSelectQuestion'
          RATING_SCALE: '#/components/schemas/RatingScaleQuestion'
          NPS: '#/components/schemas/NpsQuestion'
          VALIDATED_TEXT: '#/components/schemas/ValidatedTextQuestion'
          RANK_ORDER: '#/components/schemas/RankOrderQuestion'
          MATRIX: '#/components/schemas/MatrixQuestion'
          MAX_DIFF: '#/components/schemas/MaxDiffQuestion'
          TEXT_URL_PROMPT: '#/components/schemas/TextUrlPromptQuestion'
          CONSENT_LEGAL: '#/components/schemas/ConsentLegalQuestion'
          CONJOINT: '#/components/schemas/ConjointQuestion'
          FILE_UPLOAD: '#/components/schemas/FileUploadQuestion'
      description: Canonical Question resource.
    DisplayLogic:
      anyOf:
        - $ref: '#/components/schemas/LogicCondition'
          title: Condition
        - type: object
          properties:
            all:
              type: array
              items:
                $ref: '#/components/schemas/LogicExpression'
              minItems: 1
              maxItems: 20
          required:
            - all
          additionalProperties: false
          title: All of
        - type: object
          properties:
            any:
              type: array
              items:
                $ref: '#/components/schemas/LogicExpression'
              minItems: 1
              maxItems: 20
          required:
            - any
          additionalProperties: false
          title: Any of
      description: Typed display logic owned by a Question.
    SkipLogicRule:
      type: object
      properties:
        when:
          $ref: '#/components/schemas/LogicExpression'
        destination:
          $ref: '#/components/schemas/SkipDestination'
      required:
        - when
        - destination
      additionalProperties: false
      description: One skip rule with a typed condition and destination.
    OpenTextQuestion:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        title:
          $ref: '#/components/schemas/QuestionTitle'
        required:
          type: boolean
        displayLogic:
          anyOf:
            - $ref: '#/components/schemas/DisplayLogic'
              title: Display logic
            - type: 'null'
              title: No display logic
        skipLogic:
          $ref: '#/components/schemas/SkipLogic'
        aiFollowUp:
          type:
            - object
            - 'null'
          properties:
            userPrompt:
              type:
                - string
                - 'null'
          required:
            - userPrompt
          additionalProperties: false
        randomizePosition:
          type: boolean
        description:
          $ref: '#/components/schemas/QuestionDescription'
        image:
          $ref: '#/components/schemas/QuestionImage'
        type:
          type: string
          enum:
            - OPEN_TEXT
        responsePlaceholder:
          type: string
          description: Placeholder shown in the response field.
      required:
        - id
        - title
        - required
        - displayLogic
        - skipLogic
        - aiFollowUp
        - randomizePosition
        - type
      additionalProperties: false
      description: Canonical open-text Question resource.
      title: Open text
    AiDynamicQuestion:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        title:
          $ref: '#/components/schemas/QuestionTitle'
        required:
          type: boolean
        displayLogic:
          anyOf:
            - $ref: '#/components/schemas/DisplayLogic'
              title: Display logic
            - type: 'null'
              title: No display logic
        skipLogic:
          $ref: '#/components/schemas/SkipLogic'
        aiFollowUp:
          type:
            - object
            - 'null'
          properties:
            userPrompt:
              type:
                - string
                - 'null'
          required:
            - userPrompt
          additionalProperties: false
        randomizePosition:
          type: boolean
        description:
          $ref: '#/components/schemas/QuestionDescription'
        image:
          $ref: '#/components/schemas/QuestionImage'
        type:
          type: string
          enum:
            - AI_DYNAMIC
        userPrompt:
          type:
            - string
            - 'null'
      required:
        - id
        - title
        - required
        - displayLogic
        - skipLogic
        - aiFollowUp
        - randomizePosition
        - type
        - userPrompt
      additionalProperties: false
      description: Canonical standalone AI Dynamic Question resource.
      title: AI dynamic
    SingleSelectQuestion:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        title:
          $ref: '#/components/schemas/QuestionTitle'
        required:
          type: boolean
        displayLogic:
          anyOf:
            - $ref: '#/components/schemas/DisplayLogic'
              title: Display logic
            - type: 'null'
              title: No display logic
        skipLogic:
          $ref: '#/components/schemas/SkipLogic'
        aiFollowUp:
          type:
            - object
            - 'null'
          properties:
            userPrompt:
              type:
                - string
                - 'null'
          required:
            - userPrompt
          additionalProperties: false
        randomizePosition:
          type: boolean
        description:
          $ref: '#/components/schemas/QuestionDescription'
        image:
          $ref: '#/components/schemas/QuestionImage'
        type:
          type: string
          enum:
            - SINGLE_SELECT
        randomizeOptions:
          type: boolean
        presentation:
          type: string
          enum:
            - LIST
            - DROPDOWN
        options:
          type: array
          items:
            $ref: '#/components/schemas/QuestionOptionResponse'
        carryForward:
          $ref: '#/components/schemas/CarryForward'
      required:
        - id
        - title
        - required
        - displayLogic
        - skipLogic
        - aiFollowUp
        - randomizePosition
        - type
        - randomizeOptions
        - presentation
        - options
      additionalProperties: false
      description: Canonical single-select Question resource.
      title: Single select
    MultipleSelectQuestion:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        title:
          $ref: '#/components/schemas/QuestionTitle'
        required:
          type: boolean
        displayLogic:
          anyOf:
            - $ref: '#/components/schemas/DisplayLogic'
              title: Display logic
            - type: 'null'
              title: No display logic
        skipLogic:
          $ref: '#/components/schemas/SkipLogic'
        aiFollowUp:
          type:
            - object
            - 'null'
          properties:
            userPrompt:
              type:
                - string
                - 'null'
          required:
            - userPrompt
          additionalProperties: false
        randomizePosition:
          type: boolean
        description:
          $ref: '#/components/schemas/QuestionDescription'
        image:
          $ref: '#/components/schemas/QuestionImage'
        type:
          type: string
          enum:
            - MULTIPLE_SELECT
        randomizeOptions:
          type: boolean
        options:
          type: array
          items:
            $ref: '#/components/schemas/QuestionOptionResponse'
        selection:
          $ref: '#/components/schemas/MultipleSelectSelection'
        displayLimit:
          type: integer
          minimum: 2
          description: >-
            Total number of authored choices shown to each respondent, including
            pinned choices.
        carryForward:
          $ref: '#/components/schemas/CarryForward'
      required:
        - id
        - title
        - required
        - displayLogic
        - skipLogic
        - aiFollowUp
        - randomizePosition
        - type
        - randomizeOptions
        - options
      additionalProperties: false
      description: Canonical multiple-select Question resource.
      title: Multiple select
    RatingScaleQuestion:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        title:
          $ref: '#/components/schemas/QuestionTitle'
        required:
          type: boolean
        displayLogic:
          anyOf:
            - $ref: '#/components/schemas/DisplayLogic'
              title: Display logic
            - type: 'null'
              title: No display logic
        skipLogic:
          $ref: '#/components/schemas/SkipLogic'
        aiFollowUp:
          type:
            - object
            - 'null'
          properties:
            userPrompt:
              type:
                - string
                - 'null'
          required:
            - userPrompt
          additionalProperties: false
        randomizePosition:
          type: boolean
        description:
          $ref: '#/components/schemas/QuestionDescription'
        image:
          $ref: '#/components/schemas/QuestionImage'
        type:
          type: string
          enum:
            - RATING_SCALE
        range:
          $ref: '#/components/schemas/RatingScaleRange'
        scaleLabelType:
          $ref: '#/components/schemas/RatingScaleLabelType'
        lowEndLabel:
          type:
            - string
            - 'null'
        highEndLabel:
          type:
            - string
            - 'null'
      required:
        - id
        - title
        - required
        - displayLogic
        - skipLogic
        - aiFollowUp
        - randomizePosition
        - type
        - range
        - scaleLabelType
        - lowEndLabel
        - highEndLabel
      additionalProperties: false
      description: Canonical rating-scale Question resource.
      title: Rating scale
    NpsQuestion:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        title:
          $ref: '#/components/schemas/QuestionTitle'
        required:
          type: boolean
        displayLogic:
          anyOf:
            - $ref: '#/components/schemas/DisplayLogic'
              title: Display logic
            - type: 'null'
              title: No display logic
        skipLogic:
          $ref: '#/components/schemas/SkipLogic'
        aiFollowUp:
          type:
            - object
            - 'null'
          properties:
            userPrompt:
              type:
                - string
                - 'null'
          required:
            - userPrompt
          additionalProperties: false
        randomizePosition:
          type: boolean
        description:
          $ref: '#/components/schemas/QuestionDescription'
        image:
          $ref: '#/components/schemas/QuestionImage'
        type:
          type: string
          enum:
            - NPS
        lowEndLabel:
          type: string
        highEndLabel:
          type: string
      required:
        - id
        - title
        - required
        - displayLogic
        - skipLogic
        - aiFollowUp
        - randomizePosition
        - type
        - lowEndLabel
        - highEndLabel
      additionalProperties: false
      description: Canonical Net Promoter Score Question resource.
      title: NPS
    ValidatedTextQuestion:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        title:
          $ref: '#/components/schemas/QuestionTitle'
        required:
          type: boolean
        displayLogic:
          anyOf:
            - $ref: '#/components/schemas/DisplayLogic'
              title: Display logic
            - type: 'null'
              title: No display logic
        skipLogic:
          $ref: '#/components/schemas/SkipLogic'
        aiFollowUp:
          type:
            - object
            - 'null'
          properties:
            userPrompt:
              type:
                - string
                - 'null'
          required:
            - userPrompt
          additionalProperties: false
        randomizePosition:
          type: boolean
        description:
          $ref: '#/components/schemas/QuestionDescription'
        image:
          $ref: '#/components/schemas/QuestionImage'
        type:
          type: string
          enum:
            - VALIDATED_TEXT
        validation:
          $ref: '#/components/schemas/ValidatedTextValidation'
        responsePlaceholder:
          type: string
          description: Placeholder shown in the response field.
        validationErrorMessage:
          type: string
          minLength: 1
          maxLength: 200
          description: Error shown when the response does not satisfy validation.
        footer:
          $ref: '#/components/schemas/QuestionFooter'
      required:
        - id
        - title
        - required
        - displayLogic
        - skipLogic
        - aiFollowUp
        - randomizePosition
        - type
        - validation
      additionalProperties: false
      description: Canonical validated-text Question resource.
      title: Validated text
    RankOrderQuestion:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        title:
          $ref: '#/components/schemas/QuestionTitle'
        required:
          type: boolean
        displayLogic:
          anyOf:
            - $ref: '#/components/schemas/DisplayLogic'
              title: Display logic
            - type: 'null'
              title: No display logic
        skipLogic:
          $ref: '#/components/schemas/SkipLogic'
        aiFollowUp:
          type:
            - object
            - 'null'
          properties:
            userPrompt:
              type:
                - string
                - 'null'
          required:
            - userPrompt
          additionalProperties: false
        randomizePosition:
          type: boolean
        description:
          $ref: '#/components/schemas/QuestionDescription'
        image:
          $ref: '#/components/schemas/QuestionImage'
        type:
          type: string
          enum:
            - RANK_ORDER
        options:
          type: array
          items:
            $ref: '#/components/schemas/RankOrderOption'
          minItems: 2
        randomizeOptions:
          type: boolean
        labelForHighestRank:
          type: string
          maxLength: 255
        labelForLowestRank:
          type: string
          maxLength: 255
        carryForward:
          $ref: '#/components/schemas/CarryForward'
      required:
        - id
        - title
        - required
        - displayLogic
        - skipLogic
        - aiFollowUp
        - randomizePosition
        - type
        - options
        - randomizeOptions
        - labelForHighestRank
        - labelForLowestRank
      additionalProperties: false
      description: Canonical rank-order Question resource.
      title: Rank order
    MatrixQuestion:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        title:
          $ref: '#/components/schemas/QuestionTitle'
        required:
          type: boolean
        displayLogic:
          anyOf:
            - $ref: '#/components/schemas/DisplayLogic'
              title: Display logic
            - type: 'null'
              title: No display logic
        skipLogic:
          $ref: '#/components/schemas/SkipLogic'
        aiFollowUp:
          type:
            - object
            - 'null'
          properties:
            userPrompt:
              type:
                - string
                - 'null'
          required:
            - userPrompt
          additionalProperties: false
        randomizePosition:
          type: boolean
        description:
          $ref: '#/components/schemas/QuestionDescription'
        image:
          $ref: '#/components/schemas/QuestionImage'
        type:
          type: string
          enum:
            - MATRIX
        rows:
          type: array
          items:
            $ref: '#/components/schemas/MatrixItem'
          minItems: 2
        columns:
          type: array
          items:
            $ref: '#/components/schemas/MatrixItem'
          minItems: 2
        randomizeRows:
          type: boolean
        displayLimit:
          type: integer
          minimum: 2
          description: >-
            Total number of authored choices shown to each respondent, including
            pinned choices.
        carryForward:
          $ref: '#/components/schemas/CarryForward'
      required:
        - id
        - title
        - required
        - displayLogic
        - skipLogic
        - aiFollowUp
        - randomizePosition
        - type
        - rows
        - columns
        - randomizeRows
      additionalProperties: false
      description: Canonical Matrix Question resource.
      title: Matrix
    MaxDiffQuestion:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        title:
          $ref: '#/components/schemas/QuestionTitle'
        required:
          type: boolean
        displayLogic:
          anyOf:
            - $ref: '#/components/schemas/DisplayLogic'
              title: Display logic
            - type: 'null'
              title: No display logic
        skipLogic:
          $ref: '#/components/schemas/SkipLogic'
        aiFollowUp:
          type:
            - object
            - 'null'
          properties:
            userPrompt:
              type:
                - string
                - 'null'
          required:
            - userPrompt
          additionalProperties: false
        randomizePosition:
          type: boolean
        description:
          $ref: '#/components/schemas/QuestionDescription'
        image:
          $ref: '#/components/schemas/QuestionImage'
        type:
          type: string
          enum:
            - MAX_DIFF
        options:
          type: array
          items:
            $ref: '#/components/schemas/MaxDiffOption'
          minItems: 4
          maxItems: 24
        labelForBest:
          type: string
          maxLength: 255
        labelForWorst:
          type: string
          maxLength: 255
        configuration:
          $ref: '#/components/schemas/MaxDiffConfiguration'
        selectionStyle:
          $ref: '#/components/schemas/MaxDiffSelectionStyle'
      required:
        - id
        - title
        - required
        - displayLogic
        - skipLogic
        - aiFollowUp
        - randomizePosition
        - type
        - options
        - labelForBest
        - labelForWorst
        - configuration
        - selectionStyle
      additionalProperties: false
      description: Canonical MaxDiff Question resource.
    TextUrlPromptQuestion:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        title:
          $ref: '#/components/schemas/QuestionTitle'
        required:
          type: boolean
        displayLogic:
          anyOf:
            - $ref: '#/components/schemas/DisplayLogic'
              title: Display logic
            - type: 'null'
              title: No display logic
        skipLogic:
          $ref: '#/components/schemas/SkipLogic'
        aiFollowUp:
          type:
            - object
            - 'null'
          properties:
            userPrompt:
              type:
                - string
                - 'null'
          required:
            - userPrompt
          additionalProperties: false
        randomizePosition:
          type: boolean
        description:
          $ref: '#/components/schemas/QuestionDescription'
        image:
          $ref: '#/components/schemas/QuestionImage'
        type:
          type: string
          enum:
            - TEXT_URL_PROMPT
        action:
          $ref: '#/components/schemas/TextUrlPromptActionResponse'
        skipButtonText:
          type: string
      required:
        - id
        - title
        - required
        - displayLogic
        - skipLogic
        - aiFollowUp
        - randomizePosition
        - type
        - action
      additionalProperties: false
      description: Canonical Text/URL Prompt resource.
      title: Text / URL prompt
    ConsentLegalQuestion:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        title:
          $ref: '#/components/schemas/QuestionTitle'
        required:
          type: boolean
        displayLogic:
          anyOf:
            - $ref: '#/components/schemas/DisplayLogic'
              title: Display logic
            - type: 'null'
              title: No display logic
        skipLogic:
          $ref: '#/components/schemas/SkipLogic'
        aiFollowUp:
          type:
            - object
            - 'null'
          properties:
            userPrompt:
              type:
                - string
                - 'null'
          required:
            - userPrompt
          additionalProperties: false
        randomizePosition:
          type: boolean
        description:
          $ref: '#/components/schemas/QuestionDescription'
        image:
          $ref: '#/components/schemas/QuestionImage'
        type:
          type: string
          enum:
            - CONSENT_LEGAL
        consentText:
          type: string
        collectName:
          type: boolean
        submitButtonText:
          type: string
        skipButtonText:
          type: string
        asset:
          $ref: '#/components/schemas/ConsentAsset'
      required:
        - id
        - title
        - required
        - displayLogic
        - skipLogic
        - aiFollowUp
        - randomizePosition
        - type
        - collectName
      additionalProperties: false
      description: Canonical Consent / Legal question resource.
      title: Consent / legal
    ConjointQuestion:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        title:
          $ref: '#/components/schemas/QuestionTitle'
        required:
          type: boolean
        displayLogic:
          anyOf:
            - $ref: '#/components/schemas/DisplayLogic'
              title: Display logic
            - type: 'null'
              title: No display logic
        skipLogic:
          $ref: '#/components/schemas/SkipLogic'
        aiFollowUp:
          type:
            - object
            - 'null'
          properties:
            userPrompt:
              type:
                - string
                - 'null'
          required:
            - userPrompt
          additionalProperties: false
        randomizePosition:
          type: boolean
        description:
          $ref: '#/components/schemas/QuestionDescription'
        image:
          $ref: '#/components/schemas/QuestionImage'
        type:
          type: string
          enum:
            - CONJOINT
        features:
          type: array
          items:
            $ref: '#/components/schemas/ConjointFeature'
        configuration:
          $ref: '#/components/schemas/ConjointConfiguration'
        exclusions:
          type: array
          items:
            $ref: '#/components/schemas/ConjointExclusion'
      required:
        - id
        - title
        - required
        - displayLogic
        - skipLogic
        - aiFollowUp
        - randomizePosition
        - type
        - features
        - configuration
        - exclusions
      additionalProperties: false
      description: Canonical Conjoint Question resource.
    FileUploadQuestion:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        title:
          $ref: '#/components/schemas/QuestionTitle'
        required:
          type: boolean
        displayLogic:
          anyOf:
            - $ref: '#/components/schemas/DisplayLogic'
              title: Display logic
            - type: 'null'
              title: No display logic
        skipLogic:
          $ref: '#/components/schemas/SkipLogic'
        aiFollowUp:
          type:
            - object
            - 'null'
          properties:
            userPrompt:
              type:
                - string
                - 'null'
          required:
            - userPrompt
          additionalProperties: false
        randomizePosition:
          type: boolean
        description:
          $ref: '#/components/schemas/QuestionDescription'
        image:
          $ref: '#/components/schemas/QuestionImage'
        type:
          type: string
          enum:
            - FILE_UPLOAD
        allowedFileTypes:
          type: array
          items:
            $ref: '#/components/schemas/FileUploadFileType'
          minItems: 1
        maxFileSizeBytes:
          type: integer
          exclusiveMinimum: 0
          maximum: 52428800
        maxFiles:
          type: integer
          exclusiveMinimum: 0
          maximum: 1
        skipButtonText:
          type: string
        footer:
          $ref: '#/components/schemas/QuestionFooter'
      required:
        - id
        - title
        - required
        - displayLogic
        - skipLogic
        - aiFollowUp
        - randomizePosition
        - type
        - allowedFileTypes
        - maxFileSizeBytes
        - maxFiles
      additionalProperties: false
      description: Canonical File Upload Question resource.
    LogicCondition:
      type: object
      properties:
        source:
          $ref: '#/components/schemas/LogicConditionSource'
        operator:
          $ref: '#/components/schemas/LogicOperator'
        value:
          anyOf:
            - type: string
              title: Text
            - type: number
              title: Number
            - type: boolean
              title: Yes / no
            - type: array
              items:
                type: string
              title: List
      required:
        - source
        - operator
      additionalProperties: false
      description: >-
        A single typed condition. Operators that inspect answer state omit
        value; choice comparisons use immutable Option values.
      title: Condition
    LogicExpression:
      anyOf:
        - $ref: '#/components/schemas/LogicCondition'
          title: Condition
        - type: object
          properties:
            all:
              type: array
              items:
                $ref: '#/components/schemas/LogicExpression'
              minItems: 1
              maxItems: 20
          required:
            - all
          additionalProperties: false
          title: All of
        - type: object
          properties:
            any:
              type: array
              items:
                $ref: '#/components/schemas/LogicExpression'
              minItems: 1
              maxItems: 20
          required:
            - any
          additionalProperties: false
          title: Any of
      description: >-
        Nested display or skip conditions using all/any groups. Maximum depth is
        5; each group may contain at most 20 children.
    SkipDestination:
      oneOf:
        - $ref: '#/components/schemas/EndSkipDestination'
          title: End of study
        - $ref: '#/components/schemas/QuestionSkipDestination'
          title: Question
      discriminator:
        propertyName: type
        mapping:
          END: '#/components/schemas/EndSkipDestination'
          QUESTION: '#/components/schemas/QuestionSkipDestination'
      description: Public skip destination.
    QuestionTitle:
      type: object
      properties:
        html:
          type: string
        variables:
          type: object
          additionalProperties:
            oneOf:
              - $ref: '#/components/schemas/AttributeVariable'
                title: Environment attribute
              - $ref: '#/components/schemas/QuestionResponseVariable'
                title: Question response
            discriminator:
              propertyName: type
              mapping:
                ATTRIBUTE: '#/components/schemas/AttributeVariable'
                QUESTION_RESPONSE: '#/components/schemas/QuestionResponseVariable'
      required:
        - html
        - variables
      additionalProperties: false
      description: Canonical rich-text Question title.
    SkipLogic:
      type: array
      items:
        $ref: '#/components/schemas/SkipLogicRule'
      maxItems: 20
      description: Ordered skip rules, limited to 20. An empty array clears skip logic.
    QuestionDescription:
      type: object
      properties:
        html:
          type: string
        variables:
          type: object
          additionalProperties:
            oneOf:
              - $ref: '#/components/schemas/AttributeVariable'
                title: Environment attribute
              - $ref: '#/components/schemas/QuestionResponseVariable'
                title: Question response
            discriminator:
              propertyName: type
              mapping:
                ATTRIBUTE: '#/components/schemas/AttributeVariable'
                QUESTION_RESPONSE: '#/components/schemas/QuestionResponseVariable'
      required:
        - html
        - variables
      additionalProperties: false
      description: Canonical respondent-facing Question description.
    QuestionImage:
      type: object
      properties:
        assetId:
          type: string
          minLength: 1
          maxLength: 128
          description: Present when the image was attached from a Study asset.
        url:
          type: string
        altText:
          type:
            - string
            - 'null'
        displaySize:
          type: string
          enum:
            - FIT
            - ACTUAL
        alignment:
          type:
            - string
            - 'null'
          enum:
            - LEFT
            - CENTER
            - RIGHT
            - null
        width:
          type: integer
          exclusiveMinimum: 0
        height:
          type: integer
          exclusiveMinimum: 0
        mediaType:
          type: string
          enum:
            - image/gif
            - image/jpeg
            - image/png
            - image/webp
        originalFilename:
          type: string
      required:
        - url
        - altText
        - displaySize
        - alignment
        - width
        - height
        - mediaType
        - originalFilename
      additionalProperties: false
      description: The image shown with a Question. Omitted when the Question has no image.
    QuestionOptionResponse:
      type: object
      properties:
        value:
          type: string
        label:
          type: string
        behavior:
          $ref: '#/components/schemas/QuestionOptionResponseBehavior'
        textEntryPlaceholder:
          type: string
      required:
        - value
        - label
      additionalProperties: false
      description: Canonical answer Option returned with a choice Question.
    CarryForward:
      type: object
      properties:
        sourceQuestion:
          $ref: '#/components/schemas/ResourceRef'
        qualifyingColumnValues:
          type: array
          items:
            type: string
      required:
        - sourceQuestion
      additionalProperties: false
      description: Carries respondent-selected items from an earlier Question.
    MultipleSelectSelection:
      type: object
      properties:
        min:
          type: integer
          minimum: 0
        max:
          type: integer
          minimum: 1
      required:
        - min
        - max
      additionalProperties: false
      description: Inclusive minimum and maximum number of Options a respondent may select.
    RatingScaleRange:
      anyOf:
        - type: number
          enum:
            - 3
          title: 3 points
        - type: number
          enum:
            - 4
          title: 4 points
        - type: number
          enum:
            - 5
          title: 5 points
        - type: number
          enum:
            - 7
          title: 7 points
        - type: number
          enum:
            - 10
          title: 10 points
      description: Number of points on the rating scale.
    RatingScaleLabelType:
      type: string
      enum:
        - NUMBER
        - STAR
        - SMILEY
      description: How the rating-scale points are displayed.
    ValidatedTextValidation:
      oneOf:
        - $ref: '#/components/schemas/EmailValidation'
          title: Email
        - $ref: '#/components/schemas/UrlValidation'
          title: URL
        - $ref: '#/components/schemas/RegexValidation'
          title: Regular expression
        - $ref: '#/components/schemas/NumberValidation'
          title: Number
        - $ref: '#/components/schemas/PhoneValidation'
          title: Phone
      discriminator:
        propertyName: type
        mapping:
          EMAIL: '#/components/schemas/EmailValidation'
          URL: '#/components/schemas/UrlValidation'
          REGEX: '#/components/schemas/RegexValidation'
          NUMBER: '#/components/schemas/NumberValidation'
          PHONE: '#/components/schemas/PhoneValidation'
      description: The validation rule applied to a validated-text response.
    QuestionFooter:
      type: object
      properties:
        html:
          type: string
        variables:
          type: object
          additionalProperties:
            oneOf:
              - $ref: '#/components/schemas/AttributeVariable'
                title: Environment attribute
              - $ref: '#/components/schemas/QuestionResponseVariable'
                title: Question response
            discriminator:
              propertyName: type
              mapping:
                ATTRIBUTE: '#/components/schemas/AttributeVariable'
                QUESTION_RESPONSE: '#/components/schemas/QuestionResponseVariable'
      required:
        - html
        - variables
      additionalProperties: false
      description: Canonical respondent-facing Question footer.
    RankOrderOption:
      type: object
      properties:
        value:
          type: string
          minLength: 1
          maxLength: 255
          description: Immutable caller-defined value used by responses and Question logic.
        label:
          type: string
          minLength: 1
          maxLength: 255
          description: Text shown to respondents.
      required:
        - value
        - label
      additionalProperties: false
      description: One ordered item returned with a rank-order Question.
    MatrixItem:
      type: object
      properties:
        value:
          type: string
          minLength: 1
          maxLength: 255
          description: Immutable caller-defined value used by responses and Question logic.
        label:
          type: string
          minLength: 1
          maxLength: 255
          description: Text shown to respondents.
      required:
        - value
        - label
      additionalProperties: false
      description: One ordered Matrix row or column.
    MaxDiffOption:
      type: object
      properties:
        value:
          type: string
          minLength: 1
          maxLength: 255
          description: Immutable caller-defined value used by responses and Question logic.
        label:
          type: string
          minLength: 1
          maxLength: 255
          description: Text shown to respondents.
      required:
        - value
        - label
      additionalProperties: false
      description: One item returned with a MaxDiff Question.
    MaxDiffConfiguration:
      type: object
      properties:
        mode:
          $ref: '#/components/schemas/MaxDiffConfigurationMode'
        itemsPerSet:
          type: integer
          exclusiveMinimum: 0
        timesShown:
          type: integer
          exclusiveMinimum: 0
        setsPerUser:
          type: integer
          exclusiveMinimum: 0
          description: Number of MaxDiff sets shown to each respondent.
      required:
        - mode
        - itemsPerSet
        - timesShown
        - setsPerUser
      additionalProperties: false
      description: Resolved MaxDiff set sizing.
    MaxDiffSelectionStyle:
      type: string
      enum:
        - RADIO
        - SMILEY
      description: How respondents mark the best and worst item in each set.
    TextUrlPromptActionResponse:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - CONTINUE
            buttonText:
              type: string
          required:
            - type
          additionalProperties: false
          title: Continue
        - type: object
          properties:
            type:
              type: string
              enum:
                - EXTERNAL
            buttonText:
              type: string
            buttonUrl:
              type: string
          required:
            - type
            - buttonText
            - buttonUrl
          additionalProperties: false
          title: External link
        - type: object
          properties:
            type:
              type: string
              enum:
                - NO_BUTTON
          required:
            - type
          additionalProperties: false
          title: No button
      description: Stored button behavior returned for a Text/URL Prompt.
    ConsentAsset:
      type: object
      properties:
        id:
          type: string
        originalFilename:
          type: string
        url:
          type: string
      required:
        - originalFilename
        - url
      additionalProperties: false
      description: >-
        Consent PDF attached to a Consent / Legal question. id is omitted for
        documents uploaded in the dashboard.
    ConjointFeature:
      type: object
      properties:
        value:
          type: string
        label:
          type: string
        levels:
          type: array
          items:
            $ref: '#/components/schemas/ConjointLevel'
      required:
        - value
        - label
        - levels
      additionalProperties: false
      description: One Conjoint feature and its ordered levels.
    ConjointConfiguration:
      type: object
      properties:
        choicesPerTask:
          type: integer
          exclusiveMinimum: 0
        tasksPerRespondent:
          type: integer
          exclusiveMinimum: 0
        showNoneOption:
          type: boolean
        noneOptionLabel:
          type: string
        randomizeFeatureOrder:
          type: boolean
      required:
        - choicesPerTask
        - tasksPerRespondent
        - showNoneOption
        - noneOptionLabel
        - randomizeFeatureOrder
      additionalProperties: false
      description: Respondent task configuration for a Conjoint Question.
    ConjointExclusion:
      type: object
      properties:
        when:
          $ref: '#/components/schemas/ConjointExclusionCondition'
        exclude:
          type: array
          items:
            $ref: '#/components/schemas/ConjointExclusionCondition'
      required:
        - when
        - exclude
      additionalProperties: false
      description: A combination of Conjoint levels that respondents must not see.
    FileUploadFileType:
      type: string
      enum:
        - PNG
        - JPEG
        - GIF
        - PDF
        - DOC
        - HEIC
        - WEBP
      description: >-
        A file type that respondents may upload. JPEG includes .jpg files and
        DOC includes .docx files.
    LogicConditionSource:
      oneOf:
        - $ref: '#/components/schemas/QuestionResponseConditionSource'
          title: Question response
        - $ref: '#/components/schemas/AttributeConditionSource'
          title: Environment attribute
      discriminator:
        propertyName: type
        mapping:
          QUESTION_RESPONSE: '#/components/schemas/QuestionResponseConditionSource'
          ATTRIBUTE: '#/components/schemas/AttributeConditionSource'
      description: Typed source of a logic condition.
    LogicOperator:
      type: string
      enum:
        - EQUALS
        - NOT_EQUALS
        - GREATER_THAN
        - GREATER_THAN_OR_EQUAL
        - LESS_THAN
        - LESS_THAN_OR_EQUAL
        - IN
        - NOT_IN
        - INCLUDES_ALL
        - EXACTLY
        - CONTAINS
        - NOT_CONTAINS
        - STARTS_WITH
        - ENDS_WITH
        - ANSWERED
        - SKIPPED
        - PARTIALLY_ANSWERED
        - EXISTS
        - NOT_EXISTS
      description: >-
        Uppercase Public API operators. Study API selects the valid
        operator/value branch from the source type and referenced Question type.
    EndSkipDestination:
      type: object
      properties:
        type:
          type: string
          enum:
            - END
      required:
        - type
      additionalProperties: false
      description: Ends the Study.
      title: End of study
    QuestionSkipDestination:
      type: object
      properties:
        type:
          type: string
          enum:
            - QUESTION
        question:
          $ref: '#/components/schemas/ResourceRef'
      required:
        - type
        - question
      additionalProperties: false
      description: Skips to a Question.
      title: Question
    AttributeVariable:
      type: object
      properties:
        type:
          type: string
          enum:
            - ATTRIBUTE
        attribute:
          type: string
          minLength: 1
          maxLength: 128
        fallback:
          type: string
          maxLength: 500
      required:
        - type
        - attribute
      additionalProperties: false
      description: A rich-text replacement sourced from an environment attribute.
      title: Environment attribute
    QuestionResponseVariable:
      type: object
      properties:
        type:
          type: string
          enum:
            - QUESTION_RESPONSE
        question:
          $ref: '#/components/schemas/ResourceRef'
        fallback:
          type: string
          maxLength: 500
      required:
        - type
        - question
      additionalProperties: false
      description: A rich-text replacement sourced from an earlier Question response.
      title: Question response
    QuestionOptionResponseBehavior:
      type: string
      enum:
        - PINNED
        - OTHER_TEXT
        - NONE_OF_THE_ABOVE
      description: Non-default Option behavior included in a Question response.
    ResourceRef:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          minLength: 1
          maxLength: 128
      additionalProperties: false
      description: A reference by canonical identifier, unique name, or both.
    EmailValidation:
      type: object
      properties:
        type:
          type: string
          enum:
            - EMAIL
      required:
        - type
      additionalProperties: false
      description: Requires a valid email address.
      title: Email
    UrlValidation:
      type: object
      properties:
        type:
          type: string
          enum:
            - URL
      required:
        - type
      additionalProperties: false
      description: Requires a valid URL.
      title: URL
    RegexValidation:
      type: object
      properties:
        type:
          type: string
          enum:
            - REGEX
        pattern:
          type: string
          minLength: 1
          maxLength: 500
          description: Regular expression the complete response must match.
      required:
        - type
        - pattern
      additionalProperties: false
      description: Requires a response matching a custom regular expression.
      title: Regular expression
    NumberValidation:
      type: object
      properties:
        type:
          type: string
          enum:
            - NUMBER
        min:
          type: number
          description: Optional inclusive minimum; min and max must be supplied together.
        max:
          type: number
          description: Optional inclusive maximum; min and max must be supplied together.
        allowDecimals:
          type: boolean
          default: false
          description: Whether decimal responses are accepted.
      required:
        - type
      additionalProperties: false
      description: Requires a numeric response, optionally within a whole-number range.
      title: Number
    PhoneValidation:
      type: object
      properties:
        type:
          type: string
          enum:
            - PHONE
        countries:
          type: array
          items:
            type: string
            enum:
              - US
              - CA
          minItems: 1
          description: Allowed phone-number country or region codes.
      required:
        - type
        - countries
      additionalProperties: false
      description: Requires a phone number from one of the allowed countries or regions.
      title: Phone
    MaxDiffConfigurationMode:
      type: string
      enum:
        - RECOMMENDED
        - CUSTOM
      description: >-
        RECOMMENDED derives set sizing from the number of items; CUSTOM uses
        caller-supplied configuration.
    ConjointLevel:
      type: object
      properties:
        value:
          type: string
        label:
          type: string
      required:
        - value
        - label
      additionalProperties: false
      description: One level within a Conjoint feature.
    ConjointExclusionCondition:
      type: object
      properties:
        featureValue:
          type: string
        levelValues:
          type: array
          items:
            type: string
      required:
        - featureValue
        - levelValues
      additionalProperties: false
      description: Feature and level values referenced by a Conjoint exclusion.
    QuestionResponseConditionSource:
      type: object
      properties:
        type:
          type: string
          enum:
            - QUESTION_RESPONSE
        question:
          $ref: '#/components/schemas/ResourceRef'
      required:
        - type
        - question
      additionalProperties: false
      description: A condition sourced from an earlier Question response.
      title: Question response
    AttributeConditionSource:
      type: object
      properties:
        type:
          type: string
          enum:
            - ATTRIBUTE
        attribute:
          type: string
          minLength: 1
          maxLength: 128
      required:
        - type
        - attribute
      additionalProperties: false
      description: A condition sourced from an environment attribute definition.
      title: Environment attribute
  securitySchemes:
    EnvironmentApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Use `API-Key YOUR_API_KEY`. The key selects the Production or
        Development environment.

````