Access an API for embedding Corti Assistant in your workflow today
The Corti Embedded Assistant API enables seamless integration of Corti Assistant into host applications, such as Electronic Health Record (EHR) systems, web-based clinical portals, or native applications using embedded WebViews. The implementation provides a robust, consistent, and secure interface for parent applications to control and interact with embedded Corti Assistant.
The details outlined below are for you to embed the Corti Assistant “AI scribe
solution” natively within your application. To lean more about the full Corti
API, please see more here
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.
Synchronous typescript API via window.CortiEmbedded
Promise-based methods
Ideal for same-origin integrations
Windows API Example
Copy
Ask AI
// Wait for the embedded app to be readywindow.addEventListener("message", async (event) => { if ( event.data?.type === "CORTI_EMBEDDED_EVENT" && event.data.event === "ready" ) { // Use the window API directly const api = window.CortiEmbedded.v1; const user = await api.auth({ mode: "stateful", accessToken: "your-access-token", refreshToken: "your-refresh-token", }); console.log("Authenticated user:", user); }});
Authenticate the user session with the embedded app:
Copy
Ask AI
iframe.contentWindow.postMessage({ type: 'CORTI_EMBEDDED', version: 'v1', action: 'auth', requestId: 'unique-id', payload: { mode: 'stateless' | 'stateful', // we currently do not take this value into account and will always refresh the token internally access_token: string, refresh_token?: string, id_token?: string, expires_in?: number, token_type?: string }}, '*');
This method is in Limited Access for now - contact us for more information.
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.
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)
The 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 settings 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 which will return whatever actual language is currently used for the interface.
This method is in Limited Access for now - contact us for more information.
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