Online
Bento

Email Templates

Email templates hold a subject line, HTML content, and performance stats like open and click rates. They are used in sequences, workflows, and broadcasts. Use this API to fetch template details and update template content.

Available Endpoints

The Email Template Model

The email template model represents a reusable email with its content and performance statistics.

Properties

  • Name
    idinteger
    Description

    The unique identifier for the template

  • Name
    namestring
    Description

    The name of the template

  • Name
    subjectstring
    Description

    The email subject line

  • Name
    htmlstring
    Description

    The HTML content of the email

  • Name
    created_atdatetime
    Description

    When the template was created

  • Name
    statsobject
    Description

    Performance statistics including open_rate and click_rate


GET/v1/fetch/emails/templates/:id

Get Email Template

Retrieves a single email template by its ID, including the full HTML content and performance statistics.

Path Parameters

  • Name
    idintegerRequired
    Description

    The template ID

Query Parameters

  • Name
    site_uuidstringRequired
    Description

    Your site's unique identifier



Response

Returns the email template with its full content and stats.

  • Name
    data.idinteger
    Description

    Email template ID.

  • Name
    data.typestring
    Description

    Resource type, typically email_template.

  • Name
    data.attributes.namestring
    Description

    Template name.

  • Name
    data.attributes.subjectstring
    Description

    Template subject line.

  • Name
    data.attributes.htmlstring
    Description

    Template HTML.

  • Name
    data.attributes.statsobject|null
    Description

    Performance stats when available.


PATCH/v1/fetch/emails/templates/:id

Update Email Template

Updates an existing email template. You can update the subject line, HTML content, or both.

Path Parameters

  • Name
    idintegerRequired
    Description

    The template ID

Query Parameters

  • Name
    site_uuidstringRequired
    Description

    Your site's unique identifier

Request Body

  • Name
    email_template.subjectstring
    Description

    The new email subject line (optional)

  • Name
    email_template.htmlstring
    Description

    The new HTML content (optional)



Response

Returns the updated email template.

  • Name
    data.idinteger
    Description

    Updated email template ID.

  • Name
    data.attributes.subjectstring
    Description

    Updated subject line.

  • Name
    data.attributes.htmlstring
    Description

    Updated HTML content.