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

# Session Started

> Get notified when a new webchat session is started.

The `webchat.session.started` webhook event is triggered whenever a new webchat session
is created. This can be used to track visitor engagement and pass custom metadata from
your website into downstream systems.

## Payload

```json theme={null}
{
  "event": "webchat.session.started",
  "data": {
    "sessionId": "550e8400-e29b-41d4-a716-446655440000",
    "orgId": "org-abc123",
    "profile": "Default Profile",
    "origin": "https://example.com/pricing",
    "createdAt": "2024-01-15T14:30:00Z",
    "additionalInfo": {
      "visitorId": "v_9f8e7d",
      "source": "google_ads"
    }
  },
  "timestamp": "2024-01-15T14:30:00Z"
}
```

## Properties

| Property              | Type                    | Description                                                                                |
| --------------------- | ----------------------- | ------------------------------------------------------------------------------------------ |
| `event`               | string                  | The webhook event type (`webchat.session.started`).                                        |
| `data.sessionId`      | string                  | The unique identifier for the webchat session.                                             |
| `data.orgId`          | string                  | The Apten organization ID that owns the session.                                           |
| `data.profile`        | string                  | The name of the webchat profile that handled the session.                                  |
| `data.origin`         | string                  | The URL of the page where the webchat widget was opened. Only included if set.             |
| `data.createdAt`      | string                  | The ISO 8601 timestamp when the session was created.                                       |
| `data.additionalInfo` | Record\<string, string> | Custom key-value metadata passed when the session was created. Only included if non-empty. |
| `timestamp`           | string                  | The ISO 8601 timestamp when the webhook was sent.                                          |
