Skip to main content
is the main entry point for the Form filling SDK. It loads Suki’s hosted Form filling interface in a inside your application. Create the client once, provide your partner authentication, preferred forms (or form_template_ids for static Suki templates), and any callbacks, then use the same client to start Form filling sessions. The SDK manages the iframe connection, validates forms, and delivers session callbacks and events for you. In React, wrap your app with FormFillingProvider and render FormFilling when the clinician should see the interface. You do not pass a container element yourself; the component handles that.

Import

Create an instance

Create SukiAuthManager first, then pass it to FormFillingClient. Sign-in must succeed before the Form filling interface can open.
JavaScript
In React, create FormFillingClient inside useMemo or at module scope so you do not build a new client on every render.

Constructor options

Pass authManager and optional onError to new FormFillingClient({ ... }). Refer to FormFillingClientOptions for every field.

Start a session

Call await client.start({ ... }) when the clinician starts a Form filling session. The SDK resolves your forms (or form_template_ids when forms is omitted), validates static IDs, loads the Form filling interface, and prepares the session. The start() method resolves when the session has been initialized. When the interface is ready for interaction, onReady runs. start() does not throw. Handle errors with onError or form-filling:error. If you call start() again, the SDK closes the current session and starts a new one. You do not need to call stop() first.
Always implement onSubmit. It runs when structured JSON is ready after processing completes, not when the clinician taps submit.
Refer to StartOptions for every start() field, and Configuration for forms, correlation_id, and container sizing.

Methods and getters

In JavaScript, you can use the following methods and getters to manage the Form filling session.

React bindings and components

In React, you can use the following components and provider to manage the Form filling session.

FormFillingProvider

Wrap components that render FormFilling or call useFormFilling(). Pass the same FormFillingClient instance you created in useMemo.
React
The provider listens for form-filling:error and exposes the latest error through useFormFilling().

FormFilling

Render FormFilling when the clinician should see the Form filling interface. Mounting starts a session; unmounting calls client.stop(). Props match start() options, except you do not pass rootElement. Refer to FormFillingProps for every field.

useFormFilling()

Call inside FormFillingProvider to read the client, session state, or the latest error from sibling components.

Code examples

The following example shows how to create a Form filling client, start a session, and handle the session events in JavaScript.
JavaScript
Refer to JavaScript integration for a full step-by-step guide.

Next steps

StartOptions - Fields for client.start(). FormFillingProps - React props for FormFilling. Events - client.on() payloads and lifecycle. Configuration - Forms, correlation_id, and container sizing.
Last modified on November 5, 2026