Templates documentation

Getting started with Templates

Templates are the core of Templid. They are used to generate dynamic content based on your data.

Think about templates as a templating engine that allows you to create a template with variables (placeholders) that will be replaced with your dynamic data. To render a template, simply make an HTTP request to Templid's API with your data, and we will return the rendered content.

You don't need to worry about the templating engine, we take care of that for you. We store all the templates on our server, so you can create and manage them directly in Templid's dashboard. This way, you can easily update templates without changing your code, saving time on development and deployment.

You can create two types of templates: HTML and PDF.

HTML email templates

HTML templates are used to render email ready content.

Every template consists of:

  • Subject - the subject of the email.
  • HTML - the HTML content of the email.
  • Plain text - the plain text content of the email.

Each element can have placeholders that will be replaced with dynamic data.

PDF templates

PDFs are rendered from HTML templates. This means that you can create a PDF template using HTML and CSS.

In your HTML text, you can use placeholders to represent dynamic data. When rendering a PDF template, we will replace the placeholders with your data and generate a PDF file.

Our API allows you to render a PDF template and send it using SMTP with a single HTTP request.