Render Email
POST
/api/v1/workspaces/{workspace_id}/emails/{email_id}/locales/{locale}/render
const url = 'https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/emails/1/locales/example/render';const options = {method: 'POST', 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 POST \ --url https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/emails/1/locales/example/render \ --header 'Authorization: Bearer <token>'Renders an email for a specific locale, producing the final HTML, subject, and preheader.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”workspace_id
required
integer
Workspace ID
email_id
required
integer
Email ID
locale
required
string
Locale code
Responses
Section titled “Responses”Successful
Media typeapplication/json
object
html
required
The rendered HTML of the email
string
subject
required
The rendered subject line of the email
string
preheader
required
The rendered preheader text of the email
string
Example
{ "html": "<html><body><h1>Hello, world!</h1></body></html>", "subject": "Hello, world!", "preheader": "Hello, world!"}Unauthorized
Media typeapplication/json
object
message
required
string
Example
{ "message": "Record not found"}Not Found
Media typeapplication/json
object
message
required
string
Example
{ "message": "Record not found"}Validation Error
Media typeapplication/json
object
message
required
string
errors
required
object
key
additional properties
any
Example
{ "message": "Validation failed"}