Widget Reference
Complete reference for the embedded UI. See
Controlling the UI for narrative guidance and examples, and
Customizing the Experience for installation.
Which widget am I using?
Two implementations exist, and they support different features. The loader picks one based on your
settings:
isMinifiedView | isMiniWidgetV2 | You get | Origin |
|---|---|---|---|
true | true (default) | Compact widget | mini-widget.blueprint.ai |
true | false | Legacy compact widget | clinician.blueprint.ai/mini-widget |
unset / false | (anything) | Full widget | clinician.blueprint.ai/widget |
Compact is the current default and recommended for new integrations. Full includes note
viewing and editing screens plus the copy-note hand-off.
Setting isMiniWidgetV2: true without isMinifiedView: true gives you the full widget — the
flag has no effect on its own.
Loader script
| Environment | URL |
|---|---|
| Production | https://embed.blueprint.ai/index.min.js |
| Sandbox | https://embed.staging.blueprint.ai/index.min.js |
The script is unversioned — there is currently no way to pin a specific build, and updates reach your
application as soon as they are released. Because the URL is mutable, Subresource Integrity (integrity)
cannot be used with it.
The loader creates window.Blueprint and mounts an iframe with id="bp-widget", granting it
microphone, display-capture, clipboard-read, clipboard-write, and screen-wake-lock.
Methods
| Method | Signature | Compact | Full |
|---|---|---|---|
authenticate | (authTokens: object) => void | yes | yes |
logout | () => void | partial¹ | yes |
selectClient | (clientId: string, options?: SelectClientOptions) => void | yes | yes |
endSession | () => void | yes | — |
discardSession | () => void | yes | — |
sendMessage | (message: string, context?: object) => void | yes | yes |
¹ On the compact widget, logout() clears loader-side state but does not end the widget's own
session. Remove and re-create the container element to fully reset it.
sendMessage is a diagnostic channel that forwards a message into the widget's logs. Useful when
working through an issue with Blueprint support; not needed in normal operation.
authenticate(authTokens)
authenticate(authTokens)Takes one argument: the token object exactly as returned by
POST /v2/clinicians/{clinicianId}/authenticate.
Blueprint.authenticate({
AccessToken: '...',
IdToken: '...',
RefreshToken: '...',
ExpiresIn: 600
})Field names are PascalCase. AccessToken and RefreshToken are required; the widget refreshes
its own access token from the refresh token for as long as that token is valid.
If the widget has not finished loading, the call is retained and replayed once it signals readiness.
selectClient(clientId, options?)
selectClient(clientId, options?)clientId is Blueprint's internal UUID for the client.
interface SelectClientOptions {
sessionExternalId?: string
sessionSetting?: 'in-person' | 'telehealth'
usingHeadphones?: boolean
noteOptions?: {
sessionType?: 'individual' | 'couple' | 'group'
noteType?: string
availableNoteTypes?: string[]
treatmentApproaches?: string[]
noteGroup?: 'therapists' | 'prescribers'
}
}Calls made before the widget is ready are queued and replayed. If readiness is not signaled within
two minutes, the queued call is abandoned.
Callbacks
Each registrar takes a single function. Registering a callback that cannot fire on your widget is
harmless but silent.
| Callback | Payload | Compact | Full |
|---|---|---|---|
onSelectClientComplete | { sessionId } | yes | — |
onSessionRecordingStarted | { sessionId } | yes | yes |
onSessionRecordingPause | { sessionId } | yes | — |
onSessionRecordingResume | { sessionId } | yes | — |
onSessionRecordingEnd | { sessionId } | yes | — |
onGenerateNoteClicked | { sessionId, progressNoteId, sessionType, noteType, treatmentApproaches } | yes¹ | yes |
onNoteGenerated | { sessionId } | yes | — |
onCopyNoteClicked | { sessionId, note } | — | yes |
onDeleteNoteClicked | { sessionId, progressNoteId } | — | yes |
onDeleteSessionClicked | { sessionId } | — | yes |
¹ On the compact widget progressNoteId is always '' — the note does not exist yet. Use
onNoteGenerated or the progress_note_generated webhook for the real ID.
There is no onReady and no onError. onSelectClientComplete is the closest signal that the
widget is loaded and usable.
Settings
Assign to window.blueprintSettings before the loader script tag. Settings are read once and
cannot be changed afterward.
| Setting | Type | Default | Notes |
|---|---|---|---|
containerId | string | — | Element to mount into. Omit for floating mode. |
width | string | '350px' | |
height | string | '550px' | Not applied to minimized/expanded states |
isMinifiedView | boolean | false | true for the compact widget |
isMiniWidgetV2 | boolean | true | Only meaningful with isMinifiedView: true |
position | 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' | 'bottom-right' | Floating only |
isDraggable | boolean | true | Floating only |
isAlwaysOpen | boolean | false | Forced true when containerId is set |
buttonColor | string | '#2D54E8' | Floating launcher |
openButtonIcon | string (SVG) | Blueprint icon | Inserted as raw HTML |
closeButtonIcon | string (SVG) | Close icon | Inserted as raw HTML |
copyNoteButtonText | string | 'Copy Note' | No effect on compact |
patientReference | string | 'Client' | No effect on compact |
hideTreatmentPlan | boolean | false | No effect on compact |
hidePreviousSessions | boolean | false | No effect on compact |
fontHref | string | — | Requires fontFamily |
fontFamily | string | — | Requires fontHref |
cspNonce | string | — | Required if you enforce style-src |
minifiedViewSettings | object | {} | Compact widget theming — see below |
minifiedViewSettings
minifiedViewSettingsCompact widget only. All values are CSS strings.
| Key | Default |
|---|---|
container.borderColor | '#e2e8f0' |
container.borderWidth | '1px' |
container.borderRadius | '12px' |
container.backgroundColor | '#fff' |
buttons.borderRadius | '24px' |
buttons.primaryBackgroundColor | Blueprint blue |
buttons.primaryTextColor | white |
buttons.primaryBorderColor | — |
buttons.primaryBorderWidth | '1px' |
buttons.secondaryBackgroundColor | white |
buttons.secondaryTextColor | Blueprint blue |
buttons.secondaryBorderColor | — |
buttons.secondaryBorderWidth | '1px' |
inputs.borderRadius | '5px' |
audioIndicatorColor | '#68E19F' |
There are no CSS custom properties and no stylesheet override hook — the widget renders in an iframe,
so your page's CSS cannot reach it. This table is the full extent of visual customization.
Removed settings
| Setting | Status |
|---|---|
preloadWidget | Removed January 2026. Has no effect; safe to delete. |
DOM elements the loader creates
Useful for layout debugging. Do not depend on these — they are internal and can change.
| Element | Purpose |
|---|---|
#bp-widget | The iframe |
#bp-widget-btn | Floating launcher button |
#bp-widget-btn-icon | Icon inside the launcher |
#bp-widget-styles | Injected <style> element (this is what cspNonce applies to) |
The loader watches the DOM and re-mounts the iframe if your application removes it — helpful in SPAs
that re-render the container.
Localization
English only. There is no locale or i18n setting.
Related
- Controlling the UI — narrative guide with examples
- Customizing the Experience — installation and display modes
- Widget Troubleshooting — when things do not work
Updated about 1 month ago
