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

# Message Received

> Get notified when a visitor sends a message in webchat.

The `webchat.message.received` webhook event is triggered whenever a visitor sends a
message in a webchat session. This can be used to track incoming communication and
trigger real-time integrations.

## Payload

```json theme={null}
{
  "event": "webchat.message.received",
  "data": {
    "sessionId": "550e8400-e29b-41d4-a716-446655440000",
    "orgId": "org-abc123",
    "profile": "Default Profile",
    "origin": "https://example.com/pricing",
    "messageId": "msg_7b1d2e9c",
    "content": "Hi, do you offer annual plans?",
    "createdAt": "2024-01-15T14:30:00Z"
  },
  "timestamp": "2024-01-15T14:30:00Z"
}
```

## Properties

| Property         | Type   | Description                                                                    |
| ---------------- | ------ | ------------------------------------------------------------------------------ |
| `event`          | string | The webhook event type (`webchat.message.received`).                           |
| `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.messageId` | string | The unique identifier for the message.                                         |
| `data.content`   | string | The content of the message sent by the visitor.                                |
| `data.createdAt` | string | The ISO 8601 timestamp when the message was received.                          |
| `timestamp`      | string | The ISO 8601 timestamp when the webhook was sent.                              |
