Download a promotion's letter metrics as CSV
GET
/api/v3/promotions/{promotionCollateralUid}/metrics/download
const url = 'https://api.tryletterhead.com/api/v3/promotions/example/metrics/download?api=true';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.tryletterhead.com/api/v3/promotions/example/metrics/download?api=true' \ --header 'Authorization: Bearer <token>'Download a CSV export of the per-letter metrics (impressions, clicks) for every letter that has
used this promotion β the same data shown nested under letters on Get a promotion, as a
file download rather than JSON.
v3 endpoints expect a company API key.
Authorizations
Section titled βAuthorizations βParameters
Section titled β Parameters βPath Parameters
Section titled βPath Parameters β promotionCollateralUid
required
string
UUID of the promotion whose metrics to export
Query Parameters
Section titled βQuery Parameters β api
required
boolean
When set to true, the endpoint accepts authorization with your API Key.
Responses
Section titled β Responses β200 OK β CSV file download
Media type text/csv
string format: binary
Still can’t find what you need? Contact support.