> ## 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

> Adicionar um DID (número de telefone) a um SIP Trunk

# 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

<ParamField path="trunk_id" type="string" required>UUID do SIP Trunk.</ParamField>

## Cabeçalhos da requisição

<ParamField header="Authorization" type="string" required>
  Token Bearer para autenticação. Formato: `Bearer talq_your_environment_token_here`
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Deve ser definido como `application/json`
</ParamField>

## Corpo da requisição

<ParamField body="country_code" type="string" required>
  Código de país no formato ISO 3166-1 alpha-2 (ex: `US`, `BR`, `GB`).
</ParamField>

<ParamField body="number" type="string" required>
  Número de telefone no formato E.164 (ex: `+5511987654321`).
</ParamField>

## Exemplos

<RequestExample>
  ```bash theme={null}
  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": "+5511987654321"
    }'
  ```
</RequestExample>

## Resposta

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "data": {
      "id": "phone-uuid-1",
      "number": "+5511987654321",
      "country_code": "US",
      "formatted_number": "(555) 123-4567",
      "trunk_id": "trunk-uuid-1"
    }
  }
  ```
</ResponseExample>

## Respostas de erro

### 409 — Número Já Existe

<ResponseExample>
  ```json theme={null}
  {
    "success": false,
    "message": "This number is already registered in your environment",
    "code": "DID_ALREADY_EXISTS"
  }
  ```
</ResponseExample>
