Skip to main content

Set up (once, via the Scribe API)

Do this once per doctor through the Scribe API (institutional), with your institutional API key. Don’t have one? Ask your Telepatia contact.
1

Register the doctor — save both keys

Create a doctor account. The response returns two keys, shown once: publishableApiKey (pk_…) goes on the page; apiKey (sk_…) is the secret — backend only, never the browser.
2

Create a smart template — save its id

Create a smart template. Save the returned mrc_… id; you pass it to init().
3

Create a webhook

Subscribe to scribe_session.completed. Save the signingSecret to verify the calls. This is how your backend learns a note is ready.

Add the script

Put the config block before the CDN tag. Serve the page over https or localhost — the microphone needs a secure context. The embed reads window.TelepatiaEmbedConfig at load and mounts itself.
Each capability renders only when your institution is granted it, so leaving a flag on is safe. Use a test key while you build (no real data) and your production key to go live — same code, no environment flag.

If your page sets a Content-Security-Policy

The embed sends usage events to https://posthog.telepatia.ai: the doctor’s and the institution’s ids, when the panel opens, and errors. It sends its own error logs, with the same ids, to https://datadog.telepatia.ai. Never patient data or note text. If your page sets a Content-Security-Policy, add these hosts to connect-src:
If the policy blocks them, the embed works as before. We only stop seeing the usage and the errors.

Open the panel

The embed exposes window.TelepatiaEmbed. Call init() when the doctor clicks record — it mounts and opens the panel. Pass the context your app already has so the note comes back linked to the right consultation.
Always pass your own externalConsultationId, and a new one for each consultation — it’s how you fetch the result later. If the id is missing, or another recording already uses it, the panel shows a screen that tells the doctor to contact their organization’s IT support, and no recording starts. See The consultation ID. init() also opens the panel; a bare TelepatiaEmbedConfig with no init() mounts a recorder-less capability directly.

Get the result

Your externalConsultationId is the Scribe API’s consultationInternalId — same value, different name. When the scribe_session.completed webhook fires, fetch the record on your backend with the secret key (sk_), never the browser: The full record schema and error format live in the Scribe API product in this Hub.