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

# Webhook Events

> Callback URLs configured as a webhook in Tatango are retried 10 times when not reachable. After the 10th time, the system makes no further attempts to reach the callback URL.

## Webhook Events

The Tatango Webhooks system allows you to subscribe to real-time notifications when something important happens in your account.  The table below lists the event types currently available.

| Webhook Event      | Description                                                      |
| ------------------ | ---------------------------------------------------------------- |
| Subscribes         | Occurs when a new number has subscribed to your list             |
| Unsubscribes       | Occurs when a subscriber unsubscribes from your list             |
| Message Sent       | Occurs when a broadcast message is sent                          |
| Reply Received     | Occurs when a reply to a message from your shortcode is received |
| Subscriber Cleaned | Occurs when a subscriber is cleaned from your list               |

<Note>Each webhook event has a JSON payload whose schema is documented in the sections below.</Note>

### Subscribe Event

| Property                  | Type    | Description                                  |
| ------------------------- | ------- | -------------------------------------------- |
| `type`                    | string  | Always `"subscribe"`                         |
| `timestamp`               | string  | ISO 8601 timestamp of the event              |
| `account_id`              | integer | Tatango account identifier                   |
| `campaign_id`             | integer | List identifier                              |
| `opt_id`                  | integer | Unique identifier for the opt-in event       |
| `phone_number`            | string  | Subscriber's phone number                    |
| `carrier_id`              | integer | Carrier identifier                           |
| `carrier_name`            | string  | Name of the carrier                          |
| `first_name`              | string  | Subscriber's first name                      |
| `last_name`               | string  | Subscriber's last name                       |
| `email_address`           | string  | Subscriber's email address                   |
| `gender`                  | string  | Subscriber's gender                          |
| `zip_code`                | string  | Subscriber's ZIP code                        |
| `birthdate`               | string  | Subscriber's birth date (MM/DD/YYYY)         |
| `birthday`                | string  | Subscriber's birthday (MM/DD)                |
| `tag_list`                | array   | Array of tags associated with the subscriber |
| `first_opt_in_timestamp`  | string  | ISO 8601 timestamp of first opt-in           |
| `last_opt_in_method`      | string  | Method used for the opt-in                   |
| `last_opt_in_keyword`     | string  | Keyword used for opt-in (if applicable)      |
| `total_messages_received` | integer | Total messages received by subscriber        |

### Unsubscribe Event

| Property                  | Type    | Description                                  |
| ------------------------- | ------- | -------------------------------------------- |
| `type`                    | string  | Always `"unsubscribe"`                       |
| `timestamp`               | string  | ISO 8601 timestamp of the event              |
| `unsubscribe_date`        | string  | ISO 8601 timestamp of unsubscribe action     |
| `account_id`              | integer | Tatango account identifier                   |
| `campaign_id`             | integer | List identifier                              |
| `opt_id`                  | integer | Unique identifier for the opt event          |
| `phone_number`            | string  | Subscriber's phone number                    |
| `carrier_id`              | integer | Carrier identifier                           |
| `carrier_name`            | string  | Name of the carrier                          |
| `first_name`              | string  | Subscriber's first name                      |
| `last_name`               | string  | Subscriber's last name                       |
| `email_address`           | string  | Subscriber's email address                   |
| `gender`                  | string  | Subscriber's gender                          |
| `zip_code`                | string  | Subscriber's ZIP code                        |
| `birthdate`               | string  | Subscriber's birth date                      |
| `birthday`                | string  | Subscriber's birthday                        |
| `tag_list`                | array   | Array of tags associated with the subscriber |
| `first_opt_in_timestamp`  | string  | ISO 8601 timestamp of first opt-in           |
| `last_opt_in_method`      | string  | Last method used for opt-in                  |
| `last_opt_in_keyword`     | string  | Last keyword used for opt-in                 |
| `total_messages_received` | integer | Total messages received by subscriber        |

### Message Sent Event

| Property            | Type    | Description                                          |
| ------------------- | ------- | ---------------------------------------------------- |
| `type`              | string  | Always `"message_sent"`                              |
| `timestamp`         | string  | ISO 8601 timestamp of the event                      |
| `account_id`        | integer | Tatango account identifier                           |
| `campaign_id`       | integer | List identifier                                      |
| `message_id`        | integer | Unique identifier for the message                    |
| `message_name`      | string  | Name of the message                                  |
| `sent_timestamp`    | string  | ISO 8601 timestamp when message was sent             |
| `is_mms`            | boolean | Whether the message is MMS (`true`) or SMS (`false`) |
| `content`           | string  | Message content                                      |
| `recipient_count`   | string  | Number of intended recipients                        |
| `success_count`     | integer | Number of successful deliveries                      |
| `bounce_count`      | integer | Number of bounced messages                           |
| `clean_count`       | integer | Number of cleaned subscribers                        |
| `unsubscribe_count` | integer | Number of unsubscribes from this message             |
| `send_cost`         | number  | Cost of sending the message                          |

### Reply Received Event

| Property                 | Type    | Description                                  |
| ------------------------ | ------- | -------------------------------------------- |
| `type`                   | string  | Always `"campaign_response"`                 |
| `timestamp`              | string  | ISO 8601 timestamp of the event              |
| `account_id`             | integer | Tatango account identifier                   |
| `campaign_id`            | integer | List identifier                              |
| `message_id`             | integer | ID of the message being replied to           |
| `sent_timestamp`         | string  | ISO 8601 timestamp of original message       |
| `content`                | string  | Content of the original message              |
| `response_timestamp`     | string  | ISO 8601 timestamp of the reply              |
| `reply_content`          | string  | Content of the subscriber's reply            |
| `opt_id`                 | integer | Unique identifier for the opt record         |
| `phone_number`           | string  | Subscriber's phone number                    |
| `carrier_id`             | integer | Carrier identifier                           |
| `carrier_name`           | string  | Name of the carrier                          |
| `first_name`             | string  | Subscriber's first name                      |
| `last_name`              | string  | Subscriber's last name                       |
| `email_address`          | string  | Subscriber's email address                   |
| `gender`                 | string  | Subscriber's gender                          |
| `zip_code`               | string  | Subscriber's ZIP code                        |
| `birthdate`              | string  | Subscriber's birth date                      |
| `birthday`               | string  | Subscriber's birthday                        |
| `tag_list`               | array   | Array of tags associated with the subscriber |
| `first_opt_in_timestamp` | string  | ISO 8601 timestamp of first opt-in           |
| `last_opt_in_method`     | string  | Method used for opt-in                       |
| `last_opt_in_keyword`    | string  | Keyword used for opt-in                      |
| `is_mms`                 | boolean | Whether the reply is MMS or SMS              |
| `attachment_urls`        | array   | Array of attachment URLs for MMS replies     |

### Subscriber Cleaned Event

| Property          | Type    | Description                                    |
| ----------------- | ------- | ---------------------------------------------- |
| `type`            | string  | Always `"cleaned"`                             |
| `timestamp`       | string  | ISO 8601 timestamp of the event                |
| `account_id`      | integer | Tatango account identifier                     |
| `campaign_id`     | integer | List identifier                                |
| `subscriber_id`   | integer | Unique identifier for the subscriber           |
| `phone_number`    | string  | Subscriber's phone number                      |
| `cleaned_at`      | string  | ISO 8601 timestamp when subscriber was cleaned |
| `clean_reason`    | string  | Reason for the clean action                    |
| `last_message_id` | integer | ID of the last message sent to subscriber      |
