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

# Get widget

> Returns the widget configuration stored on the environment's draft version: which surface the embed runs and the settings of each surface. Visitors see the published version, so this can differ from the live site until the environment is published.



## OpenAPI

````yaml /specs-prettified/realtime/openapi.stable.json get /v1/stable/widget
openapi: 3.0.0
info:
  title: Realtime
  description: Realtime gateway API service
  version: 1.0.0
  contact: {}
servers:
  - url: https://realtime-api.voiceflow.com
security: []
tags: []
paths:
  /v1/stable/widget:
    get:
      tags:
        - Widget
      summary: Get widget
      description: "Returns the widget configuration stored on the environment's draft
        version: which surface the embed runs and the settings of each surface.
        Visitors see the published version, so this can differ from the live
        site until the environment is published."
      operationId: StableWidgetController_get
      parameters:
        - name: projectID
          required: true
          in: query
          schema:
            type: string
            description: The ID of the project to operate on.
        - name: environmentAlias
          required: true
          in: query
          schema:
            type: string
            description: The alias of the environment to operate on (e.g. `main`).
      responses:
        "200":
          description: Returns the widget with its surface `type` and its `chat`, `voice`,
            `common`, and `security` blocks, as stored on the environment's
            draft version.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StableWidgetResponse"
          x-vf-doc:
            description: Returns the widget with its surface `type` and its `chat`, `voice`,
              `common`, and `security` blocks, as stored on the environment's
              draft version.
      security:
        - token: []
components:
  schemas:
    StableWidgetResponse:
      type: object
      properties:
        widget:
          description: The widget configuration stored on the environment's draft version.
          allOf:
            - $ref: "#/components/schemas/StableWidget"
      required:
        - widget
    StableWidget:
      type: object
      properties:
        type:
          description: "Which surface the embed runs: `chat` for a text chat widget,
            `voice` for a click-to-call widget. It selects whether the `chat` or
            the `voice` block is applied at runtime; the other is kept but
            ignored."
          allOf:
            - $ref: "#/components/schemas/WidgetSettingsWidgetType"
          enum:
            - chat
            - voice
          x-enumNames:
            - CHAT
            - VOICE
        chat:
          description: "The chat surface, applied when `type` is `chat`: how it renders on
            the page (floating `widget`, inline `embed`, or `popover`), its
            header and agent images, the opening banner, the input placeholder,
            the privacy and AI disclaimers, voice input and output, file upload,
            and the end-of-conversation CSAT survey."
          allOf:
            - $ref: "#/components/schemas/WidgetSettingsChatSettings"
        voice:
          description: "The voice surface, applied when `type` is `voice`: how the call
            screen renders, and the copy shown through a call — the
            call-to-action, the start and end button labels, and the listening
            and talking states."
          allOf:
            - $ref: "#/components/schemas/WidgetSettingsVoiceSettings"
        common:
          description: "Chrome shared by both surfaces: the launcher, the primary color
            and its palette, the font, the position and spacing on the page, the
            width, the Voiceflow footer link, and where the conversation is
            persisted between page loads."
          allOf:
            - $ref: "#/components/schemas/WidgetSettingsCommonSettings"
        security:
          description: Approved-domain allowlisting and transcript controls. Absent on a
            project that has never configured it. Writing this block requires a
            plan entitlement.
          allOf:
            - $ref: "#/components/schemas/WidgetSettingsSecuritySettings"
      required:
        - type
        - chat
        - voice
        - common
    WidgetSettingsWidgetType:
      type: string
      enum:
        - chat
        - voice
      x-enumNames:
        - CHAT
        - VOICE
    WidgetSettingsChatSettings:
      type: object
      properties:
        renderMode:
          $ref: "#/components/schemas/WidgetSettingsChatRenderMode"
        headerImage:
          $ref: "#/components/schemas/WidgetSettingsChatSettingsHeaderImage"
        agentImage:
          $ref: "#/components/schemas/WidgetSettingsChatSettingsAgentImage"
        banner:
          $ref: "#/components/schemas/WidgetSettingsChatSettingsBanner"
        placeholderText:
          type: string
        disclaimer:
          allOf:
            - $ref: "#/components/schemas/WidgetSettingsChatDisclaimer"
        aiDisclaimer:
          $ref: "#/components/schemas/WidgetSettingsChatSettingsAIDisclaimer"
        handoffToAgentImageURL:
          nullable: true
          type: string
        streamingDisabled:
          type: boolean
        responseLoader:
          allOf:
            - $ref: "#/components/schemas/WidgetSettingsChatSettingsResponseLoader"
        voiceInput:
          type: boolean
        voiceOutput:
          type: boolean
        voiceOutputMuted:
          type: boolean
        voiceMode:
          type: boolean
        notificationSound:
          type: boolean
        fileUpload:
          allOf:
            - $ref: "#/components/schemas/WidgetSettingsChatSettingsFileUpload"
        csat:
          allOf:
            - $ref: "#/components/schemas/WidgetSettingsChatSettingsCSAT"
      required:
        - renderMode
        - headerImage
        - agentImage
        - banner
        - placeholderText
        - aiDisclaimer
        - voiceInput
        - voiceOutput
    WidgetSettingsChatRenderMode:
      type: string
      enum:
        - embed
        - widget
        - popover
      x-enumNames:
        - EMBED
        - WIDGET
        - POPOVER
    WidgetSettingsChatSettingsHeaderImage:
      type: object
      properties:
        enabled:
          type: boolean
        url:
          nullable: true
          type: string
      required:
        - enabled
    WidgetSettingsChatSettingsAgentImage:
      type: object
      properties:
        enabled:
          type: boolean
        url:
          nullable: true
          type: string
      required:
        - enabled
    WidgetSettingsChatSettingsBanner:
      type: object
      properties:
        title:
          type: string
        description:
          type: string
        enabled:
          type: boolean
        imageURL:
          nullable: true
          type: string
      required:
        - title
        - description
        - enabled
    WidgetSettingsChatDisclaimer:
      type: object
      properties:
        enabled:
          type: boolean
        title:
          type: string
        description:
          type: string
        primaryButtonText:
          type: string
        secondaryButtonText:
          type: string
        secondaryButtonURL:
          type: string
      required:
        - enabled
        - title
        - description
        - primaryButtonText
        - secondaryButtonText
        - secondaryButtonURL
    WidgetSettingsChatSettingsAIDisclaimer:
      type: object
      properties:
        text:
          type: string
        enabled:
          type: boolean
      required:
        - text
        - enabled
    WidgetSettingsChatSettingsResponseLoader:
      oneOf:
        - $ref: "#/components/schemas/WidgetSettingsChatSettingsResponseLoaderDots"
        - $ref: "#/components/schemas/WidgetSettingsChatSettingsResponseLoaderSpinnerWith\
            Text"
    WidgetSettingsChatSettingsResponseLoaderDots:
      type: object
      properties:
        type:
          type: string
          enum:
            - dots
          x-enumNames:
            - DOTS
      required:
        - type
    WidgetSettingsChatSettingsResponseLoaderSpinnerWithText:
      type: object
      properties:
        type:
          type: string
          enum:
            - spinner-with-text
          x-enumNames:
            - SPINNER_WITH_TEXT
        text:
          type: string
      required:
        - type
        - text
    WidgetSettingsChatSettingsFileUpload:
      type: object
      properties:
        enabled:
          type: boolean
        maxFilesPerConversation:
          nullable: true
          type: number
        model:
          type: string
      required:
        - enabled
    WidgetSettingsChatSettingsCSAT:
      type: object
      properties:
        enabled:
          type: boolean
        promptText:
          type: string
        includeFreetextFeedback:
          type: boolean
      required:
        - enabled
        - includeFreetextFeedback
    WidgetSettingsVoiceSettings:
      type: object
      properties:
        renderMode:
          $ref: "#/components/schemas/WidgetSettingsVoiceRenderMode"
        content:
          $ref: "#/components/schemas/WidgetSettingsVoiceSettingsContent"
      required:
        - renderMode
        - content
    WidgetSettingsVoiceRenderMode:
      type: string
      enum:
        - full
        - compact
        - expand
      x-enumNames:
        - FULL
        - COMPACT
        - EXPAND
    WidgetSettingsVoiceSettingsContent:
      type: object
      properties:
        imageURL:
          nullable: true
          type: string
        talkingText:
          type: string
        endButtonText:
          type: string
        listeningText:
          type: string
        startButtonText:
          type: string
        callToActionText:
          type: string
      required:
        - talkingText
        - endButtonText
        - listeningText
        - startButtonText
        - callToActionText
    WidgetSettingsCommonSettings:
      type: object
      properties:
        sideSpacing:
          type: string
        bottomSpacing:
          type: string
        width:
          type: string
        position:
          $ref: "#/components/schemas/WidgetSettingsWidgetPosition"
        fontFamily:
          type: string
        primaryColor:
          $ref: "#/components/schemas/WidgetSettingsPrimaryColor"
        poweredBy:
          type: boolean
        launcher:
          $ref: "#/components/schemas/WidgetSettingsCommonSettingsLauncher"
        footerLink:
          $ref: "#/components/schemas/WidgetSettingsCommonSettingsFooterLink"
        persistence:
          $ref: "#/components/schemas/WidgetSettingsChatPersistence"
        featureFlags:
          allOf:
            - $ref: "#/components/schemas/WidgetSettingsCommonSettingsFeatureFlags"
      required:
        - sideSpacing
        - bottomSpacing
        - position
        - fontFamily
        - primaryColor
        - poweredBy
        - launcher
        - footerLink
        - persistence
    WidgetSettingsWidgetPosition:
      type: string
      enum:
        - right
        - left
      x-enumNames:
        - RIGHT
        - LEFT
    WidgetSettingsPrimaryColor:
      type: object
      properties:
        color:
          type: string
        palette:
          $ref: "#/components/schemas/WidgetSettingsColorPalette"
      required:
        - color
        - palette
    WidgetSettingsColorPalette:
      type: object
      properties:
        "50":
          type: string
        "100":
          type: string
        "200":
          type: string
        "300":
          type: string
        "400":
          type: string
        "500":
          type: string
        "600":
          type: string
        "700":
          type: string
        "800":
          type: string
        "900":
          type: string
      required:
        - "50"
        - "100"
        - "200"
        - "300"
        - "400"
        - "500"
        - "600"
        - "700"
        - "800"
        - "900"
    WidgetSettingsCommonSettingsLauncher:
      type: object
      properties:
        type:
          $ref: "#/components/schemas/WidgetSettingsLauncherType"
        text:
          type: string
        imageURL:
          nullable: true
          type: string
      required:
        - type
    WidgetSettingsLauncherType:
      type: string
      enum:
        - icon
        - label
        - both
      x-enumNames:
        - ICON
        - LABEL
        - BOTH
    WidgetSettingsCommonSettingsFooterLink:
      type: object
      properties:
        enabled:
          type: boolean
        text:
          type: string
        url:
          type: string
      required:
        - enabled
    WidgetSettingsChatPersistence:
      type: string
      enum:
        - memory
        - localStorage
        - sessionStorage
      x-enumNames:
        - MEMORY
        - LOCAL_STORAGE
        - SESSION_STORAGE
    WidgetSettingsCommonSettingsFeatureFlags:
      type: object
      additionalProperties:
        type: boolean
    WidgetSettingsSecuritySettings:
      type: object
      properties:
        approvedDomains:
          $ref: "#/components/schemas/WidgetSettingsSecuritySettingsApprovedDomains"
        disableTranscript:
          type: boolean
        isTranscriptDownloadEnabled:
          type: boolean
      required:
        - approvedDomains
        - disableTranscript
    WidgetSettingsSecuritySettingsApprovedDomains:
      type: object
      properties:
        enabled:
          type: boolean
        domains:
          type: string
      required:
        - enabled
        - domains
  securitySchemes:
    token:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Voiceflow bearer token
````
