Skip to main content
When Suki delivers a webhook notification, it sends a POST request to your callback URL with Content-Type: application/json. Before you process the body, check these request headers so you can confirm the delivery is from Suki:

How to handle the payload and response

Your handler should verify those headers first, then read the top-level status field in the JSON and branch on "success" or "failure". For the full request specification and sample handler code in Python and TypeScript, refer to the Asynchronous notifications (webhook) API reference.

Payload structure when status is “success” or “failure”

Every webhook body includes a top-level status field. All other fields depend on that value. When status is "success": The payload identifies the session and encounter and provides links to retrieve results. It includes:
  • session_id, encounter_id (always present)
  • Optionally: sessions, additional_info, _links
Inside _links, each key is an array of link objects (href, method, name, type). These are the keys you will see in the _links object:
Use the _links object to get URLs for fetching session content, encounter content, structured clinical data, status, and transcripts from the Ambient APIs. For each link, combine its href with your API base URL and use the correct authentication when you call those follow-up APIs.The sessions array lists the session IDs tied to the encounter so far.
When status is "failure": The payload identifies the session and encounter and describes the error. It includes:
  • session_id, encounter_id, error_code, error_detail
Use these fields to log the failure, trigger alerts, or show an error in your application. For a summary of completion, failure, timeout, and cancellation events, refer to Event types.

Example payloads

The following examples show the JSON bodies your endpoint receives. Use them to validate your parser and to see how the structure maps to the description above. When status is success: When a session completes and note generation succeeds, your endpoint receives a payload like this:
JSON
Combine each href in _links with your API base URL and send a GET request with the appropriate authentication to retrieve content, structured data, encounter resources, status, or transcripts. The sessions array lists all session IDs for this encounter. When status is failure: When a session or note generation fails, your endpoint receives a payload like this:
JSON
Use error_code and error_detail to log the failure, send an alert, or display an error to the user.

Implementation tips

  • Return 200 OK quickly and do heavy work (follow-up API calls, database updates) in a background job or queue.
  • Treat the handler as idempotent; use session_id to detect duplicate deliveries and process each notification only once.
  • Check generated-at and reject requests that are too old for your risk window, so replayed calls are less useful to an attacker.
  • Store the secret key in a secrets manager (for example AWS Secrets Manager or Azure Key Vault), not in source control.
  • Add rate limiting on the public URL so abuse is harder.
  • Keep the endpoint highly available (for example a load balancer or redundant instances).
  • Log that a webhook was received plus session_id, encounter_id, and status; avoid logging full bodies if they contain sensitive data.

Responses from Suki webhook endpoint

When you call the Suki Webhook Endpoint (for example, using the href values in _links to fetch content, status, or transcripts), Suki returns an HTTP status and, for errors, a JSON body with code and message. In your application, handle 401 by re-authenticating or refreshing the token. Handle 400 by fixing the request or showing an error. Consider retrying on 5xx when appropriate.
Last modified on July 24, 2026