> ## Documentation Index
> Fetch the complete documentation index at: https://developer.suki.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# StartOptions Type

> forms, correlation_id, rootElement, and callbacks for client.start

These are the settings you pass each time you open Form filling with **`client.start()`** in JavaScript. Prefer **`forms`** for the medical forms in this run. Pass **`correlation_id`** so results map to the correct encounter.

```javascript JavaScript theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
await client.start({
  rootElement,
  forms: [{ form_template_id: "YOUR_TEMPLATE_ID" }],
  correlation_id: "YOUR_ENCOUNTER_ID",
  onSubmit: (result) => {
    console.log(result.structured_data);
  },
});
```

## Properties

**start() options**

**rootElement** `HTMLElement` *required*

Container for the Form filling UI. **JavaScript only.** Give this element explicit height before **`start()`**. React passes the container automatically through **`FormFilling`**. Refer to [Container sizing](https://developer.suki.ai/form-filling-sdk/guides/configuration.md#container-sizing).

**forms** `MedicalFormMetadata[]`

Preferred list of medical forms for this Form filling run. Each entry is either **`{ form_template_id }`** or a dynamic entry with required **`schema`** and optional **`id`**, **`name`**, and **`type`**. When **`forms`** is provided, it is the sole source of Context. Supply at least one valid entry. Refer to [Dynamic and static medical forms](https://developer.suki.ai/form-filling-sdk/guides/configuration.md#dynamic-and-static-medical-forms) and [Dynamic Form filling](https://developer.suki.ai/documentation/concepts/form-filling/dynamic-form-filling.md).

**form\_template\_ids** `string[]`

DEPRECATED List of Suki template IDs as strings. This option still works when you omit **`forms`**. Prefer **`forms: [{ form_template_id }]`**, because we will remove this option in a future major release. The SDK maps each ID to **`{ form_template_id }`**. Unsupported IDs are dropped, and if no valid forms remain the SDK emits **`SUKI_FF_001`**.

**correlation\_id** `string`

**Optional.** Your encounter or appointment ID from your system. Echoed on callbacks and webhook payloads. Strongly recommended so structured data maps to the correct record. When omitted, the hosted UI supplies a UUID when it creates the session. Refer to [Encounter ID (`correlation_id`)](https://developer.suki.ai/form-filling-sdk/guides/configuration#correlation_id-your-encounter-id).

**onSubmit** `function` *required*

Called when structured results are ready (after processing), not when the clinician taps **submit**. Receives a **`FormFillingResult`** with **`structured_data`**. For dynamic forms, correlate with **`partner_form_id`**. The iframe is removed after this runs for the active session. Refer to [Callbacks](https://developer.suki.ai/form-filling-sdk/guides/callbacks.md).

**onReady** `function`

**Optional.** Called when the hosted UI is loaded and ready. Runs after **`start()`** resolves the iframe handshake.

**onCancel** `function`

**Optional.** Called when the clinician cancels during form selection or recording.

> [!TIP]
>
> For callback behavior and event payloads, refer to [Callbacks](https://developer.suki.ai/form-filling-sdk/guides/callbacks.md) and [Events](https://developer.suki.ai/form-filling-sdk/api-reference/events.md).

## Next steps

&#x20;**[FormFillingProps](https://developer.suki.ai/form-filling-sdk/api-reference/form-filling-props.md)** - Same session fields as React props.

&#x20;**[Configuration](https://developer.suki.ai/form-filling-sdk/guides/configuration.md)** - How to set **`forms`**, **`correlation_id`**, and container height.

&#x20;**[FormFillingClientOptions](https://developer.suki.ai/form-filling-sdk/api-reference/constructor-options.md)** - **`authManager`** and **`onError`** on the client.

&#x20;**[JavaScript integration](https://developer.suki.ai/form-filling-sdk/javaScript-integration/javaScript.md)** - End-to-end **`start()`** wiring.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.