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

# messages.sent event

> Fired when a message is sent through the D-API API.

## `messages.sent` event

> [!WARNING]
>
> `messages.sent` fires **only** for messages sent through the D-API
> **API** (`/messages/send/*` and `/interactive/send/*`). Messages
> sent from the **phone itself** or from **other devices linked** to the
> same number do **not** trigger `messages.sent` — they arrive in
> [`messages.received`](https://docs.d-api.cloud/en/whatsapp/webhooks/messages-received) with `fromMe: true`.

Use this event to confirm that a message fired through the API was sent
successfully and to record the final content delivered to WhatsApp.

> [!NOTE]
>
> The payload has **exactly the same structure** as the `messages.received` event
> for the same `type` (same fields, `media_data` with `file_length`/`mimetype`,
> `context_info`, etc.), just with `fromMe: true` and `isMetaAI: false`. For the full reference of
> all fields, see the
> [messages.received](https://docs.d-api.cloud/en/whatsapp/webhooks/messages-received.md) page.

The difference is in the roles: `from` is **your** number (the session) and `to` is the
recipient.

> [!NOTE]
>
> When media is sent by **external URL**, the payload may include
> `pending_media_url` (the original URL provided in the request) inside
> `media_data`. Also, the message `id` may come
> in **uppercase**.

***

## Examples by type

> [accordion] text
>
> ```json theme={null}
> {
>   "event": "messages.sent",
>   "sessionId": "my-session",
>   "timestamp": "2026-01-24T22:55:00.000Z",
>   "traceId": "c17dee440402792623e3ad6d925cb111",
>   "data": {
>     "id": "AC9831DDA691236BA3CE4909A187B703",
>     "type": "text",
>     "message": "Olá! Como posso ajudar?",
>     "timestamp": 1769295300000,
>     "fromMe": true,
>     "isMetaAI": false,
>     "is_group": false,
>     "group_name": "",
>     "from": {
>       "jid": "558005915338@s.whatsapp.net",
>       "name": "Minha Empresa"
>     },
>     "from_name": "Minha Empresa",
>     "to": {
>       "jid": "5511999999999@s.whatsapp.net",
>       "name": "João"
>     },
>     "media_url": null
>   }
> }
> ```

> [accordion] image
>
> ```json theme={null}
> {
>   "event": "messages.sent",
>   "sessionId": "my-session",
>   "timestamp": "2026-01-24T23:08:46.618Z",
>   "traceId": "c303a70535496ac2ef475d1454e5091d",
>   "data": {
>     "id": "3EB0F61B5D1F94FAFCD306",
>     "type": "image",
>     "message": "",
>     "timestamp": 1769296125000,
>     "fromMe": true,
>     "isMetaAI": false,
>     "is_group": false,
>     "group_name": "",
>     "from": {
>       "jid": "558005915338@s.whatsapp.net",
>       "name": "Minha Empresa"
>     },
>     "from_name": "Minha Empresa",
>     "to": {
>       "jid": "5511999999999@s.whatsapp.net",
>       "name": "João"
>     },
>     "media_data": {
>       "url": "https://mmg.whatsapp.net/...",
>       "width": 1179,
>       "height": 1127,
>       "caption": "",
>       "file_length": 108529,
>       "mimetype": "image/jpeg"
>     },
>     "media_url": "https://s3.us-east-005.backblazeb2.com/d-api-media/my-session/image/3EB0F61B5D1F94FAFCD306.jpg",
>     "body": ""
>   }
> }
> ```

> [accordion] video
>
> ```json theme={null}
> {
>   "event": "messages.sent",
>   "sessionId": "my-session",
>   "timestamp": "2026-01-24T23:09:25.997Z",
>   "traceId": "696a8af1fffc77be1da98883fbf47a18",
>   "data": {
>     "id": "3EB0611DADDC69F4FCE999",
>     "type": "video",
>     "message": "",
>     "timestamp": 1769296161000,
>     "fromMe": true,
>     "isMetaAI": false,
>     "is_group": false,
>     "group_name": "",
>     "from": {
>       "jid": "558005915338@s.whatsapp.net",
>       "name": "Minha Empresa"
>     },
>     "from_name": "Minha Empresa",
>     "to": {
>       "jid": "5511999999999@s.whatsapp.net",
>       "name": "João"
>     },
>     "media_data": {
>       "url": "https://mmg.whatsapp.net/...",
>       "width": 2160,
>       "height": 3840,
>       "caption": "",
>       "duration": 9,
>       "file_length": 15033300,
>       "mimetype": "video/mp4"
>     },
>     "media_url": "https://s3.us-east-005.backblazeb2.com/d-api-media/my-session/video/3EB0611DADDC69F4FCE999.mp4",
>     "body": ""
>   }
> }
> ```

> [accordion] audio
>
> ```json theme={null}
> {
>   "event": "messages.sent",
>   "sessionId": "my-session",
>   "timestamp": "2026-01-24T23:07:23.963Z",
>   "traceId": "57b56b9da28101ef39a2bbacb02bf79e",
>   "data": {
>     "id": "3EB04F2EA624ED5AE5E994",
>     "type": "audio",
>     "message": "Audio message",
>     "timestamp": 1769296042000,
>     "fromMe": true,
>     "isMetaAI": false,
>     "is_group": false,
>     "group_name": "",
>     "from": {
>       "jid": "558005915338@s.whatsapp.net",
>       "name": "Minha Empresa"
>     },
>     "from_name": "Minha Empresa",
>     "to": {
>       "jid": "5511999999999@s.whatsapp.net",
>       "name": "João"
>     },
>     "media_data": {
>       "url": "https://mmg.whatsapp.net/...",
>       "is_ptt": true,
>       "duration": 1,
>       "file_length": 3228,
>       "mimetype": "audio/ogg; codecs=opus"
>     },
>     "media_url": "https://s3.us-east-005.backblazeb2.com/d-api-media/my-session/audio/3EB04F2EA624ED5AE5E994.ogg"
>   }
> }
> ```

> [accordion] document
>
> ```json theme={null}
> {
>   "event": "messages.sent",
>   "sessionId": "my-session",
>   "timestamp": "2026-01-24T22:52:36.560Z",
>   "traceId": "f52c470bc7e83b615fe02f7ae6de99a4",
>   "data": {
>     "id": "AC4E4E0D20923933E79133FED55E86FA",
>     "type": "document",
>     "message": "",
>     "timestamp": 1769295155000,
>     "fromMe": true,
>     "isMetaAI": false,
>     "is_group": false,
>     "group_name": "",
>     "from": {
>       "jid": "558005915338@s.whatsapp.net",
>       "name": "Minha Empresa"
>     },
>     "from_name": "Minha Empresa",
>     "to": {
>       "jid": "5511999999999@s.whatsapp.net",
>       "name": "João"
>     },
>     "media_data": {
>       "url": "https://mmg.whatsapp.net/...",
>       "caption": "",
>       "filename": "contrato.pdf",
>       "file_length": 561909,
>       "mimetype": "application/pdf"
>     },
>     "media_url": "https://s3.us-east-005.backblazeb2.com/d-api-media/my-session/application/AC4E4E0D20923933E79133FED55E86FA.pdf",
>     "body": ""
>   }
> }
> ```

> [accordion] sticker
>
> ```json theme={null}
> {
>   "event": "messages.sent",
>   "sessionId": "my-session",
>   "timestamp": "2026-01-24T23:25:41.529Z",
>   "traceId": "0cc5f31ce4eeba9d93b69c644047d132",
>   "data": {
>     "id": "3EB07121F4AA1FECE1EB77",
>     "type": "sticker",
>     "message": "Sticker",
>     "timestamp": 1769297140000,
>     "fromMe": true,
>     "isMetaAI": false,
>     "is_group": false,
>     "group_name": "",
>     "from": {
>       "jid": "558005915338@s.whatsapp.net",
>       "name": "Minha Empresa"
>     },
>     "from_name": "Minha Empresa",
>     "to": {
>       "jid": "5511999999999@s.whatsapp.net",
>       "name": "João"
>     },
>     "media_data": {
>       "url": "https://mmg.whatsapp.net/...",
>       "width": 0,
>       "height": 0,
>       "file_length": 31670,
>       "mimetype": "image/webp",
>       "is_animated": false
>     },
>     "media_url": "https://s3.us-east-005.backblazeb2.com/d-api-media/my-session/image/3EB07121F4AA1FECE1EB77.webp"
>   }
> }
> ```

> [accordion] location
>
> ```json theme={null}
> {
>   "event": "messages.sent",
>   "sessionId": "my-session",
>   "timestamp": "2026-01-24T23:14:40.667Z",
>   "traceId": "9acf700c9a579d390acfaabcd47d813a",
>   "data": {
>     "id": "2A3245D5D360B969BC24",
>     "type": "location",
>     "message": "Location: -23.550520, -46.633308",
>     "timestamp": 1769296480000,
>     "fromMe": true,
>     "isMetaAI": false,
>     "is_group": false,
>     "group_name": "",
>     "from": {
>       "jid": "558005915338@s.whatsapp.net",
>       "name": "Minha Empresa"
>     },
>     "from_name": "Minha Empresa",
>     "to": {
>       "jid": "5511999999999@s.whatsapp.net",
>       "name": "João"
>     },
>     "data": {
>       "degrees_latitude": -23.550520,
>       "degrees_longitude": -46.633308,
>       "name": "",
>       "address": "",
>       "thumbnail": "/9j/4AAQSkZJRgABAQAA..."
>     },
>     "media_url": null
>   }
> }
> ```

> [accordion] contact
>
> ```json theme={null}
> {
>   "event": "messages.sent",
>   "sessionId": "my-session",
>   "timestamp": "2026-01-24T23:07:52.683Z",
>   "traceId": "5e2ce9f64316e43de9f9be26bc883cc6",
>   "data": {
>     "id": "3EB0E400D2D23FCC5F62",
>     "type": "contact",
>     "message": "Contact: João Silva",
>     "timestamp": 1769296072000,
>     "fromMe": true,
>     "isMetaAI": false,
>     "is_group": false,
>     "group_name": "",
>     "from": {
>       "jid": "558005915338@s.whatsapp.net",
>       "name": "Minha Empresa"
>     },
>     "from_name": "Minha Empresa",
>     "to": {
>       "jid": "5511999999999@s.whatsapp.net",
>       "name": "João"
>     },
>     "data": {
>       "contact_name": "João Silva",
>       "contact_phone": "5511988887777",
>       "display_name": "João Silva",
>       "vcard": "BEGIN:VCARD\nVERSION:3.0\nN:Silva;João;;;\nFN:João Silva\nTEL;type=CELL;waid=5511988887777:+55 11 98888-7777\nEND:VCARD"
>     },
>     "media_url": null
>   }
> }
> ```

> [accordion] reaction
>
> ```json theme={null}
> {
>   "event": "messages.sent",
>   "sessionId": "my-session",
>   "timestamp": "2026-01-24T23:22:59.675Z",
>   "traceId": "902f8bc16e32af74bca7b23c1696377f",
>   "data": {
>     "id": "3EB0798CB87F57E7E8FDEE",
>     "type": "reaction",
>     "message": "👍",
>     "timestamp": 1769296979000,
>     "fromMe": true,
>     "isMetaAI": false,
>     "is_group": false,
>     "group_name": "",
>     "from": {
>       "jid": "558005915338@s.whatsapp.net",
>       "name": "Minha Empresa"
>     },
>     "from_name": "Minha Empresa",
>     "to": {
>       "jid": "5511999999999@s.whatsapp.net",
>       "name": "João"
>     },
>     "data": {
>       "original_message_id": "2A3245D5D360B969BC24",
>       "reaction_text": "👍",
>       "reaction_timestamp": 1769296978000,
>       "target_participant": ""
>     },
>     "media_url": null
>   }
> }
> ```

> [accordion] list
>
> ```json theme={null}
> {
>   "event": "messages.sent",
>   "sessionId": "my-session",
>   "timestamp": "2026-01-25T20:15:06.493Z",
>   "traceId": "5458c3c3605f3d5dee7076349890912d",
>   "data": {
>     "id": "3EB0B74CA34A5FC973F4C2",
>     "type": "list",
>     "message": "mensagem aqui",
>     "timestamp": 1769372106000,
>     "fromMe": true,
>     "isMetaAI": false,
>     "is_group": false,
>     "group_name": "",
>     "from": {
>       "jid": "558005915338@s.whatsapp.net",
>       "name": "Minha Empresa"
>     },
>     "from_name": "Minha Empresa",
>     "to": {
>       "jid": "5511999999999@s.whatsapp.net",
>       "name": "João"
>     },
>     "data": {
>       "title": "Teste",
>       "description": "mensagem aqui",
>       "button_text": "Abrir",
>       "footer_text": "",
>       "list_type": 1,
>       "sections": [
>         {
>           "title": "Teste",
>           "rows": [
>             {
>               "row_id": "t1",
>               "title": "Sim",
>               "description": "aham"
>             }
>           ]
>         }
>       ]
>     },
>     "media_url": null
>   }
> }
> ```

> [accordion] carousel
>
> ```json theme={null}
> {
>   "event": "messages.sent",
>   "sessionId": "my-session",
>   "timestamp": "2026-01-25T20:15:09.153Z",
>   "traceId": "44663f6360711dc8e6788b6772c2efa9",
>   "data": {
>     "id": "3EB024449A497D01E1DB93",
>     "type": "carousel",
>     "message": "",
>     "timestamp": 1769372108000,
>     "fromMe": true,
>     "isMetaAI": false,
>     "is_group": false,
>     "group_name": "",
>     "from": {
>       "jid": "558005915338@s.whatsapp.net",
>       "name": "Minha Empresa"
>     },
>     "from_name": "Minha Empresa",
>     "to": {
>       "jid": "5511999999999@s.whatsapp.net",
>       "name": "João"
>     },
>     "data": {
>       "type": "carousel",
>       "cards": [
>         {
>           "header_title": "",
>           "body": "Teste"
>         }
>       ]
>     },
>     "media_url": null,
>     "body": ""
>   }
> }
> ```

***

## Other sendable types

The types below can also be sent through the API. The exact `messages.sent`
payload format for these types is **not documented here** to avoid
incorrect examples — when sent, the webhook follows the same structure
as the corresponding [`messages.received`](https://docs.d-api.cloud/en/whatsapp/webhooks/messages-received),
with `fromMe: true`.

| Type | Endpoint |
| - | - |
| poll | `POST /messages/send/poll` |
| album | `POST /messages/send/album` |
| nativeflow | `POST /interactive/send/nativeflow` |

> [!NOTE]
>
> Polls (`poll`) are reported in `messages.received` as `poll_update`
> (votes). An **album** sends multiple media items and may trigger more than one
> individual media event (`image`/`video`). Confirm the format in a test environment
> before handling these types in production.

***

## Sending endpoints

Each sendable type maps to an API endpoint:

| Type | Endpoint |
| - | - |
| text | `POST /messages/send/text` |
| image | `POST /messages/send/image` |
| video | `POST /messages/send/video` |
| audio | `POST /messages/send/audio` |
| document | `POST /messages/send/document` |
| sticker | `POST /messages/send/sticker` |
| location | `POST /messages/send/location` |
| contact | `POST /messages/send/contact` |
| poll | `POST /messages/send/poll` |
| reaction | `POST /messages/send/reaction` |
| album | `POST /messages/send/album` |
| list | `POST /interactive/send/list` |
| carousel | `POST /interactive/send/carousel` |
| nativeflow | `POST /interactive/send/nativeflow` |

> [!WARNING]
>
> Avoid using `messages.sent` to trigger auto-reply automations.
> Since it confirms messages that **you yourself** sent through the API, treating it as
> a reply trigger can cause loops.


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