Menu

API reference · Email Marketing

Templates

email_marketing · templates · 7 operations

GET/v1/email-marketing/templates

List email templates

email_marketing.templates.list

ReadIdempotentSince 2026-11-01

Lists the organization's email templates, most recently updated first, paginated by cursor: name, subject, description, preview text, editor (legacy rich text or builder), format (always: html with the brand layout, or text for a personal-style email), category and labels. Filter by label_id (the page is completed up to limit). The content and design are not included: use email_marketing.templates.get. Requires view access to Email Marketing.

Scope
email_marketing:read
Permission
View the module
MCP tool
email_marketing_templates_listOn the full surface; on the compact one, mb_execute_operation with id: "email_marketing.templates.list".

Declared cost: up to 601 reads and 0 writes per call (they count against the daily quota).

Parameters

limitintegerqueryoptional

How many items this page brings at most (see the maximum and the default in the schema).

Default: 50

cursorstringqueryoptional

The next_cursor of the previous page, exactly as it came (only for the same list and filters); without it, the first page.

label_idstringqueryoptional

Only the templates with this label (its id).

Response

dataarray<object>
has_moreboolean
next_cursorstring

Errors

Example

curl "https://api.mb-suite.com/v1/email-marketing/templates" \
  -H "Authorization: Bearer $MB_API_KEY"

Try it with your test API key

With a test API key the request always goes to your practice organization: example data you can reset.

curl "https://api.mb-suite.com/v1/email-marketing/templates" \
  -H "Authorization: Bearer $MB_TEST_KEY"
GET/v1/email-marketing/templates/{template_id}

Get one email template

email_marketing.templates.get

ReadIdempotentSince 2026-11-01

Returns a template with its content: content (the rich-text HTML of the legacy editor) and html_content (the complete email HTML, present for builder templates). design (the builder document, keys kept as the builder writes them; it repeats the HTML inside its blocks) comes only with include_design: true. Use html_content (or content) as a campaign's html_content. Not found (email_template_not_found) if it is not a template of this organization. Requires view access to Email Marketing.

Scope
email_marketing:read
Permission
View the module
MCP tool
email_marketing_templates_getOn the full surface; on the compact one, mb_execute_operation with id: "email_marketing.templates.get".

Declared cost: up to 1 reads and 0 writes per call (they count against the daily quota).

Parameters

template_idstringpathrequired

The template's id (from email_marketing.templates.list).

include_designbooleanqueryoptional

Also return the visual editor's document (design). Default false through the API: html_content already has the email.

Response

idstring
namestring
descriptionstring | null
subjectstring | null
preview_textstring | null
contentstring | null
html_contentstring | null
designobject | null
editor_versionstring | null
formatstring | null
content_categorystring | null
variablesarray<string> | null
label_idsarray<string> | null
created_bystring | null
created_atnumber | null
updated_atnumber | null

Errors

Example

curl "https://api.mb-suite.com/v1/email-marketing/templates/{template_id}" \
  -H "Authorization: Bearer $MB_API_KEY"

Try it with your test API key

With a test API key the request always goes to your practice organization: example data you can reset.

curl "https://api.mb-suite.com/v1/email-marketing/templates/{template_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/email-marketing/templates

Create an email template

email_marketing.templates.create

WriteSince 2026-11-01

Creates a template with a name, subject and content: HTML in content (and optionally a complete email in html_content), or a builder document in design (its HTML is generated on the server when html_content is not sent). format text sends it as a personal-style email without the brand layout. Variables available when sending: {{nombre}}, {{email}}, {{unsubscribe_url}}, {{unsubscribe_text}}, {{company_name}}, {{email_footer_address}}. Returns template_id. Error: design_invalid. Requires full access to Email Marketing.

Scope
email_marketing:write
Permission
Edit in the module
MCP tool
email_marketing_templates_createOn the full surface; on the compact one, mb_execute_operation with id: "email_marketing.templates.create".

Declared cost: up to 0 reads and 1 writes per call (they count against the daily quota).

Parameters

namestringbodyrequired

The template's name.

subjectstringbodyrequired

The default subject of the emails that use it.

contentstringbodyoptional

The HTML (legacy editor).

Default: ""

descriptionstringbodyoptional

Internal description.

preview_textstringbodyoptional

The preview line after the subject.

variablesarray<string>bodyoptional

The merge variables it uses, e.g. first_name.

designobjectbodyoptional

The visual editor's document (settings and sections of blocks): the server renders the HTML from it and the template becomes a builder one.

html_contentstringbodyoptional

The rendered HTML (with design, the server renders it).

editor_versionenumbodyoptional

legacy (HTML editor) or builder (visual editor).

Values: legacy, builder

content_categoryenumbodyoptional

marketing (default; with unsubscribe link) or transactional.

Values: marketing, transactional

formatenumbodyoptional

html (default; the brand layout) or text (a personal-style email).

Values: html, text

label_idsarray<string>bodyoptional

Template labels of the app (their ids, up to 50).

Response

template_idstring

Errors

Example

curl -X POST "https://api.mb-suite.com/v1/email-marketing/templates" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "name": "NAME",
  "subject": "SUBJECT"
}'

Try it with your test API key

With a test API key the request always goes to your practice organization: example data you can reset.

curl -X POST "https://api.mb-suite.com/v1/email-marketing/templates" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "name": "NAME",
  "subject": "SUBJECT"
}'
PATCH/v1/email-marketing/templates/{template_id}

Update an email template

email_marketing.templates.update

WriteIdempotentSince 2026-11-01

Updates one or more fields of a template: name, description, subject, preview text, content, html_content, format, category or labels. Sending design (the builder document) saves it, regenerates html_content on the server and marks the template as a builder template. Campaigns already created keep their own copy of the HTML; flow steps use the template as it is when each email is sent. Returns the updated template. Error: design_invalid. Requires full access to Email Marketing.

Scope
email_marketing:write
Permission
Edit in the module
MCP tool
email_marketing_templates_updateOn the full surface; on the compact one, mb_execute_operation with id: "email_marketing.templates.update".

Declared cost: up to 1 reads and 1 writes per call (they count against the daily quota).

Parameters

template_idstringpathrequired

The template's id (from email_marketing.templates.list).

updatesobjectbodyrequired

The fields to change.

Response

templateobject

Errors

Example

curl -X PATCH "https://api.mb-suite.com/v1/email-marketing/templates/{template_id}" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "updates": {}
}'

Try it with your test API key

With a test API key the request always goes to your practice organization: example data you can reset.

curl -X PATCH "https://api.mb-suite.com/v1/email-marketing/templates/{template_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "updates": {}
}'
POST/v1/email-marketing/templates/{template_id}/duplicate

Duplicate an email template

email_marketing.templates.duplicate

WriteSince 2026-11-01

Copies a template (content, design, format and labels) into a new one named '<name> (copia)'. Returns the new template_id. Requires full access to Email Marketing.

Scope
email_marketing:write
Permission
Edit in the module
MCP tool
email_marketing_templates_duplicateOn the full surface; on the compact one, mb_execute_operation with id: "email_marketing.templates.duplicate".

Declared cost: up to 1 reads and 1 writes per call (they count against the daily quota).

Parameters

template_idstringpathrequired

The template's id (from email_marketing.templates.list).

Response

template_idstring

Errors

Example

curl -X POST "https://api.mb-suite.com/v1/email-marketing/templates/{template_id}/duplicate" \
  -H "Authorization: Bearer $MB_API_KEY"

Try it with your test API key

With a test API key the request always goes to your practice organization: example data you can reset.

curl -X POST "https://api.mb-suite.com/v1/email-marketing/templates/{template_id}/duplicate" \
  -H "Authorization: Bearer $MB_TEST_KEY"
DELETE/v1/email-marketing/templates/{template_id}

Delete an email template

email_marketing.templates.delete

IrreversibleSince 2026-11-01

Deletes a template unless a step of an active, draft or paused flow uses it (email_template_in_use, with the flow name: change that step first). Campaigns keep their own copy of the HTML. It goes to the 30-day trash. Outside the screen it requires a dry run and a confirm_token, or a REST DELETE. Requires full access to Email Marketing.

With an API key, this DELETE runs directly: the record stays 30 days in the trash and the response carries its trash_item_id. With an OAuth token, and through the MCP, it needs dry_run → confirm_token.

Scope
email_marketing:write and “Allow deletions” (email_marketing:delete in OAuth)
Permission
Edit in the module
MCP tool
email_marketing_templates_deleteOn the full surface; on the compact one, mb_execute_operation with id: "email_marketing.templates.delete".

Declared cost: up to 502 reads and 2 writes per call (they count against the daily quota).

Parameters

template_idstringpathrequired

The template's id (from email_marketing.templates.list).

Response

oktrue
trash_item_idstring

The trash item this deletion left: the item_id of platform.trash.restore (POST /trash/{item_id}/restore). Missing if nothing went to the trash.

trash_item_idsarray<string>

Only when the deletion left more than one copy: all of them, the first being trash_item_id.

trash_expires_atnumber

When the copy leaves the trash for good (epoch ms): 30 days after the deletion.

Errors

Example

curl -X DELETE "https://api.mb-suite.com/v1/email-marketing/templates/{template_id}" \
  -H "Authorization: Bearer $MB_API_KEY"

Try it with your test API key

With a test API key the request always goes to your practice organization: example data you can reset.

curl -X DELETE "https://api.mb-suite.com/v1/email-marketing/templates/{template_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/email-marketing/templates/{template_id}/send-test

Send a test of an email template (a real email through Amazon SES)

email_marketing.templates.send_test

WriteSince 2026-11-01

Sends ONE real test email of a template to one address (subject prefixed with [TEST], test values for {{nombre}} and the other variables, an unsubscribe link that does nothing) through Amazon SES. With an API key or an app it needs the account's verified sending domain and a sender on it (email_domain_not_verified, email_sender_missing). Outside the app it always runs in two steps: dry_run=true runs the same checks and says to whom, from which sender and with which subject it would go, with a confirm_token (10 minutes); then call it again with the confirm_token. Not idempotent: every call sends another email. Returns sent and to. Errors: email_invalid, email_template_empty, email_sending_paused (MB Suite paused the account's email sending: not even a test goes out until it is resumed). Requires full access to Email Marketing.

Needs confirmation: first dry_run: true (preview and confirm_token, valid 10 minutes and for one run), then the same body with confirm_token. In a few operations only with certain data: the description says when. Why and how: Dry run and confirm_token.

Scope
email_marketing:write
Permission
Edit in the module
MCP tool
email_marketing_templates_send_testOn the full surface; on the compact one, mb_execute_operation with id: "email_marketing.templates.send_test".

Declared cost: up to 2 reads and 0 writes per call (they count against the daily quota). Touches an external platform (ses): it counts against the external operations quota.

Parameters

template_idstringpathrequired

The template's id (from email_marketing.templates.list).

tostringbodyrequired

Where the test goes (your own address).

Response

senttrue
tostring

Errors

Example

curl -X POST "https://api.mb-suite.com/v1/email-marketing/templates/{template_id}/send-test" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "to": "TO",
  "dry_run": true
}'

Try it with your test API key

With a test API key the request always goes to your practice organization: example data you can reset. In the practice organization this operation is not simulated (it reaches another platform): it answers 409 sandbox_external_unavailable.