Message events

All messages sent through the Enterprise Communications API can provide message status webhook events.

You can subscribe your webhook to receive these events to understand the status of your message sends.

Only subscribe to the message events you need to avoid overheads.

2054

The message events are usually used to understand the status of a message with additional detail contained within the events payload, if required. A message can generate the following message events:

  • message.sent
    Your message has been sent on the channel.

Once the final status is known you receive one of the following events:

  • message.delivered
    Your message has been delivered.
  • message.read
    Your message has been read or opened.
    Only on channels that support this.
  • message.expired
    Your message wasn't delivered within the expiresOn time window, or the channel’s default time window.
  • message.failed
    The message delivery failed.

If you have used trackable interactions in your message then you can receive an interaction.click event when they are interacted with.

This is supported for:

  • Links in transactional emails
  • Shortened links in SMS or MMS.

Sent

This event indicates a message has been sent on a channel.

Examples

{
  "eventId": "0dceaf0d-93ea-4314-a6f8-b0cffe69799a",
  "accountId": 1234,
  "apiSpaceId": "c924cf6e-4352-4b26-a71a-c2032bea7a01",
  "name": "message.sent",
  "payload": {
    "details": {
      "channel": "sms",
      "additionalInfo": {
        "to": "447123123123",
        "successful": true,
        "clientRef": "e9f154c8-4011-493f-bb73-09cfcf8a1411"
      },
      "channelStatus": {
        "sms": {
          "status": "sent",
          "details": {
            "to": "447123123123",
            "successful": true,
            "clientRef": "e9f154c8-4011-493f-bb73-09cfcf8a1411"
          },
          "updatedOn": "2017-08-31T09:26:14.798Z"
        }
      }
    },
    "channelData": {
      "sms": {
        "phoneNumberCountryCode": "GB",
        "segmentCount": 1
      }
    },
    "updatedOn": "2017-08-31T09:26:14.799Z",
    "metadata": {
      "data": "My correlation data"
    },
    "id": "e9f154c8-4011-493f-bb73-09cfcf8a1411"
  },
  "revision": 2,
  "etag": "\"2e-PLB2C6w/yVdPjUhuRiZtlvt8k0Q\"",
  "timestamp": "2017-08-31T09:26:14.604Z"
}
{
    "eventId": "1ba527cf-61fc-485d-8e13-bd4b033d9be9",
    "accountId": 1234,
    "apiSpaceId": "1154802b-a288-48f9-839c-b56181b9f3cf",
    "name": "message.sent",
    "payload": {
        "id": "b960fa14-9f39-412a-b46f-e073f18e7199",
        "details": {
            "channel": "mms",
            "additionalInfo": {
                "to": "17123123123",
                "successful": true,
                "segmentCount": 1
            },
            "channelStatus": {
                "mms": {
                    "status": "sent",
                    "updatedOn": "2024-01-12T13:49:38.021Z",
                    "details": {
                        "to": "17123123123",
                        "successful": true,
                        "segmentCount": 1
                    }
                }
            }
        },
        "metadata": {
            "useraccountid": 1234,
            "campaignid": 1518,
            "campaignname": "Test",
            "contactid": 111111,
            "requestid": 0,
            "sendid": 0,
            "programid": 0
        },
        "updatedOn": "2024-01-12T13:49:36.829Z",
        "channelData": {
            "mms": {
                "fromPhoneNumber": "1321321321",
                "phoneNumberCountryCode": "US",
                "segmentCount": 1
            }
        }
    },
    "revision": 2,
    "etag": "\"2e-/M/cPyS542jB+raFJkj8qCUpiTY\"",
    "timestamp": "2024-01-12T13:49:38.034Z"
}
{
  "eventId": "e0c3111b-d3a2-4042-96da-c92dfc7e1c52",
  "accountId": 1234,
  "apiSpaceId": "fe42e8af-5fc3-40d4-a38c-034535c0a385",
  "name": "message.sent",
  "payload": {
    "id": "89a31d97-b23e-41db-be4c-087df2136bd0",
    "details": {
      "channel": "rcs",
      "additionalInfo": {
        "name": "phones/+4477123123123/agentMessages/89a31d97-b23e-41db-be4c-087df2136bd0",
        "sendTime": "2019-10-23T16:03:33.677Z",
        "contentMessage": {
          "text": "Sending is easy with One API"
        }
      },
      "channelStatus": {}
    },
    "metadata": {
      "data": "My important data"
    },
    "updatedOn": "2019-10-23T16:03:32.468Z",
    "channelData": {
      "rcs": {
        "phoneNumber": "447123123123",
        "phoneNumberCountryCode": "GB",
        "agentId": "770950354877"
      }
    }
  },
  "revision": 2,
  "etag": "\"2e-7gE/WwkZra5g83pnw9iaeuI/NJw\"",
  "timestamp": "2019-10-23T16:03:33.697Z"
}
{
  "eventId": "487b9258-aee0-48da-b410-b253823fda10",
  "accountId": 1234,
  "apiSpaceId": "fa42e8af-5fc4-40d4-a38c-034535c0a385",
  "name": "message.sent",
  "payload": {
    "details": {
      "channel": "fbMessenger",
      "additionalInfo": {
        "fbMessengerId": "1924625277845988",
        "messageId": "mid.$cABAnV7v5AVdiiyqOdVcWeVGDyz-6"
      },
      "channelStatus": {
        "fbMessenger": {
          "status": "sent",
          "details": {
            "fbMessengerId": "1924625277645988",
            "messageId": "mid.$cABAnV7v5AVdiiyqOdVcWeVGDyz-6"
          },
          "updatedOn": "2017-05-30T15:06:56.934Z"
        }
      }
    },
    "updatedOn": "2017-05-30T15:06:56.934Z",
    "id": "79b156e6-c314-4114-ac6a-be8eab624951"
  },
  "revision": 2,
  "etag": "\"2e-Zb4yVYmVGmr9WRNuY47SF8Vd21I\"",
  "timestamp": "2017-05-30T15:06:57.592Z"
}
{
    "eventId": "769f4305-ea98-45ae-860b-a32e44b9aa47",
    "accountId": 1234,
    "apiSpaceId": "61d1780d-8440-480a-b268-20b1eb50a4ff",
    "name": "message.sent",
    "payload": {
        "id": "8b6076fe-4c85-4f92-a195-3625a7a62c32",
        "details": {
            "channel": "appMessaging",
            "additionalInfo": {
                "conversationId": "Customer_Services_anon_4c191a33-050b-4bab-9147-38300445fdd4",
                "conversationMessageId": "8b6076fe-4c85-4f92-a195-3625a7a62c32"
            },
            "channelStatus": {}
        },
        "conversationId": "Customer_Services_anon_4c191a33-050b-4bab-9147-38300445fdd4",
        "updatedOn": "2019-03-07T10:37:21.529Z"
    },
    "revision": 2,
    "etag": "\"2e-lvaY1DE4bB43iP6/vi6xlcm3rGI\"",
    "timestamp": "2019-03-07T10:37:21.640Z"
}

Delivered

This event indicates that a message has been delivered, if delivery receipts are supported on the channel.

Examples

{
  "eventId": "2b612e8c-b88d-485c-8e98-81939f879500",
  "accountId": 1234,
  "apiSpaceId": "c224cf6e-4352-4b26-a71a-c9032bea7a01",
  "name": "message.delivered",
  "payload": {
    "details": {
      "channel": "sms",
      "channelStatus": {
        "tranid": "946245251",
        "messageguid": "9fd260a5-52a7-4d84-bc08-10e04d07d7b7",
        "statusid": "1",
        "recipient": "447123123123",
        "statusdescription": "Messages delivered to handset",
        "datetime": "2017-08-31T10:28:00.143",
        "clientref": "e9f154c8-4011-493f-bb73-09cfcf8a1411",
        "submissiontime": "2017-08-31T10:26:14.317",
        "apispaceid": "c224cf6e-4352-4b26-a71a-c9032bea7a01",
        "statustimeutc": "2017-08-31T09:27:21.000Z"
      }
    },
    "metadata": {
      "data": "My correlation data"
    },
    "id": "e9f154c8-4011-493f-bb73-09cfcf8a1411"
  },
  "revision": 3,
  "etag": "\"2e-oazq69nFeiKkl5WM78YH7xo/8xU\"",
  "timestamp": "2017-08-31T09:28:03.074Z"
}
{
    "eventId": "52987c07-7ec8-41c2-bc47-9bad3a9419a6",
    "accountId": 1234,
    "apiSpaceId": "1154802b-a288-48f9-839c-b56181b9f3cf",
    "name": "message.delivered",
    "payload": {
        "id": "b960fa14-9f39-412a-b46f-e073f18e7199",
        "details": {
            "channel": "mms"
        },
        "metadata": {
            "useraccountid": 1234,
            "campaignid": 1518,
            "campaignname": "Test",
            "contactid": 38334181,
            "requestid": 0,
            "sendid": 0,
            "programid": 0
        },
        "updatedOn": "2024-01-12T13:49:38.010Z"
    },
    "revision": 3,
    "etag": "\"2e-nExyCNBg7TA5kGFlJ6i9Qnnvfok\"",
    "timestamp": "2024-01-12T13:49:41.967Z"
}
{
  "eventId": "07006cd8-b9b0-4554-ae49-f6bc7b7a22b9",
  "accountId": 1234,
  "apiSpaceId": "ff42e8af-5fc3-40d4-a38c-034535c0a385",
  "name": "message.delivered",
  "payload": {
    "id": "df80de47-d2d7-436f-afe0-7559f64b0583",
    "details": {
      "channel": "rcs",
      "channelStatus": {
        "data": {
          "senderPhoneNumber": "+447123123123",
          "eventType": "DELIVERED",
          "eventId": "MsuYXA9p9FTcKajFDiwiELqA",
          "messageId": "df80de47-d2d7-436f-afe0-7559f64b0583",
          "sendTime": "2019-10-23T16:17:09.331989Z"
        },
        "attributes": {
          "type": "event",
          "project_number": "770950354877",
          "event_type": "DELIVERED",
          "product": "RBM"
        },
        "messageId": "653513593921442",
        "publishTime": "2019-10-23T16:17:10.329Z"
      }
    },
    "metadata": {
      "data": "My important data"
    },
    "updatedOn": "2019-10-23T16:17:11.325Z"
  },
  "revision": 3,
  "etag": "\"2e-Gcg41t6jFwT2CVW8wouZDroNu9Y\"",
  "timestamp": "2019-10-23T16:17:11.328Z"
}
{
  "eventId": "77775ef0-60f9-4ec1-8fa5-cfc3990e1f94",
  "accountId": 1234,
  "apiSpaceId": "fb42e8af-5fc3-40d4-a38c-034535c0a385",
  "name": "message.delivered",
  "payload": {
    "details": {
      "channel": "fbMessenger",
      "channelStatus": {
        "sender": {
          "id": "1124625277645988"
        },
        "recipient": {
          "id": "138143536705220"
        },
        "timestamp": 1496248541996,
        "delivery": {
          "watermark": 1496248541613,
          "seq": 0
        }
      }
    },
    "updatedOn": "2017-05-31T16:35:41.613Z",
    "id": "0bc1e71e-28f4-40f4-853a-7112fd28f627"
  },
  "revision": 3,
  "etag": "\"2e-5L1Qw6Yi1fL1KMW7AH2amYIvNSI\"",
  "timestamp": "2017-05-31T16:35:43.078Z"
}
{
    "eventId": "ae467606-6dd3-4eb5-aa9a-1901e1e8cecd",
    "accountId": 1234,
    "apiSpaceId": "61d1780d-8440-480a-b268-20b1eb50a4ff",
    "name": "message.delivered",
    "payload": {
        "id": "8b6076fe-4c85-4f92-a195-3625a7a62c32",
        "details": {
            "channel": "appMessaging",
            "channelStatus": {
                "messageId": "8b6076fe-4c85-4f92-a195-3625a7a62c32",
                "conversationId": "Customer_Services_anon_4c191a33-050b-4bab-9147-38300445fdd4",
                "scope": "a2p",
                "direction": "outbound",
                "sentOn": "2019-03-07T10:37:21.624Z",
                "isPublicConversation": false,
                "profileId": "anon_4c191a33-050b-4bab-9147-38300445fdd4",
                "timestamp": "2019-03-07T10:37:21.737Z"
            }
        },
        "conversationId": "Customer_Services_anon_4c191a33-050b-4bab-9147-38300445fdd4",
        "updatedOn": "2019-03-07T10:37:21.737Z"
    },
    "revision": 3,
    "etag": "\"2e-E+VfGOH5aZPuHpiCVUOfy63gnNY\"",
    "timestamp": "2019-03-07T10:37:21.847Z"
}

Read

This event indicates that a message has been read on a channel.

This only applies to channels that support read receipts.

Examples

{
  "eventId": "8a418712-a341-480a-9e61-e750ee27cde2",
  "accountId": 1234,
  "apiSpaceId": "ff42e8af-5fc3-40d4-a38c-034535c0a385",
  "name": "message.read",
  "payload": {
    "id": "208bd9df-efd0-42d2-9f4a-56f97258c3a1",
    "details": {
      "channel": "rcs",
      "channelStatus": {
        "data": {
          "senderPhoneNumber": "+447123123123",
          "eventType": "READ",
          "eventId": "MsFHSpJVEUSRKSZQkEX4NNmg",
          "messageId": "208bd9df-efd0-42d2-9f4a-56f97258c3a1",
          "sendTime": "2019-10-24T08:36:49.527958Z"
        },
        "attributes": {
          "type": "event",
          "project_number": "770950354877",
          "event_type": "READ",
          "product": "RBM"
        },
        "messageId": "653537493453991",
        "publishTime": "2019-10-24T08:36:50.349Z"
      }
    },
    "metadata": {
      "data": "My important data"
    },
    "updatedOn": "2019-10-24T08:36:51.027Z"
  },
  "revision": 4,
  "etag": "\"2e-TxeQvmtFPwKmf7wpfCirDLiBf1o\"",
  "timestamp": "2019-10-24T08:36:51.032Z"
}
{
  "eventId": "4fb53a11-48a0-46e6-af4c-946556f03445",
  "accountId": 1234,
  "apiSpaceId": "fb42e8af-5fc3-40d4-a38c-034535c0a385",
  "name": "message.read",
  "payload": {
    "details": {
      "channel": "fbMessenger",
      "channelStatus": {
        "sender": {
          "id": "1124625277645988"
        },
        "recipient": {
          "id": "138143536705220"
        },
        "timestamp": 1496248566710,
        "read": {
          "watermark": 1496248541613,
          "seq": 0
        }
      }
    },
    "updatedOn": "2017-05-31T16:35:41.613Z",
    "id": "0bc1e71e-28f4-40f4-853a-7112fd28f627"
  },
  "revision": 4,
  "etag": "\"2e-konny6DS4WEpVq5z2UDXb98kYQw\"",
  "timestamp": "2017-05-31T16:36:07.407Z"
}
{
    "eventId": "43a708b8-e884-49d6-92eb-cd75b7707f52",
    "accountId": 1234,
    "apiSpaceId": "61d1780d-8440-480a-b268-20b1eb50a4ff",
    "name": "message.read",
    "payload": {
        "id": "8b6076fe-4c85-4f92-a195-3625a7a62c32",
        "details": {
            "channel": "appMessaging",
            "channelStatus": {
                "messageId": "8b6076fe-4c85-4f92-a195-3625a7a62c32",
                "conversationId": "Customer_Services_anon_4c191a33-050b-4bab-9147-38300445fdd4",
                "scope": "a2p",
                "direction": "outbound",
                "sentOn": "2019-03-07T10:37:21.624Z",
                "isPublicConversation": false,
                "profileId": "anon_4c191a33-050b-4bab-9147-38300445fdd4",
                "timestamp": "2019-03-07T10:37:21.750Z"
            }
        },
        "conversationId": "Customer_Services_anon_4c191a33-050b-4bab-9147-38300445fdd4",
        "updatedOn": "2019-03-07T10:37:21.750Z"
    },
    "revision": 4,
    "etag": "\"2e-kvIDONdrGVEMD3E2ElniLL62jcA\"",
    "timestamp": "2019-03-07T10:37:21.864Z"
}

Expired

This event indicates that a message has not been delivered within the specified expiry period.

Examples

{
  "eventId": "c88f35a8-5fe7-4069-9151-f4dcf8ee89b3",
  "accountId": 1234,
  "apiSpaceId": "fb42e8af-5fc3-40d4-a38c-034535c0a385",
  "name": "message.expired",
  "payload": {
    "details": {
      "channel": "sms",
      "channelStatus": {}
    },
    "updatedOn": "2017-06-01T10:45:05.685Z",
    "id": "a3c0c65c-6199-43e1-ba43-e7184a583e86"
  },
  "revision": 3,
  "etag": "\"2e-gTE0IKqsj+rNG0tojkpW/WZezTc\"",
  "timestamp": "2017-06-01T16:07:19.777Z"
}

Failed

This event indicates that the message has failed to be sent or delivered.

🚧

You only receive channel statuses for non-general failures

If your message is accepted, but when we try to send we have an issue and cannot send it on any of the channels requested, then you receive a message.failed event. The event has no details in the channelStatus object.

If we’re able to submit to a channel but an issue occurs, then the channelStatus object contains an object describing the channel issue.

Examples

{
    "eventId": "8270b263-4b21-4396-be5a-deb7803bbe3a",
    "accountId": 1234,
    "apiSpaceId": "fb42e8af-5fc3-40d4-a38c-034535c0a385",
    "name": "message.failed",
    "payload": {
        "details": {
            "reason": "The message failed because it could not be sent to any of the configured channels.",
            "channelStatus": {}
        },
        "updatedOn": "2018-06-28T09:56:17.296Z",
        "metadata": {
            "myMessageId": 45210
        },
        "id": "0c7d3c2c-c90b-4d12-8416-683420186d08"
    },
    "revision": 2,
    "etag": "\"2e-xiPUac66W8M5clJfkYKXKQ/nBR8\"",
    "timestamp": "2018-06-28T09:56:17.305Z"
}
{
    "eventId": "c14320d9-6f24-48c6-a981-15879b756203",
    "accountId": 1234,
    "apiSpaceId": "ae1f5482-2438-41ce-ac1a-9137491f701d",
    "name": "message.failed",
    "payload": {
        "id": "37fe6fcc-8149-48d0-baf9-1c72850d532b",
        "details": {
            "channelStatus": {
                "sms": {
                    "status": "failed",
                    "details": {
                        "reason": "Rejected by operator",
                        "data": {
                            "tranid": "78303243",
                            "messageguid": "a88cf899-07dc-47c0-873f-f2dba2dc35f1",
                            "statusid": "4",
                            "recipient": "447123123123",
                            "statusdescription": "Messages rejected by operator",
                            "datetime": "2019-04-12T10:47:00.237",
                            "clientref": "37fe6fcc-8149-48d0-baf9-1c72850d532b",
                            "submissiontime": "2019-04-12T10:41:13.073",
                            "apispaceid": "AE1F5482-2438-41CE-AC1A-9137491F701D",
                            "statustimeutc": "2019-04-12T09:46:00.000Z"
                        }
                    },
                    "updatedOn": "2019-04-12T09:46:00.000Z"
                }
            },
            "reason": "Channel reported the message was undeliverable"
        },
        "metadata": {
            "data": "My correlation data"
        },
        "updatedOn": "2019-04-12T09:46:00.000Z"
    },
    "revision": 4,
    "etag": "\"2e-9e8qfTZb9PDAQGEExbOz24FWjPk\"",
    "timestamp": "2019-04-12T09:47:00.657Z"
}
{
  "eventId": "0ee4c8b6-0cc5-4e51-828d-58ce51bcb476",
  "accountId": 1234,
  "apiSpaceId": "1944aba6-a66d-4ebe-9010-5567e7ba3b25",
  "name": "message.failed",
  "payload": {
    "id": "17377be2-4e2e-4d4d-81c4-760f8bd81c05",
    "details": {
      "reason": "The message failed because it could not be sent to any of the configured channels.",
      "channelStatus": {
        "sms": {
          "status": "failed",
          "updatedOn": "2022-11-30T16:01:10.382Z",
          "details": {
            "reason": "SMS channel returned a status of unsuccessful",
            "data": {
              "to": "44123123123",
              "successful": false,
              "clientRef": "17377be2-4e2e-4d4d-81c4-760f8bd81c05",
              "segmentCount": 0,
              "validationFailures": [
                {
                  "property": "body",
                  "failureCode": "UnicodeBodyRejected",
                  "details": "body field is not valid. Unicode content is not allowed when PreventUnicode is true."
                }
              ]
            }
          }
        }
      }
    },
    "updatedOn": "2022-11-30T16:01:10.388Z"
  },
  "revision": 2,
  "etag": "\"2e-2K2j7Y290E9imvp2K8wIfr8hbOI\"",
  "timestamp": "2022-11-30T16:01:10.474Z"
}
{
  "eventId": "05618bd9-dba3-4105-9f71-492df2b031c2",
  "accountId": 1234,
  "apiSpaceId": "1154802b-a288-48f9-839c-b56181b9f3cf",
  "name": "message.failed",
  "payload": {
    "id": "32de4778-9b9d-4c33-8486-203b2b70db02",
    "details": {
      "channelStatus": {},
      "reason": "Invalid request:\r\n1) Not allowed to send message to 48500000000 (PL) for mms channel. Allowed country codes are: US,CA (paramName: phoneNumberCountryCode)"
    },
    "updatedOn": "2023-11-13T08:23:00.992Z"
  },
  "revision": 1,
  "etag": "\"2e-2xMXoYeZe7V7GPlmMik+VpstP9g\"",
  "timestamp": "2023-11-13T08:23:01.057Z"
}
{
  "eventId": "9e33d815-3700-46fd-a9f7-97004298747d",
  "accountId": 1234,
  "apiSpaceId": "ff42e8af-5fc3-40d4-a38c-034535c0a385",
  "name": "message.failed",
  "payload": {
    "id": "8d7e7543-92e3-4acd-abfe-d527a7ea580b",
    "details": {
      "reason": "The message failed because it could not be sent to any of the configured channels.",
      "channelStatus": {
        "rcs": {
          "status": "failed",
          "updatedOn": "2019-10-24T13:31:11.619Z",
          "details": {
            "reason": "The profile is not tester",
            "data": {
              "phoneNumber": "447123123123",
              "phoneNumberCountryCode": "GB",
              "profileId": "e9395e29-a4b8-4d4c-9ea1-f6e1a676ac62"
            }
          }
        }
      }
    },
    "metadata": {
      "data": "My important data"
    },
    "updatedOn": "2019-10-24T13:31:11.619Z"
  },
  "revision": 2,
  "etag": "\"2e-7KQ6HOIk/Wlv5NWBmcEYBa9ZL+s\"",
  "timestamp": "2019-10-24T13:31:11.633Z"
}
{
  "eventId": "d8536261-ee1d-4b88-8f2e-89d9ea35dd1b",
  "accountId": 1234,
  "apiSpaceId": "c224cf6e-4352-4b26-a71a-c9032bea7a01",
  "name": "message.failed",
  "payload": {
    "details": {
      "reason": "The message failed because it could not be sent to any of the configured channels.",
      "channelStatus": {
        "fbMessenger": {
          "status": "failed",
          "details": {
            "reason": "connect ETIMEDOUT 31.13.71.1:443"
          },
          "updatedOn": "2017-08-31T11:13:38.238Z"
        }
      }
    },
    "updatedOn": "2017-08-31T11:13:38.239Z",
    "id": "2a680295-581f-41a7-8825-c6d488e87d07"
  },
  "revision": 2,
  "etag": "\"2e-X5EBTbPlzb3vKVB3mCNjthHMD2E\"",
  "timestamp": "2017-08-31T11:13:37.895Z"
}
{
  "eventId": "90e0b8c5-efc0-4db0-882d-79783efab84c",
  "accountId": 1234,
  "apiSpaceId": "ff42e8af-5fc3-40d4-a38c-034535c0a385",
  "name": "message.failed",
  "payload": {
    "details": {
      "channelStatus": {
        "email": {
          "Message-Id": "<20170912101441.61901.BF1018B9ABE26D26@stage-mail.comapi-email.com>",
          "X-Mailgun-Sid": "WyIxYmFhNSIsICJkYXZlLmJhZGRlbGV5QGNvbWFwaS5jb20iLCAiY2NjOGVlIl0=",
          "attachment-count": "1",
          "body-plain": "",
          "code": "606",
          "comapi-apiSpaceId": "ff42e8af-5fc3-40d4-a38c-034535c0a385",
          "comapi-messageId": "929e38e7-5fed-4aab-865b-824e1fb32457",
          "description": "Not delivering to unsubscribed address",
          "domain": "mail.comapi-email.com",
          "event": "dropped",
          "message-headers": "[[\"X-Mailgun-Sid\", \"WyIxYmFhNSIsICJkYXZlLmJhZGRlbGV5QGNvbWFwaS5jb20iLCAiY2NjOGVlIl0=\"], [\"List-Unsubscribe\", \"<mailto:u+mq6wgy3dhbswkjtjhuzdamjxga4tcmrrgaytinbrfy3dcojqgexeerrrgaytqqrzifbekmrwiqzdmjjugbzxiylhmuww2yljnqxgg33nmfygsllfnvqws3bomnxw2jtihu4tgmjxgntginbrgm2dmyzsmezteyzygizwcmbqgvtdqyjwheydcjtdn5wwc4djfvwwk43tmftwkslehu4teolfgm4gknzngvtgkzbngrqwcyrnha3dkyrnhazdizjrmzrdgmrugu3sm4r5mrqxmzjomjqwizdfnrsxsjjugbrw63lbobus4y3pnuthipjfgjasmy3pnvqxa2jnmfygsu3qmfrwkslehvtgmnbsmu4gczrngvtggmzngqyginbnmeztqyzngaztinjtgvrtayjtha2q@mail.comapi-email.com>\"], [\"Content-Transfer-Encoding\", [\"7bit\", {}]], [\"Received\", \"by luna.mailgun.net with HTTP; Tue, 12 Sep 2017 10:14:41 +0000\"], [\"Message-Id\", \"<[email protected]>\"], [\"X-Mailgun-Variables\", \"{\\\"comapi-messageId\\\": \\\"929e38e7-5fed-4aab-865b-824e1fb32457\\\", \\\"comapi-apiSpaceId\\\": \\\"ff42e8af-5fc3-40d4-a38c-034535c0a385\\\"}\"], [\"X-Mailgun-Track-Opens\", \"true\"], [\"X-Mailgun-Track\", \"true\"], [\"To\", \"[email protected]\"], [\"From\", \"Acme Support <general|[email protected]>\"], [\"Subject\", \"Your order has been dispatched\"], [\"Content-Type\", [\"text/html\", {\"charset\": \"ascii\"}]], [\"Mime-Version\", \"1.0\"]]",
          "reason": "hardfail",
          "recipient": "[email protected]",
          "signature": "6490861634ab4b1586aaaed755d776684ca76413e42022976b6b18e0cc2c5a23",
          "timestamp": "1505211288",
          "token": "2ea3b6ebe4575acfc8f0f6aab61b9f04f0240e46098fc93ff5"
        }
      }
    },
    "updatedOn": "2017-09-12T10:14:48.000Z",
    "metadata": {
      "data": "My correlation data"
    },
    "id": "929e38e7-5fed-4aab-865b-824e1fb32457"
  },
  "revision": 3,
  "etag": "\"2e-vLlFQqCT9Y1DZ0zNEvaOqP9nH8E\"",
  "timestamp": "2017-09-12T10:14:49.000Z"
}

Inbound

This event is an inbound message from a channel.

Examples

{
  "eventId": "0028ebc3-c0e9-4924-9b44-9135c7990f57",
  "accountId": 1234,
  "apiSpaceId": "c224cf6e-4352-4b26-a71a-c9032bea7a01",
  "name": "message.inbound",
  "payload": {
    "from": {
      "phoneNumber": "447234234234",
      "profileId": "sms_447234234234"
    },
    "channel": "sms",
    "to": {
      "phoneNumber": "447123123123"
    },
    "body": "Hello",
    "channelData": {
      "messageId": "2014753436",
      "keyword": "",
      "clientRef": "",
      "receivedOn": "2017-08-31T11:57:54.000Z"
    },
    "id": "4980e512-1a11-4ac3-ad9b-f8a23905432b",
    "receivedOn": "2017-08-31T11:57:55.735Z"
  },
  "revision": 0,
  "etag": "\"2e-egLNsnrQHYwEYFdCSTKKvFzExjM\"",
  "timestamp": "2017-08-31T11:57:55.738Z"
}
{
  "eventId": "020b8e91-a116-47c6-b7e9-dab878e5761a",
  "accountId": 1234,
  "apiSpaceId": "fb42e8af-5fc3-40d4-a38c-034535c0a385",
  "name": "message.inbound",
  "payload": {
    "from": {
      "fbMessengerId": "1924625277645988",
      "profileId": "[email protected]"
    },
    "channel": "fbMessenger",
    "body": "Hi there",
    "channelData": {
      "pageId": "118143536805220",
      "body": {
        "sender": {
          "id": "1924625277645988"
        },
        "recipient": {
          "id": "118143536805220"
        },
        "timestamp": 1496157103192,
        "message": {
          "mid": "mid.$cAAAnV7v5AVdiiy7sWFcWemjwmFUt",
          "seq": 611,
          "text": "Hi there"
        }
      }
    },
    "id": "8e14bc40-cf93-44bf-be7b-d5dfa77cb53e",
    "receivedOn": "2017-05-30T15:11:44.451Z"
  },
  "revision": 0,
  "etag": "\"2e-gLoREj4XI35uB44EZ2pYIeiIhls\"",
  "timestamp": "2017-05-30T15:11:45.169Z"
}
{
  "eventId": "bb7529b7-6f42-48ae-9c7c-f4787f0309c1",
  "accountId": 1234,
  "apiSpaceId": "fb42e8af-5fc3-40d4-a38c-034535c0a385",
  "name": "message.inbound",
  "payload": {
    "from": {
      "fbMessengerId": "1924625277645988",
      "profileId": "[email protected]"
    },
    "channel": "fbMessenger",
    "channelData": {
      "pageId": "118143536805220",
      "body": {
        "sender": {
          "id": "1924625277645988"
        },
        "recipient": {
          "id": "118143536805220"
        },
        "timestamp": 1496157323290,
        "message": {
          "mid": "mid.$cAAAnV7v5AVdiizJIGlcWez6SN4a6",
          "seq": 613,
          "attachments": [
            {
              "type": "image",
              "payload": {
                "url": "https://scontent.xx.fbcdn.net/v/t35.0-12/18836412_972877662815683_1343824608_o.png?_nc_ad=z-m&oh=bb64923a45848c937f15cbb415bf7942&oe=592F8F05"
              }
            }
          ]
        }
      }
    },
    "id": "2e779cb8-681d-440f-b48a-c0e6061cecc0",
    "receivedOn": "2017-05-30T15:15:32.120Z"
  },
  "revision": 0,
  "etag": "\"2e-JpSAWx+NJaPfrFzaDVTp863rgZ4\"",
  "timestamp": "2017-05-30T15:15:32.873Z"
}
{
    "eventId": "024c3f39-86a9-47a8-b3b9-7a1fc3e273e3",
    "accountId": 1234,
    "apiSpaceId": "61d1780d-8440-480a-b268-20b1eb50a4ff",
    "name": "message.inbound",
    "payload": {
        "from": {
            "profileId": "anon_4c191a33-050b-4bab-9147-38300445fdd4"
        },
        "to": {
            "conversationId": "Customer_Services_anon_4c191a33-050b-4bab-9147-38300445fdd4",
            "profileId": "TEAM\\Customer_Services"
        },
        "channel": "appMessaging",
        "channelData": {
            "messageId": "36136f57-7c13-4a6b-bc17-67f5c4dfd201",
            "metadata": {},
            "context": {
                "from": {
                    "id": "anon_4c191a33-050b-4bab-9147-38300445fdd4"
                },
                "conversationId": "Customer_Services_anon_4c191a33-050b-4bab-9147-38300445fdd4",
                "sentBy": "session:anon_4c191a33-050b-4bab-9147-38300445fdd4",
                "sentOn": "2019-03-07T10:40:49.118Z",
                "scope": "a2p",
                "direction": "inbound"
            },
            "parts": [
                {
                    "data": "Hi there",
                    "size": 8,
                    "type": "text/plain"
                }
            ]
        },
        "body": "Hi there",
        "correlation": {
            "messageId": "8b6076fe-4c85-4f92-a195-3625a7a62c32"
        },
        "id": "13a4090d-59f5-4f5f-8b5c-44904e4f33cd",
        "receivedOn": "2019-03-07T10:41:16.184Z"
    },
    "revision": 0,
    "etag": "\"2e-XQsB+++7ler4ZxAAPBVKJ1apYKs\"",
    "timestamp": "2019-03-07T10:41:16.193Z"
}
{
  "eventId": "833b5df1-7238-4916-bd2d-5ef0ebf24d61",
  "accountId": 1234,
  "apiSpaceId": "ff42e8af-5fc3-40d4-a38c-034535c0a385",
  "name": "message.inbound",
  "payload": {
    "from": {
      "phoneNumber": "447123123123",
      "phoneNumberCountryCode": "GB",
      "profileId": "98f16701-7041-4511-b0ab-34a4554599de"
    },
    "channel": "rcs",
    "to": {
      "agentId": "770950354877"
    },
    "messageParts": [
      {
        "type": "text/plain",
        "data": "Hi"
      }
    ],
    "receivedOn": "2019-10-24T13:46:55.502Z",
    "body": "Hi",
    "correlation": {
      "messageId": "eeabef3f-848d-4a00-8aaa-c7779648d7e5",
      "metadata": {
        "data": "My important data"
      }
    },
    "id": "5f111b34-b9c8-483f-afa2-eeeed6346366"
  },
  "revision": 0,
  "etag": "\"2e-82hH53sJtouGf0qQqqxl6xNQwS0\"",
  "timestamp": "2019-10-24T13:46:55.531Z"
}
{
  "eventId": "1c26007e-7e3a-4c2e-a6ef-5c8a8d7b4d94",
  "accountId": 1234,
  "apiSpaceId": "ff42e8af-5fc3-40d4-a38c-034535c0a385",
  "name": "message.inbound",
  "payload": {
    "from": {
      "phoneNumber": "447123123123",
      "phoneNumberCountryCode": "GB",
      "profileId": "98f16701-7041-4511-b0ab-34a4554599de"
    },
    "channel": "rcs",
    "to": {
      "agentId": "770950354877"
    },
    "messageParts": [
      {
        "type": "application/pdf",
        "url": "https://rcs-user-content-eu.storage.googleapis.com/802acc59-605f-417c-c2fb-877222c2d1e7/5f5cd9e112c64f47aa79368b945643b3e4ef51021d739db15d07cbcfacc5",
        "name": "ClaimsForm.pdf"
      }
    ],
    "receivedOn": "2019-10-29T16:38:46.405Z",
    "correlation": {
      "messageId": "419b23d5-8e82-4b05-9a30-b2d91400033d",
      "metadata": {
        "data": "My important data"
      }
    },
    "id": "1be3b3cf-e93e-4b81-97ca-2b747ec2a8ff"
  },
  "revision": 0,
  "etag": "\"2e-Kf5vZlGmG20yIO7oPsDxEPZUiW8\"",
  "timestamp": "2019-10-29T16:38:46.428Z"
}
{
  "eventId": "d40f6c64-2687-40db-8315-b2a7c486cb6b",
  "accountId": 1234,
  "apiSpaceId": "ff42e8af-5fc3-40d4-a38c-034535c0a385",
  "name": "message.inbound",
  "payload": {
    "from": {
      "phoneNumber": "447123123123",
      "phoneNumberCountryCode": "GB",
      "profileId": "98f16701-7041-4511-b0ab-34a4554599de"
    },
    "channel": "rcs",
    "to": {
      "agentId": "770950354877"
    },
    "messageParts": [
      {
        "type": "image/gif",
        "url": "https://rcs-user-content-eu.storage.googleapis.com/403705b0-5638-45d3-91a7-cd2d3cbadfe7/8b4c1b0f711bbbc4fe07b751edb494ef09c00f7b21f5ba83015d25e6ca23",
        "name": "3"
      }
    ],
    "receivedOn": "2019-10-29T16:21:06.195Z",
    "correlation": {
      "messageId": "419b23d5-8e82-4b05-9a30-b2d91400033d",
      "metadata": {
        "data": "My important data"
      }
    },
    "id": "7ba338db-fb7c-46ed-8d45-ffab38a5c5c6"
  },
  "revision": 0,
  "etag": "\"2e-eiv0ZMO6mzU2sO0z3TL69n1ux2E\"",
  "timestamp": "2019-10-29T16:21:06.197Z"
}