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

# message.received

Event triggered when a program you're enrolled in sends you a direct message, whether from the dashboard, the API or an Intercom reply. Campaign messages don't trigger this event.

## Response body parameters

All webhook payloads follow a consistent top-level structure with
event-specific data nested within the `data` object.

**id** `string`

The event ID.
**event** `string`

The event type that triggered the webhook (e.g., `message.received`).
**createdAt** `string`

ISO 8601 timestamp when the webhook event was created.
**data** `object`

Event-specific data containing detailed information about the event. The
data object for the `message.received` event contains the following
parameters:

**object parameters**

**id** `string`

Unique identifier for the message.

**text** `string`

The text of the message.

**readInApp** `string | null`

ISO 8601 timestamp when you read the message in the app, or `null` if you haven't.

**readInEmail** `string | null`

ISO 8601 timestamp when you read the message in an email, or `null` if you haven't.

**createdAt** `string`

ISO 8601 timestamp when the message was sent.

**updatedAt** `string`

ISO 8601 timestamp when the message was last updated.

**attachments** `object[]`

The files attached to the message.

**attachment object**

**name** `string`

The file name of the attachment.

**size** `number`

The size of the attachment, in bytes.

**type** `string`

The MIME type of the attachment.

**url** `string`

A download link that expires after 1 hour.

**sourceType** `string`

Who sent the message. Always `program` for this event.

**program** `object`

The program that sent the message.

**program object**

**id** `string`

Unique identifier for the program.

**name** `string`

Name of the program.

**slug** `string`

Slug of the program.

**logo** `string | null`

URL of the program's logo, if any.

```json Response theme={null}
{
  "id": "evt_KleiO4HBwZFbO1vZLWIPZ2AtX",
  "event": "message.received",
  "createdAt": "2025-07-16T10:48:15.000Z",
  "data": {
    "id": "msg_1KAP4CDPBSVMMBMH9XX3YZZ0Z",
    "text": "Hey! Thanks for joining the program. Let us know if you need any assets.",
    "readInApp": null,
    "readInEmail": null,
    "createdAt": "2025-07-16T10:48:14.722Z",
    "updatedAt": "2025-07-16T10:48:14.722Z",
    "attachments": [],
    "sourceType": "program",
    "program": {
      "id": "prog_CYCu7IMAapjkRpTnr8F1azjN",
      "name": "Acme",
      "slug": "acme",
      "logo": "https://assets.dub.co/logo.png"
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.