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.
- Scope
crm_phones:write- Permission
- Edit in the module
- MCP tool
crm_phones_whatsapp_lines_set_destinationOn the full surface; on the compact one,mb_execute_operationwithid: "crm_phones.whatsapp_lines.set_destination".
Declared cost: up to 2 reads and 1 writes per call (they count against the daily quota).
Parameters
line_idstringpathThe phone line: an id from crm_phones.lines.list.
destinationenumbodyThe part of the product that uses the line: crm or support.
Values: crm, support
Response
line_idstringfromstringtostringchangedbooleanErrors
Example
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"
}'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/crm/lines/{line_id}/destination" \
-H "Authorization: Bearer $MB_TEST_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"destination": "crm"
}'