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
    id
    Type
    integer
    Description

    The unique identifier for the template

  • Name
    name
    Type
    string
    Description

    The name of the template

  • Name
    subject
    Type
    string
    Description

    The email subject line

  • Name
    html
    Type
    string
    Description

    The HTML content of the email

  • Name
    created_at
    Type
    datetime
    Description

    When the template was created

  • Name
    stats
    Type
    object
    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
    id
    Type
    integer
    Description

    The template ID

Query Parameters

  • Name
    site_uuid
    Type
    string
    Description

    Your site's unique identifier



Response

Returns the email template with its full content and stats.

  • Name
    data.id
    Type
    integer
    Description

    Email template ID.

  • Name
    data.type
    Type
    string
    Description

    Resource type, typically email_template.

  • Name
    data.attributes.name
    Type
    string
    Description

    Template name.

  • Name
    data.attributes.subject
    Type
    string
    Description

    Template subject line.

  • Name
    data.attributes.html
    Type
    string
    Description

    Template HTML.

  • Name
    data.attributes.stats
    Type
    object|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
    id
    Type
    integer
    Description

    The template ID

Query Parameters

  • Name
    site_uuid
    Type
    string
    Description

    Your site's unique identifier

Request Body

  • Name
    email_template.subject
    Type
    string
    Description

    The new email subject line (optional)

  • Name
    email_template.html
    Type
    string
    Description

    The new HTML content (optional)



Response

Returns the updated email template.

  • Name
    data.id
    Type
    integer
    Description

    Updated email template ID.

  • Name
    data.attributes.subject
    Type
    string
    Description

    Updated subject line.

  • Name
    data.attributes.html
    Type
    string
    Description

    Updated HTML content.

Was this page useful?

Your answer helps us find docs that need work.