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.
- Alcance
crm_phones:write- Permiso
- Editar en el módulo
- Tool del MCP
crm_phones_whatsapp_lines_set_destinationEn la superficie completa; en la compacta,mb_execute_operationconid: "crm_phones.whatsapp_lines.set_destination".
Costo declarado: hasta 2 lecturas y 1 escrituras por llamada (cuentan en el cupo diario).
Parámetros
line_idstringrutaThe phone line: an id from crm_phones.lines.list.
destinationenumcuerpoThe part of the product that uses the line: crm or support.
Valores: crm, support
Respuesta
line_idstringfromstringtostringchangedbooleanErrores
Ejemplo
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"
}'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/crm/lines/{line_id}/destination" \
-H "Authorization: Bearer $MB_TEST_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"destination": "crm"
}'