Menú

Referencia de la API · Inbox

CRM

social_inbox · crm · 4 operaciones

POST/v1/social-inbox/items/{item_id}/crm/send

Send a Social Inbox direct message to the CRM

social_inbox.crm.send_to_crm

EscrituraIdempotenteDesde 2026-11-01

Turns an Instagram, Messenger or TikTok direct message into a CRM prospect or deal and moves its whole conversation to CRM → Messages (it leaves the Inbox AI's hands; reply to it with crm.social_dm.send). The lead source decides the destination, dedup, owner and AI qualification, like any lead: source_id (a direct-message lead source; default the one covering the account, or the system one), pipeline_id and stage_id when they exist, and destination (prospect or deal) only with the system source. owner_id sets the owner of the resulting deal (or prospect) in the same call, exactly as crm.deals.update or crm.prospects.update would (changelog, the new owner's notification, the CRM conversation's owner, crm.deal.updated): it must be a member of the organization (400 owner_not_member) and choosing it needs a CRM Manager: an owner, an admin, a CRM admin or a sales manager (403 crm_action_denied otherwise); both are checked before anything is written. The answer then says owner_id (the owner it ended with) and owner_changed. A record owned by an AI agent (ai-…; the lead source may have just given it one, and that agent starts right after the call) keeps that owner here: hand it over later with crm.prospects.update or crm.deals.update. An existing person with the same social identity is reused. Already linked: returns the current link with already_linked true and changes nothing but the owner when owner_id comes (so a retry finishes the job). A comment is not a conversation (409 crm_not_linkable: use social_inbox.crm.create_prospect). Requires full access to the Social Inbox and to the CRM, the CRM permission to create prospects and, for a credential, the crm:write scope. Optional dry run: with dry_run=true nothing is written (no source, person, prospect, deal, link or message, and the assignment rule's rotation does not move): it runs the same gates and checks and fails with the same errors (crm_not_linkable, crm_invalid_source, owner_not_member, crm_action_denied), or returns a Preview with already_linked and conversation_id; source (id, name, is_system, will_be_created: the system source this call would create the first time); destination; pipeline_id and stage_id where a new deal would land (null for a prospect or a reused record); person (id, existing: a person with the same social identity is reused); record (type prospect or deal, id, existing: the person's open deal or active prospect, or the record this contact got when it came in before, is reused); owner (id, from existing_record, assignment_rule, owner_id, contact_owner — a new prospect of a known person goes to that person's owner when they are a member of the organization — or none, rule_id, approximate: an assignment rule's choice is predicted with the same calculation as the rule's Test button and can change if another lead comes in first; a record that would be handed to an AI agent keeps it even with owner_id); and items_to_move (messages of the conversation that would move to CRM → Messages). Warnings say what the real call would silently ignore (a pipeline or stage that does not exist, destination with a non-system source), when the system source would be created and when the owner comes from a rule, an AI agent or the person's owner.

Alcance
social_inbox:write
Permiso
Editar en el módulo · Acción del CRM: create_prospect
Tool del MCP
social_inbox_crm_send_to_crmEn la superficie completa; en la compacta, mb_execute_operation con id: "social_inbox.crm.send_to_crm".

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

Parámetros

item_idstringrutarequerido

The inbox item id (from social_inbox.items.list).

source_idstringcuerpoopcional

A direct-message lead source (crm.lead_sources.list) or a system one (_ig_dm…). Default: the one of the account that received it.

destinationenumcuerpoopcional

With a system source only: create a prospect or a deal (an own source decides by its configuration).

Valores: prospect, deal

pipeline_idstringcuerpoopcional

Pipeline for a deal (crm.pipelines.list).

stage_idstringcuerpoopcional

Stage of that pipeline (crm.pipelines.get).

owner_idstringcuerpoopcional

The owner of the resulting prospect or deal, set in the same call: a member's user id. Needs a CRM Manager (owner, admin, CRM admin or sales manager).

Respuesta

conversation_idstring
person_idstring
items_linkednumber
chat_data_suggestednumber
already_linkedboolean
prospect_idstring
deal_idstring
owner_idstring | null

Only with owner_id: the owner the deal or prospect has after the call (null when the conversation has no prospect or deal).

owner_changedboolean

Only with owner_id: whether this call changed the owner.

Errores

Ejemplo

curl -X POST "https://api.mb-suite.com/v1/social-inbox/items/{item_id}/crm/send" \
  -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/social-inbox/items/{item_id}/crm/send" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/social-inbox/items/{item_id}/crm/prospect

Create a CRM prospect from the author of a comment

social_inbox.crm.create_prospect

EscrituraIdempotenteDesde 2026-11-01

Creates a CRM prospect (or deal, as the lead source says) for the author of a comment or mention; the public thread stays in the Inbox and the comment becomes the prospect's first note. The person is tagged with the network (the network's direct-message source): source_id, pipeline_id and stage_id are optional. A LinkedIn comment or mention gives 409 crm_not_linkable: LinkedIn's terms don't allow using its members' data to create leads. Idempotent per comment: the same comment returns what it created before (already_created true). A direct message gives 409 crm_not_linkable (use social_inbox.crm.send_to_crm). Requires full access to the Social Inbox and to the CRM, the CRM permission to create prospects and, for a credential, the crm:write scope.

Alcance
social_inbox:write
Permiso
Editar en el módulo · Acción del CRM: create_prospect
Tool del MCP
social_inbox_crm_create_prospectEn la superficie completa; en la compacta, mb_execute_operation con id: "social_inbox.crm.create_prospect".
Eventos que puede emitir
crm.lead.createdcrm.deal.created

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

Parámetros

item_idstringrutarequerido

The inbox item id (from social_inbox.items.list).

source_idstringcuerpoopcional

The lead source to create it with (crm.lead_sources.list). Default: the account's system source.

pipeline_idstringcuerpoopcional

Pipeline (crm.pipelines.list).

stage_idstringcuerpoopcional

Stage of that pipeline.

Respuesta

person_idstring
already_createdboolean
prospect_idstring
deal_idstring

Errores

Ejemplo

curl -X POST "https://api.mb-suite.com/v1/social-inbox/items/{item_id}/crm/prospect" \
  -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/social-inbox/items/{item_id}/crm/prospect" \
  -H "Authorization: Bearer $MB_TEST_KEY"