Menu

Referência da API · Email Marketing

Flows

email_marketing · flows · 19 operações

GET/v1/email-marketing/flows

List email flows

email_marketing.flows.list

LeituraIdempotenteDesde 2026-11-01

Lists the organization's email flows (automated sequences of emails, delays, conditions, label actions and internal notifications), most recently updated first, paginated by cursor. Filter by status (draft, active, paused, archived) or trigger (manual, audience_sync, event). Filters apply to the page read, so a page can bring fewer than limit while has_more is true: follow next_cursor until has_more is false. Steps are not included: use email_marketing.flows.get. Requires view access to Email Marketing.

Escopo
email_marketing:read
Permissão
Ver o módulo
Tool do MCP
email_marketing_flows_listNa superfície completa; na compacta, mb_execute_operation com id: "email_marketing.flows.list".

Custo declarado: até 202 leituras e 0 escritas por chamada (contam na cota diária).

Parâmetros

limitintegerqueryopcional

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

Padrão: 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.

statusenumqueryopcional

Only flows in this status: draft, active, paused or archived.

Valores: draft, active, paused, archived

triggerenumqueryopcional

Only flows with this trigger: manual, audience_sync or event.

Valores: manual, audience_sync, event

Resposta

dataarray<object>
has_moreboolean
next_cursorstring

Erros

Exemplo

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

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

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

Get one email flow with its steps

email_marketing.flows.get

LeituraIdempotenteDesde 2026-11-01

Returns a flow (trigger, status, re-entry policy, send window, exit conditions, linked audiences, step and enrollment counters) with all its steps in reading order, as the canvas shows them: the main branch by order and, right after each condition step, its yes branch and then its no branch (each by order, nested). Condition steps branch into cond_<stepId>_yes / cond_<stepId>_no (their yes_branch_id and no_branch_id; each step says its branch_id). Use it before editing steps or enrolling contacts. Not found (email_flow_not_found) if the id is not a flow of this organization. Requires view access to Email Marketing.

Escopo
email_marketing:read
Permissão
Ver o módulo
Tool do MCP
email_marketing_flows_getNa superfície completa; na compacta, mb_execute_operation com id: "email_marketing.flows.get".

Custo declarado: até 201 leituras e 0 escritas por chamada (contam na cota diária).

Parâmetros

flow_idstringrotaobrigatório

The flow's id (from email_marketing.flows.list).

Resposta

idstring
namestring
triggerstring
statusstring
stepsarray<object>
descriptionstring | null
trigger_event_namestring | null
trigger_configobject | null
steps_countnumber | null
enrollment_countnumber | null
reentry_policystring | null
cooldown_daysnumber | null
send_window_startnumber | null
send_window_endnumber | null
send_timezonestring | null
exit_conditionsarray<object> | null
linked_audiencesarray<object> | null

The audiences whose new members enter the flow (audience_sync).

created_bystring | null
created_atnumber | null
updated_atnumber | null

Erros

Exemplo

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

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

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

Create an email flow

email_marketing.flows.create

EscritaDesde 2026-11-01

Creates a flow in draft with a name and a trigger: manual (contacts are enrolled by hand or by API), audience_sync (members of linked audiences are enrolled automatically) or event (contact_added or contact_labeled; trigger_event_name is required). Optionally seeds email and delay steps in order: an email step can name its template by template_id or by template_name (matched case-insensitively against the organization's templates, like the screen's flow templates). Nothing is sent: activate it later with email_marketing.flows.activate. Returns flow_id. Errors: trigger_event_required, email_template_not_found. Requires full access to Email Marketing.

Escopo
email_marketing:write
Permissão
Editar no módulo
Tool do MCP
email_marketing_flows_createNa superfície completa; na compacta, mb_execute_operation com id: "email_marketing.flows.create".

Custo declarado: até 1051 leituras e 51 escritas por chamada (contam na cota diária).

Parâmetros

namestringcorpoobrigatório

The flow's name.

triggerenumcorpoobrigatório

manual (contacts are enrolled by hand or by API), audience_sync (the members of linked audiences) or event (trigger_event_name).

Valores: manual, audience_sync, event

descriptionstringcorpoopcional

Internal description.

trigger_configobjectcorpoopcional

Extra settings of the trigger (small map; the app writes it).

trigger_event_nameenumcorpoopcional

With trigger event: contact_added or contact_labeled.

Valores: contact_added, contact_labeled

reentry_policyenumcorpoopcional

once (default), multiple or cooldown (again after cooldown_days).

Valores: once, multiple, cooldown

cooldown_daysintegercorpoopcional

With reentry_policy cooldown: days before the same contact can enter again.

send_window_startintegercorpoopcional

Emails go out only from this hour (0 to 24, in send_timezone).

send_window_endintegercorpoopcional

…and until this hour (0 to 24, in send_timezone).

send_timezonestringcorpoopcional

IANA time zone of the send window, e.g. America/Argentina/Buenos_Aires.

stepsarray<object>corpoopcional

The first steps (email and delay, up to 50), in order.

Resposta

flow_idstring

Erros

Exemplo

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

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

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

Update an email flow's settings

email_marketing.flows.update

EscritaIdempotenteDesde 2026-11-01

Updates one or more settings of a flow: name, description, trigger, trigger_config (for contact_labeled: { label_id, label_name }), trigger_event_name, send window (send_window_start/sendWindowEnd hours 0-24 and send_timezone), re-entry policy (once, multiple, cooldown with cooldown_days) and exit conditions (label_added with a contact label, or max_days). null clears a nullable field. Steps are edited with the email_marketing.flows.steps operations and the status with activate/pause/archive. Returns the updated flow. Requires full access to Email Marketing.

Escopo
email_marketing:write
Permissão
Editar no módulo
Tool do MCP
email_marketing_flows_updateNa superfície completa; na compacta, mb_execute_operation com id: "email_marketing.flows.update".

Custo declarado: até 1 leituras e 1 escritas por chamada (contam na cota diária).

Parâmetros

flow_idstringrotaobrigatório

The flow's id (from email_marketing.flows.list).

updatesobjectcorpoobrigatório

The fields to change.

Resposta

flowobject

Erros

Exemplo

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

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

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

Duplicate an email flow

email_marketing.flows.duplicate

EscritaDesde 2026-11-01

Copies a flow's settings and all its steps into a new draft flow named '<name> (copia)', without enrollments or linked audiences. The copy works like the original: the steps of each condition branch hang from the copied condition, and an 'opened the previous email' condition points to the copied email step. Returns the new flow_id. Requires full access to Email Marketing.

Escopo
email_marketing:write
Permissão
Editar no módulo
Tool do MCP
email_marketing_flows_duplicateNa superfície completa; na compacta, mb_execute_operation com id: "email_marketing.flows.duplicate".

Custo declarado: até 201 leituras e 201 escritas por chamada (contam na cota diária).

Parâmetros

flow_idstringrotaobrigatório

The flow's id (from email_marketing.flows.list).

Resposta

flow_idstring

Erros

Exemplo

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

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

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

Activate an email flow

email_marketing.flows.activate

EscritaIdempotenteDesde 2026-11-01

Turns a flow on: from then on its enrolled contacts receive its emails (the flow cron sends within minutes, inside the send window). Checks first that the organization has a verified sending domain and a mailing address (CAN-SPAM), that the flow has at least one email step and that every email step has a template, condition, label and notification steps are configured; «opened the previous email» conditions are pointed to the closest prior email of their branch. Idempotent: an active flow stays as is (changed false). Outside the app it always runs in two steps, because from then on it sends real emails: dry_run=true runs the same checks and says how many enrollments in progress start receiving, how people enter from then on (its trigger and linked audiences) and what is left of the monthly plan, with a confirm_token (10 minutes); then call it again with the confirm_token. Errors: email_domain_not_verified, email_footer_address_missing, email_sending_paused (MB Suite paused the account's email sending, details.kind bounce_rate or manual: while paused no flow sends and none can be activated), flow_without_email_step, flow_step_without_template, flow_steps_invalid (details.problems). Requires full access to Email Marketing.

Pede confirmação: primeiro dry_run: true (prévia e confirm_token, válido por 10 minutos e por uma única execução), depois o mesmo corpo com confirm_token. Em algumas poucas, só com certos dados: a descrição diz quando. Por que e como: Prévia e confirmação.

Escopo
email_marketing:write
Permissão
Editar no módulo
Tool do MCP
email_marketing_flows_activateNa superfície completa; na compacta, mb_execute_operation com id: "email_marketing.flows.activate".

Custo declarado: até 202 leituras e 201 escritas por chamada (contam na cota diária).

Parâmetros

flow_idstringrotaobrigatório

The flow's id (from email_marketing.flows.list).

Resposta

statusstring
changedboolean

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/email-marketing/flows/{flow_id}/activate" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "dry_run": true
}'

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl -X POST "https://api.mb-suite.com/v1/email-marketing/flows/{flow_id}/activate" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "dry_run": true
}'
POST/v1/email-marketing/flows/{flow_id}/pause

Pause an email flow

email_marketing.flows.pause

EscritaIdempotenteDesde 2026-11-01

Pauses an active flow: nothing is sent while it is paused and its enrollments wait where they are (they resume when the flow is activated again). Pausing an archived flow brings it back paused, without sending. Idempotent: a paused flow stays as is, and a draft (never active) stays a draft (changed false, status draft). Requires full access to Email Marketing.

Escopo
email_marketing:write
Permissão
Editar no módulo
Tool do MCP
email_marketing_flows_pauseNa superfície completa; na compacta, mb_execute_operation com id: "email_marketing.flows.pause".

Custo declarado: até 1 leituras e 1 escritas por chamada (contam na cota diária).

Parâmetros

flow_idstringrotaobrigatório

The flow's id (from email_marketing.flows.list).

Resposta

statusstring
changedboolean

Erros

Exemplo

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

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl -X POST "https://api.mb-suite.com/v1/email-marketing/flows/{flow_id}/pause" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/email-marketing/flows/{flow_id}/archive

Archive an email flow

email_marketing.flows.archive

EscritaIdempotenteDesde 2026-11-01

Archives a flow: it stops sending, it drops its linked audiences (no more automatic enrollment) and it no longer accepts enrollments; it keeps its steps and history. Activate it again to bring it back (audiences must be linked again). Idempotent. Use email_marketing.flows.delete to remove it. Requires full access to Email Marketing.

Escopo
email_marketing:write
Permissão
Editar no módulo
Tool do MCP
email_marketing_flows_archiveNa superfície completa; na compacta, mb_execute_operation com id: "email_marketing.flows.archive".

Custo declarado: até 1 leituras e 1 escritas por chamada (contam na cota diária).

Parâmetros

flow_idstringrotaobrigatório

The flow's id (from email_marketing.flows.list).

Resposta

statusstring
changedboolean

Erros

Exemplo

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

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

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

Delete an email flow

email_marketing.flows.delete

IrreversívelDesde 2026-11-01

Deletes a flow and all its enrollments (contacts in the middle of it stop receiving emails). The flow goes to the 30-day trash with its steps: restoring it brings it back paused if it was active, without its enrollments. Owners and admins only. Outside the screen it requires a dry run (which counts the enrollments) and a confirm_token, or a REST DELETE.

Com uma API key, este DELETE roda direto: o registro fica 30 dias na lixeira e a resposta traz o seu trash_item_id. Com um token OAuth, e pelo MCP, pede dry_run → confirm_token.

Escopo
email_marketing:write e «Permitir exclusões» (email_marketing:delete no OAuth)
Permissão
Editar no módulo · Só owner, admin
Tool do MCP
email_marketing_flows_deleteNa superfície completa; na compacta, mb_execute_operation com id: "email_marketing.flows.delete".

Custo declarado: até 5002 leituras e 5001 escritas por chamada (contam na cota diária).

Parâmetros

flow_idstringrotaobrigatório

The flow's id (from email_marketing.flows.list).

Resposta

oktrue
enrollments_deletednumber
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.

Erros

Exemplo

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

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

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

Add a step to an email flow

email_marketing.flows.steps.add

EscritaDesde 2026-11-01

Adds a step to a flow: email (template_id of an organization template, optional subject), delay (delay_minutes), condition (condition_config: has_label with label_id, in_audience with audience_id, or opened_previous; it creates two branches, cond_<step_id>_yes and cond_<step_id>_no, where later steps go with branch_id), label_action (add or remove a contact label) or notification (an internal email to a member: recipient_user_id must be a member of this account, otherwise it is skipped). Appended at the end of its branch (default main) or right after insert_after_step_id. A flow holds up to 200 steps. Returns step_id. Requires full access to Email Marketing.

Escopo
email_marketing:write
Permissão
Editar no módulo
Tool do MCP
email_marketing_flows_steps_addNa superfície completa; na compacta, mb_execute_operation com id: "email_marketing.flows.steps.add".

Custo declarado: até 203 leituras e 202 escritas por chamada (contam na cota diária).

Parâmetros

flow_idstringrotaobrigatório

The flow's id (from email_marketing.flows.list).

typeenumcorpoobrigatório

email, delay, condition (splits into a yes and a no branch), label_action or notification.

Valores: email, delay, condition, label_action, notification

template_idstringcorpoopcional

A template of email_marketing.templates.list (its id).

template_namestringcorpoopcional

The template's name as shown (resolved from template_id when missing).

subjectstringcorpoopcional

The email's subject (default: the template's).

delay_minutesnumbercorpoopcional

How long to wait, in minutes (up to a year: 525600).

condition_configobjectcorpoopcional

With type condition: what it checks.

label_action_configobjectcorpoopcional

With type label_action: which label to add or remove.

notification_configobjectcorpoopcional

With type notification: who gets the in-app notice and what it says.

branch_idstringcorpoopcional

main (default) or a branch of a condition: cond_<step_id>_yes or cond_<step_id>_no (its yes_branch_id / no_branch_id).

insert_after_step_idstringcorpoopcional

Insert after this step of the same branch (steps[].id); without it, at the end.

Resposta

step_idstring

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/email-marketing/flows/{flow_id}/steps" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "type": "email"
}'

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl -X POST "https://api.mb-suite.com/v1/email-marketing/flows/{flow_id}/steps" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "type": "email"
}'
PATCH/v1/email-marketing/flows/{flow_id}/steps/{step_id}

Update a step of an email flow

email_marketing.flows.steps.update

EscritaIdempotenteDesde 2026-11-01

Updates a step's template, subject, delay, condition, label action or notification (the fields of its type). It does not change the step type or its place: delete and add it again, or use email_marketing.flows.steps.reorder. Returns the updated step. Not found (email_flow_step_not_found) if the step is not in that flow. Requires full access to Email Marketing.

Escopo
email_marketing:write
Permissão
Editar no módulo
Tool do MCP
email_marketing_flows_steps_updateNa superfície completa; na compacta, mb_execute_operation com id: "email_marketing.flows.steps.update".

Custo declarado: até 3 leituras e 2 escritas por chamada (contam na cota diária).

Parâmetros

flow_idstringrotaobrigatório

The flow's id (from email_marketing.flows.list).

step_idstringrotaobrigatório

The step's id (from email_marketing.flows.get, steps[].id).

updatesobjectcorpoobrigatório

The fields to change (only the ones of the step's type).

Resposta

stepobject

Erros

Exemplo

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

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl -X PATCH "https://api.mb-suite.com/v1/email-marketing/flows/{flow_id}/steps/{step_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "updates": {}
}'
DELETE/v1/email-marketing/flows/{flow_id}/steps/{step_id}

Delete a step of an email flow

email_marketing.flows.steps.delete

IrreversívelDesde 2026-11-01

Deletes a step and renumbers its branch; deleting a condition also deletes every step of its two branches (and of the branches of a condition nested inside them). Enrollments sitting on a deleted step continue from the next one. Steps are not kept in the trash: add the step again if it was a mistake. Outside the screen it requires a dry run (it names the step and counts the branch steps that go with it) and a confirm_token. Returns deleted (the steps removed). Requires full access to Email Marketing.

Pede confirmação: primeiro dry_run: true (prévia e confirm_token, válido por 10 minutos e por uma única execução), depois o mesmo corpo com confirm_token. Em algumas poucas, só com certos dados: a descrição diz quando. Por que e como: Prévia e confirmação.

Escopo
email_marketing:write e «Permitir exclusões» (email_marketing:delete no OAuth)
Permissão
Editar no módulo
Tool do MCP
email_marketing_flows_steps_deleteNa superfície completa; na compacta, mb_execute_operation com id: "email_marketing.flows.steps.delete".

Custo declarado: até 202 leituras e 202 escritas por chamada (contam na cota diária).

Parâmetros

flow_idstringrotaobrigatório

The flow's id (from email_marketing.flows.list).

step_idstringrotaobrigatório

The step's id (from email_marketing.flows.get, steps[].id).

Resposta

deletednumber

Erros

Exemplo

curl -X DELETE "https://api.mb-suite.com/v1/email-marketing/flows/{flow_id}/steps/{step_id}" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "dry_run": true
}'

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl -X DELETE "https://api.mb-suite.com/v1/email-marketing/flows/{flow_id}/steps/{step_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "dry_run": true
}'
POST/v1/email-marketing/flows/{flow_id}/steps/reorder

Reorder the steps of an email flow

email_marketing.flows.steps.reorder

EscritaIdempotenteDesde 2026-11-01

Sets the order of a branch's steps: ordered_ids lists them in the new order (order 0, 1, 2…). Every id must be a step of the flow; steps not listed keep their order. Idempotent. Requires full access to Email Marketing.

Escopo
email_marketing:write
Permissão
Editar no módulo
Tool do MCP
email_marketing_flows_steps_reorderNa superfície completa; na compacta, mb_execute_operation com id: "email_marketing.flows.steps.reorder".

Custo declarado: até 201 leituras e 201 escritas por chamada (contam na cota diária).

Parâmetros

flow_idstringrotaobrigatório

The flow's id (from email_marketing.flows.list).

ordered_idsarray<string>corpoobrigatório

The step ids of one branch (steps[].id), in their new order.

Resposta

oktrue

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/email-marketing/flows/{flow_id}/steps/reorder" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "ordered_ids": [
    "ORDERED_ID"
  ]
}'

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl -X POST "https://api.mb-suite.com/v1/email-marketing/flows/{flow_id}/steps/reorder" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "ordered_ids": [
    "ORDERED_ID"
  ]
}'
GET/v1/email-marketing/flows/{flow_id}/enrollments

List the enrollments of an email flow

email_marketing.flows.enrollments.list

LeituraIdempotenteDesde 2026-11-01

Lists the contacts enrolled in a flow, newest first, paginated by cursor: email, name, status (active, paused, completed, cancelled, failed, exited), current step, next send time, how they entered (enrollment_source) and why they left (exit_reason, cancel_reason). Filter by status; the filter applies to the page read, so follow next_cursor until has_more is false. Requires view access to Email Marketing.

Escopo
email_marketing:read
Permissão
Ver o módulo
Tool do MCP
email_marketing_flows_enrollments_listNa superfície completa; na compacta, mb_execute_operation com id: "email_marketing.flows.enrollments.list".

Custo declarado: até 203 leituras e 0 escritas por chamada (contam na cota diária).

Parâmetros

flow_idstringrotaobrigatório

The flow's id (from email_marketing.flows.list).

limitintegerqueryopcional

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

Padrão: 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.

statusenumqueryopcional

Only enrollments in this status: active, completed, paused, cancelled, failed or exited.

Valores: active, completed, paused, cancelled, failed, exited

Resposta

dataarray<object>
has_moreboolean
next_cursorstring

Erros

Exemplo

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

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

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

Enroll one contact in an email flow

email_marketing.flows.enrollments.enroll

EscritaDesde 2026-11-01

Enrolls one email address (optionally with name and the contact_id of Contacts) in a flow: it starts at the first step of the main branch and, if the flow is active, its first email goes out within minutes (inside the send window) — unless MB Suite paused the account's email sending: then it waits until sending is resumed (the dry run says so). To enroll many, use email_marketing.flows.enrollments.enroll_audience. Outside the app it always runs in two steps, because in an active flow it starts real emails: dry_run=true runs the same checks (same errors) and says whether the flow is active (emails start within minutes) or the enrollment waits until it is activated, with a confirm_token (10 minutes); then call it again with the confirm_token. Errors: email_invalid, email_flow_archived, email_suppressed (unsubscribed, bounced or complained), already_enrolled (an active enrollment in this flow). Returns enrollment_id. Requires full access to Email Marketing.

Pede confirmação: primeiro dry_run: true (prévia e confirm_token, válido por 10 minutos e por uma única execução), depois o mesmo corpo com confirm_token. Em algumas poucas, só com certos dados: a descrição diz quando. Por que e como: Prévia e confirmação.

Escopo
email_marketing:write
Permissão
Editar no módulo
Tool do MCP
email_marketing_flows_enrollments_enrollNa superfície completa; na compacta, mb_execute_operation com id: "email_marketing.flows.enrollments.enroll".
Eventos que pode emitir
email_marketing.flow.enrolled

Custo declarado: até 204 leituras e 2 escritas por chamada (contam na cota diária).

Parâmetros

flow_idstringrotaobrigatório

The flow's id (from email_marketing.flows.list).

emailstringcorpoobrigatório

The contact's email.

namestringcorpoopcional

The contact's name (for {{first_name}} and the like).

contact_idstringcorpoopcional

The contact of Contacts, if there is one (contacts.contacts.list).

enrollment_sourceobjectcorpoopcional

Where the enrollment comes from (default manual).

Resposta

enrollment_idstring

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/email-marketing/flows/{flow_id}/enrollments" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "ana@example.com",
  "dry_run": true
}'

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl -X POST "https://api.mb-suite.com/v1/email-marketing/flows/{flow_id}/enrollments" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "ana@example.com",
  "dry_run": true
}'
POST/v1/email-marketing/flows/{flow_id}/enrollments/from-audience

Enroll an audience's current members in an email flow

email_marketing.flows.enrollments.enroll_audience

IrreversívelDesde 2026-11-01

Enrolls once every current member of an audience (a snapshot: people who join the audience later are not enrolled; for that, link it with email_marketing.flows.audiences.link). Skips invalid and repeated addresses, people already active in the flow and the suppression list. If the flow is active they start receiving its emails within minutes, counting against the email plan, and a sent email cannot be recalled; while MB Suite has the account's email sending paused they wait instead (the dry run says so). Irreversible: outside the app it always runs in two steps — dry_run=true returns the preview (how many enter, how many are left out and why, what is left of the monthly plan, the first recipients) and a confirm_token (10 minutes), then call it again with the same input and the confirm_token; the credential must allow irreversible operations (403 delete_not_allowed otherwise). Not idempotent: running it again enrolls those whose previous enrollment already ended. Returns enrolled and skipped. Errors: email_audience_not_found, email_flow_archived, audience_empty. Requires full access to Email Marketing.

Pede confirmação: primeiro dry_run: true (prévia e confirm_token, válido por 10 minutos e por uma única execução), depois o mesmo corpo com confirm_token. Em algumas poucas, só com certos dados: a descrição diz quando. Por que e como: Prévia e confirmação.

Escopo
email_marketing:write e «Permitir exclusões» (email_marketing:delete no OAuth)
Permissão
Editar no módulo
Tool do MCP
email_marketing_flows_enrollments_enroll_audienceNa superfície completa; na compacta, mb_execute_operation com id: "email_marketing.flows.enrollments.enroll_audience".
Eventos que pode emitir
email_marketing.flow.enrolled

Custo declarado: até 10000 leituras e 10000 escritas por chamada (contam na cota diária).

Parâmetros

flow_idstringrotaobrigatório

The flow's id (from email_marketing.flows.list).

audience_idstringcorpoobrigatório

The audience's id (from email_marketing.audiences.list).

Resposta

enrollednumber
skippednumber

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/email-marketing/flows/{flow_id}/enrollments/from-audience" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "audience_id": "AUDIENCE_ID",
  "dry_run": true
}'

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl -X POST "https://api.mb-suite.com/v1/email-marketing/flows/{flow_id}/enrollments/from-audience" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "audience_id": "AUDIENCE_ID",
  "dry_run": true
}'
POST/v1/email-marketing/flow-enrollments/{enrollment_id}/exit

Take a contact out of an email flow

email_marketing.flows.enrollments.exit

EscritaIdempotenteDesde 2026-11-01

Stops an active or paused enrollment: the contact receives nothing else from that flow (status cancelled, reason manual). Idempotent: an enrollment that already ended stays as is (changed false). It does not unsubscribe the address from other flows or campaigns: for that add it with email_marketing.suppressions.add. Requires full access to Email Marketing.

Escopo
email_marketing:write
Permissão
Editar no módulo
Tool do MCP
email_marketing_flows_enrollments_exitNa superfície completa; na compacta, mb_execute_operation com id: "email_marketing.flows.enrollments.exit".
Eventos que pode emitir
email_marketing.flow.exited

Custo declarado: até 2 leituras e 2 escritas por chamada (contam na cota diária).

Parâmetros

enrollment_idstringrotaobrigatório

The enrollment's id (from email_marketing.flows.enrollments.list).

Resposta

changedboolean
statusstring

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/email-marketing/flow-enrollments/{enrollment_id}/exit" \
  -H "Authorization: Bearer $MB_API_KEY"

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl -X POST "https://api.mb-suite.com/v1/email-marketing/flow-enrollments/{enrollment_id}/exit" \
  -H "Authorization: Bearer $MB_TEST_KEY"