Move a WhatsApp line to another part of the product
crm_phones.whatsapp_lines.set_destination
Moves a WhatsApp line (the id crm.lines.list returns) to another destination: crm (the CRM inbox) or support. Its conversations move with it (each inbox filters by line). A line that feeds an active CRM lead source cannot move (line_has_active_lead_source): delete the source first, or it would keep creating leads from messages nobody sees in the CRM. Idempotent: moving it to the destination it already has changes nothing (changed=false). Returns from, to and changed. Requires edit access to Phones.
- Escopo
crm_phones:write- Permissão
- Editar no módulo
- Tool do MCP
crm_phones_whatsapp_lines_set_destinationNa superfície completa; na compacta,mb_execute_operationcomid: "crm_phones.whatsapp_lines.set_destination".
Custo declarado: até 2 leituras e 1 escritas por chamada (contam na cota diária).
Parâmetros
line_idstringrotaThe phone line: an id from crm_phones.lines.list.
destinationenumcorpoThe part of the product that uses the line: crm or support.
Valores: crm, support
Resposta
line_idstringfromstringtostringchangedbooleanErros
Exemplo
curl -X POST "https://api.mb-suite.com/v1/crm/lines/{line_id}/destination" \
-H "Authorization: Bearer $MB_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"destination": "crm"
}'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/crm/lines/{line_id}/destination" \
-H "Authorization: Bearer $MB_TEST_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"destination": "crm"
}'