Preview a branded customer email
GET
/customer-email/preview
const url = 'https://example.com/customer-email/preview';const options = { method: 'GET', headers: {cookie: '__Host-bottle.session_token=<__Host-bottle.session_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://example.com/customer-email/preview \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token>Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”HTML and plain-text preview
Media typeapplication/json
object
html
required
string
text
required
string
Example generated
{ "html": "example", "text": "example"}Not signed in
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Not permitted
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Domain already in use or must be disconnected first
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Invalid settings
Media typeapplication/json
object
error
required
string
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}