Menu

Referência da API · Inbox

Regras

social_inbox · rules · 7 operações

GET/v1/social-inbox/rules

List Social Inbox automation rules

social_inbox.rules.list

LeituraIdempotenteDesde 2026-11-01

Lists the inbox automation rules in evaluation order (order: the first enabled rule that replies wins), with their conditions (schedule included) and actions (a legacy rule shows its reply as an action), and broken_actions: the actions that cannot work today because what they use is gone (a deleted saved reply, an archived AI Community Manager, a member who left, deleted labels or CRM source). Rules only act on new incoming items of the last 24 hours. Requires view access to the Social Inbox.

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

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

Parâmetros

Sem parâmetros.

Resposta

dataarray<object>

Erros

Exemplo

curl "https://api.mb-suite.com/v1/social-inbox/rules" \
  -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/social-inbox/rules" \
  -H "Authorization: Bearer $MB_TEST_KEY"
GET/v1/social-inbox/rules/{rule_id}

Get one Social Inbox automation rule

social_inbox.rules.get

LeituraIdempotenteDesde 2026-11-01

Returns one inbox automation rule with its conditions, actions, order, whether it is enabled and broken_actions (the actions that cannot work today: index, kind and reason, such as snippet_missing). 404 inbox_rule_not_found if it is not in this organization. Requires view access.

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

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

Parâmetros

rule_idstringrotaobrigatório

The rule id (from social_inbox.rules.list).

Resposta

idstring

The rule id.

namestring

Its name.

enabledboolean

Whether it runs on new items.

keywordsarray<string>

Words that trigger it (any of them; stored lowercase and without accents). Empty = no text condition.

match_modestring

contains or exact_word.

actionsarray<object>

What it does (1 to 10), in order; see social_inbox.rules.create.

ordernumber

Evaluation order: the first enabled rule that replies wins.

scopeobject | null

Source → false excludes it (ig_comment, tt_message…). Absent = every source.

account_idsarray<string> | null

Only items of these connected accounts.

root_resource_idsarray<string> | null

Only items on these posts or conversations.

scheduleobject | null

Its time condition. Absent = any time. With a time zone that does not exist the rule does not run.

first_message_onlyboolean | null

Only the first message of each author.

broken_actionsarray<object>

The actions that cannot work today (the saved reply, AI position, member, labels or CRM source they use is gone). A rule with broken actions can be renamed or turned off, but not turned on until they are fixed. Empty = all fine.

created_atnumber | null

When it was created (epoch ms).

created_by_idstring | null

Who created it (a member's user id).

updated_atnumber | null

Last edit (epoch ms).

updated_by_idstring | null

Who edited it last.

Erros

Exemplo

curl "https://api.mb-suite.com/v1/social-inbox/rules/{rule_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/social-inbox/rules/{rule_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/social-inbox/rules

Create a Social Inbox automation rule

social_inbox.rules.create

EscritaDesde 2026-11-01

Creates an inbox automation rule, last in the order and enabled unless enabled false. Conditions (all optional, deterministic, never sentiment or language): keywords (any of them; match_mode contains or exact_word; case and accents ignored), scope (source → false excludes it: ig_comment, ig_message, ig_mention, fb_comment, fb_message, fb_mention, li_comment, li_mention, tt_comment, tt_message), account_ids, root_resource_ids (posts), schedule (inside or outside weekly slots in an IANA time zone that must exist; a slot from later than to crosses midnight into the next day, and from equal to to is rejected) and first_message_only. Actions (1 to 10): management ones run for every matching rule (add_labels, assign to a member or ai-<position_id>, archive, mark_spam, needs_attention, notify members, send_to_crm for direct messages); at most ONE reply action per rule (reply_snippet with a saved reply, or reply_with_cm: an AI Community Manager drafts with an extra directive), and the first enabled rule by order that replies wins. A reply rule needs at least one condition. Referenced members, positions, saved replies, labels and CRM sources must exist in this organization (400 rule_*; a rule with send_to_crm also needs the crm:write scope on a credential). Up to 100 rules (409 limit_reached, details.resource inbox_rules). A reply rule can answer on the networks by itself: outside the app, creating one on (the default) needs a dry run and its confirm_token, like turning it on with social_inbox.rules.set_enabled; created off, or without a reply action, it runs directly. Returns the rule. Owner or admin only. With LinkedIn or TikTok, their terms limit it through the API and the MCP: what they do not allow answers 403 platform_terms_restricted (the permissions guide lists what each platform allows).

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. Nesta, só quando: the rule has a reply action (reply_snippet or reply_with_cm) and is created on, which it is unless enabled is false: it answers every new matching comment or message by itself.

Escopo
social_inbox:write
Permissão
Editar no módulo · Só owner, admin
Tool do MCP
social_inbox_rules_createNa superfície completa; na compacta, mb_execute_operation com id: "social_inbox.rules.create".

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

Parâmetros

namestringcorpoobrigatório

The rule's name.

actionsarray<object>corpoobrigatório

What it does (1 to 10): management actions run for every matching rule; at most one reply action (reply_snippet or reply_with_cm) per rule.

enabledbooleancorpoopcional

Whether it runs on new items.

Padrão: true

keywordsarray<string>corpoopcional

Words that trigger it (any of them, up to 20; case and accents ignored). Empty = no text condition.

Padrão: []

match_modeenumcorpoopcional

contains (inside any word) or exact_word (a whole word).

Valores: contains, exact_word · Padrão: "contains"

scopeobjectcorpoopcional

Source → false excludes it (ig_comment, ig_message, ig_mention, fb_comment, fb_message, fb_mention, li_comment, li_mention, tt_comment, tt_message). Absent = every source.

account_idsarray<string>corpoopcional

Only items received by these connected accounts (account_id of social_inbox.connections.list), up to 30.

root_resource_idsarray<string>corpoopcional

Only items on these posts or conversations (root_resource_id of an item), up to 50.

scheduleobjectcorpoopcional

Time condition: inside or outside weekly slots in a time zone.

first_message_onlybooleancorpoopcional

Only the first message of each author.

Resposta

rule_idstring
ruleobject

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/social-inbox/rules" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "NAME",
  "actions": [],
  "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/social-inbox/rules" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "NAME",
  "actions": [],
  "dry_run": true
}'
PATCH/v1/social-inbox/rules/{rule_id}

Update a Social Inbox automation rule

social_inbox.rules.update

EscritaIdempotenteDesde 2026-11-01

Updates an inbox automation rule: updates is applied over the saved rule and the resulting rule is validated as a whole; null on an optional condition (scope, account_ids, root_resource_ids, schedule, first_message_only) removes it. actions, when sent, replace the list and are validated; when not sent, the saved ones stay (so a rule whose saved reply was deleted can still be renamed or turned off). Conditions (all optional, deterministic, never sentiment or language): keywords (any of them; match_mode contains or exact_word; case and accents ignored), scope (source → false excludes it: ig_comment, ig_message, ig_mention, fb_comment, fb_message, fb_mention, li_comment, li_mention, tt_comment, tt_message), account_ids, root_resource_ids (posts), schedule (inside or outside weekly slots in an IANA time zone that must exist; a slot from later than to crosses midnight into the next day, and from equal to to is rejected) and first_message_only. Actions (1 to 10): management ones run for every matching rule (add_labels, assign to a member or ai-<position_id>, archive, mark_spam, needs_attention, notify members, send_to_crm for direct messages); at most ONE reply action per rule (reply_snippet with a saved reply, or reply_with_cm: an AI Community Manager drafts with an extra directive), and the first enabled rule by order that replies wins. A reply rule needs at least one condition. Outside the app, a change that leaves answering by itself a rule that was not (it turns on a rule with a reply action, or adds a reply to a rule that is on) needs a dry run and its confirm_token, like social_inbox.rules.set_enabled; any other change runs directly. 404 inbox_rule_not_found. Returns the rule. Owner or admin only. With LinkedIn or TikTok, their terms limit it through the API and the MCP: what they do not allow answers 403 platform_terms_restricted (the permissions guide lists what each platform allows).

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. Nesta, só quando: the change leaves on, with a reply action, a rule that was not answering by itself before (it turns the rule on, or adds a reply to a rule that is on).

Escopo
social_inbox:write
Permissão
Editar no módulo · Só owner, admin
Tool do MCP
social_inbox_rules_updateNa superfície completa; na compacta, mb_execute_operation com id: "social_inbox.rules.update".

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

Parâmetros

rule_idstringrotaobrigatório

The rule id (from social_inbox.rules.list).

updatesobjectcorpoobrigatório

What changes, applied over the saved rule; null on scope, account_ids, root_resource_ids, schedule or first_message_only removes that condition.

Resposta

ruleobject

Erros

Exemplo

curl -X PATCH "https://api.mb-suite.com/v1/social-inbox/rules/{rule_id}" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "updates": {},
  "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 PATCH "https://api.mb-suite.com/v1/social-inbox/rules/{rule_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "updates": {},
  "dry_run": true
}'
POST/v1/social-inbox/rules/{rule_id}/enabled

Turn a Social Inbox rule on or off

social_inbox.rules.set_enabled

EscritaIdempotenteDesde 2026-11-01

Turns an inbox automation rule on (enabled true) or off (false) without touching the rest. Turning it off never re-validates (an outdated rule can always be turned off); turning on a rule that was off re-validates its saved actions like rules.create (400 rule_snippet_missing, rule_cm_missing, rule_assignee_invalid, rule_labels_missing, rule_crm_source_missing…): fix them with rules.update first (rules.get shows broken_actions). A rule with a reply action answers new comments and messages by itself, so outside the app turning one on needs a dry run and its confirm_token (turning it off, or on a rule without a reply, runs directly). 404 inbox_rule_not_found. Returns the rule. Owner or admin only. With LinkedIn or TikTok, their terms limit it through the API and the MCP: what they do not allow answers 403 platform_terms_restricted (the permissions guide lists what each platform allows).

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. Nesta, só quando: enabled is true and the rule has a reply action (reply_snippet or reply_with_cm: it answers every new matching comment or message by itself).

Escopo
social_inbox:write
Permissão
Editar no módulo · Só owner, admin
Tool do MCP
social_inbox_rules_set_enabledNa superfície completa; na compacta, mb_execute_operation com id: "social_inbox.rules.set_enabled".

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

Parâmetros

rule_idstringrotaobrigatório

The rule id (from social_inbox.rules.list).

enabledbooleancorpoobrigatório

true turns it on (its actions are checked again), false off.

Resposta

ruleobject

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/social-inbox/rules/{rule_id}/enabled" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "enabled": true,
  "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/social-inbox/rules/{rule_id}/enabled" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "enabled": true,
  "dry_run": true
}'
POST/v1/social-inbox/rules/reorder

Reorder Social Inbox rules

social_inbox.rules.reorder

EscritaIdempotenteDesde 2026-11-01

Sets the evaluation order of the inbox rules: rule_ids in the new order (position = index). The order decides which reply rule wins. Ids that no longer exist are skipped (counted in skipped). Owner or admin only.

Escopo
social_inbox:write
Permissão
Editar no módulo · Só owner, admin
Tool do MCP
social_inbox_rules_reorderNa superfície completa; na compacta, mb_execute_operation com id: "social_inbox.rules.reorder".

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

Parâmetros

rule_idsarray<string>corpoobrigatório

Every rule id in the new order (from social_inbox.rules.list): position = index.

Resposta

updatednumber
skippednumber

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/social-inbox/rules/reorder" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "rule_ids": [
    "RULE_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/social-inbox/rules/reorder" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "rule_ids": [
    "RULE_ID"
  ]
}'
DELETE/v1/social-inbox/rules/{rule_id}

Delete a Social Inbox automation rule

social_inbox.rules.delete

IrreversívelDesde 2026-11-01

Deletes an inbox automation rule. It stays 30 days in the trash (restoring it brings it back with its order and its enabled state). Outside the screen it needs a dry run and a confirm_token, except a REST DELETE with a key allowed to delete. 404 inbox_rule_not_found. Owner or admin only.

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
social_inbox:write e «Permitir exclusões» (social_inbox:delete no OAuth)
Permissão
Editar no módulo · Só owner, admin
Tool do MCP
social_inbox_rules_deleteNa superfície completa; na compacta, mb_execute_operation com id: "social_inbox.rules.delete".

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

Parâmetros

rule_idstringrotaobrigatório

The rule id (from social_inbox.rules.list).

Resposta

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.

Erros

Exemplo

curl -X DELETE "https://api.mb-suite.com/v1/social-inbox/rules/{rule_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/social-inbox/rules/{rule_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY"