Skip to main content

Report Message Events

This endpoint used to send information about message status change.

Request

POST <API base url>/events

Body

[
{
"timestamp": required string, // UTC timestamp in ISO format when an event occurs
// in real-life, e.g. when SMS was actually
// delivered to a customer
"messageId": required int64, // Message identifier
"status": required string, // one of - inQueue, dequeuing, dequeued, sending,
// sent, accepted, delivered, seen, engaged,
// policyDeny, unknownContact, error
"channel": optional string, // channel where a message was delivered to,
// one of - messenger, sms, inApp, email
"reportedAt": optional string // UTC timestamp in ISO format when an event was reported
// by a communication channel provider, if applicable
"details": optional string // Additional details in free form text that could be
// usefull to know about message status change,
// for example: The customer is not a Viber user.
},
...
]

Example:

[
{
"timestamp": "2021-10-24T12:31:57Z",
"messageId": 6637960,
"status": "delivered",
"channel": "sms",
"reportedAt": "2021-10-24T12:32:16Z"
},
{
"timestamp": "2021-10-24T12:31:57Z",
"messageId": 6637961,
"status": "policyDeny",
},
{
"timestamp": "2021-10-24T12:31:57Z",
"messageId": 6637962,
"status": "error",
"details": "Not a Viber user"
}
]

Response

The endpoint returns no response body.