# message.send_success

Source: https://developer.nylas.com/docs/reference/notifications/messages/message-send_success/

Sent when a scheduled message is sent and delivered successfully. Requires the `send_at` parameter.

> The `body` field is typically omitted or empty in the delivered payload. Use the `snippet` field for a preview, or re-query the Messages API for the full body.

## data.object fields

- `grant_id` (string) - The grant ID that sent this message. Present at the `data` level.
- `object` (object) - The scheduled message that was sent.
  - `object` (string) (message) - Always `message`.
  - `grant_id` (string) - The grant ID that sent this message.
  - `id` (string) - The Nylas message ID.
  - `subject` (string) - The message subject line.
  - `body` (string) - The message body. Typically omitted from webhook payloads; use `snippet` instead.
  - `from` (array) - Sender information.
    - `name` (string)
    - `email` (string)
  - `to` (array) - Primary recipients.
    - `name` (string)
    - `email` (string)
  - `cc` (array) - CC recipients.
    - `name` (string)
    - `email` (string)
  - `bcc` (array) - BCC recipients.
    - `name` (string)
    - `email` (string)
  - `reply_to` (array) - Reply-to addresses.
    - `name` (string)
    - `email` (string)
  - `attachments` (array) - Attachment metadata.
    - `id` (string) - Attachment ID.
    - `filename` (string) - Original filename.
    - `content_type` (string) - MIME type.
    - `size` (integer) - Size in bytes.
    - `content` (string) - Base64-encoded attachment content.
  - `schedule_id` (string) - The scheduled send job ID.
  - `send_at` (integer) - Unix timestamp when the message was scheduled to send.
  - `use_draft` (boolean) - Whether the message was sent from a draft. Omitted when `false` (the default).

## Example payload

```json
{
  "specversion": "1.0",
  "type": "message.send_success",
  "source": "/nylas/send",
  "id": "<WEBHOOK_ID>",
  "time": 1723821985,
  "data": {
    "application_id": "<NYLAS_APPLICATION_ID>",
    "grant_id": "<NYLAS_GRANT_ID>",
    "object": {
      "object": "message",
      "grant_id": "<NYLAS_GRANT_ID>",
      "attachments": [
        {
          "content": "HASKDJhiuahsdjlkhKJAsd=",
          "content_type": "text/plain",
          "filename": "myfile.txt",
          "id": "<ATTACHMENT_ID>",
          "size": 16
        }
      ],
      "bcc": [
        {
          "email": "alex.johnson@example.com",
          "name": "Alex Johnson"
        }
      ],
      "cc": [
        {
          "email": "sam.lee@example.com",
          "name": "Sam Lee"
        }
      ],
      "from": [
        {
          "email": "dana.chen@example.com",
          "name": "Dana Chen"
        }
      ],
      "id": "<MESSAGE_ID>",
      "reply_to": [
        {
          "email": "dana.chen@example.com",
          "name": "Dana Chen"
        }
      ],
      "schedule_id": "<SCHEDULE_ID>",
      "send_at": 1723825200,
      "subject": "Q3 planning meeting agenda",
      "to": [
        {
          "email": "jordan.taylor@example.com",
          "name": "Jordan Taylor"
        }
      ],
      "snippet": "Hi team, here is the agenda for our Q3 planning meeting..."
    }
  },
  "webhook_delivery_attempt": 1
}
```
