Introduction

Prev Next
Phrasee Webhooks1.0.0

This is a collection of the REST API requests for Phrasee's webhook / tracking pixel which can be used to send data to Phrasee about the performance metrics of experiments. The following metrics are currently supported:

  • Opens
  • Clicks
  • Unsubscribes
  • Conversions

More help and support, along with step-by-step setup guides for individual ESPs, can be found here: https://support.phrasee.co

Parameters

Parameter Description Example Value Required?
variant_id The Phrasee variant id 62a857d781b6eb23b1e77f8e Sometimes
campaign_id The Phrasee experiment / campaign id 62a3479f8fcd86d5704b546d Sometimes
account_id The Phrasee account id 62a34835f1cba8d71359cb0b No
batch_id The Phrasee batch id, if using Dynamic Optimization 10002 Sometimes
project_id The Phrasee project id 62a34d79d87a17b87f74bb10 No
delivery_id The id for the message delivery, usually provided by your ESP 742322 Sometimes
recipient_id The id of the recipient receiving the delivery, usually provided by your ESP. Note: Phrasee hashes the recipient id, and never stores the raw passed in value. 9283672739 Sometimes
send_id The unique ID identifying this specific send to a recipient 673457-11235-34235-23523 Sometimes
return_pixel Whether the API call should return a 1x1 pixel, intended for use with the GET open request. This defaults to true if no value is passed. false No

The required parameters change depending on a number of factors, including if you are using the realtime API.

If using the realtime API, only delivery_id and recipient_id are required, and as long as the same ids were provided on the call to the realtime API, Phrasee can infer the other values from what has already been stored.

If using Dynamic Optimization without the realtime API, the following fields are required: variant_id, campaign_id, batch_id and send_id.

GET Requests

Parameters can be passed as query parameters.

POST Requests

Parameters can be passed as query or body parameters. Query parameters take precedence over body parameters.

For certain ESPs which are less flexible about what can be defined in the POST body, Phrasee can map to the expected field names. This includes:

  • Iterable: When the body is received, dataFields.campaignId gets mapped to delivery_id, and email gets mapped to recipient_id.

Open Tracking Pixel in email

Where webhooks can't be used, opens can also be tracked by utilising the Open webhook as a 1x1 tracking pixel in an email. This involves adding an image to the HTML body of the email, with the webhook url as the value for the src property, for example:





Servers
http://{{webhookurl}}