# Reporting Webhooks

Reporting Webhooks send real-time message activity events (e.g. sends, opens, clicks) as JSON in an HTTP POST. They’re useful in many cases, including analyzing message activity outside of Customer.io.

You can find information about each individual event type on our [Reporting Webhooks API documentation](/integrations/api/webhooks).

 Looking to send a custom webhook to a specific API via your workflow?

Check out [Webhook Actions](/journeys/webhooks-action), instead.

## Setup[](#setup)

1.  [Log in](https://fly.customer.io/login) and go to *Data & Integrations* > *Integrations*.
    
2.  Find and select **Reporting Webhooks**.
    
3.  Click **Add Reporting Webhook**.
    
4.  Enter the **Webhook Endpoint** URL where you want to receive events. While the endpoint URL can be either HTTP or HTTPs, we recommend HTTPS to protect customer information.
    
5.  Select the events you want to receive.
    
6.  (Optional) Select the **Send Frequency** and **Body Content** options.
    
    *   **Send Frequency:** This determines whether you receive events the first time they happen or every time they happen.
    *   **Body Content:** Enable this to include message body content (and email headers) in all of the “Sent” events we send to you.
7.  Choose **Save and Enable Webhook** at the bottom right of the page.
    

[![reporting_webhook_configuration](https://docs.customer.io/images/reporting_webhook_configuration.png)](#d705bf40f04e893cbf74727945a2cb50-lightbox)

### (Optional) Allowlist our IP addresses[](#optional-allowlist-our-ip-addresses)

If you have firewalls or rules in place that only allow connections from specific IPs, add Customer.io IP addresses to your allowlist so your systems can receive connections from us.

US Region

EU Region

35.188.196.183

34.76.143.229

104.198.177.219

34.78.91.47

104.154.232.87

34.77.94.252

130.211.229.195

35.187.188.242

104.198.221.24

34.78.122.90

104.197.27.15

35.195.137.235

35.194.9.154

130.211.108.156

104.154.144.51

104.199.50.18

104.197.210.12

34.78.44.80

35.225.6.73

35.205.31.154

35.192.215.166

34.170.204.100

## Disabling webhooks[](#disabling-webhooks)

If you want to stop sending webhook events, you can disable the webhook.

1.  Go to *Data & Integrations* > *Integrations*.
2.  Go to *Reporting Webhooks*.
3.  Select your webhook and click *Disable*.

[![Disable Toggle](https://docs.customer.io/images/Disable%20Toggle.png)](#d6448832df8c4170d179a6012fe3f529-lightbox)

You can also edit your webhook, change the state to *disabled*, and click **Save**.

[![Disable Toggle 2](https://docs.customer.io/images/Disable%20Toggle%202.png)](#d08f73c7d96a3307e84471107ff922cc-lightbox)

 If you re-enable a webhook, you’ll only receive events from the moment you re-enable it. We don’t backfill or replay webhook events that occurred while the webhook was disabled.

## Test a webhook[](#test-a-webhook)

To inspect Webhook Events before pointing them at your own servers, use a service like [webhook.site](http://webhook.site).

 Warning

Enabling a webhook endpoint can cause you to send sensitive data to an external recipient. We recommend creating a test/sandbox workspace to test your webhooks so that you don’t inadvertently leak sensitive data to a potentially unsecured endpoint.

To send a test event, press **Send Test** while editing your Webhook Endpoint.

[![image.png](https://docs.customer.io/images/image%28381%29.png)](#18100d0abeb013533ec14f637be805b8-lightbox)

## Events[](#events)

The following events are available via webhook:

To only receive specific events, refine your selections within the nested list:

[![Webhook Events](https://docs.customer.io/images/Webhook%20Events.png)](#62d0cfd6f27ab5585ca4ac9569dbaa1c-lightbox)

If you have a specific request for an event not listed here that you would like to be notified of, please [contact us](https://customer.io/contact/).

## Webhook attributes[](#webhook-attributes)

Attribute

Description

action\_id

If the delivery was created as part of a Campaign or API Triggered Broadcast workflow, this is the ID for the unique workflow item that caused the delivery to be created. It can be used to retrieve full message details, including content, via the Campaign endpoint of [our API](/integrations/api/app/#operation/getCampaignAction).

broadcast\_id

If applicable, the ID of the API Triggered Broadcast that generated the message. It can be used to retrieve message details, including the actions in your broadcast, via the Braodcast endpoint of [our API](/integrations/api/app/#operation/getBroadcast).

campaign\_id

If applicable, the ID of the Event-triggered, Segment-triggered, or Date-triggered Campaign that generated the message.

content

The body content of a sent message; if a message is an email, body content also contains headers. This can be useful if you want to display message content in your app. You must opt in to receiving content.

content\_id

If the message was part of a newsletter split test, this is the ID of the split test variation.

customer\_id

The ID of the person the webhook event represents. In a workspace supporting both `email` and `id` as identifiers, this value can be null. The value is empty if the person has been deleted. This field is generally considered deprecated. You should ignore this value and rely on the `identifiers` object.

identifiers

Contains identifiers for the person the webhook event is associated with. The object is empty if a person was deleted. If your workspace supports both email and ID as identifiers, this object contains `id`, `email`, and `cio_id`, and both `id` and `email` can be null. If your workspace only supports ID, this object only contains `id`.

delivery\_id

The unique ID of the delivery record associated with the message.

device\_id

Only on push-related events, the ID of the associated mobile device.

device\_platform

Only on push-related events, the platform of the associated mobile device.

email\_address

Only on customer\_subscribed and customer\_unsubscribed events, this is the email address of the person.

event\_id

The unique ID of the reporting webhook event being sent. This can be useful for deduplicating purposes.

event\_type

The type of event sent (e.g. email\_sent, sms\_drafted).

href

Only on “clicked” events, the fully rendered URL of the link that was clicked.

journey\_id

The ID for the path a person went through in a Campaign or API Triggered Broadcast workflow. In our [Data Warehouse Sync](/journeys/data-warehouse-sync), this is referred to as subject\_id.

link\_id

Only on “clicked” events, the ID of the tracked link that was clicked.

machine

Only on email “clicked” events, indicates if the click was generated by a machine (boolean).

newsletter\_id

If applicable, the ID of the Newsletter that generated the message. It can be used to retrieve full message details via the Newsletters endpoint of [our API](/integrations/api/app/#operation/getNewsletters).

prefetched

Only on email “opened” events, indicates if the email was opened by Gmail, Apple Privacy Protection, or a user agent identified as a machine (boolean).

proxied

Only on email “opened” events, indicates if the email was fetched by a proxy to hide the user identity, IP address, etc. (boolean).

recipient

The address of the message recipient. This could be an email address, a phone number, a mobile device ID, a Webhook URL, or a Slack username or channel.

subject

For email events, this is the subject of the email.

failure\_message

If applicable, the reason a message failed to send.

timestamp

The timestamp at which the event being reported took place.

transactional\_message\_id

If a message is transactional, this is the unique identifier of the transactional message “template” that you sent (and referenced in the [transactional message payload](/integrations/api/app/#tag/Transactional)). If you send transactional messages without referencing `transactional_message_id` (by passing `body`, `subject`, and `from` values at send time), this value is 1.

tracked\_response

Only available for in-app message “clicked” events, the [tracked response](/journeys/tracked-responses) value if *Track Clicks* is enabled for the in-app message action/component that a person clicked/tapped.

trigger\_event\_id

The id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)

## The identifiers object[](#the-identifiers-object)

Webhook payloads include an `identifiers` object. This object contains the unique identifiers for the person your event represents.

The items that the `identifiers` object can contain are defined by your workspace settings. If your workspace supports both `email` and `id` as identifiers, the identifiers block contains both (though either can be null if not set) and a `cio_id`—a unique, immutable identifier set by Customer.io to identify people canonically across changes to their other identifiers.

If your workspace uses ID as its only identifier, the `identifiers` object *only* contains the `id`.

```json
{
  "data": {
    "action_id": 36,
    "broadcast_id": 9,
    "customer_id": "abcd-1234",
    "identifiers": {
        "cio_id": "03000001",
        "id": "abcd-1234",
        "email": "test@example.com"
    },
    "delivery_id": "RPILAgABcRhIBqSp7kiPekGBIeVh",
    "recipient": "test@example.com",
    "subject": "hello"
  },
  "event_id": "01E4C8AY5K21N2QNRBD9YXJ13Z",
  "object_type": "email",
  "metric": "sent",
  "timestamp": 1585254331
}
```

## Format[](#format)

 Go to our new [reporting webhook documentation](/integrations/api/webhooks) for examples of each event type.

Customer.io Webhooks are HTTP POST requests encoded in JSON. The requests have a User Agent header containing “Customer.io Web Hooks x.x” where “x.x” is the version number.

The JSON body contains a general top-level section included in all webhook requests, as well as a “data” attribute, which contains data specific to the type of event.

Below is an example of an HTTP request for an email-related event:

```json
User-Agent: Customer.io Web Hooks 1.0
Host: webhook.site
Content-Type: application/json
Accept-Encoding: gzip
Cf-Connecting-Ip: 167.114.157.9
X-Request-Id: 	7e6f46cd-480e-4354-93ce-74b770015c7f
Connect-Time: 1
Content-Length: 1100
Cf-Visitor: {"scheme":"http"}
Total-Route-Time: 0
Cf-Ipcountry: CA
Cf-Ray: 2b62237a83a12507-ORD
Connection: close
Via: 1.1 vegur

RAW BODY

{
  "data": {
    "action_id": 36,
    "broadcast_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
        "email": "test@example.com",
        "cio_id": "d9c106000001"
    },
    "delivery_id": "RPILAgABcRhIBqSp7kiPekGBIeVh",
    "recipient": "test@example.com",
    "subject": "hello"
  },
  "event_id": "01E4C8AY5K21N2QNRBD9YXJ13Z",
  "object_type": "email",
  "metric": "clicked",
  "timestamp": 1585254331
}
```

## Send rate, timeouts, and failures[](#timeouts-and-failures)

Our send rate is dynamic with no hard max; however, we roughly process in batches of 40 requests per workspace. The send rate for a single endpoint depends on:

*   How fast you can accept our webhooks
*   The total volume of reporting webhooks across our customer base at the time of your request

We have a 4-second timeout for calls to your webhook endpoint. If we don’t get a successful (2xx) response during those 4 seconds, we retry the webhook over a period of 7 days with exponential backoff. Each time we check your workspace for reporting webhooks, we start by queuing the retries then check for new requests if there’s still room in the batch of requests.

If your webhook server responds with any of the following status codes, we’ll add the failed call to a batch that we’ll retry after an hour. When we process the batch, we’ll move individual failures in the batch to a new batch/queue.

*   Error codes: `400`, `401`, `402`, `403`, `404`, `405`, `410`, `422`,`429`, `500`, `502`, `521`.
*   Error responses: `EOF`, `server misbehaving`, `connect: connection refused`, `read: connection reset by peer`, `tls: failed to verify certificate: x509:`

If you have issues with your webhook server and you want to temporarily block our servers, you can look up the current set of IP addresses we use [via this API endpoint](/integrations/api/app/#operation/getCioAllowlist).

## Securely verify requests[](#securely-verify-requests)

For security purposes, webhooks include `X-CIO-Signature` in the header. This signature combines your webhook signing key with the body of the webhook request using a standard HMAC-SHA256 hash.

*   **For reporting webhooks,** you can find the signing key on the same page you enter your webhook endpoint: [*Data & Integrations > Integrations > Reporting webhooks*](https://fly.customer.io/env/last/integrations/reporting-webhooks).
*   **For webhooks in your workflows** (also known as *Send and receive data* actions), you can find the signing key in [*Settings > Workspace Settings > API & Webhook Credentials*](https://fly.customer.io/env/last/settings/api_credentials) under the *Webhook signing keys* tab.

To validate a signed request, follow these steps:

1.  Copy the `X-CIO-Timestamp` header sent with the webhook.
2.  Combine the version number, timestamp, and body, delimited by colons. It should form a string like this: `v0:<timestamp>:<body>`, where the version number is always `v0`.
3.  Hash the string in the HMAC SHA256 standard using your webhook signing secret as the hash key.
4.  Compare this hashed string to the `X-CIO-Signature` value sent with the request. If it came from Customer.io, they will match.

 Always use the request’s raw body to construct the hash

Do not use any transformations such as `JSON.stringify()` (Node.js) or `json.dumps()` (Python) as there are subtle differences between parsing libraries.

Here’s an [example of a validation function](https://play.golang.org/p/HpSDjjPOMoc) in Golang.

```go
import (
	"encoding/hex"
	"crypto/hmac"
	"crypto/sha256"
	"strconv"
	"fmt"
)

func CheckSignature(WebhookSigningSecret, XCIOSignature string, XCIOTimestamp int, RequestBody []byte) (bool, error) {
  signature, err := hex.DecodeString(XCIOSignature)
  if err != nil {
    return false, err
  }

  mac := hmac.New(sha256.New, []byte(WebhookSigningSecret))

  if _, err := mac.Write([]byte("v0:" + strconv.Itoa(XCIOTimestamp) + ":")); err != nil {
    return false, err
  }
  if _, err := mac.Write(RequestBody); err != nil {
    return false, err
  }

  computed := mac.Sum(nil)

  if !hmac.Equal(computed, signature) {
    fmt.Println("Signature didn't match")
    return false, nil
  }

  fmt.Println("Signature matched!")
  return true, nil
}
```

## Frequently asked questions[](#frequently-asked-questions)

1.  **Can webhooks contain the message body?** Yes! We can send the message body for all channels, but you must opt in to this option during [setup](/journeys/webhooks#setup).
    
2.  **How can I secure webhooks?** It’s possible to add basic authentication in the Webhook Endpoint URL field (e.g. [http://username:password@example.com](http://username:password@example.com)).
    
3.  **How do you identify each message that is going out?** Each message sent from Customer.io has a `delivery_id` unique identifier that is also part of the default unsubscribe link: `https://track.customer.io/unsubscribe/MjYyMTI6Fs_YAmQAAnMAFeEaAU2YoV7tFRoYVh6HYAFzOjIyOTkwMQA=`
    
    To view a particular message in the UI, select **Deliveries & Drafts** from the left panel, click under the “Action” column for any message in the list, then replace the end of the URL in your browser with the `delivery_id` you’re interested in. For example:
    
    `https://fly.customer.io/env/26212/outbox/deliveries/MjYyMTI6Fs_YAmQAAnMAFeEaAU2YoV7tFRoYVh6HYAFzOjIyOTkwMQA=`
    
    The `delivery_id` is also displayed under the Metadata details in the right-hand column of the page.
    
4.  **Can I specify which campaign(s) get forwarded to an external webhook?** No. If you need to monitor only a specific campaign, however, it’s possible to handle the logic on your end to filter out unwanted webhook events based on `campaign_id`.
    
5.  **Can I get a webhook when a customer gets added to a segment?** No. But if you want to pull a list of people in a given segment, you can do so using the `/segments/:id/membership` endpoint of [our API](/integrations/api/app/). Alternatively, you could create a segment-triggered campaign based on the segment you’re interested in, set the email inside to “Queue Draft” and then monitor the `email_drafted` events for that `campaign_id`.
    
6.  **Do you send an event for each click performed by a user?** By default, only the first click event is sent. If you wish to have each click recorded, you can set the Send Frequency on your Webhook Endpoint accordingly:
    
    [![Webhook Send Frequency](https://docs.customer.io/images/Webhook%20Send%20Frequency.png)](#5bf1b9c86abb53316edeaaeb5e3341b3-lightbox)
    
7.  **Can Reporting Webhooks be rate limited?** By default, we only send one event per action (sent, opened, clicked, etc.) to limit the output. No further rate limiting is available.
    
8.  **Is it possible to host a webhook endpoint in Customer.io?** No. For incoming data, you’ll need to use [our REST API](/integrations/api/cdp/) or our [Segment integration](https://segment.com/docs/destinations/customer.io/).
    

## Send third-party delivery metrics to Customer.io[](#send-third-party-delivery-metrics-to-customerio)

If you use outgoing webhooks to trigger messages from a third-party provider that is not natively integrated with Customer.io, you can send incoming calls to our [Track metrics API](/integrations/api/track/#operation/metrics) to capture metrics in Customer.io. This allows you to see delivery metrics for all of your messages in one place.

The following steps assume you already have at least one campaign that uses a [**Send and Receive Data webhook action**](/journeys/webhooks-action/) to send messages via a third party’s API. To send delivery metrics back to Customer.io:

1.  [Create a reporting webhook](#setup) in *Integrations* where you pass webhook events.
    1.  Send the reporting webhook to a URL from your third-party service provider. The third-party provider can reference the `X-CIO-Delivery-ID` in the header of the message to uniquely identify that message.
2.  From the third-party provider, you’ll send updates back via our [Track API](/integrations/api/track/#operation/metrics) including delivery metrics (“delivered”, “bounced”, etc.).
    1.  You can view the metrics anywhere you can see them within your Customer.io account, such as Campaign Metrics, as well as data-out integrations. Note that the metrics will show as *Webhook* messages, since that was the type of delivery from your campaign.

## Webhook event examples[](#webhook-event-examples)

We’ve moved webhook examples, including details about the schema for each individual webhook event, to [our API documentation](/integrations/api/webhooks/).

### Customer event examples[](#customer-event-examples)

#### customer\_subscribed[](#customer_subscribed)

```json
{
  "data": {
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "email_address": "test@example.com"
  },
  "event_id": "01E4C4CT6YDC7Y5M7FE1GWWPQJ", //the id of the reporting webhook instance
  "object_type": "customer",
  "metric": "subscribed",
  "timestamp": 1585250199
}
```

#### customer\_unsubscribed[](#customer_unsubscribed)

```json
{
  "data": {
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "email_address": "test@example.com"
  },
  "event_id": "01E4C4C6P79C12J5A6KPE6XNFD", //the id of the reporting webhook instance
  "object_type": "customer",
  "metric": "unsubscribed",
  "timestamp": 1585250179
}
```

#### cio\_subscription\_preferences\_changed[](#cio_subscription_preferences_changed)

```json
{
  "metric": "cio_subscription_preferences_changed",
  "event_id": "01E4C4CT6YDC7Y5M7FE1GWWPQJ", //the id of the reporting webhook instance
  "delivery_type": "email",
  "timestamp": 1613063089,
  "data": {
    "content": "{\"topics\":{\"topic_1\":true}}",
    "customer_id": "42",
    "email_address": "test@example.com",
    "identifiers": {
      "id": "42",
      "email": "test@example.com",
      "cio_id": "d9c106000001"
    },
    "trigger_id": 1,
    "delivery_id": "ZAIAAVTJVG0QcCok0-0ZKj6yiQ==",
    "action_id": 96,
    "broadcast_id": 2,
    "journey_id": "01GW20GXAAXBKZD8J96M8FNV3R",
    "parent_action_id": 1
  }
}
```

### Email event examples[](#email-event-examples)

#### email\_drafted[](#email_drafted)

```json
{
  "data": {
    "action_id": 36,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgABcRhIBqSp7kiPekGBIeVh",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "01E4C4G1S0AMNG0XVF2M7RPH5S", //the id of the reporting webhook instance
  "object_type": "email",
  "metric": "drafted",
  "timestamp": 1585250305
}
```

#### email\_attempted[](#email_attempted)

```json
{
  "data": {
    "action_id": 36,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgABcRhIBqSp7kiPekGBIeVh",
    "failure_message": "from address can't be blank",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "01E4C4HDQ7GH7M19ZKS39BDB73", //the id of the reporting webhook instance
  "object_type": "email",
  "metric": "attempted",
  "timestamp": 1585250350
}
```

#### email\_sent[](#email_sent)

```json
{
  "data": {
    "action_id": 36,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgABcRhIBqSp7kiPekGBIeVh",
    "recipient": "test@example.com",
    "subject": "hello",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "01E4C8AY5K21N2QNRBD9YXJ13Z", //the id of the reporting webhook instance
  "object_type": "email",
  "metric": "sent",
  "timestamp": 1585254331
}
```

#### email\_delivered[](#email_delivered)

```json
{
  "data": {
    "action_id": 12042,
    "campaign_id": 1424,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "SA13dk35ja7s8d9kja3s2dASdasd==",
    "recipient": "test@example.com",
    "subject": "Thanks for joining!",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "01ASDG7S9P6MAZPTJ78JND9GDC", //the id of the reporting webhook instance
  "object_type": "email",
  "metric": "delivered",
  "timestamp": 1234567890
}
```

#### email\_opened[](#email_opened)

```json
{
  "data": {
    "action_id": 36,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgABcRhIBqSp7kiPekGBIeVh",
    "recipient": "test@example.com",
    "subject": "hello",
    "proxied": false,
    "prefetched": true,
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "01E4C8BES586H0A5PFK1ARB9JW", //the id of the reporting webhook instance
  "object_type": "email",
  "metric": "opened",
  "timestamp": 1585254348
}
```

#### email\_clicked[](#email_clicked)

```json
{
  "data": {
    "action_id": 36,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgABcRhIBqSp7kiPekGBIeVh",
    "href": "http://google.com",
    "link_id": 1,
    "machine": false,
    "recipient": "test@example.com",
    "subject": "hello",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "01E4C8BES5XT87ZWRJFTB35YJ3", //the id of the reporting webhook instance
  "object_type": "email",
  "metric": "clicked",
  "timestamp": 1585254348
}
```

#### email\_converted[](#email_converted)

```json
{
  "data": {
    "action_id": 12042,
    "campaign_id": 1424,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "SA13dk35ja7s8d9kja3s2dASdasd==",
    "recipient": "test@example.com",
    "subject": "Thanks for joining!",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "01ASDG7S9P6MYWPTJ78JND9GDC", //the id of the reporting webhook instance
  "object_type": "email",
  "metric": "converted",
  "timestamp": 1234567890
}
```

#### email\_unsubscribed[](#email_unsubscribed)

```json
{
  "data": {
    "action_id": 37,
    "campaign_id": 6,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RAECAAFxEqBRJ6UXtUdDSeFe_L8=",
    "recipient": "test@example.com",
    "subject": "hello",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "01E4S9V7WSQK80RJZC6ATRQX8B", //the id of the reporting webhook instance
  "object_type": "email",
  "metric": "unsubscribed",
  "timestamp": 1585692122
}
```

#### email\_bounced[](#email_bounced)

```json
{
  "data": {
    "content_id": 1146,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RMehBAAAAXE7r_ONUGXly9DBGkpq1JS31=",
    "failure_message": "550 5.5.0 Requested action not taken: mailbox unavailable",
    "newsletter_id": 736,
    "recipient": "test@example.com",
    "subject": "Thanks for joining!",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "12ASDG7S9P6MAZPTJ78DAND9GDC", //the id of the reporting webhook instance
  "object_type": "email",
  "metric": "bounced",
  "timestamp": 1234567890
}
```

#### email\_dropped[](#email_dropped)

```json
{
  "data": {
    "content_id": 1146,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RMehBAAasdAAXE7r_ONUGXly9DBGkpq1JS31=",
    "failure_message": "Not delivering to previously bounced address",
    "newsletter_id": 736,
    "recipient": "test@example.com",
    "subject": "Thanks for joining!",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "31ASDG7S9P6MAZPTJ78DAND9GDC", //the id of the reporting webhook instance
  "object_type": "email",
  "metric": "dropped",
  "timestamp": 1234567890
}
```

#### email\_spammed[](#email_spammed)

```json
{
  "data": {
    "action_id": 73,
    "campaign_id": 52,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RObuBAXE4xnjV0vtJso_6xdRAas135",
    "recipient": "test@example.com",
    "subject": "Book now!",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "31ASDG7SU6HSJ78DAND9GDC", //the id of the reporting webhook instance
  "object_type": "email",
  "metric": "spammed",
  "timestamp": 1234567890
}
```

#### email\_failed[](#email_failed)

```json
{
  "data": {
    "action_id": 73,
    "campaign_id": 52,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "EFBAXE4xnjV0vtJso_6xdRAas135",
    "failure_message": "Customer is unsubscribed",
    "recipient": "test@example.com",
    "subject": "Book for vacation now!",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "31ASDG7SU6JN78DAND9GDC", //the id of the reporting webhook instance
  "object_type": "email",
  "metric": "failed",
  "timestamp": 1234567890
}
```

#### email\_undeliverable[](#email_undeliverable)

```json
{
  "event_id": "01E4C4CT6YDC7Y5M7FE1GWWPQJ", //the id of the reporting webhook instance
  "object_type": "email",
  "timestamp": 1613063089,
  "metric": "undeliverable",
  "data": {
    "customer_id": "42",
    "delivery_id": "ZAIAAVTJVG0QcCok0-0ZKj6yiQ==",
    "action_id": 96,
    "campaign_id": 2,
    "identifiers": {
      "id": "42",
      "email": "test@example.com",
      "cio_id": "d9c106000001"
    },
    "subject": "string",
    "recipient": "test@example.com",
    "failure_message": "Something went wrong!",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  }
}
```

### Push notification event examples[](#push-notification-event-examples)

#### push\_drafted[](#push_drafted)

```json
{
  "data": {
    "action_id": 37,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgUBcRhIBqSfeiIwdIYJKxTY",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "01E4C4G1S0HZ7C4220T6QNY8JX", //the id of the reporting webhook instance
  "object_type": "push",
  "metric": "drafted",
  "timestamp": 1585250305
}
```

#### push\_attempted[](#push_attempted)

```json
{
  "data": {
    "action_id": 38,
    "campaign_id": 6,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RAEABQFxN56fWzydfV4_EGvfobI=",
    "failure_message": "NoDevicesSynced",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "01E4VSX8SZ0T9AQMH4Q16NRB89", //the id of the reporting webhook instance
  "object_type": "push",
  "metric": "attempted",
  "timestamp": 1585776075
}
```

#### push\_sent[](#push_sent)

A person can have multiple devices. When we send a push, we can try to send it to more than one device—but that doesn’t mean that each device will receive the message. If we can’t send a message to a device in the `recipients` array, we’ll include a `failure_message` for it.

```json
{
  "data": {
    "action_id": 37,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgUBcRhIBqSfeiIwdIYJKxTY",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "recipients": [
      {
        "device_id": "eeC2XC_NVPo:APA91bEYRSgmu-dAZcOWi7RzKBbT9gdY3WJACOpLQEMAmAOsChJMAZWirvSlSF3EuHxb7qdwlYeOyCWtbsnR14Vyx5nwBmg5J3SyPxfNn-ey1tNgXIj5UOq8IBk2VwzMApk-xzD4JJof",
        "device_platform": "android",
        "failure_message": "FCM_INVALID_TOKEN"
      }
    ]
  },
  "event_id": "01E4C4HDQ7P1X9KTKF0ZX7PWHE", //the id of the reporting webhook instance
  "object_type": "push",
  "metric": "sent",
  "timestamp": 1585250350
}
```

#### push\_delivered[](#push_delivered)

```json
{
  "data": {
    "action_id": 37,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgUBcRhIBqSfeiIwdIYJKxTY",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "recipients": [
      {
        "device_id": "eeC2XC_NVPo:APA91bEYRSgmu-dAZcOWi7RzKBbT9gdY3WJACOpLQEMAmAOsChJMAZWirvSlSF3EuHxb7qdwlYeOyCWtbsnR14Vyx5nwBmg5J3SyPxfNn-ey1tNgXIj5UOq8IBk2VwzMApk-xzD4JJof",
        "device_platform": "android"
      }
    ]
  },
  "event_id": "01E4C4HDQ7P1X9KTKF0ZX7PWHE", //the id of the reporting webhook instance
  "object_type": "push",
  "metric": "delivered",
  "timestamp": 1585250350
}
```

#### push\_opened[](#push_opened)

Customer.io cannot track `opened` events for a push notification unless:

*   You are using our mobile SDKs in your app.
*   [You report `opened` metrics to us using the API](/integrations/api/track/#operation/pushMetrics)

```json
{
  "data": {
    "action_id": 37,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgUBcRhIBqSfeiIwdIYJKxTY",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "recipients": [
      {
        "device_id": "eeC2XC_NVPo:APA91bEYRSgmu-dAZcOWi7RzKBbT9gdY3WJACOpLQEMAmAOsChJMAZWirvSlSF3EuHxb7qdwlYeOyCWtbsnR14Vyx5nwBmg5J3SyPxfNn-ey1tNgXIj5UOq8IBk2VwzMApk-xzD4JJof",
        "device_platform": "android"
      }
    ]
  },
  "event_id": "01E4C4V2B3FW52RKEKP4QF2P74", //the id of the reporting webhook instance
  "object_type": "push",
  "metric": "opened",
  "timestamp": 1585250665
}
```

#### push\_clicked[](#push_clicked)

```json
{
  "data": {
    "action_id": 37,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgUBcRhIBqSfeiIwdIYJKxTY",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "href": "ciosas://product/2",
    "link_id": 1,
    "recipients": [
      {
        "device_id": "eeC2XC_NVPo:APA91bEYRSgmu-dAZcOWi7RzKBbT9gdY3WJACOpLQEMAmAOsChJMAZWirvSlSF3EuHxb7qdwlYeOyCWtbsnR14Vyx5nwBmg5J3SyPxfNn-ey1tNgXIj5UOq8IBk2VwzMApk-xzD4JJof",
        "device_platform": "android"
      }
    ]
  },
  "event_id": "01E4V2SBHYK4TNTG8WKMP39G9R", //the id of the reporting webhook instance
  "object_type": "push",
  "metric": "clicked",
  "timestamp": 1585751829
}
```

#### push\_converted[](#push_converted)

```json
{
  "data": {
    "action_id": 37,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgUBcRiSO2rkbaiQ-5luSWXK",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "recipients": [
      {
        "device_id": "eeC2XC_NVPo:APA91bEYRSgmu-dAZcOWi7RzKBbT9gdY3WJACOpLQEMAmAOsChJMAZWirvSlSF3EuHxb7qdwlYeOyCWtbsnR14Vyx5nwBmg5J3SyPxfNn-ey1tNgXIj5UOq8IBk2VwzMApk-xzD4JJof",
        "device_platform": "android"
      }
    ]
  },
  "event_id": "01E4XWX0NB4DH73NWDRTT71NMT", //the id of the reporting webhook instance
  "object_type": "push",
  "metric": "converted",
  "timestamp": 1585846320
}
```

#### push\_bounced[](#push_bounced)

```json
{
  "data": {
    "action_id": 38,
    "campaign_id": 6,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RAEABQFxN55vrab8yVNNVNI2Hxc=",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "recipients": [
      {
        "device_id": "my_android_device_id",
        "device_platform": "android",
        "failure_message": "FCM_INVALID_TOKEN"
      }
    ]
  },
  "event_id": "01E4VSWX38K3R96QJ3B9N37KJR", //the id of the reporting webhook instance
  "object_type": "push",
  "metric": "bounced",
  "timestamp": 1585776063
}
```

#### push\_dropped[](#push_dropped)

```json
{
  "data": {
    "action_id": 40,
    "campaign_id": 7,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RAECBQFxN6HHbPKYTzCT4XAS20Y=",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "recipients": [
      {
        "device_id": "my_android_device_id",
        "device_platform": "android",
        "failure_message": "FCM_INVALID_TOKEN"
      }
    ]
  },
  "event_id": "01E4VT612DR9BX6J1HXCBAYA1N", //the id of the reporting webhook instance
  "object_type": "push",
  "metric": "dropped",
  "timestamp": 1585776361
}
```

#### push\_failed[](#push_failed)

```json
{
  "data": {
    "action_id": 38,
    "campaign_id": 6,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RAECAQFxNeUBx6LqfjqrN1j-BJc=",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "failure_message": "Variable 'customer.test' is missing"
  },
  "event_id": "01E4VSWX38K3R96QJ3B9N37KJR", //the id of the reporting webhook instance
  "object_type": "push",
  "metric": "failed",
  "timestamp": 1585747134
}
```

#### push\_undeliverable[](#push_undeliverable)

```json
{
  "event_id": "01E4C4CT6YDC7Y5M7FE1GWWPQJ", //the id of the reporting webhook instance
  "object_type": "push",
  "timestamp": 1613063089,
  "metric": "undeliverable",
  "data": {
    "customer_id": "42",
    "delivery_id": "ZAIAAVTJVG0QcCok0-0ZKj6yiQ==",
    "action_id": 96,
    "broadcast_id": 2,
    "identifiers": {
      "id": "42",
      "email": "test@example.com",
      "cio_id": "d9c106000001"
    },
    "failure_message": "Something went wrong!"
  }
}
```

### In-App message event examples[](#in-app-message-event-examples)

#### in\_app\_drafted[](#in_app_drafted)

```json
{
  "event_id": "01E4C4CT6YDC7Y5M7FE1GWWPQJ", //the id of the reporting webhook instance
  "object_type": "in-app",
  "timestamp": 1613063089,
  "metric": "drafted",
  "data": {
    "trigger_id": 1,
    "customer_id": "42",
    "delivery_id": "ZAIAAVTJVG0QcCok0-0ZKj6yiQ==",
    "action_id": 96,
    "broadcast_id": 2,
    "journey_id": "01GW20GXAAXBKZD8J96M8FNV3R",
    "parent_action_id": 1,
    "identifiers": {
      "id": "42",
      "email": "test@example.com",
      "cio_id": "d9c106000001"
    }
  }
}
```

#### in\_app\_attempted[](#in_app_attempted)

```json
{
  "event_id": "01E4C4CT6YDC7Y5M7FE1GWWPQJ", //the id of the reporting webhook instance
  "object_type": "in-app",
  "timestamp": 1613063089,
  "metric": "attempted",
  "data": {
    "trigger_id": 1,
    "customer_id": "42",
    "delivery_id": "ZAIAAVTJVG0QcCok0-0ZKj6yiQ==",
    "action_id": 96,
    "broadcast_id": 2,
    "journey_id": "01GW20GXAAXBKZD8J96M8FNV3R",
    "parent_action_id": 1,
    "identifiers": {
      "id": "42",
      "email": "test@example.com",
      "cio_id": "d9c106000001"
    },
    "failure_message": "Something went wrong!"
  }
}
```

#### in\_app\_sent[](#in_app_sent)

```json
{
  "event_id": "01E4C4CT6YDC7Y5M7FE1GWWPQJ", //the id of the reporting webhook instance
  "object_type": "in-app",
  "timestamp": 1613063089,
  "metric": "sent",
  "data": {
    "trigger_id": 1,
    "customer_id": "42",
    "delivery_id": "ZAIAAVTJVG0QcCok0-0ZKj6yiQ==",
    "action_id": 96,
    "broadcast_id": 2,
    "journey_id": "01GW20GXAAXBKZD8J96M8FNV3R",
    "parent_action_id": 1,
    "identifiers": {
      "id": "42",
      "email": "test@example.com",
      "cio_id": "d9c106000001"
    },
    "content": "string",
    "recipient": "test@example.com"
  }
}
```

#### in\_app\_opened[](#in_app_opened)

```json
{
  "event_id": "01E4C4CT6YDC7Y5M7FE1GWWPQJ", //the id of the reporting webhook instance
  "object_type": "in-app",
  "timestamp": 1613063089,
  "metric": "opened",
  "data": {
    "trigger_id": 1,
    "customer_id": "42",
    "delivery_id": "ZAIAAVTJVG0QcCok0-0ZKj6yiQ==",
    "action_id": 96,
    "broadcast_id": 2,
    "journey_id": "01GW20GXAAXBKZD8J96M8FNV3R",
    "parent_action_id": 1,
    "identifiers": {
      "id": "42",
      "email": "test@example.com",
      "cio_id": "d9c106000001"
    }
  }
}
```

#### in\_app\_clicked[](#in_app_clicked)

```json
{
  "event_id": "01E4C4CT6YDC7Y5M7FE1GWWPQJ", //the id of the reporting webhook instance
  "object_type": "in-app",
  "timestamp": 1613063089,
  "metric": "clicked",
  "data": {
    "trigger_id": 1,
    "customer_id": "42",
    "delivery_id": "ZAIAAVTJVG0QcCok0-0ZKj6yiQ==",
    "action_id": 96,
    "broadcast_id": 2,
    "journey_id": "01GW20GXAAXBKZD8J96M8FNV3R",
    "parent_action_id": 1,
    "identifiers": {
      "id": "42",
      "email": "test@example.com",
      "cio_id": "d9c106000001"
    },
    "recipient": "test@example.com",
    "href": "https://www.customer.io",
    "link_id": 1,
    "tracked_response": "Response One"
  }
}
```

#### in\_app\_converted[](#in_app_converted)

```json
{
  "event_id": "01E4C4CT6YDC7Y5M7FE1GWWPQJ", //the id of the reporting webhook instance
  "object_type": "in-app",
  "timestamp": 1613063089,
  "metric": "converted",
  "data": {
    "trigger_id": 1,
    "customer_id": "42",
    "delivery_id": "ZAIAAVTJVG0QcCok0-0ZKj6yiQ==",
    "action_id": 96,
    "broadcast_id": 2,
    "journey_id": "01GW20GXAAXBKZD8J96M8FNV3R",
    "parent_action_id": 1,
    "identifiers": {
      "id": "42",
      "email": "test@example.com",
      "cio_id": "d9c106000001"
    },
    "recipient": "test@example.com"
  }
}
```

#### in\_app\_failed[](#in_app_failed)

```json
{
  "event_id": "01E4C4CT6YDC7Y5M7FE1GWWPQJ", //the id of the reporting webhook instance
  "object_type": "in-app",
  "timestamp": 1613063089,
  "metric": "failed",
  "data": {
    "trigger_id": 1,
    "customer_id": "42",
    "delivery_id": "ZAIAAVTJVG0QcCok0-0ZKj6yiQ==",
    "action_id": 96,
    "broadcast_id": 2,
    "journey_id": "01GW20GXAAXBKZD8J96M8FNV3R",
    "parent_action_id": 1,
    "identifiers": {
      "id": "42",
      "email": "test@example.com",
      "cio_id": "d9c106000001"
    },
    "failure_message": "Something went wrong!"
  }
}
```

#### in\_app\_undeliverable[](#in_app_undeliverable)

```json
{
  "event_id": "01E4C4CT6YDC7Y5M7FE1GWWPQJ", //the id of the reporting webhook instance
  "object_type": "in-app",
  "timestamp": 1613063089,
  "metric": "undeliverable",
  "data": {
    "customer_id": "42",
    "delivery_id": "ZAIAAVTJVG0QcCok0-0ZKj6yiQ==",
    "action_id": 96,
    "broadcast_id": 2,
    "identifiers": {
      "id": "42",
      "email": "test@example.com",
      "cio_id": "d9c106000001"
    },
    "failure_message": "Something went wrong!"
  }
}
```

### SMS event examples[](#sms-event-examples)

#### sms\_drafted[](#sms_drafted)

```json
{
  "data": {
    "action_id": 38,
    "broadcast_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgIBcRhIBqSZNqzgZVFoivwW"
  },
  "event_id": "01E4C4G1S02P8D0G2JMY88KAFN", //the id of the reporting webhook instance
  "object_type": "sms",
  "metric": "drafted",
  "timestamp": 1585250305
}
```

#### sms\_attempted[](#sms_attempted)

```json
{
  "data": {
    "action_id": 41,
    "campaign_id": 7,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "ROk1AAIBcR4iT6mueuxiDtzO8HXv",
    "failure_message": "Twilio Error 21408: Permission to send an SMS has not been enabled for the region indicated by the 'To' number: +18008675309.",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "01E4F3DCS83P8HT7R3E6DWQN1X", //the id of the reporting webhook instance
  "object_type": "sms",
  "metric": "attempted",
  "timestamp": 1234567890
}
```

#### sms\_sent[](#sms_sent)

```json
{
  "data": {
    "action_id": 38,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgIBcRhIBqSZNqzgZVFoivwW",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "recipient": "+18008675309"
  },
  "event_id": "01E4C4HDQ7KZF7AFPG6N2YQDJ0", //the id of the reporting webhook instance
  "object_type": "sms",
  "metric": "sent",
  "timestamp": 1585250350
}
```

#### sms\_delivered[](#sms_delivered)

```json
{
  "data": {
    "action_id": 38,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgIBcRh6qzHz-8gKvscP2UZa",
    "recipient": "+18008675309",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "01E4XXG43MDMG47Z43V3090AW5", //the id of the reporting webhook instance
  "object_type": "sms",
  "metric": "delivered",
  "timestamp": 1585846946
}
```

#### sms\_clicked[](#sms_clicked)

```json
{
  "data": {
    "action_id": 38,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgIBcRh6qzHz-8gKvscP2UZa",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "href": "https://app.com/verify",
    "link_id": 1,
    "recipient": "+18008675309"
  },
  "event_id": "01E4XXPN42JDF4B1ATQKTZ8WHV", //the id of the reporting webhook instance
  "object_type": "sms",
  "metric": "clicked",
  "timestamp": 1585847161
}
```

#### sms\_converted[](#sms_converted)

```json
{
  "data": {
    "action_id": 38,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgIBcRh6qzHz-8gKvscP2UZa",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "recipient": "+18008675309"
  },
  "event_id": "01E4XXPN42JDF4B1ATQKTZ8WHV", //the id of the reporting webhook instance
  "object_type": "sms",
  "metric": "converted",
  "timestamp": 1585847161
}
```

#### sms\_bounced[](#sms_bounced)

```json
{
  "data": {
    "action_id": 38,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgIBcRhIBqSZNqzgZVFoivwW",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "failure_message": "Twilio error code: 21704",
    "recipient": "+18008675309"
  },
  "event_id": "01E4C4HENVDANXW94RQHHQYYDM", //the id of the reporting webhook instance
  "object_type": "sms",
  "metric": "bounced",
  "timestamp": 1585250351
}
```

#### sms\_failed[](#sms_failed)

```json
{
  "data": {
    "action_id": 41,
    "campaign_id": 7,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "ROk1AAIBcR4iT6mueuxiDtzO8HXv",
    "failure_message": "Twilio Error 21408: Permission to send an SMS has not been enabled for the region indicated by the 'To' number: +18008675309.",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "01E4F3DCS83P8HT7R3E6DWQN1X", //the id of the reporting webhook instance
  "object_type": "sms",
  "metric": "failed",
  "timestamp": 1234567890
}
```

#### sms\_undeliverable[](#sms_undeliverable)

```json
{
  "event_id": "01E4C4CT6YDC7Y5M7FE1GWWPQJ", //the id of the reporting webhook instance
  "object_type": "sms",
  "timestamp": 1613063089,
  "metric": "undeliverable",
  "data": {
    "customer_id": "42",
    "delivery_id": "ZAIAAVTJVG0QcCok0-0ZKj6yiQ==",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "action_id": 96,
    "campaign_id": 2,
    "identifiers": {
      "id": "42",
      "email": "test@example.com",
      "cio_id": "d9c106000001"
    },
    "failure_message": "Something went wrong!"
  }
}
```

#### sms\_replied[](#sms_replied)

This event occurs when someone replies to a message you sent them.

We attribute inbound messages to the original delivery if the inbound message occurs within 72 hours of the original delivery. If the inbound message occurs outside the 72 hour window, or we can’t otherwise attribute the reply to a delivery, we won’t send this event.

```json
{
  "event_id": "01E4C4CT6YDC7Y5M7FE1GWWPQJ", //the id of the reporting webhook instance
  "object_type": "sms",
  "timestamp": 1613063089,
  "metric": "replied",
  "data": {
    "inbound_event_id": "01E4C4CT6YDC7Y5M7FE1GWWPQJ",
    "to": "+15555555555",
    "recipient": "+15551234567",
    "customer_id": "42",
    "delivery_id": "ZAIAAVTJVG0QcCok0-0ZKj6yiQ==",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "action_id": 96,
    "campaign_id": 2,
    "identifiers": {
      "id": "42",
      "email": "test@example.com",
      "cio_id": "d9c106000001"
    },
  }
}
```

### Slack event examples[](#slack-event-examples)

#### slack\_drafted[](#slack_drafted)

```json
{
  "data": {
    "action_id": 39,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgQBcRhIBqRiZAc0fyQiLvkC",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "01E4C4G1S0T3Y4V8W7F6MNFA8S", //the id of the reporting webhook instance
  "object_type": "slack",
  "metric": "drafted",
  "timestamp": 1585250305
}
```

#### slack\_attempted[](#slack_attempted)

```json
{
  "data": {
    "action_id": 38,
    "campaign_id": 6,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RAECAQFxNeUBx6LqfjqrN1j-BJc=",
    "failure_message": "Variable 'customer.test' is missing",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "01E4TYA2KA9T0XGHCRJ784B774", //the id of the reporting webhook instance
  "object_type": "slack",
  "metric": "attempted",
  "timestamp": 1585747134
}
```

#### slack\_sent[](#slack_sent)

```json
{
  "data": {
    "action_id": 39,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgQBcRhNAufb0s30bmz5HD7Y",
    "recipient": "#signups",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "01E4C4TQKD6KJ274870J5DE2HB", //the id of the reporting webhook instance
  "object_type": "slack",
  "metric": "sent",
  "timestamp": 1585250655
}
```

#### slack\_clicked[](#slack_clicked)

```json
{
  "data": {
    "action_id": 39,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgQBcRhocpCJE3mFfwvRzNe6",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "href": "http://bing.com",
    "link_id": 1,
    "recipient": "#signups"
  },
  "event_id": "01E4C6HJTBNDX18XC4B88M3Y2G", //the id of the reporting webhook instance
  "object_type": "slack",
  "metric": "clicked",
  "timestamp": 1585252451
}
```

#### slack\_failed[](#slack_failed)

```json
{
  "data": {
    "action_id": 39,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgQBcRhIBqRiZAc0fyQiLvkC",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "failure_message": "value passed for channel was invalid",
  },
  "event_id": "01E4C4HDQ77BCN0X23Z3WBE764", //the id of the reporting webhook instance
  "object_type": "slack",
  "metric": "failed",
  "timestamp": 1585250350
}
```

#### slack\_undeliverable[](#slack_undeliverable)

```json
{
  "event_id": "01E4C4CT6YDC7Y5M7FE1GWWPQJ", //the id of the reporting webhook instance
  "object_type": "slack",
  "timestamp": 1613063089,
  "metric": "undeliverable",
  "data": {
    "customer_id": "42",
    "delivery_id": "ZAIAAVTJVG0QcCok0-0ZKj6yiQ==",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "action_id": 96,
    "campaign_id": 2,
    "identifiers": {
      "id": "42",
      "email": "test@example.com",
      "cio_id": "d9c106000001"
    },
    "failure_message": "Something went wrong!"
  }
}
```

### Webhook example events[](#webhook-example-events)

#### webhook\_drafted[](#webhook_drafted)

```json
{
  "data": {
    "action_id": 40,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgEBcRhIBqSrYcXDr2ks6Pj9",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC" //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
  },
  "event_id": "01E4C4G1S04QCV1NASF4NWMQNR", //the id of the reporting webhook instance
  "object_type": "webhook",
  "metric": "drafted",
  "timestamp": 1585250305
}
```

#### webhook\_attempted[](#webhook_attempted)

```json
{
  "data": {
    "action_id": 38,
    "campaign_id": 6,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RAECAQFxNeUBx6LqgjqrN1j-BJc=",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "failure_message": "Variable 'customer.test' is missing"
  },
  "event_id": "01E4TYA2KA9T0XGHCRJ784B774", //the id of the reporting webhook instance
  "object_type": "webhook",
  "metric": "attempted",
  "timestamp": 1585747134
}
```

#### webhook\_sent[](#webhook_sent)

```json
{
  "data": {
    "action_id": 40,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgEBcRhNAufr2aU82jtDZEh6",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "recipient": "https://test.example.com/process"
  },
  "event_id": "01E4C6EP0HCKRHKFARMZ5XEH7A", //the id of the reporting webhook instance
  "object_type": "webhook",
  "metric": "sent",
  "timestamp": 1585252357
}
```

#### webhook\_clicked[](#webhook_clicked)

```json
{
  "data": {
    "action_id": 40,
    "campaign_id": 9,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RPILAgEBcRhNAufr2aU82jtDZEh6",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "href": "http://bing.com",
    "link_id": 1,
    "recipient": "https://test.example.com/process"
  },
  "event_id": "01E4C6F5N1Y54TVGJTN64Y1ZS9", //the id of the reporting webhook instance
  "object_type": "webhook",
  "metric": "clicked",
  "timestamp": 1585252373
}
```

#### webhook\_failed[](#webhook_failed)

```json
{
  "data": {
    "action_id": 38,
    "campaign_id": 6,
    "customer_id": "0200102",
    "identifiers": {
        "id": "0200102",
    },
    "delivery_id": "RAECAQFxNeK3bC4SYqhQqFGBQrQ=",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "failure_message": "HTTP 404 Not Found []"
  },
  "event_id": "01E4TY5FVB0ZQ4KVDKRME0XSYZ", //the id of the reporting webhook instance
  "object_type": "webhook",
  "metric": "failed",
  "timestamp": 1585746984
}
```

#### webhook\_undeliverable[](#webhook_undeliverable)

```json
{
  "event_id": "01E4C4CT6YDC7Y5M7FE1GWWPQJ", //the id of the reporting webhook instance
  "object_type": "webhook",
  "timestamp": 1613063089,
  "metric": "undeliverable",
  "data": {
    "customer_id": "42",
    "delivery_id": "ZAIAAVTJVG0QcCok0-0ZKj6yiQ==",
    "trigger_event_id": "21E4C3CT6YDC7Y4N7FE1GWWABC", //the id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)
    "action_id": 96,
    "campaign_id": 2,
    "identifiers": {
      "id": "42",
      "email": "test@example.com",
      "cio_id": "d9c106000001"
    },
    "failure_message": "Something went wrong!"
  }
}
```

## Legacy email webhook format[](#legacy-email-webhook-format)

On April 8, 2020, we streamlined our email webhook payloads, removing unneeded data in order to improve our processing speed and reliability.

If you had Reporting Webhooks enabled before April 8, 2020, the old email webhook payload remains unchanged.

The example below covers any of the email-related activity:

```json
User-Agent: Customer.io Web Hooks 1.0
Host: webhook.site
Content-Type: application/json
Accept-Encoding: gzip
Cf-Connecting-Ip: 167.114.157.9
X-Request-Id: 	7e6f46cd-480e-4354-93ce-74b770015c7f
Connect-Time: 1
Content-Length: 1100
Cf-Visitor: {"scheme":"http"}
Total-Route-Time: 0
Cf-Ipcountry: CA
Cf-Ray: 2b62237a83a12507-ORD
Connection: close
Via: 1.1 vegur

RAW BODY

{
"data": {
  "campaign_id": "1000002",
  "campaign_name": "Upgrade to Premium",
  "customer_id": "98513",
  "email_address": "customer@example.com",
  "email_id": "NTE4MzE6FwGLxwJkAAJkABcBIfcaAVVvdGukFUsYV2hY6QFlOjQ4YTZhODljLTM3MjktMTFlNi04MDQwLTYzNGY3NzAzM2NhNjozNDMwMzEA",
  "message_id": "1000013",
  "message_name": "First Upgrade Email",
  "subject": "Have any doubts?",
  "template_id": "343031",
  "variables": {
    "attachments": null,
    "customer": {
      "created_at": 1466453747,
      "email": "customer@example.com",
      "id": 98513,
      "name": "John Doe",
      "plan_name": "free"
    },
    "email_id": "NTE4MzE6FwGLxwJkAAJkABcBIfcaAVVvdGukFUsYV2hY6QFlOjQ4YTZhODljLTM3MjktMTFlNi04MDQwLTYzNGY3NzAzM2NhNjozNDMwMzEA",
    "event": {
      "page": "https://customer.io/pricing/"
    },
    "event_id": "48a6a89c-3729-11e6-8040-634f77033ca6",
    "event_name": "viewed_pricing_page",
    "from_address": null,
    "recipient": null,
    "reply_to": null
  }
},
"event_id": "b50cb221c60f87cdf06e",
"event_type": "email_drafted",
"timestamp": 1466456299
}
```

## Legacy email webhook attributes[](#legacy-email-webhook-attributes)

*   **campaign\_id** and **campaign\_name**: refer to the [transactional message](/journeys/transactional-api), [segment-triggered campaign](/campaigns-in-customerio) or [newsletter](/newsletters) that generated the email
    
*   **customer\_id**: user id (can be retrieved from the person profile). Only present if the person is still active (not included if the person has been deleted).
    
*   **email\_address**: “To” email address
    
*   **email\_id**: unique message id (each individual message sent from Customer.io has a different “email\_id”); can also be found in the unsubscribe link URL
    
*   **event**: specific to event-triggered campaigns; includes all the event attributes
    
*   **event\_id (data section)**: specific to event-triggered campaigns; id of the event that generated the message (not visible in the UI)
    
*   **event\_id**: internal attribute; id associated with the email\_type action
    
*   **event\_name**: specific to event-triggered campaigns; name of the event that powers the campaign
    
*   **event\_type**: type of event (“email\_drafted”, “email\_sent”, etc.)
    
*   **from\_address**: from\_address set via the event
    
*   **href** and **link\_id**: specific to “email\_clicked” events
    
*   **href**: first URL clicked by the user
    
*   **link\_id**: internal attribute (not visible in the UI)
    
*   **message\_id**: campaign email id; can be found in the campaign URL after emails/ (e.g. [https://fly.customer.io/env/51831/v2/composer/emails/225039](https://fly.customer.io/env/51831/v2/composer/emails/225039))
    
*   **message\_name**: the name of the campaign email
    
*   **reason**: specific to the “email\_bounced” and “email\_dropped” events, mentions the cause of the bounce/suppression (e.g.: Invalid)
    
*   **recipient**: email address of a user that does not exist inside Customer.io
    
*   **reply\_to**: reply\_to address set via the event
    
*   **subject**: email subject
    
*   **template\_id**: internal attribute, each email inside a campaign can have multiple template ids depending on the changes made over time. You can view it in the UI by filtering for a specific email under Email Log. For example: [https://fly.customer.io/env/51831/email\_logs?campaign=139744&template=343216](https://fly.customer.io/env/51831/email_logs?campaign=139744&template=343216)
    
*   **timestamp**: date and time when the event took place in unix (seconds since epoch) format
    
*   **variables**:
    
    *   **attachments**: specific to transactional emails with small attachments (e.g. .ics files)
    *   **customer**: all the attributes associated with your user