Menu

Referência da API · Phones

Configurações por usuário

crm_phones · user_settings · 1 operação

POST/v1/phones/users/{user_id}/default-line

Set a person's default outgoing line

crm_phones.user_settings.set_default_line

EscritaIdempotenteDesde 2026-11-01

Sets the line a person calls from by default in the Phones dialer (line_id), or clears it with line_id=null (the dialer then picks the line by the destination's country). The person (user_id in the path) must be a member of the organization (user_not_member); the line must be an active line of the organization (line_not_found, line_not_active) and not dedicated to WhatsApp (line_whatsapp_locked: those lines do not place calls). Anyone with view access to Phones can set their own; setting another person's requires edit access. Idempotent. Returns user_id and default_line_id.

Escopo
crm_phones:write
Permissão
Ver o módulo
Tool do MCP
crm_phones_user_settings_set_default_lineNa superfície completa; na compacta, mb_execute_operation com id: "crm_phones.user_settings.set_default_line".

Custo declarado: até 4 leituras e 1 escritas por chamada (contam na cota diária).

Parâmetros

user_idstringrotaobrigatório

A member: a user_id from crm.team.list (with access to Phones).

line_idstring | nullcorpoobrigatório

The phone line: an id from crm_phones.lines.list. null clears the preference (the phone picks the line by country again).

Resposta

user_idstring
default_line_idstring | null

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/phones/users/{user_id}/default-line" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "line_id": "LINE_ID"
}'

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/phones/users/{user_id}/default-line" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "line_id": "LINE_ID"
}'