Configuration

Last updated  Aug 4, 2026

One configuration object drives the whole experience. The model is identical on iOS, Android, and Flutter — examples below are Swift; the other platforms use the same names.

Theming

One VoqalTheme drives every surface. Hairlines, text tiers, and fills are derived automatically so the assistant looks native in light or dark.

Theme.swift
config.theme = VoqalTheme(    accent: "#2d5bff",        // your brand color (hex)    accent2: "#5b8dff",       // optional gradient pair    appearance: .auto,        // .light · .dark · .auto (follows the phone)    font: nil,                // your app's font — one font for ALL text    radius: 20)               // base corner radius for cards & the sheet

Presentation style

The default .sheet slides up and is swipe-to-dismiss; .fullScreen takes the whole screen edge-to-edge and dismisses via the close button. This is a setup-time setting.

AppDelegate.swift
config.presentationStyle = .fullScreen   // default: .sheet

Header branding

Replace the default “Voqal” title and mark with your own. Leave both unset to fall back to the Voqal title and mark.

AppDelegate.swift
config.strings.chatHeaderTitle = "Rabbit"config.icons.chatHeaderIcon = UIImage(named: "RabbitLogo")

Action button

Optionally show an accent-colored button next to the voice wave that takes the user to a page in your app — a checkout screen, for example. The SDK renders the button; your app owns the route. Off by default.

AppDelegate.swift
// Enable the button (nil icon → a default shopping-bag glyph).config.actionButton = VoqalActionButton(icon: UIImage(named: "Cart"))// Navigate from your own view controller when it's tapped.func voqalDidTapActionButton() {    let checkout = CheckoutViewController()    getViewController().present(checkout, animated: true)}
When tapped, the SDK dismisses the assistant first unless you pass dismissOnTap: false, then calls you back.

Home screen

The greeting name, the “Try saying” suggestions, and whether the live data glance shows when the assistant opens.

AppDelegate.swift
config.home = VoqalHome(    userName: "Nour",    pinnedCTAs: ["What's my balance?", "Create a payment link"],    showAgentGlance: true)

Configuration reference

PropertyTypeDefaultDescription
requestIdStringrequiredEnvironment routing — prod- or stg- prefix.
apiKeyStringrequiredYour Voqal API key (pk_live_…), sent as X-Voqal-Key.
themeVoqalThemedefaultaccent, accent2, appearance, font, radius.
homeVoqalHomeemptyuserName, pinnedCTAs, showAgentGlance.
presentationStylePresentationStyle.sheet.sheet (slide-up) or .fullScreen (edge-to-edge).
stringsStringsConfiguration“Voqal”chatHeaderTitle— the assistant’s name in the header.
iconsIconConfigurationaccent orbchatHeaderIcon, voqalButtonIcon.
actionButtonVoqalActionButton?offOptional in-app navigation button next to the voice wave.
conversationTimeoutTimeInterval7200How long a conversation resumes after close and reopen (seconds).
agentURLURL?baked inOverride the engine endpoint (rarely needed).
  • Fast first turn — call prewarm right after setup: it opens the engine connection in the background so the assistant is instant when opened.
  • Conversation memoryconversationTimeout (default 2h) controls how long a conversation resumes after the sheet is closed and reopened.
© 2026 VoqalVoqal SDK & engine documentation