Skip to content

Render Email

POST
/api/v1/workspaces/{workspace_id}/emails/{email_id}/locales/{locale}/render
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.

workspace_id
required
integer

Workspace ID

email_id
required
integer

Email ID

locale
required
string

Locale code

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"
}