<!-- Generated from the canonical 99 Digital API documentation. Do not edit this file. -->

Canonical page: https://docs.99digital.co.il/whatsapp-api/webhook/outgoing-messages

# Outgoing Messages

**Webhook.** Sent to the webhook URL you configure.

Outgoing messages webhooks are only relevant to
[coexistence](https://docs.99digital.co.il/whatsapp-api/information/coexistence) WhatsApp accounts
(`hook` "outgoing"). They show outgoing messages sent by the user themselves
from their mobile phone WhatsApp Business app (or WhatsApp Web), outside of
the API. This is only relevant to let you know the user sent a message, in
case you want to show it as an outgoing message in your platform.

- Note: any outgoing message sent from the API will not trigger an outgoing
  message webhook.
- Outgoing messages webhooks are turned on by default.
- Note 2: outgoing messages to groups are not supported.
- The acknowledges of these messages arrive as
  [Acknowledge](https://docs.99digital.co.il/whatsapp-api/webhook/acknowledge) webhooks (`hook` "update")
  with the same `unique`.

**Settings:**

| Setting | Value |
| --- | --- |
| URL | Your URL — set it with [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) |
| Method | JSON via POST |

**With every outgoing message, you will get the following:**

```json
{
  "status": "OK",
  "hook": "outgoing",
  "unique": "HBgMOTcyNTAxMjM0NTY3FQIAEhgUOEY0QzE2N0E5RDNCMDA5RkQ1QjIA",
  "from": "972771234567",
  "to": "972501234567",
  "type": "text",
  "body": "Sure, we are open until 20:00",
  "caption": "",
  "isForwarded": false,
  "timestamp": "1789900120",
  "timestampMS": 102938,
  "media": false,
  "quote": false,
  "quoteUnique": false
}
```

### Response explained

| Parameter | Description / Example |
| --- | --- |
| `status` | "OK" always. |
| `hook` | "outgoing" always, for a new outgoing message. |
| `unique` | Unique ID for the outgoing message. Its acknowledges arrive with the same `unique`. |
| `from` | Your WhatsApp account. |
| `to` | The end user WhatsApp account that received the message. |
| `type` | Message type. Can be one of the following: `text`, `image`, `audio`, `video`, `location`, `ptt`, `document`, `button`, `contacts`, `list`, `reaction`. |
| `body` | The content of the 'body' depends on the 'type' of the message — see the table below. |
| `caption` | The content of the 'caption' depends on the 'type' of the message — see the table below. |
| `isForwarded` | Shows if the outgoing message is forwarded — true or false. |
| `timestamp` | Time stamp of the outgoing message (Unix time, in seconds, as a string). |
| `timestampMS` | The sub-second part of the timestamp (of the time we processed the message, in microseconds), in case you need it. |
| `media` | If this message contains any media file, it will be true; otherwise false. |
| `quote` | If this message is a quoted message, it will be true; otherwise false. |
| `quoteUnique` | In case the message is quoted (it means that the user replied to an incoming message), this will be the original message unique ID. If the message is not quoted, this will be false. |

#### `body` by message type

| Type | The data that will come |
| --- | --- |
| text | Outgoing text message |
| image | Link |
| audio | Link |
| video | Link |
| location | `lat,lng` |
| ptt | Link |
| document | Link |
| button | Button text |
| contacts | Phone number |
| list | The selection text |
| reaction | The emoji |

You must download the link files to your server: we delete all files within
7 days.

#### `caption` by message type

| Type | The data that will come |
| --- | --- |
| text | Nothing, empty |
| image | Caption text with the image |
| audio | Nothing, empty |
| video | Caption text with the video |
| location | The name and address of the place (`name - address`), if any |
| ptt | Nothing, empty |
| document | Caption text with the document |
| button | Nothing, empty |
| contacts | Name of the contact |
| list | The item list ID that was selected |
| reaction | Nothing, empty |

## Webhook payload

Content type: `application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | string | Yes | "OK" always. One of: `OK`. |
| `hook` | string | Yes | "outgoing" always, for a new outgoing message. Always `outgoing`. |
| `unique` | string | Yes | Unique ID for the outgoing message. Its acknowledges arrive with the same `unique`. Example: `HBgMOTcyNTAxMjM0NTY3FQIAEhgUOEY0QzE2N0E5RDNCMDA5RkQ1QjIA`. |
| `from` | string | Yes | Your WhatsApp account. Example: `972771234567`. |
| `to` | string | Yes | The end user WhatsApp account that received the message. Example: `972501234567`. |
| `type` | string | Yes | Message type. One of: `text`, `image`, `audio`, `video`, `location`, `ptt`, `document`, `button`, `contacts`, `list`, `reaction`. Example: `text`. |
| `body` | string | Yes | The content of the 'body' depends on the 'type' of the message: \| Type \| The data that will come \| \| --- \| --- \| \| text \| Outgoing text message \| \| image \| Link \| \| audio \| Link \| \| video \| Link \| \| location \| `lat,lng` \| \| ptt \| Link \| \| document \| Link \| \| button \| Button text \| \| contacts \| Phone number \| \| list \| The selection text \| \| reaction \| The emoji \| You must download the link files to your server: we delete all files within 7 days. Example: `Sure, we are open until 20:00`. |
| `caption` | string | Yes | The content of the 'caption' depends on the 'type' of the message: \| Type \| The data that will come \| \| --- \| --- \| \| text \| Nothing, empty \| \| image \| Caption text with the image \| \| audio \| Nothing, empty \| \| video \| Caption text with the video \| \| location \| The name and address of the place (`name - address`), if any \| \| ptt \| Nothing, empty \| \| document \| Caption text with the document \| \| button \| Nothing, empty \| \| contacts \| Name of the contact \| \| list \| The item list ID that was selected \| \| reaction \| Nothing, empty \|. Example: ``. |
| `isForwarded` | boolean | Yes | Shows if the outgoing message is forwarded — true or false. Example: `false`. |
| `timestamp` | string | Yes | Time stamp of the outgoing message (Unix time, in seconds, as a string). Example: `1789900120`. |
| `timestampMS` | integer | Yes | The sub-second part of the time we processed the message (in microseconds), in case you need it. Example: `102938`. |
| `media` | boolean | Yes | If this message contains any media file, it will be true; otherwise false. Example: `false`. |
| `quote` | boolean | Yes | If this message is a quoted message, it will be true; otherwise false. Example: `false`. |
| `quoteUnique` | string \| boolean | Yes | In case the message is quoted (it means that the user replied to an incoming message), this will be the original message unique ID. If the message is not quoted, this will be false. Example: `false`. |

### Example: Text

A message sent from the WhatsApp Business app on the phone, not through the API.

```json
{
  "status": "OK",
  "hook": "outgoing",
  "unique": "HBgMOTcyNTAxMjM0NTY3FQIAEhgUOEY0QzE2N0E5RDNCMDA5RkQ1QjIA",
  "from": "972771234567",
  "to": "972501234567",
  "type": "text",
  "body": "Sure, we are open until 20:00",
  "caption": "",
  "isForwarded": false,
  "timestamp": "1789900120",
  "timestampMS": 102938,
  "media": false,
  "quote": false,
  "quoteUnique": false
}
```

## Responses

### 200 — Received. Answer with any 2xx status (200, 201, 204 …) — we wait up to 5 seconds to connect and up to 15 seconds for your answer. The body of your answer is ignored.

### default — Any other status, or no answer in time, counts as a failed delivery. With `retry` 1 in Set Webhook we try again: immediately, then after 5 minutes, 20 minutes, 1 hour, 4 hours and 24 hours. Without it, the webhook is not sent again.
