Menu

API reference · Inbox

Rules

social_inbox · rules · 7 operations

GET/v1/social-inbox/rules

List Social Inbox automation rules

social_inbox.rules.list

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

Scope
social_inbox:read
Permission
View the module
MCP tool
social_inbox_rules_listOn the full surface; on the compact one, mb_execute_operation with id: "social_inbox.rules.list".

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

Parameters

No parameters.

Response

dataarray<object>

Errors

Example

curl "https://api.mb-suite.com/v1/social-inbox/rules" \
  -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/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

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

Scope
social_inbox:read
Permission
View the module
MCP tool
social_inbox_rules_getOn the full surface; on the compact one, mb_execute_operation with id: "social_inbox.rules.get".

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

Parameters

rule_idstringpathrequired

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

Response

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.

Errors

Example

curl "https://api.mb-suite.com/v1/social-inbox/rules/{rule_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/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

WriteSince 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).

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. In this one, only when: 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.

Scope
social_inbox:write
Permission
Edit in the module · Only owner, admin
MCP tool
social_inbox_rules_createOn the full surface; on the compact one, mb_execute_operation with id: "social_inbox.rules.create".

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

Parameters

namestringbodyrequired

The rule's name.

actionsarray<object>bodyrequired

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.

enabledbooleanbodyoptional

Whether it runs on new items.

Default: true

keywordsarray<string>bodyoptional

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

Default: []

match_modeenumbodyoptional

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

Values: contains, exact_word · Default: "contains"

scopeobjectbodyoptional

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>bodyoptional

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

root_resource_idsarray<string>bodyoptional

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

scheduleobjectbodyoptional

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

first_message_onlybooleanbodyoptional

Only the first message of each author.

Response

rule_idstring
ruleobject

Errors

Example

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

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/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

WriteIdempotentSince 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).

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. In this one, only when: 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).

Scope
social_inbox:write
Permission
Edit in the module · Only owner, admin
MCP tool
social_inbox_rules_updateOn the full surface; on the compact one, mb_execute_operation with id: "social_inbox.rules.update".

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

Parameters

rule_idstringpathrequired

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

updatesobjectbodyrequired

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

Response

ruleobject

Errors

Example

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

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/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

WriteIdempotentSince 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).

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. In this one, only when: 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).

Scope
social_inbox:write
Permission
Edit in the module · Only owner, admin
MCP tool
social_inbox_rules_set_enabledOn the full surface; on the compact one, mb_execute_operation with id: "social_inbox.rules.set_enabled".

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

Parameters

rule_idstringpathrequired

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

enabledbooleanbodyrequired

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

Response

ruleobject

Errors

Example

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

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/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

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

Scope
social_inbox:write
Permission
Edit in the module · Only owner, admin
MCP tool
social_inbox_rules_reorderOn the full surface; on the compact one, mb_execute_operation with id: "social_inbox.rules.reorder".

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

Parameters

rule_idsarray<string>bodyrequired

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

Response

updatednumber
skippednumber

Errors

Example

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

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/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

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

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
social_inbox:write and “Allow deletions” (social_inbox:delete in OAuth)
Permission
Edit in the module · Only owner, admin
MCP tool
social_inbox_rules_deleteOn the full surface; on the compact one, mb_execute_operation with id: "social_inbox.rules.delete".

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

Parameters

rule_idstringpathrequired

The rule id (from social_inbox.rules.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/social-inbox/rules/{rule_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/social-inbox/rules/{rule_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY"