Adds a postback rule to be triggered by certain Leanplum message or A/B test events. The maximum number of postbacks allowed is three per app. This method requires your data export API clientKey.

See type and channels below for all possible events that can trigger postbacks. To see what values can be returned by the resulting POST request, see postbackUrl with an example template below.

Postback retry policy: If your app is unresponsive, Leanplum's request will timeout in 30 seconds. If the error code is 5xx, we will retry up to 9 more times with exponential backoff, starting from 1 hour, up to 10 hours. If all 10 times fail, the data is lost.

Example URL template for postbackUrl

Note that the values in the curly braces must be exactly as shown below, but you can customize the keys however you like in your template. For example, message_id={{Message ID}} or messageId={{Message ID}} will both work just fine.{{Message ID}}&event={{Message event}}&device_id={{Device ID}}&user_id={{User ID}}&time={{Trigger time}}&channel={{Message channel}}&template_name={{Template name}}&parameters={{Parameters}}


Make sure your URL is encoded before posting

Un-encoded URLs can cause the request to fail or add the postback incorrectly. Postman and certain browsers often encode the URL for you, which is why our example contains & instead of %26.