Delivery Object

The delivery object holds statistics about the delivery of a receipt’s email (if any).

Name

Type

Description

events

mapping of arrays of Delivery Events, required

An object mapping event types to arrays containing a limited number of event objects (see Delivery Event)

counts

mapping of arrays of integers, required

An object mapping event types to counters indicating how many times an event of a given type occurred

Delivery Event

Name

Type

Description

timestamp

string, required

the date and time of this event, expressed in UTC, formatted as an ISO 8601 date

reason

string, optional

the reason of a bounce or drop

Examples

Successful delivery:

A successfully delivered email, which has been opened a number of times. Only the first timestamp of the open event is stored.

{
  "counts": {
    "delivered": 1,
    "open": 3,
    "processed": 1
  },
  "events": {
    "delivered": [
      {
        "timestamp": "2015-10-01T08:56:35+00:00"
      }
    ],
    "open": [
      {
        "timestamp": "2015-10-01T11:22:38+00:00"
      }
    ],
    "processed": [
      {
        "timestamp": "2015-10-01T08:56:32+00:00"
      }
    ]
  }
}

Bounce:

The following example shows a delivery object for an email that has bounced. The bounce reason returned by the SMTP server is included.

{
  "counts": {
    "bounce": 1,
    "processed": 1
  },
  "events": {
    "bounce": [
      {
        "reason": "554 delivery error: dd This user doesn't have an example.com account (example@example.com) [-5] - mta1129.mail.example.com ",
        "timestamp": "2015-10-21T09:01:58+00:00"
      }
    ],
    "processed": [
      {
        "timestamp": "2015-10-21T09:01:54+00:00"
      }
    ]
  }
}