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

# configureSession() (Deprecated)

> Reference for the deprecated Embedded API configureSession() method.

Use `configureSession()` only if you still depend on the legacy session-configuration structure.

<Warning>
  `configureSession()` is deprecated in favor of
  [setInteractionOptions()](/assistant/api/set-interaction-options). It
  continues to work during the deprecation period. If your integration depends
  on `defaultOutputLanguage`, keep using its legacy-compatible behavior during
  this period. See the [Migration Guide](/assistant/configuration-migration) and
  [Scheduled Deprecations](/assistant/deprecation-timeline).
</Warning>

## Usage

```typescript theme={null}
await api.configureSession({
  defaultLanguage: "en",
  defaultOutputLanguage: "en",
  defaultTemplateKey: "corti-soap",
  defaultMode: "virtual",
});
```

```javascript theme={null}
await api.configureSession({
  defaultTemplateKey: "corti-soap",
  defaultOutputLanguage: "en",
});
```

## Prerequisites

* User must be authenticated.

## Input validation

* `defaultLanguage`: Must be a valid language code.
* `defaultOutputLanguage`: Must be a valid language code.
* `defaultTemplateKey`: Must be a language-agnostic template identifier.
* `defaultMode`: Must be either `"virtual"` or `"in-person"`.
* If either `defaultTemplateKey` or `defaultOutputLanguage` is provided, both must be provided together.

## Possible errors

* `UNAUTHORIZED`: User not authenticated.
* `INVALID_PAYLOAD`: Invalid payload, including when only one of `defaultTemplateKey` or `defaultOutputLanguage` is provided.
* `NOT_FOUND`: No template matches `defaultTemplateKey` plus `defaultOutputLanguage`.
* `INTERNAL_ERROR`: Failed to update session settings.

## Returns

`void`

## Related reference

* [API Reference Overview](/assistant/api-reference)
* [setInteractionOptions()](/assistant/api/set-interaction-options)
* [getTemplates()](/assistant/api/get-templates)
