Documentation Index
Fetch the complete documentation index at: https://docs.vectalk.com.br/llms.txt
Use this file to discover all available pages before exploring further.
As configurações de chamadas são uma seção dentro das Configurações do Número. Aqui detalhamos todos os campos disponíveis.
Campos da Resposta (GET)
A seção calling retornada pelo GET /api/phone-numbers/settings:
Campos Obrigatórios
| Campo | Tipo | Valores | Descrição |
|---|
status | string | NOT_SET, enabled, disabled | Status das chamadas |
call_icon_visibility | string | NOT_SET, DEFAULT, DISABLE_ALL | Visibilidade do ícone de chamada |
callback_permission_status | string | NOT_SET, enabled, disabled | Status do callback de permissão |
Campos Opcionais (aparecem quando calling está habilitado)
| Campo | Tipo | Valores | Descrição |
|---|
ip_addresses | object | — | Endereços IP usados para chamadas |
ip_addresses.default | string[] | — | Lista de IPs padrão |
srtp_key_exchange_protocol | string | NOT_SET, DTLS, SDES | Protocolo de troca de chaves SRTP |
SIP (sip)
| Campo | Tipo | Descrição |
|---|
sip.status | string | enabled ou disabled |
sip.servers | array | Lista de servidores SIP configurados |
sip.servers[].app_id | string | ID da aplicação (obrigatório) |
sip.servers[].hostname | string | Hostname do servidor SIP (obrigatório) |
sip.servers[].port | integer | Porta do servidor (opcional) |
sip.servers[].password | string | Senha SIP — só retornada com include_sip_credentials=true |
Vídeo (video)
| Campo | Tipo | Descrição |
|---|
video.status | string | enabled ou disabled |
Áudio (audio)
| Campo | Tipo | Descrição |
|---|
audio.status | string | enabled ou disabled |
Horários de Chamada (call_hours)
| Campo | Tipo | Descrição |
|---|
call_hours.status | string | enabled ou disabled |
call_hours.timezone | string | Timezone (ex: America/Sao_Paulo) |
call_hours.day_of_week_start | string | Dia de início da semana |
Ícones de Chamada (call_icons)
| Campo | Tipo | Descrição |
|---|
call_icons.restrict_to_user_countries | string[] | Países onde o ícone de chamada é exibido (códigos ISO) |
Restrições (restrictions)
| Campo | Tipo | Descrição |
|---|
restrictions.restrictions | array | Lista de restrições ativas |
restrictions.restrictions[].type | string | Tipo da restrição |
restrictions.restrictions[].expiration | integer | Timestamp Unix de expiração |
Campos para Atualização (POST)
Ao enviar POST /api/phone-numbers/settings com a seção calling:
enabled ou disabled — habilita ou desabilita chamadas.
calling.call_icon_visibility
DEFAULT ou DISABLE_ALL — controla visibilidade do ícone de chamada.
enabled ou disabled — habilita ou desabilita chamadas de vídeo.
enabled ou disabled — habilita ou desabilita SIP.
calling.srtp_key_exchange_protocol
Protocolo de troca de chaves SRTP: DTLS ou SDES.
Exemplos
curl --request POST \
--url https://apis.vectalk.com.br/api/phone-numbers/settings \
--header 'Authorization: Bearer {seu_token}' \
--header 'Content-Type: application/json' \
--data '{
"calling": {
"status": "enabled",
"call_icon_visibility": "DEFAULT",
"sip": {
"status": "enabled"
},
"srtp_key_exchange_protocol": "DTLS"
}
}'
Desabilitar Chamadas
curl --request POST \
--url https://apis.vectalk.com.br/api/phone-numbers/settings \
--header 'Authorization: Bearer {seu_token}' \
--header 'Content-Type: application/json' \
--data '{
"calling": {
"status": "disabled"
}
}'
curl --request GET \
--url 'https://apis.vectalk.com.br/api/phone-numbers/settings?include_sip_credentials=true' \
--header 'Authorization: Bearer {seu_token}'
Resposta (calling não configurado)
{
"calling": {
"status": "NOT_SET",
"call_icon_visibility": "NOT_SET",
"callback_permission_status": "NOT_SET"
},
"storage_configuration": {
"status": "DEFAULT"
}
}
Resposta (calling habilitado com SIP)
{
"calling": {
"status": "enabled",
"call_icon_visibility": "DEFAULT",
"ip_addresses": {
"default": ["157.240.0.1", "157.240.0.2"]
},
"callback_permission_status": "enabled",
"srtp_key_exchange_protocol": "DTLS",
"sip": {
"status": "enabled",
"servers": [
{
"app_id": "12345",
"hostname": "sip.whatsapp.com",
"port": 5060,
"password": "sip_password_here"
}
]
},
"video": {
"status": "disabled"
},
"audio": {
"status": "enabled"
},
"call_hours": {
"status": "disabled"
},
"restrictions": {
"restrictions": []
}
},
"storage_configuration": {
"status": "DEFAULT"
}
}