Menú

Referencia de la API · Email Marketing

Plantillas

email_marketing · templates · 7 operaciones

GET/v1/email-marketing/templates

List email templates

email_marketing.templates.list

LecturaIdempotenteDesde 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.

Alcance
email_marketing:read
Permiso
Ver el módulo
Tool del MCP
email_marketing_templates_listEn la superficie completa; en la compacta, mb_execute_operation con id: "email_marketing.templates.list".

Costo declarado: hasta 601 lecturas y 0 escrituras por llamada (cuentan en el cupo diario).

Parámetros

limitintegerqueryopcional

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

Por defecto: 50

cursorstringqueryopcional

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

label_idstringqueryopcional

Only the templates with this label (its id).

Respuesta

dataarray<object>
has_moreboolean
next_cursorstring

Errores

Ejemplo

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

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes reiniciar.

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

LecturaIdempotenteDesde 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.

Alcance
email_marketing:read
Permiso
Ver el módulo
Tool del MCP
email_marketing_templates_getEn la superficie completa; en la compacta, mb_execute_operation con id: "email_marketing.templates.get".

Costo declarado: hasta 1 lecturas y 0 escrituras por llamada (cuentan en el cupo diario).

Parámetros

template_idstringrutarequerido

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

include_designbooleanqueryopcional

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

Respuesta

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

Errores

Ejemplo

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

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes reiniciar.

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

EscrituraDesde 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.

Alcance
email_marketing:write
Permiso
Editar en el módulo
Tool del MCP
email_marketing_templates_createEn la superficie completa; en la compacta, mb_execute_operation con id: "email_marketing.templates.create".

Costo declarado: hasta 0 lecturas y 1 escrituras por llamada (cuentan en el cupo diario).

Parámetros

namestringcuerporequerido

The template's name.

subjectstringcuerporequerido

The default subject of the emails that use it.

contentstringcuerpoopcional

The HTML (legacy editor).

Por defecto: ""

descriptionstringcuerpoopcional

Internal description.

preview_textstringcuerpoopcional

The preview line after the subject.

variablesarray<string>cuerpoopcional

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

designobjectcuerpoopcional

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_contentstringcuerpoopcional

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

editor_versionenumcuerpoopcional

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

Valores: legacy, builder

content_categoryenumcuerpoopcional

marketing (default; with unsubscribe link) or transactional.

Valores: marketing, transactional

formatenumcuerpoopcional

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

Valores: html, text

label_idsarray<string>cuerpoopcional

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

Respuesta

template_idstring

Errores

Ejemplo

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"
}'

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes reiniciar.

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

EscrituraIdempotenteDesde 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.

Alcance
email_marketing:write
Permiso
Editar en el módulo
Tool del MCP
email_marketing_templates_updateEn la superficie completa; en la compacta, mb_execute_operation con id: "email_marketing.templates.update".

Costo declarado: hasta 1 lecturas y 1 escrituras por llamada (cuentan en el cupo diario).

Parámetros

template_idstringrutarequerido

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

updatesobjectcuerporequerido

The fields to change.

Respuesta

templateobject

Errores

Ejemplo

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": {}
}'

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes reiniciar.

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

EscrituraDesde 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.

Alcance
email_marketing:write
Permiso
Editar en el módulo
Tool del MCP
email_marketing_templates_duplicateEn la superficie completa; en la compacta, mb_execute_operation con id: "email_marketing.templates.duplicate".

Costo declarado: hasta 1 lecturas y 1 escrituras por llamada (cuentan en el cupo diario).

Parámetros

template_idstringrutarequerido

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

Respuesta

template_idstring

Errores

Ejemplo

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

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes reiniciar.

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

IrreversibleDesde 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.

Con una API key, este DELETE se ejecuta directo: el registro queda 30 días en la papelera y la respuesta trae su trash_item_id. Con un token OAuth, y por el MCP, pide dry_run → confirm_token.

Alcance
email_marketing:write y «Permitir eliminar» (email_marketing:delete en OAuth)
Permiso
Editar en el módulo
Tool del MCP
email_marketing_templates_deleteEn la superficie completa; en la compacta, mb_execute_operation con id: "email_marketing.templates.delete".

Costo declarado: hasta 502 lecturas y 2 escrituras por llamada (cuentan en el cupo diario).

Parámetros

template_idstringrutarequerido

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

Respuesta

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.

Errores

Ejemplo

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

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes reiniciar.

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

EscrituraDesde 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.

Pide confirmación: primero dry_run: true (vista previa y confirm_token, que vale 10 minutos y una sola vez), después el mismo cuerpo con confirm_token. En unas pocas, solo con ciertos datos: la descripción dice cuándo. Por qué y cómo: Vista previa y confirmación.

Alcance
email_marketing:write
Permiso
Editar en el módulo
Tool del MCP
email_marketing_templates_send_testEn la superficie completa; en la compacta, mb_execute_operation con id: "email_marketing.templates.send_test".

Costo declarado: hasta 2 lecturas y 0 escrituras por llamada (cuentan en el cupo diario). Toca una plataforma externa (ses): cuenta en el cupo de operaciones externas.

Parámetros

template_idstringrutarequerido

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

tostringcuerporequerido

Where the test goes (your own address).

Respuesta

senttrue
tostring

Errores

Ejemplo

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
}'

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes reiniciar. En la práctica esta operación no se simula (toca otra plataforma): responde 409 sandbox_external_unavailable.