> This page is for version v2.
> For other versions, use one of these documentation indexes:
> - v1 (default): https://developers.outpave.com/v1/llms.txt
> - v2: https://developers.outpave.com/v2/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.outpave.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.outpave.com/_mcp/server.

# Embedded session expired

POST 

Recorded when `POST /embeddedSessions/{embeddedSessionId}/expire` ends a pending or active session. A session that reaches its `expiresAt` without that call records no event; `GET /embeddedSessions/{embeddedSessionId}` reports it as `EXPIRED`. `transition.from` is `PENDING` or `ACTIVE`.

Reference: https://developers.outpave.com/v2/api-reference/events-api/events/on-embedded-session-expired

## Request

### Payload

- `id` (string, required) — Event identifier, identical on every delivery attempt and replay.
- `object` ("event", required) — Always `event`.
- `type` (string, required) — `<object>.<pastTenseVerb>` or `<object>.<child>.<pastTenseVerb>`.
- `apiVersion` ("2.0", required) — Always `2.0`.
- `createdAt` (datetime, required) — When the change committed; not an ordering token.
- `livemode` (boolean, required) — `true` on a live platform in production, `false` on a Sandbox platform and outside production.
- `relatedObject` (EventRelatedObject, required)
- `accountHolderId` (string, optional) — A resource ID. Treat it as an opaque, case-sensitive string.
- `cardProgramId` (string, optional) — A resource ID. Treat it as an opaque, case-sensitive string.
- `transition` (EventTransition, optional) — A committed state change of an allowlisted field; not an ordered delta or a history.
- `requestId` (string, optional) — The v2 request that caused the change, when one did.
- `data` (EmbeddedSessionEventData, optional) — The resource the event names, as committed by its change. Absent only on events recorded before resources were added to events.

## Types

### EventRelatedObject

- `id` (string, required) — A resource ID. Treat it as an opaque, case-sensitive string.
- `type` (string, required) — The resource's `object` value; equals the event type prefix.
- `url` (string, required) — Relative path of the resource. Platform callers add `Account-Holder` with `accountHolderId`.

### EventTransition

A committed state change of an allowlisted field; not an ordered delta or a history.

- `field` (string, required) — The field that changed, for example `status`.
- `to` (string, required) — Value after the change.
- `from` (string, optional) — Value before the change.

### EmbeddedSessionEventData

The resource the event names, as committed by its change. Absent only on events recorded before resources were added to events.

- `object` (EmbeddedSessionSnapshot, optional) — The resource exactly as `GET relatedObject.url` returned it without `extend` when the change committed, less the members the events overview lists as left out. Its `object` member equals `relatedObject.type`.
- `previousAttributes` (EmbeddedSessionEventDataPreviousAttributes, optional) — On a change of an existing resource, each top-level member of `object` whose value changed, with its value before the change, or `null` where it had none. Nested objects are listed whole, and `updatedAt` is never listed. Empty when no member changed. Absent on `*.created` events, on the other events of the change that created the resource, on test events, and on `financialAccount.balanceUpdated`.
- `objectOmitted` (true, optional) — Present instead of `object` and `previousAttributes` when the event with its resource would be larger than 64 KiB, or the resource could not be rendered. Read the resource from `relatedObject.url`.

### EmbeddedSessionSnapshot

The embedded session as `GET /embeddedSessions/{embeddedSessionId}` returns it, less `target` and `origin`: that GET also needs the component's own grants, while the event needs only `embeddedSessions:read`. The `clientToken` is only ever in the create response.

- `id` (string, required) — Session ID.
- `object` ("embeddedSession", required) — Always `embeddedSession`.
- `accountHolderId` (string, required) — The account holder the component acts for.
- `livemode` (boolean, required) — `true` on a live platform in production, `false` on a Sandbox platform and outside production.
- `status` (enum, required) — `PENDING` until the component redeems the `clientToken`, `ACTIVE` while it runs, `EXPIRED` once it timed out or was expired.
  - Allowed values: `PENDING`, `ACTIVE`, `EXPIRED`
- `expiresAt` (datetime, required) — When the `clientToken` stops being redeemable while `PENDING`, when the component stops while `ACTIVE`, and when the session ended once `EXPIRED`.
- `createdAt` (datetime, required) — When the session was created.
- `updatedAt` (datetime, required) — When the session last changed.

### EmbeddedSessionEventDataPreviousAttributes

On a change of an existing resource, each top-level member of `object` whose value changed, with its value before the change, or `null` where it had none. Nested objects are listed whole, and `updatedAt` is never listed. Empty when no member changed. Absent on `*.created` events, on the other events of the change that created the resource, on test events, and on `financialAccount.balanceUpdated`.