This guide walks you through the steps to use the Form Filling APIs to authenticate, create a session, provide context, stream audio through the shared Partner WebSocket (GET /ws/stream), end the session, and retrieve structured form output. The WebSocket endpoint and message format are the same as Ambient audio streaming. Use the form-filling session ID when establishing the WebSocket connection. What you will doDocumentation Index
Fetch the complete documentation index at: https://developer.suki.ai/llms.txt
Use this file to discover all available pages before exploring further.
- Authenticate to get a Suki token (and register the user if needed).
- Create a form-filling session and optionally seed context for template metadata.
- Stream audio over
/ws/streamusing your form-fillingambient_session_id, then end the session when the visit is done (details in the note after Step 3). - Retrieve structured form output by polling status and structured-data, or rely on a webhook when processing finishes.
Install the Suki developer docs as skill to get context on Suki’s developer tools, APIs, and SDKs.npx skills add https://developer.suki.aiThen add the Suki developer docs MCP server for access to documentation search. Follow the MCP instructions at https://developer.suki.ai/documentation/mcp.
Access and credentials
You need partner credentials to use the Suki Form Filling API. Contact our Partnership team to get your credentials. They will guide you through the Onboarding process and provide what you need to get started.Prerequisites
To use the Suki Form Filling APIs, you must have the following:- An OAuth-compliant authentication system
- JWT tokens with consistent user identifiers
- A publicly accessible endpoint (or Okta authorization server) for token validation
Environments to use for development and testing
- This guide uses
https://sdp.suki-stage.comandwss://sdp.suki-stage.comfor API and WebSocket examples (staging). Your partnership team will confirm which environment, base URL, and credentials apply for your integration.
Step 1: Authenticate and get token
To begin, you must authenticate to get your access token. Send a POST request to the /api/v1/auth/login endpoint with the following parameters in the request body:- partner_id: Your unique , which we provide to you securely offline.
- partner_token: The user’s OAuth 2.0 ID token () from your identity provider.
- provider_id (Optional): Unique identifier for the . Required for Bearer type partners only.
partner_token using your publicly exposed JWKS endpoint (or your Okta authorization server URL if you use Okta). On a successful request, the API returns a (suki_token) that you must include as the sdp_suki_token header for all subsequent API calls.
Handling an unregistered user:
- If the user is not yet registered in our system, the
/loginrequest will fail. - In this case, you must first call the /api/v1/auth/register endpoint to create the user, then call
/loginagain. - You only need to call the register endpoint once for each new user.
- Refer to the Register API reference for the full specification.
Step 2: Create form-filling session
To start a form-filling session, send a POST request to the /api/v1/form-filling/session/create endpoint with the following parameters in the request body:In the API reference, both the Form Filling session ID and the Suki Ambient API session ID are named
ambient_session_id. Those identifiers refer to different sessions. Use only the ambient_session_id returned from form-filling /session/create for form-filling REST calls and for /ws/stream.- ambient_session_id (Optional): Associate this form-filling session with an existing Ambient API session when applicable.
- correlation_id (Optional): Client-supplied identifier for tracing or correlating requests.
ambient_session_id for this form-filling session. Use that value for context, streaming, end, status, and structured-data calls.
Step 3: Seed context
After creating the session, you can send a POST request to the /api/v1/form-filling/session//context endpoint to provide form template metadata.The request body is optional. If you omit it, skip this step and continue to audio capture (see the note after this step). If you include
form_filling, you must send valid values: an array of objects, each with a required form_template_id (UUID for the template). Providing context improves the quality of structured form output for the templates you select.- form_filling (Optional): An object with
values, an array ofform_template_identries that identify which medical form templates apply to this session.
Audio capture: The Form Filling APIs do not add a separate streaming endpoint. Use the Partner Ambient
GET /ws/stream WebSocket on the same host as REST (for example wss://sdp.suki-stage.com/ws/stream in staging). Authenticate with your form-filling ambient_session_id and sdp_suki_token. Follow Audio streaming API reference and Ambient audio streaming for handshake, PCM format, message order, EVENT controls, timeouts, and the sequence close WebSocket → end session (REST) → poll status and structured-data. Treat REST as the source of truth for final structured output.Step 4: End session
To complete the session and begin processing, send a POST request to the /api/v1/form-filling/session//end endpoint. This signals that no more audio will be sent for this session.Step 5: Poll status and retrieve structured data
When structured output is ready, Suki can notify your application. The recommended way to know when processing has finished is to use a webhook on the same partner callback you use for Ambient. Suki sends events such assession_summary_generated to the endpoint configured during onboarding. Payloads include _links you can follow to retrieve results. For verification, payload shapes, and examples, see Asynchronous notifications (webhook) and Notification webhook for partners.
Retrieving structured output manually: Alternatively, poll the Form Filling REST endpoints:
- GET /api/v1/form-filling/session//status: Check the processing status of a session.
- GET /api/v1/form-filling/session//structured-data: Retrieve generated_values and non_generated_values for the session.
For complete technical specifications, please refer to the relevant API Reference pages.