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, form_template_ids, and any callbacks, then use the same client to start Form filling sessions. The SDK manages the iframe connection, validates template IDs, 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

These are the settings you pass to new FormFillingClient({ ... }) in JavaScript.

Start options

Call await client.start({ ... }) when the clinician starts a Form filling session. The SDK validates your form_template_ids, loads the Form filling interface, authenticates the session, and prepares it for use. The start() method resolves when the session has been initialized. When the interface is fully loaded and ready for interaction, the onReady callback is called. start() does not throw errors. Instead, handle errors with the onError callback or the form-filling:error event. If you call start() again, the SDK automatically 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.

start() options

Refer to Configuration for container sizing and correlation_id details.

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.

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

Refer to Events for client.on() payloads and lifecycle Refer to Callbacks for onSubmit and FormFillingResult Refer to Configuration for auth, container sizing, and correlation_id
Last modified on July 23, 2026