HomeGuidesAPI Reference
ChangelogHelp CenterCommunityContact Us
API Reference
These docs are for a deprecated API version. Click here to use the latest version.

Create Template Render

Render a template with the given template ID and context attribute. Returns the HTML and plain text versions of the email template.

Request body parameters (nested under attributes):

  • return_fields: Request specific fields using sparse fieldsets.
  • context: This is the context your email template will be rendered with. You must pass in a context object as a JSON object.

Email templates are rendered with contexts in a similar manner to Django templates. Nested template variables can be referenced via dot notation. Template variables without corresponding context values are treated as FALSE and output nothing.

Ex. { "name" : "George Washington", "state" : "VA" }

Rate limits:
Burst: 3/s
Steady: 60/m

Scopes:
Templates Read

Body Params
object
required
string
required
object
required
string
required

The ID of template

object
required

The context for the template render. This must be a JSON object which has values for any tags used in the template. See this doc for more details.

string
array of strings

Provide fields to limit the returned data

return_fields
Headers
string
required
Defaults to 2023-01-24

API endpoint revision (format: YYYY-MM-DD[.suffix])

Responses

Language
Credentials