> ## 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.

# Headless Web SDK Types Reference

> React type definitions and interfaces for the Suki Headless Web SDK

In React and TypeScript, **types** and **interfaces** describe the shape of objects you pass into hooks, props, and APIs. They tell your editor what fields exist, which are required, and what you get back from a function, so you catch mistakes early and autocomplete stays accurate.

This reference lists the Headless Web SDK types you will see alongside [Authentication](https://developer.suki.ai/headless-web-sdk/guides/hooks/auth-hook.md), [Ambient session creation](https://developer.suki.ai/headless-web-sdk/guides/hooks/ambient-hook.md), and [Ambient session control](https://developer.suki.ai/headless-web-sdk/guides/hooks/ambient-session-hook.md). They are grouped below the same way you tend to use them in an app: first identity and tokens, then session context and session hook inputs and outputs.

Open a card when you need the exact field list, optional vs required flags, and how a type connects to a hook or flow.

## Authentication and tokens

Use these types when you configure `useAuth`, read results from login or registration, or type the payload when your backend refreshes a `partnerToken`.

> [card] [UseAuthParams](https://developer.suki.ai/headless-web-sdk/api-reference/types/use-auth-params.md)
>
> Use this type to pass `partnerId`, `partnerToken`, and auto-registration settings to `useAuth`.

> [card] [LoginResponse](https://developer.suki.ai/headless-web-sdk/api-reference/types/login-response.md)
>
> Use this type to read `suki_token` and `jwt_bearer` after `login()` succeeds.

> [card] [RegistrationResponse](https://developer.suki.ai/headless-web-sdk/api-reference/types/registration-response.md)
>
> Use this type to type the success response from `registerUser()`.

> [card] [UpdatePartnerTokenResponse](https://developer.suki.ai/headless-web-sdk/api-reference/types/update-partner-token-response.md)
>
> Use this type to read refreshed tokens after `updatePartnerToken()`.

| Type | What it is | Use case |
| - | - | - |
| [`UseAuthParams`](https://developer.suki.ai/headless-web-sdk/api-reference/types/use-auth-params) | Object type for `useAuth` hook arguments | When you initialize auth in a root component and need typed `partnerId`, `partnerToken`, and auto-registration settings before any Ambient call |
| [`LoginResponse`](https://developer.suki.ai/headless-web-sdk/api-reference/types/login-response) | Object type with `suki_token` and `jwt_bearer` | When `login()` resolves and you store tokens, update app state, or pass credentials to your backend |
| [`RegistrationResponse`](https://developer.suki.ai/headless-web-sdk/api-reference/types/registration-response) | Empty object type (`Record<string, never>`) | When `autoRegister` is `false` and you call `registerUser()` in a separate step before `login()` |
| [`UpdatePartnerTokenResponse`](https://developer.suki.ai/headless-web-sdk/api-reference/types/update-partner-token-response) | Object type with refreshed `suki_token` and `jwt_bearer` | When your app rotates `partnerToken` after SSO refresh or a scheduled token exchange and you call `updatePartnerToken()` |

## Ambient session

Use these types when you pass session context, configure `useAmbientSession`, or type values from `sessionStatus` in your UI.

> [card] [SessionContext](https://developer.suki.ai/headless-web-sdk/api-reference/types/session-context.md)
>
> Use this type to send patient, provider, visit, and diagnosis fields with `setSessionContext`.

> [card] [UseAmbientSessionParams](https://developer.suki.ai/headless-web-sdk/api-reference/types/use-ambient-session-params.md)
>
> Use this type to pass `ambientSessionId`, audio callbacks, and `onSessionTerminatedByPeer` to `useAmbientSession`.

> [card] [UseAmbientSessionReturn](https://developer.suki.ai/headless-web-sdk/api-reference/types/use-ambient-session-return.md)
>
> Use this type to type `start`, `pause`, `submit`, `cancelRemote`, `endRemote`, and `sessionStatus`.

> [card] [AmbientSessionStatus](https://developer.suki.ai/headless-web-sdk/api-reference/types/ambient-session-status.md)
>
> Use this type for server lifecycle values such as `created`, `submitted`, and `completed`.

| Type | What it is | Use case |
| - | - | - |
| [`SessionContext`](https://developer.suki.ai/headless-web-sdk/api-reference/types/session-context) | Object type for session metadata sent to Suki | When you call `setSessionContext` after `start()` to improve note quality, or before a Web SDK handoff when you need `patient_id` and structured `name` on the shared note |
| [`UseAmbientSessionParams`](https://developer.suki.ai/headless-web-sdk/api-reference/types/use-ambient-session-params) | Object type for `useAmbientSession` hook arguments. SDK export name: `UseAmbientSessionProps` | When `useAmbient` returns `ambientSessionId` and you attach recording controls, an audio visualizer, or a handler for another product ending the live session |
| [`UseAmbientSessionReturn`](https://developer.suki.ai/headless-web-sdk/api-reference/types/use-ambient-session-return) | Object type for the `useAmbientSession` return value | When you build a recording component that calls `start`, `pause`, and `submit`, or resolves a `sessionAlreadyExists` conflict with `cancelRemote` or `endRemote` |
| [`AmbientSessionStatus`](https://developer.suki.ai/headless-web-sdk/api-reference/types/ambient-session-status) | String union of server-side session lifecycle values | When you show note progress on Suki's servers, for example waiting on `submitted` or showing `completed`, separate from your local recording UI state |

> [!TIP]
>
> For end-to-end workflows, refer to [Ambient interoperability](https://developer.suki.ai/headless-web-sdk/guides/ambient-interoperability.md), [Handle ambient session conflicts](https://developer.suki.ai/headless-web-sdk/guides/handle-ambient-session-conflicts.md), and [Read shared ambient notes](https://developer.suki.ai/headless-web-sdk/guides/read-shared-ambient-notes.md).

## Next steps

&#x20;**[Provider](https://developer.suki.ai/headless-web-sdk/api-reference/platform-client.md)** - More information on how to wrap your application with the `PlatformClient` and `PlatformClientProvider` before using hooks.


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