Overview
This implementation provides a robust, consistent, and secure interface for parent applications to control and interact with the embedded Corti Assistant. The API supports both asynchronous (postMessage) and synchronous (window object) integration modes.Integration Modes
1. PostMessage API
This method is recommended for iFrame/WebView integration
- Secure cross-origin communication
- Works with any iframe or WebView implementation
- Fully asynchronous with request/response pattern
PostMessage
2. Window API
This method is recommended for direct integration
- Synchronous typescript API via
window.CortiEmbedded - Promise-based methods
- Ideal for same-origin integrations
Window API
Authentication
Authenticate the user session with the embedded app:Configure interface
The configure command allows you to configure the Assistant interface for the current session, include toggling which UI features are visible, the visual appearance of assistant, and locale settings.features.interactionTitle: truefeatures.aiChat: truefeatures.documentFeedback: truefeatures.navigation: falsefeatures.virtualMode: true(regardless of user preferences, the option can be hidden and “disabled”, which means it won’t show up on the UI and even if the session is configured to be virtual, it won’t be if this is toggled after the session configuration message)appearance.primaryColor: null(uses built-in styles, which is blue-ish)locale.interfaceLanguage: null(uses the current user’s specified default language or determined by browser setting if not specified)locale.dictationLanguage: "en"
configure command can be invoked at any time and will take effect instantly.
The command can be invoked with a partial object, and only the specified properties will take effect.
The command returns the full currently applied configuration object.
Note that if appearance.primaryColor has not been set, it will always return as null indicating default colors will be used, unlike locale.interfaceLanguage or locale.dictationLanguage which will return whatever actual language is currently used for the given setting.
Appearance
Disclaimer - always ensure WCAG 2.2 AA conformance
- 1.4.3 Contrast (Minimum): normal text ≥ 4.5:1; large text ≥ 3:1
- 1.4.11 Non-text Contrast: UI boundaries, focus rings, and selected states ≥ 3:1
- 2.4.11 Focus Not Obscured (Minimum): focus indicators remain visible and unobstructed
Available interface languages
Updated as per November 2025
| Language code | Language |
|---|---|
en | English |
de-DE | German |
fr-FR | French |
it-IT | Italian |
sv-SE | Swedish |
da-DK | Danish |
Available dictation languages
Updated as per November 2025
EU
| Language code | Language |
|---|---|
en | English |
en-GB | British English |
de | German |
fr | French |
sv | Swedish |
da | Danish |
nl | Dutch |
no | Norwegian |
US
| Language code | Language |
|---|---|
en | English |
Create interaction
Add Facts
Add contextual facts to the current interaction:Configure Session
Set session-level defaults and preferences:Navigate
Navigate to a specific path within the embedded app:/– start a new session/session/<id>- go to an existing session identified by<id>/templates- browse and create templates/settings/preferences- edit defaults like languages and default session settings/settings/input- edit dictation input settings/settings/account- edit general account settings/settings/archive- view items in and restore from archive (only relevant if navigation is visible)
Set credentials
Change the credentials of the currently authenticated user. This can be used both to set the credentials for a user without a password (if only authenticated via identity provider) or to change the password of a user with an existing password. The current password policy must be followed:- At least 1 uppercase, 1 lowercase, 1 numerical and 1 special character
- At least 8 characters long
Recording controls
Start and stop recording within the embedded session:Get status
ThegetStatus method allows you to request information about the current state of the application, including: authentication status, current user, current URL and interaction details.
interaction in particular contains a list of resources combined with their respective metadata.
Events
The embedded app sends events to notify the parent application of important state changes:Event Types
ready | Embedded app is loaded and ready |
loaded | Navigation to a specific path completed |
recordingStarted | Recording has started |
recordingStopped | Recording has stopped |
documentGenerated | A document has been generated |
documentUpdated | A document has been updated |
documentSynced | A document has been synced to EHR |
Listening for Events
Listening for Events
Complete Integration Flow
Here’s a complete example showing the recommended integration steps:Example Embedded Integration
Error Handling
All API methods can throw errors. Always wrap calls in try-catch blocks:Error Handling
Please contact us for help or questions.