Email Templates

Browse the email templates available for newsletters. Newsletter html_content is rendered into the template's {{ content }} slot when an email_template_id is provided.

GET/api/v1/email-templates

List email templates for the authenticated client. Returns active templates by default; pass ?archived=true for archived templates.

Response Fields

idinteger

The template ID.

namestring

The template display name.

html_contentstring

The HTML wrapper. Newsletter html_content is rendered into the {{ content }} slot.

is_defaultboolean

True when this template is the account default.

is_systemboolean

True when this is a system-provided template (no client_id).

archived_atstring|null

ISO 8601 timestamp when archived, or null.

created_atstring

ISO 8601 creation timestamp.

updated_atstring

ISO 8601 last update timestamp.

Request

curl -X GET \
  "https://byomailer.com/api/v1/email-templates" \
  -H "Authorization: Bearer {your-api-token}" \
  -H "Accept: application/json"

Response

200
{
  "data": [
    {
      "id": 1,
      "name": "Default wrapper",
      "html_content": "<table>...{{ content }}...</table>",
      "is_default": true,
      "is_system": false,
      "archived_at": null,
      "created_at": "2024-02-01T08:00:00.000000Z",
      "updated_at": "2024-02-01T08:00:00.000000Z"
    }
  ],
  "meta": {
    "path": "https://byomailer.com/api/v1/email-templates",
    "per_page": 25,
    "next_cursor": null,
    "prev_cursor": null
  }
}
GET/api/v1/email-templates/default

Get the active default email template for the authenticated client. Returns {"data": null} when no default is set.

Response Fields

idinteger

The template ID.

namestring

The template display name.

html_contentstring

The HTML wrapper. Newsletter html_content is rendered into the {{ content }} slot.

is_defaultboolean

True when this template is the account default.

is_systemboolean

True when this is a system-provided template (no client_id).

archived_atstring|null

ISO 8601 timestamp when archived, or null.

created_atstring

ISO 8601 creation timestamp.

updated_atstring

ISO 8601 last update timestamp.

Request

curl -X GET \
  "https://byomailer.com/api/v1/email-templates/default" \
  -H "Authorization: Bearer {your-api-token}" \
  -H "Accept: application/json"

Response

200
{
  "data": {
    "id": 1,
    "name": "Default wrapper",
    "html_content": "<table>...{{ content }}...</table>",
    "is_default": true,
    "is_system": false,
    "archived_at": null,
    "created_at": "2024-02-01T08:00:00.000000Z",
    "updated_at": "2024-02-01T08:00:00.000000Z"
  }
}
GET/api/v1/email-templates/{emailTemplateId}

Get a single email template by ID.

Path Parameters

emailTemplateIdinteger
required

The template ID.

Response Fields

idinteger

The template ID.

namestring

The template display name.

html_contentstring

The HTML wrapper. Newsletter html_content is rendered into the {{ content }} slot.

is_defaultboolean

True when this template is the account default.

is_systemboolean

True when this is a system-provided template (no client_id).

archived_atstring|null

ISO 8601 timestamp when archived, or null.

created_atstring

ISO 8601 creation timestamp.

updated_atstring

ISO 8601 last update timestamp.

Request

curl -X GET \
  "https://byomailer.com/api/v1/email-templates/{emailTemplateId}" \
  -H "Authorization: Bearer {your-api-token}" \
  -H "Accept: application/json"

Response

200
{
  "data": {
    "id": 1,
    "name": "Default wrapper",
    "html_content": "<table>...{{ content }}...</table>",
    "is_default": true,
    "is_system": false,
    "archived_at": null,
    "created_at": "2024-02-01T08:00:00.000000Z",
    "updated_at": "2024-02-01T08:00:00.000000Z"
  }
}
BYOMailer

© 2026 All rights reserved.