Skip to content

API overview and authentication

The Maiilo API lets your application fetch your email templates. It always returns a template’s published version: the exact HTML, subject and variables frozen when you last published, never the draft you are editing.

The API is read-only, and available on every plan.

  • The published version of a template, stored when you pressed Publish. The API does not render the template on request, so the same version returns the same bytes every time.
  • Editing the draft or a shared block does not change the response. Only publishing does. See What the API and SendGrid serve.
  • A template that has never been published returns 404 with {"error":"template_not_published"}.
https://app.maiilo.io/api/v1

Endpoints:

GET https://app.maiilo.io/api/v1/templates/:id
GET https://app.maiilo.io/api/v1/templates/:id?format=html
GET https://app.maiilo.io/api/v1/templates/:id?format=variables

See Get template by ID for the full reference.

Every request needs an API key, sent as a bearer token in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Create and delete keys on the API keys page in the app. Free includes 1 key and Pro includes 5.

A request with no key or an unknown key gets a 401. See Errors.

Maiilo does not send email. A typical integration:

  1. Fetch the template from the API, or cache it and refresh it when you publish.
  2. Replace the {{variables}} with your data. ?format=variables tells you which variables a template expects.
  3. Send the HTML and subject with your email provider, such as SendGrid, Amazon SES, Postmark or Resend.

If you send with SendGrid, you can skip the API: Maiilo can push the published version into SendGrid as a dynamic template, and tells you when SendGrid falls behind your latest publish (Pro). See SendGrid.

Each plan includes a number of API requests per month: 100 on Free and 10,000 on Pro. See Limits and quotas.

Email [email protected].