---
title: Reference
slug: dynamic-sip-trunking/reference
createdAt: 2026-08-10T11:16:13.748Z
---

# Error Codes Reference

| Error Code | HTTP Status | Message                     | Description                                                                  |
| ---------- | ----------- | --------------------------- | ---------------------------------------------------------------------------- |
| 1000       | 404         | Not Found                   | Resource not found (invalid trunk\_sid, phone\_number\_id, etc.)             |
| 1001       | 400         | Mandatory Parameter missing | Required parameter not provided                                              |
| 1002       | 400         | Invalid parameter           | Parameter value is invalid or malformed                                      |
| 1007       | 400         | Invalid request body        | JSON parsing error or malformed request body                                 |
| 1008       | 409         | Duplicate resource          | Resource already exists (duplicate trunk name, IP already whitelisted, etc.) |
| 1011       | 415         | Unsupported content type    | Wrong Content-Type header. Use application/json                              |

# Quick Reference

## API Endpoints Summary

| **API**                     | **Method** | **Endpoint**                                                                   |
| --------------------------- | ---------- | ------------------------------------------------------------------------------ |
| Create Trunk                | POST       | /v2/accounts/&#x7B;sid}/trunks                                                 |
| List Trunks                 | GET        | /v2/accounts/&#x7B;sid}/trunks                                                 |
| Update Trunk                | PUT        | /v2/accounts/&#x7B;sid}/trunks/&#x7B;trunk\_sid}                               |
| Delete Trunk                | DELETE     | /v2/accounts/&#x7B;sid}/trunks?trunk\_sid=&#x7B;trunk\_sid}                    |
| Trunk Map Lookup            | GET        | /v2/accounts/&#x7B;sid}/trunk-maps?exophone=&#x7B;number}                      |
| Map Phone Number            | POST       | /v2/accounts/&#x7B;sid}/trunks/&#x7B;trunk\_sid}/phone-numbers                 |
| Get Phone Numbers           | GET        | /v2/accounts/&#x7B;sid}/trunks/&#x7B;trunk\_sid}/phone-numbers                 |
| Update Phone Number Mode    | PUT        | /v2/accounts/&#x7B;sid}/trunks/&#x7B;trunk\_sid}/phone-numbers/&#x7B;id}       |
| Delete Phone Number Mapping | DELETE     | /v2/accounts/&#x7B;sid}/trunks/&#x7B;trunk\_sid}/phone-numbers?id=&#x7B;id}    |
| Map ACL                     | POST       | /v2/accounts/&#x7B;sid}/trunks/&#x7B;trunk\_sid}/whitelisted-ips               |
| Get ACLs                    | GET        | /v2/accounts/&#x7B;sid}/trunks/&#x7B;trunk\_sid}/whitelisted-ips               |
| Update Whitelisted IP       | PUT        | /v2/accounts/&#x7B;sid}/trunks/&#x7B;trunk\_sid}/whitelisted-ips/&#x7B;id}     |
| Delete Whitelisted IP       | DELETE     | /v2/accounts/&#x7B;sid}/trunks/&#x7B;trunk\_sid}/whitelisted-ips?id=&#x7B;id}  |
| Create Credentials          | POST       | /v2/accounts/&#x7B;sid}/trunks/&#x7B;trunk\_sid}/credentials                   |
| List Credentials            | GET        | /v2/accounts/&#x7B;sid}/trunks/&#x7B;trunk\_sid}/credentials                   |
| Update Credentials          | PUT        | /v2/accounts/&#x7B;sid}/trunks/&#x7B;trunk\_sid}/credentials/&#x7B;id}         |
| Delete Credentials          | DELETE     | /v2/accounts/&#x7B;sid}/trunks/&#x7B;trunk\_sid}/credentials?id=&#x7B;id}      |
| Map Destination URI         | POST       | /v2/accounts/&#x7B;sid}/trunks/&#x7B;trunk\_sid}/destination-uris              |
| Get Destination URIs        | GET        | /v2/accounts/&#x7B;sid}/trunks/&#x7B;trunk\_sid}/destination-uris              |
| Update Destination URI      | PUT        | /v2/accounts/&#x7B;sid}/trunks/&#x7B;trunk\_sid}/destination-uris/&#x7B;id}    |
| Delete Destination URI      | DELETE     | /v2/accounts/&#x7B;sid}/trunks/&#x7B;trunk\_sid}/destination-uris?id=&#x7B;id} |
| Set Trunk Alias             | POST       | /v2/accounts/&#x7B;sid}/trunks/&#x7B;trunk\_sid}/settings                      |
| List Trunk Settings         | GET        | /v2/accounts/&#x7B;sid}/trunks/&#x7B;trunk\_sid}/settings                      |
| Delete Trunk Setting        | DELETE     | /v2/accounts/&#x7B;sid}/trunks/&#x7B;trunk\_sid}/settings?name=&#x7B;name}     |

## Mode Options

| Mode | Description                       | Use Case                                |
| ---- | --------------------------------- | --------------------------------------- |
| pstn | Routes calls to telephone network | Standard PBX/Contact Center integration |
| flow | Routes calls to Voice AI bot      | StreamKit/Voice AI integration          |

## Notes

- Duplicate resource errors (1008) are safe and can be ignored if the configuration already exists
- Destination URI must always be configured, even when using Exotel Flows
- flow mode is required only for Voicebot or non-Connect applets
