Menu

Referência da API · CRM

Mensagens diretas de redes

crm · social_dm · 1 operação

POST/v1/crm/conversations/{conversation_id}/social-dm

Reply to an Instagram, Messenger or TikTok DM that is in the CRM (CRM → Messages)

crm.social_dm.send

EscritaDesde 2026-11-01

Replies with text in an Instagram, Messenger or TikTok direct-message conversation that is in the CRM (CRM → Messages: one passed from the Social Inbox or linked to a lead), through the connected account that received it, and records it in the conversation (it goes back to the open CRM inbox). A direct message that is still only in the Social Inbox is answered with social_inbox.items.reply. Meta accepts free text within 24 hours of the contact's last message; only a person replying from the screen can extend it up to 7 days, never an integration. The text limit depends on the network (Instagram counts bytes). Social conversations cannot be started from here: the contact writes first. The dry run checks what the send checks before going out (the connected account, the network's text limit and the reply window) without calling the network. When the network does not confirm the reply it answers external_outcome_unknown (it may have gone out: check the conversation before sending it again). Requires send_whatsapp on the conversation's owner (a member only in conversations they own or without owner). With an API key marked as an AI agent's (an owner or admin sets it on the key; it is never chosen per call), the message is recorded as sent by AI, like the AI Setter's (crm.messages.list marks it as sent by AI, with the key's user as its AI agent), the AI badge in the inbox, and it counts as AI, not as a person, in reports and in caps (crm.messages.count with ai_agent_user_id). With 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.

Escopo
crm:write
Permissão
Editar no módulo
Tool do MCP
crm_social_dm_sendNa superfície completa; na compacta, mb_execute_operation com id: "crm.social_dm.send".

Custo declarado: até 6 leituras e 6 escritas por chamada (contam na cota diária). Usa uma plataforma externa (meta): conta na cota de operações externas.

Parâmetros

conversation_idstringrotaobrigatório

The Instagram, Messenger or TikTok conversation of the CRM inbox (crm.conversations.list with that channel).

textstringcorpoobrigatório

The text of the reply; each network has its own limit (Instagram counts bytes): over it, text_too_long.

Resposta

message_idstring

The message recorded in the conversation (crm.messages.list).

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/crm/conversations/{conversation_id}/social-dm" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "TEXT",
  "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. Na prática esta operação não é simulada (usa outra plataforma): responde 409 sandbox_external_unavailable.