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

# API Reference

> Overview of the Embedded API surface, method groups, error model, and common workflows.

This page gives you the structure of the Embedded API and links to the individual method reference pages.

<Info>
  **Applies to all integration methods**

  The Embedded API is available through the [Web Component API](/assistant/web-component-api), [Window API](/assistant/window-api), and [PostMessage API](/assistant/postmessage-api). The underlying capabilities and error model are shared, but the invocation shape differs by integration method.
</Info>

<Check>
  **Examples use the Web Component API shape**

  The linked method reference pages use the Web Component or React API shape for consistency. When you use the Window API or PostMessage, the same operation often keeps the same payload but changes how it is invoked.
</Check>

## How to use this reference

Use the method pages in the sidebar when you need payload details, validation rules, error cases, or return types for a specific method.

The API Reference is grouped into:

* **Application** methods for authentication, app-level configuration, navigation, account state, and template lookup
* **Interaction** methods for interaction setup, session defaults, contextual facts, and recording control
* **Deprecated** methods within those groups when you still need the legacy configuration flow during the deprecation period

If you need configuration behavior, scenarios, or migration help, use these pages alongside the method reference:

* [Configuration Scenarios](/assistant/configuration-scenarios)
* [Config Migration Guide](/assistant/configuration-migration)
* [Scheduled Deprecations](/assistant/deprecation-timeline)

## Method groups

### Application

* [auth()](/assistant/api/auth) - Authenticate the embedded user session
* [configureApp()](/assistant/api/configure-app) - Apply app-level UI, appearance, locale, and network configuration
* [navigate()](/assistant/api/navigate) - Navigate to an internal Assistant route
* [setCredentials()](/assistant/api/set-credentials) - Update the authenticated user's credentials
* [getStatus()](/assistant/api/get-status) - Read current application and interaction state
* [getTemplates()](/assistant/api/get-templates) - Retrieve available templates for the authenticated user
* [configure() (Deprecated)](/assistant/api/configure) - Legacy app configuration structure

### Interaction

* [createInteraction()](/assistant/api/create-interaction) - Create a new interaction session
* [setInteractionOptions()](/assistant/api/set-interaction-options) - Apply interaction-level defaults and options
* [addFacts()](/assistant/api/add-facts) - Add contextual facts to the current interaction
* [startRecording()](/assistant/api/start-recording) - Start recording in the current session
* [stopRecording()](/assistant/api/stop-recording) - Stop recording in the current session
* [configureSession() (Deprecated)](/assistant/api/configure-session) - Legacy session-level defaults

## Error codes

All API actions may return errors with the following structure:

```typescript theme={null}
{
  message: string,
  code: "UNAUTHORIZED" | "NOT_READY" | "NOT_FOUND" | "INVALID_PAYLOAD" | "INTERNAL_ERROR",
  details?: unknown,
}
```

| Code              | Description                                      | Common causes                                                                   |
| ----------------- | ------------------------------------------------ | ------------------------------------------------------------------------------- |
| `UNAUTHORIZED`    | User is not authenticated or the session expired | `auth()` was not called, or tokens are no longer valid                          |
| `NOT_READY`       | A required precondition is missing               | No active interaction, not in recording context, or a required view is not open |
| `NOT_FOUND`       | A requested resource does not exist              | Invalid interaction ID, user not found, or template not found                   |
| `INVALID_PAYLOAD` | Request payload validation failed                | Missing required fields, invalid formats, unsupported values                    |
| `INTERNAL_ERROR`  | Unexpected client or server failure              | Retry the request or contact support if the issue persists                      |

## Workflows

Workflow examples now live on [API Reference Workflows](/assistant/api-reference-workflows).

Use that page when you want end-to-end examples that combine multiple methods into a realistic integration flow.

## Configuration-specific reference

Configuration-specific lookup data such as supported interface languages, dictation language codes, and string override keys lives in the configuration documentation rather than in the method reference.

Use these pages when you need those details:

* [Supported Values](/assistant/configuration-values)
* [Configuration Scenarios](/assistant/configuration-scenarios)
* [Config Migration Guide](/assistant/configuration-migration)

## Related documentation

* [Web Component API](/assistant/web-component-api) - Package API and integration overview
* [Window API](/assistant/window-api) - Same-origin method invocation
* [PostMessage API](/assistant/postmessage-api) - Cross-frame method invocation
* [Welcome](/assistant/welcome) - Overview of the embedded Assistant

<Note>
  Please [contact us](https://help.corti.app) if you need help with a specific
  API method or integration pattern.
</Note>
