Pular para o conteúdo principal
POST
/
api
/
v1
/
sip-trunks
/
{trunk_id}
/
dids
curl -X POST "https://app.talkover.ai/api/v1/sip-trunks/trunk-uuid-1/dids" \
  -H "Authorization: Bearer talq_your_environment_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "country_code": "US",
    "number": "+15551234567"
  }'
{
  "success": true,
  "data": {
    "id": "phone-uuid-1",
    "number": "+15551234567",
    "country_code": "US",
    "formatted_number": "(555) 123-4567",
    "trunk_id": "trunk-uuid-1"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.talkover.ai/llms.txt

Use this file to discover all available pages before exploring further.

Criar DID no SIP Trunk

Registra um novo DID (número de telefone) em um SIP Trunk. Após adicionado, o DID pode ser atribuído a agentes para chamadas inbound ou outbound.

Endpoint

POST /api/v1/sip-trunks/{trunk_id}/dids

Parâmetros de Caminho

trunk_id
string
obrigatório
UUID do SIP Trunk.

Cabeçalhos da Requisição

Authorization
string
obrigatório
Token Bearer para autenticação. Formato: Bearer talq_your_environment_token_here
Content-Type
string
obrigatório
Deve ser definido como application/json

Corpo da Requisição

country_code
string
obrigatório
Código de país no formato ISO 3166-1 alpha-2 (ex: US, BR, GB).
number
string
obrigatório
Número de telefone no formato E.164 (ex: +15551234567).

Exemplos

curl -X POST "https://app.talkover.ai/api/v1/sip-trunks/trunk-uuid-1/dids" \
  -H "Authorization: Bearer talq_your_environment_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "country_code": "US",
    "number": "+15551234567"
  }'

Resposta

{
  "success": true,
  "data": {
    "id": "phone-uuid-1",
    "number": "+15551234567",
    "country_code": "US",
    "formatted_number": "(555) 123-4567",
    "trunk_id": "trunk-uuid-1"
  }
}

Respostas de Erro

409 — Número Já Existe

{
  "success": false,
  "message": "This number is already registered in your environment",
  "code": "DID_ALREADY_EXISTS"
}