Skip to main content
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, ambient session creation, and ambient session control. 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 partner token. 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.

UseAuthParams

Parameters for the useAuth hook

LoginResponse

Response shape from the login flow

RegistrationResponse

Response shape from registration

UpdatePartnerTokenResponse

Response from partner token updates

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.

SessionContext

Patient, provider, and visit context for sessions

UseAmbientSessionParams

Parameters for useAmbientSession

UseAmbientSessionReturn

Return type of useAmbientSession

AmbientSessionStatus

Session status values and related typing

Next steps

Refer to Provider for more information on how to wrap your application with the PlatformClient and PlatformClientProvider before using hooks.
Last modified on May 22, 2026