AMP supports HTTP POST callbacks, meaning that you can have an endpoint on your own server which will receive callbacks whenever something happens. This is used to track delivered messages & allow you to build custom statistics. This callback URL must be publicly available on the internet and have our IP whitelisted (if the system has a firewall).
Callbacks are separated into two categories: delivery status reports and reply messages. Both are signalled back over an HTTP callback to the URLs supplied in the original message request (see Request Body » Outer Level).
Delivery Reports and any other relevant intermediary statuses are posted to the URL specified by the “callback_url” field in the original message request. If no callback_url was specified in the request, no status report callback will be generated. Since more than one delivery report may be obtained from the destination network in a very short time frame, each post request may contain multiple delivery reports bundled together.
For two-way messaging, any reply messages sent by the recipient of the original message will be posted to the URL given by the “reply_url” field in the original message request. If no reply_url is set, two-way messaging will be disabled.
Whitelist callback server
You may need to configure your firewall to whitelist traffic from these IP addresses:
IPv4: 80.252.167.60
Note that these IPs can change in the future.
SSL Support
The use of SSL on the client’s callback server is optional, i.e. both HTTP and HTTPS schemes are supported. However, if HTTPS validation fails, the callback is treated as failed. For information on how failures are handled, see Callback failure below.
Callback failure
The HTTP Callback on your server should return the correct HTTP Headers containing 200 OK. If the client’s server is unreachable or does not return a 200 OK, the callback is queued to be retried again. After three failed attempts, with an interval of 5 minutes between them, the callback is discarded.