Skip to main content
POST
/
v1
/
my
/
templates
/
preview
Render an email design to HTML
curl --request POST \
  --url https://api.nitrosend.com/v1/my/templates/preview \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "document": {
    "sections": [
      {
        "type": "header",
        "props": {},
        "styles": {
          "background_color": "<string>",
          "padding": "<string>",
          "align": "left"
        }
      }
    ],
    "theme": {
      "brand_color": "<string>",
      "bg_color": "<string>",
      "text_color": "<string>",
      "font_body": "<string>",
      "font_heading": "<string>",
      "logo_url": "<string>"
    }
  }
}
'
{
  "html": "<string>"
}

Authorizations

Authorization
string
header
required

API key (nskey_live_...) or JWT token. API key is checked first; if not found, falls back to Devise JWT authentication.

Body

application/json
document
object
required

Email template design document

Response

Rendered HTML

html
string