Preview a promotion's rendered HTML
GET
/api/v3/promotions/{promotionCollateralUid}/preview
const url = 'https://api.tryletterhead.com/api/v3/promotions/example/preview?api=true&esp=1';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/preview?api=true&esp=1' \ --header 'Authorization: Bearer <token>'Render a single promotionβs HTML for a specific ESP and return it directly as text/html (not
the usual JSON envelope) β used to preview exactly what the promotion will look like once
embedded in a send for that ESP.
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 to preview
Query Parameters
Section titled βQuery Parameters β api
required
boolean
When set to true, the endpoint accepts authorization with your API Key.
esp
required
integer
ESP id to render for. Only 1 (Mailchimp) and 5 (Constant Contact) are supported by this endpoint.
Responses
Section titled β Responses β200 OK β rendered HTML
Media type text/html
string
Still can’t find what you need? Contact support.