> ## 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](/headless-web-sdk/guides/hooks/auth-hook), [ambient session creation](/headless-web-sdk/guides/hooks/ambient-hook), and [ambient session control](/headless-web-sdk/guides/hooks/ambient-session-hook). 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`.

Reach for **`UseAuthParams`** when you build the argument object for the auth hook. Use **`LoginResponse`** and **`RegistrationResponse`** when you handle success or error shapes from those flows. Use **`UpdatePartnerTokenResponse`** when you update tokens and want the SDK response typed end to end.

<CardGroup cols={2}>
  <Card title="UseAuthParams" icon="brackets" href="/headless-web-sdk/api-reference/types/use-auth-params" arrow={true}>
    Parameters for the `useAuth` hook
  </Card>

  <Card title="LoginResponse" icon="key" href="/headless-web-sdk/api-reference/types/login-response" arrow={true}>
    Response shape from the login flow
  </Card>

  <Card title="RegistrationResponse" icon="user-plus" href="/headless-web-sdk/api-reference/types/registration-response" arrow={true}>
    Response shape from registration
  </Card>

  <Card title="UpdatePartnerTokenResponse" icon="arrows-rotate" href="/headless-web-sdk/api-reference/types/update-partner-token-response" arrow={true}>
    Response from `partnerToken` updates
  </Card>
</CardGroup>

## Ambient session

Use these types when you pass patient, provider, and visit details into a session, call `useAmbientSession`, or branch UI on session status. **`SessionContext`** is the object that carries who and what visit the session is for.

**`UseAmbientSessionParams`** and **`UseAmbientSessionReturn`** match what you pass in and what the hook gives back (handlers, state, and helpers). **`AmbientSessionStatus`** is what you use when you need a narrow set of status values or related typing for recording, pausing, resuming, or finishing work.

<CardGroup cols={2}>
  <Card title="SessionContext" icon="file-lines" href="/headless-web-sdk/api-reference/types/session-context" arrow={true}>
    Patient, provider, and visit context for sessions
  </Card>

  <Card title="UseAmbientSessionParams" icon="sliders" href="/headless-web-sdk/api-reference/types/use-ambient-session-params" arrow={true}>
    Parameters for `useAmbientSession`
  </Card>

  <Card title="UseAmbientSessionReturn" icon="arrow-turn-down-right" href="/headless-web-sdk/api-reference/types/use-ambient-session-return" arrow={true}>
    Return type of `useAmbientSession`
  </Card>

  <Card title="AmbientSessionStatus" icon="signal" href="/headless-web-sdk/api-reference/types/ambient-session-status" arrow={true}>
    Session status values and related typing
  </Card>
</CardGroup>

## Next steps

<Icon icon="file-lines" iconType="solid" /> Refer to [Provider](/headless-web-sdk/api-reference/platform-client) for more information on how to wrap your application with the `PlatformClient` and `PlatformClientProvider` before using hooks.
