---
title: Manage & View
slug: dynamic-sip-trunking/manage-and-view
createdAt: 2026-08-10T10:54:20.089Z
---

APIs for viewing configurations, updating settings, and managing your trunk.

## Get Phone Numbers

Retrieves all phone numbers mapped to a trunk.

### HTTP Request

:::BlockQuote
GET https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/phone-numbers
:::

### Example Request

:::BlockQuote
curl -s -X GET "https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/phone-numbers"
:::

### Example Response

:::BlockQuote
\{
&#x20; "request\_id": "785471d288054cbf8c677b75e0b5f2f8",
&#x20; "method": "GET",
&#x20; "http\_code": 200,
&#x20; "metadata": \{
&#x20;   "page\_size": 50,
&#x20;   "first\_page\_uri": "/v2/accounts/ameyo5m/trunks/trmum1f708622631150902801a1n/phone-numbers?offset=0\&page\_size=50",
&#x20;   "prev\_page\_uri": null,
&#x20;   "next\_page\_uri": null
&#x20; },
&#x20; "response": \[
&#x20;   \{
&#x20;     "code": 200,
&#x20;     "error\_data": null,
&#x20;     "status": "success",
&#x20;     "data": \{
&#x20;       "id": "41523",
&#x20;       "phone\_number": "+918040264208",
&#x20;       "trunk\_sid": "trmum1f708622631150902801a1n",
&#x20;       "date\_created": "2026-01-23T13:28:11Z",
&#x20;       "date\_updated": "2026-01-23T13:41:59Z",
&#x20;       "mode": "flow"
&#x20;     }
&#x20;   }
&#x20; ]
}
:::

### Response Parameters

| Parameter Name            | Type & Value                                                  |
| ------------------------- | ------------------------------------------------------------- |
| metadata.page\_size       | Integer; Number of results per page                           |
| metadata.first\_page\_uri | String; URI for the first page                                |
| metadata.prev\_page\_uri  | String or null; URI for previous page (null if on first page) |
| metadata.next\_page\_uri  | String or null; URI for next page (null if on last page)      |
| response\[]               | Array; List of phone number objects                           |

## Get ACLs (Whitelisted IPs)

Retrieves all whitelisted IP addresses for a trunk.

### HTTP Request

:::BlockQuote
GET https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/whitelisted-ips
:::

### Example Request

:::BlockQuote
curl -s -X GET "https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/whitelisted-ips"
:::

### Example Response

:::BlockQuote
\{
&#x20; "request\_id": "91dc982ca79846479c6f9678c788cfc1",
&#x20; "method": "GET",
&#x20; "http\_code": 200,
&#x20; "metadata": \{
&#x20;   "page\_size": 50,
&#x20;   "first\_page\_uri": "/v2/accounts/ameyo5m/trunks/trmum1f708622631150902801a1n/whitelisted-ips?offset=0\&page\_size=50",
&#x20;   "prev\_page\_uri": null,
&#x20;   "next\_page\_uri": null
&#x20; },
&#x20; "response": \[
&#x20;   \{
&#x20;     "code": 200,
&#x20;     "error\_data": null,
&#x20;     "status": "success",
&#x20;     "data": \{
&#x20;       "id": "1154",
&#x20;       "mask": 32,
&#x20;       "trunk\_sid": "trmum1f708622631150902801a1n",
&#x20;       "ip": "44.248.146.11",
&#x20;       "friendly\_name": null,
&#x20;       "date\_created": "2026-01-23T13:30:04Z",
&#x20;       "date\_updated": "2026-01-23T13:30:04Z"
&#x20;     }
&#x20;   }
&#x20; ]
}
:::

## Get Destination URIs

Retrieves all destination URIs configured for a trunk.

### HTTP Request

:::BlockQuote
GET https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/destination-uris
:::

### Example Request

:::BlockQuote
curl -s -X GET "https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/destination-uris"
:::

### Example Response

:::BlockQuote
\{
&#x20; "request\_id": "bfc1544ab0ab4df3ae49173ccc744331",
&#x20; "method": "GET",
&#x20; "http\_code": 200,
&#x20; "metadata": \{
&#x20;   "page\_size": 50,
&#x20;   "first\_page\_uri": "/v2/accounts/ameyo5m/trunks/trmum1f708622631150902801a1n/destination-uris?offset=0\&page\_size=50",
&#x20;   "prev\_page\_uri": null,
&#x20;   "next\_page\_uri": null
&#x20; },
&#x20; "response": \[
&#x20;   \{
&#x20;     "code": 200,
&#x20;     "error\_data": null,
&#x20;     "status": "success",
&#x20;     "data": \{
&#x20;       "id": "2544",
&#x20;       "destination": "sip\:sip.company.com:5061;transport=tls",
&#x20;       "date\_created": "2026-01-23T13:39:06Z",
&#x20;       "date\_updated": "2026-01-23T13:39:06Z",
&#x20;       "type": "public",
&#x20;       "priority": 0,
&#x20;       "weight": 1,
&#x20;       "trunk\_sid": "trmum1f708622631150902801a1n"
&#x20;     }
&#x20;   },
&#x20;   \{
&#x20;     "code": 200,
&#x20;     "error\_data": null,
&#x20;     "status": "success",
&#x20;     "data": \{
&#x20;       "id": "2543",
&#x20;       "destination": "sip:44.248.146.11:5061;transport=tls",
&#x20;       "date\_created": "2026-01-23T13:38:32Z",
&#x20;       "date\_updated": "2026-01-23T13:38:32Z",
&#x20;       "type": "public",
&#x20;       "priority": 0,
&#x20;       "weight": 1,
&#x20;       "trunk\_sid": "trmum1f708622631150902801a1n"
&#x20;     }
&#x20;   }
&#x20; ]
}
:::

## Update Phone Number Mode

Updates the routing mode for a mapped phone number. Use this to switch between PSTN and StreamKit (Voice AI) modes.

### HTTP Request

:::BlockQuote
PUT https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/phone-numbers/\<phone\_number\_id>
:::

**Important:** The \<phone\_number\_id>is the **numeric ID** returned when you mapped the phone number (e.g., 41523), NOT the phone number itself.

### Request Headers

| Header       | Value            |
| ------------ | ---------------- |
| Content-Type | application/json |

### Request Parameters

| Parameter Name | Mandatory/Optional | Value                                                                                                                       |
| -------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------- |
| phone\_number  | Mandatory          | String; The phone number in E.164 format. Must match the phone number associated with the ID. Example: +919876543210        |
| mode           | Mandatory          | String; The new routing mode. Can be: pstn- Route calls to telephone network, flow- Route calls to Voice AI bot (StreamKit) |

### Example Request (Switch to Flow mode)

:::BlockQuote
curl -s -X PUT "https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/phone-numbers/41523" \\
&#x20; -H "Content-Type: application/json" \\
&#x20; -d '\{
&#x20;   "phone\_number": "+918040264208",
&#x20;   "mode": "flow"
&#x20; }'
:::

### Example Request (Switch to PSTN mode)

:::BlockQuote
curl -s -X PUT "https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/phone-numbers/41523" \\
&#x20; -H "Content-Type: application/json" \\
&#x20; -d '\{
&#x20;   "phone\_number": "+918040264208",
&#x20;   "mode": "pstn"
&#x20; }'
:::

### Example Response

:::BlockQuote
\{
&#x20; "request\_id": "c719cd56eb5943e789e1bdbd4ce1515a",
&#x20; "method": "PUT",
&#x20; "http\_code": 200,
&#x20; "response": \{
&#x20;   "code": 200,
&#x20;   "error\_data": null,
&#x20;   "status": "success",
&#x20;   "data": \{
&#x20;     "id": "41523",
&#x20;     "phone\_number": "+918040264208",
&#x20;     "trunk\_sid": "trmum1f708622631150902801a1n",
&#x20;     "date\_created": "2026-01-23T13:28:11Z",
&#x20;     "date\_updated": "2026-01-23T13:41:59Z",
&#x20;     "mode": "flow"
&#x20;   }
&#x20; }
}
:::

### Response Parameters

| Parameter Name | Type & Value                                                                          |
| -------------- | ------------------------------------------------------------------------------------- |
| id             | String; The phone number mapping ID                                                   |
| phone\_number  | String; The phone number in E.164 format                                              |
| trunk\_sid     | String; The associated trunk                                                          |
| mode           | String; The updated routing mode (pstn or flow)                                       |
| date\_created  | String; ISO 8601 timestamp when mapping was created                                   |
| date\_updated  | String; ISO 8601 timestamp when mapping was updated (will be updated after this call) |

## Set Trunk Alias (Caller ID)

Sets the phone number displayed to called parties on outbound calls. This is useful when you want to display a specific caller ID regardless of which phone number is mapped to the trunk.

### HTTP Request

:::BlockQuote
POST https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/settings
:::

### Request Headers

| Header       | Value            |
| ------------ | ---------------- |
| Content-Type | application/json |

### Request Parameters

| Parameter Name    | Mandatory/Optional | Value                                                                                               |
| ----------------- | ------------------ | --------------------------------------------------------------------------------------------------- |
| settings          | Mandatory          | Array; List of setting objects                                                                      |
| settings\[].name  | Mandatory          | String; Setting name. Use trunk\_external\_aliasfor caller ID                                       |
| settings\[].value | Mandatory          | String; The phone number to display as caller ID. Should be in E.164 format. Example: +919876543210 |

### Example Request

:::BlockQuote
curl -s -X POST "https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/settings" \\
&#x20; -H "Content-Type: application/json" \\
&#x20; -d '\{
&#x20;   "settings": \[
&#x20;     \{
&#x20;       "name": "trunk\_external\_alias",
&#x20;       "value": "+919876543210"
&#x20;     }
&#x20;   ]
&#x20; }'
:::

### Example Response

:::BlockQuote
\{
&#x20; "request\_id": "8ce98845365f43fd97c2f46df38438c6",
&#x20; "method": "POST",
&#x20; "http\_code": 200,
&#x20; "metadata": \{
&#x20;   "total": 1,
&#x20;   "success": 1
&#x20; },
&#x20; "response": \[
&#x20;   \{
&#x20;     "code": 200,
&#x20;     "error\_data": null,
&#x20;     "status": "success",
&#x20;     "data": \{
&#x20;       "name": "trunk\_external\_alias",
&#x20;       "value": "+919876543210",
&#x20;       "trunk\_sid": "trmum1f708622631150902801a1n",
&#x20;       "date\_created": "2026-01-23T13:34:50Z",
&#x20;       "date\_updated": "2026-01-23T13:34:50Z"
&#x20;     }
&#x20;   }
&#x20; ]
}
:::

### Response Parameters

| Parameter Name   | Type & Value                                             |
| ---------------- | -------------------------------------------------------- |
| metadata.total   | Integer; Total number of settings in request             |
| metadata.success | Integer; Number of successfully applied settings         |
| name             | String; Setting name (trunk\_external\_alias)            |
| value            | String; The caller ID phone number                       |
| trunk\_sid       | String; The associated trunk                             |
| date\_created    | String; ISO 8601 timestamp when setting was created      |
| date\_updated    | String; ISO 8601 timestamp when setting was last updated |

## Delete Trunk

Permanently deletes a trunk and all its associated configurations (phone numbers, ACLs, destination URIs).

**⚠️ Warning:** This action cannot be undone. All associated phone number mappings, whitelisted IPs, and destination URIs will be permanently deleted.

### HTTP Request

:::BlockQuote
DELETE https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks?trunk\_sid=\<trunk\_sid>
:::

### Example Request

:::BlockQuote
curl -s -X DELETE "https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks?trunk\_sid=\<trunk\_sid>"
:::

### Example Response

:::BlockQuote
\{
&#x20; "request\_id": "f708818c79f547b3aee31c4a480367a5",
&#x20; "method": "DELETE",
&#x20; "http\_code": 200,
&#x20; "response": \{
&#x20;   "code": 200,
&#x20;   "error\_data": null,
&#x20;   "status": "success",
&#x20;   "data": \{
&#x20;     "trunk\_name": "my\_trunk1234",
&#x20;     "date\_created": "2026-01-23T13:25:39Z",
&#x20;     "date\_updated": "2026-01-23T13:25:39Z",
&#x20;     "trunk\_sid": "trmum15f77c83605998cdb9d1a1n",
&#x20;     "status": "active",
&#x20;     "domain\_name": "ameyo5m.pstn.exotel.com",
&#x20;     "auth\_type": "IP-WHITELIST",
&#x20;     "registration\_enabled": "disabled",
&#x20;     "edge\_preference": "auto",
&#x20;     "nso\_code": "ANY-ANY",
&#x20;     "secure\_trunking": "disabled",
&#x20;     "destination\_uris": "/v2/accounts/ameyo5m/trunks/trmum15f77c83605998cdb9d1a1n/destination-uris",
&#x20;     "whitelisted\_ips": "/v2/accounts/ameyo5m/trunks/trmum15f77c83605998cdb9d1a1n/whitelisted-ips",
&#x20;     "credentials": "/v2/accounts/ameyo5m/trunks/trmum15f77c83605998cdb9d1a1n/credentials",
&#x20;     "phone\_numbers": "/v2/accounts/ameyo5m/trunks/trmum15f77c83605998cdb9d1a1n/phone-numbers"
&#x20;   }
&#x20; }
}
:::

### Response Parameters

The response returns the full trunk data that was deleted, allowing you to verify which trunk was removed.



## List Trunks

Retrieves all SIP trunks for the account with pagination. Optionally filter to a single trunk using trunk\_sid.

### HTTP Request

:::BlockQuote
GET https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks \:::
:::

### Request Headers

| **Header**   | **Value**        |
| ------------ | ---------------- |
| Content-Type | application/json |

### Query Parameters

| **Parameter Name** | **Mandatory/Optional** | **Value**                                              |
| ------------------ | ---------------------- | ------------------------------------------------------ |
| page\_size         | Optional               | Integer; number of results per page. Default: 50       |
| offset             | Optional               | Integer; pagination offset. Default: 0                 |
| trunk\_sid         | Optional               | String; when provided, returns only the matching trunk |

### Example Request

\:::BlockQuote curl -s -X GET "https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks?page\_size=50\&offset=0" \:::

### Example Request (single trunk filter)

:::BlockQuote
curl -s -X GET "https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks?trunk\_sid=\<trunk\_sid>"&#x20;
:::

### HTTP Response

On success, the HTTP response status code will be 200 OK.

### Example Response

:::BlockQuote
\{&#x20;
"request\_id": "785471d288054cbf8c677b75e0b5f2f8",&#x20;
"method": "GET",&#x20;
"http\_code": 200,&#x20;
"metadata": \{ "page\_size": 50, "first\_page\_uri": "/v2/accounts/\<your\_sid>/trunks?offset=0\&page\_size=50", "prev\_page\_uri": null, "next\_page\_uri": null },&#x20;
"response":&#x20;
\[&#x20;
\{&#x20;
"code": 200,&#x20;
"error\_data": null,&#x20;
"status": "success",&#x20;
"data": \{ "trunk\_name": "outbound\_trunk",&#x20;
"date\_created": "2026-01-23T09:24:59Z",&#x20;
"date\_updated": "2026-01-23T09:24:59Z",&#x20;
"trunk\_sid": "trmum1f708622631150902801a1n",&#x20;
"status": "active",&#x20;
"domain\_name": "ameyo5m.pstn.exotel.com",&#x20;
"auth\_type": "IP-WHITELIST",&#x20;
"registration\_enabled": "disabled",&#x20;
"edge\_preference": "auto",&#x20;
"nso\_code": "ANY-ANY",&#x20;
"secure\_trunking": "disabled",&#x20;
"destination\_uris": "/v2/accounts/ameyo5m/trunks/trmum1f708622631150902801a1n/destination-uris", "whitelisted\_ips": "/v2/accounts/ameyo5m/trunks/trmum1f708622631150902801a1n/whitelisted-ips", "credentials": "/v2/accounts/ameyo5m/trunks/trmum1f708622631150902801a1n/credentials", "phone\_numbers": "/v2/accounts/ameyo5m/trunks/trmum1f708622631150902801a1n/phone-numbers" }&#x20;
}&#x20;
]&#x20;
}&#x20;
:::

### Response Parameters

| **Parameter Name**        | **Type & Value**                                                    |
| ------------------------- | ------------------------------------------------------------------- |
| metadata.page\_size       | Integer; number of results per page                                 |
| metadata.first\_page\_uri | String; URI for the first page                                      |
| metadata.prev\_page\_uri  | String or null; URI for previous page                               |
| metadata.next\_page\_uri  | String or null; URI for next page                                   |
| response\[]               | Array; list of trunk objects (same fields as Create Trunk response) |



## Update Trunk

Partially updates trunk properties such as trunk\_name, auth\_type, or nso\_code.

### HTTP Request

:::BlockQuote
PUT https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>
:::

### Request Headers

| **Header**   | **Value**        |
| ------------ | ---------------- |
| Content-Type | application/json |

### Request Parameters

| **Parameter Name** | **Mandatory/Optional** | **Value**                                                                                                   |
| ------------------ | ---------------------- | ----------------------------------------------------------------------------------------------------------- |
| trunk\_name        | Optional               | String; Unique identifier for the trunk. Must be alphanumeric with underscores only, maximum 16 characters. |
| auth\_type         | Optional               | String; Authentication type (e.g. IP-WHITELIST)                                                             |
| nso\_code          | Optional               | String; Network Service Operator code. Use ANY-ANY for standard configuration.                              |

### Example Request

:::BlockQuote
curl -s -X PUT "https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>" \ -H "Content-Type: application/json" \ -d '\{ "trunk\_name": "my\_pbx\_trunk" }'
:::

### HTTP Response

On success, the HTTP response status code will be 200 OK.

### Example Response

:::BlockQuote
\{&#x20;
"request\_id": "c719cd56eb5943e789e1bdbd4ce1515a",&#x20;
"method": "PUT",&#x20;
"http\_code": 200,&#x20;
"response":&#x20;
\{ "code": 200,&#x20;
"error\_data": null,&#x20;
"status": "success",&#x20;
"data":&#x20;
\{ "trunk\_name": "my\_pbx\_trunk",&#x20;
"date\_created": "2026-01-23T09:24:59Z",&#x20;
"date\_updated": "2026-01-23T14:10:12Z",&#x20;
"trunk\_sid": "trmum1f708622631150902801a1n",&#x20;
"status": "active",&#x20;
"domain\_name": "\<accounsid>.pstn.exotel.com",&#x20;
"auth\_type": "IP-WHITELIST",&#x20;
"registration\_enabled": "disabled",&#x20;
"edge\_preference": "auto",&#x20;
"nso\_code": "ANY-ANY",&#x20;
"secure\_trunking": "disabled",&#x20;
"destination\_uris": "/v2/accounts/ameyo5m/trunks/trmum1f708622631150902801a1n/destination-uris", "whitelisted\_ips": "/v2/accounts/ameyo5m/trunks/trmum1f708622631150902801a1n/whitelisted-ips", "credentials": "/v2/accounts/ameyo5m/trunks/trmum1f708622631150902801a1n/credentials", "phone\_numbers": "/v2/accounts/ameyo5m/trunks/trmum1f708622631150902801a1n/phone-numbers"&#x20;
}&#x20;
}&#x20;
}
:::

### Response Parameters

| **Parameter Name** | **Type & Value**                                       |
| ------------------ | ------------------------------------------------------ |
| trunk\_sid         | String; Unique identifier for the trunk                |
| trunk\_name        | String; Updated trunk name                             |
| date\_updated      | String; ISO 8601 timestamp when trunk was last updated |
| status             | String; Current trunk status (active / inactive)       |



## Trunk Map Lookup (Exophone)

Resolves which trunk a virtual number (ExoPhone / DID) is mapped to.

### HTTP Request

:::BlockQuote
GET https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunk-maps
:::

### Request Headers

| **Header**   | **Value**        |
| ------------ | ---------------- |
| Content-Type | application/json |

### Query Parameters

| **Parameter Name** | **Mandatory/Optional** | **Value**                                                            |
| ------------------ | ---------------------- | -------------------------------------------------------------------- |
| exophone           | Mandatory              | String; Virtual number / DID in E.164 format. Example: +919876543210 |
| trunk\_sid         | Optional               | String; optionally constrain lookup to a specific trunk              |

### Example Request

:::BlockQuote
curl -s -X GET "https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunk-maps?exophone=+919876543210"
:::

### HTTP Response

On success, the HTTP response status code will be 200 OK.

### Example Response

:::BlockQuote
\{&#x20;
"request\_id": "13ab9319cf574486ba299c364f82cade",&#x20;
"method": "GET",&#x20;
"http\_code": 200,&#x20;
"response":&#x20;
\{ "code": 200,&#x20;
"error\_data": null,&#x20;
"status": "success",&#x20;
"data":&#x20;
\{ "exophone": "+919876543210",&#x20;
"trunk\_sid": "trmum1f708622631150902801a1n",&#x20;
"phone\_number\_id": "41512",&#x20;
"mode": "pstn"&#x20;
}&#x20;
}&#x20;
}
:::

### Response Parameters

| **Parameter Name** | **Type & Value**                                                                                    |
| ------------------ | --------------------------------------------------------------------------------------------------- |
| exophone           | String; The queried virtual number in E.164 format                                                  |
| trunk\_sid         | String; Trunk SID associated with this number                                                       |
| phone\_number\_id  | String; Numeric mapping id (same id used by Update Phone Number Mode / Delete Phone Number Mapping) |
| mode               | String or null; Routing mode (pstn / flow / null)                                                   |

## Delete Phone Number Mapping

Detaches a phone number (DID/ExoPhone) from the trunk.

**Important:** Pass the numeric mapping id returned when you mapped the phone number (e.g. 41523), **not** the phone number itself. The id is passed as query parameter id.

### HTTP Request

:::BlockQuote
DELETE https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/phone-numbers?id=\<phone\_number\_id>
:::

### Example Request

:::BlockQuote
curl -s -X DELETE "https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/phone-numbers?id=41523"
:::

### HTTP Response

On success, the HTTP response status code will be 200 OK.

### Example Response

:::BlockQuote
\{&#x20;
"request\_id": "c719cd56eb5943e789e1bdbd4ce1515a",&#x20;
"method": "DELETE",&#x20;
"http\_code": 200,&#x20;
"response":&#x20;
\{ "code": 200,&#x20;
"error\_data": null,&#x20;
"status": "success",&#x20;
"data": \{ "id": "41523",&#x20;
"phone\_number": "+918040264208",&#x20;
"trunk\_sid": "trmum1f708622631150902801a1n",&#x20;
"date\_created": "2026-01-23T13:28:11Z",&#x20;
"date\_updated": "2026-01-23T13:41:59Z",&#x20;
"mode": "flow"&#x20;
}&#x20;
}&#x20;
}
:::

### Response Parameters

| **Parameter Name** | **Type & Value**                                  |
| ------------------ | ------------------------------------------------- |
| id                 | String; Deleted phone number mapping id           |
| phone\_number      | String; The detached phone number in E.164 format |
| trunk\_sid         | String; The trunk this mapping belonged to        |
| mode               | String or null; Routing mode at time of delete    |

## Update Whitelisted IP

Updates an existing ACL (whitelisted IP) entry — for example to change IP or subnet mask.

**Important:** \\\<whitelist\\\_entry\\\_id> is the numeric id returned when you mapped the ACL (e.g. 1153), **not** the IP address itself.

### HTTP Request

:::BlockQuote
PUT https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/whitelisted-ips/\<whitelist\_entry\_id>
:::

### Request Headers

| **Header**   | **Value**        |
| ------------ | ---------------- |
| Content-Type | application/json |

### Request Parameters

| **Parameter Name** | **Mandatory/Optional** | **Value**                                              |
| ------------------ | ---------------------- | ------------------------------------------------------ |
| ip                 | Mandatory              | String; IPv4 address. Example: 44.248.146.11           |
| mask               | Mandatory              | Integer; Subnet mask in CIDR notation. Example: 32, 24 |

### Example Request

:::BlockQuote
curl -s -X PUT "https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/whitelisted-ips/1153" \ -H "Content-Type: application/json" \ -d '\{ "ip": "44.248.146.11", "mask": 32 }'
:::

### HTTP Response

On success, the HTTP response status code will be 200 OK.

### Example Response

:::BlockQuote
\{&#x20;
"request\_id": "3daaed4cd05d443f854e07e60dd4c008",&#x20;
"method": "PUT",&#x20;
"http\_code": 200,&#x20;
"response":&#x20;
\{ "code": 200,&#x20;
"error\_data": null,&#x20;
"status": "success",&#x20;
"data": \{ "id": "1153", "mask": 32, "trunk\_sid": "trmum1f708622631150902801a1n",&#x20;
"ip": "44.248.146.11",&#x20;
"friendly\_name": null,&#x20;
"date\_created": "2026-01-23T11:37:36Z",&#x20;
"date\_updated": "2026-01-23T15:02:10Z"&#x20;
}&#x20;
}&#x20;
}
:::

### Response Parameters

| **Parameter Name** | **Type & Value**                                     |
| ------------------ | ---------------------------------------------------- |
| id                 | String; Unique identifier for this ACL entry         |
| ip                 | String; The whitelisted IP address                   |
| mask               | Integer; Subnet mask in CIDR notation                |
| trunk\_sid         | String; The trunk this ACL is associated with        |
| date\_updated      | String; ISO 8601 timestamp when ACL was last updated |

## Delete Whitelisted IP

Removes an ACL (whitelisted IP) entry from the trunk.

**Important:** Whitelist entry id is passed as query param id (not /whitelisted-ips/\\\<id>).

### HTTP Request

:::BlockQuote
DELETE https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/whitelisted-ips?id=\<whitelist\_entry\_id>
:::

### Example Request

:::BlockQuote
curl -s -X DELETE "https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/whitelisted-ips?id=1153"
:::

### HTTP Response

On success, the HTTP response status code will be 200 OK.

### Example Response

:::BlockQuote
\{&#x20;
"request\_id": "91dc982ca79846479c6f9678c788cfc1",&#x20;
"method": "DELETE",&#x20;
"http\_code": 200,&#x20;
"response":&#x20;
\{ "code": 200,&#x20;
"error\_data": null,&#x20;
"status": "success",&#x20;
"data":&#x20;
\{ "id": "1153",&#x20;
"mask": 32,&#x20;
"trunk\_sid": "trmum1f708622631150902801a1n",&#x20;
"ip": "44.248.146.11",&#x20;
"friendly\_name": null,&#x20;
"date\_created": "2026-01-23T11:37:36Z",&#x20;
"date\_updated": "2026-01-23T11:37:36Z"&#x20;
}&#x20;
}&#x20;
}
:::

### Response Parameters

| **Parameter Name** | **Type & Value**                         |
| ------------------ | ---------------------------------------- |
| id                 | String; Deleted ACL entry id             |
| ip                 | String; The IP that was removed          |
| mask               | Integer; Subnet mask that was configured |
| trunk\_sid         | String; The trunk this ACL belonged to   |



## Update Destination URI

Updates load-balancing attributes (priority, weight) for an existing destination URI.

**Important:** \\\<destination\\\_id> is the numeric id returned when you mapped the destination URI (e.g. 2543).

### HTTP Request

:::BlockQuote
PUT https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/destination-uris/\<destination\_id>
:::

### Request Headers

| **Header**   | **Value**        |
| ------------ | ---------------- |
| Content-Type | application/json |

### Request Parameters

| **Parameter Name** | **Mandatory/Optional** | **Value**                                           |
| ------------------ | ---------------------- | --------------------------------------------------- |
| priority           | Optional               | Integer; Lower values = higher priority. Default: 0 |
| weight             | Optional               | Integer; Higher values = more traffic. Default: 1   |

### Example Request

:::BlockQuote
curl -s -X PUT "https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/destination-uris/2543" \ -H "Content-Type: application/json" \ -d '\{ "priority": 0, "weight": 5 }'
:::

### HTTP Response

On success, the HTTP response status code will be 200 OK.

### Example Response

:::BlockQuote
\{&#x20;
"request\_id": "63999f0a98a24a0aa58ab5b74aec9f0a",&#x20;
"method": "PUT",&#x20;
"http\_code": 200,&#x20;
"response":&#x20;
\{ "code": 200,&#x20;
"error\_data": null,&#x20;
"status": "success",&#x20;
"data":&#x20;
\{ "id": "2543",&#x20;
"destination": "sip:44.248.146.11:5061;transport=tls",&#x20;
"date\_created": "2026-01-23T13:38:32Z",&#x20;
"date\_updated": "2026-01-23T16:05:01Z",&#x20;
"type": "public",&#x20;
"priority": 0,&#x20;
"weight": 5,&#x20;
"trunk\_sid": "trmum1f708622631150902801a1n"&#x20;
}&#x20;
}&#x20;
}
:::

### Response Parameters

| **Parameter Name** | **Type & Value**                                             |
| ------------------ | ------------------------------------------------------------ |
| id                 | String; Destination URI id                                   |
| destination        | String; The SIP URI                                          |
| priority           | Integer; Updated priority                                    |
| weight             | Integer; Updated weight                                      |
| trunk\_sid         | String; The associated trunk                                 |
| date\_updated      | String; ISO 8601 timestamp when destination was last updated |

## Delete Destination URI

Removes a destination URI from the trunk.

**Important:** Destination id is passed as query param id (not /destination-uris/\\\<id>).

### HTTP Request

:::BlockQuote
DELETE https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/destination-uris?id=\<destination\_id>
:::

### Example Request

:::BlockQuote
curl -s -X DELETE "https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/destination-uris?id=2543"
:::

### HTTP Response

On success, the HTTP response status code will be 200 OK.

### Example Response

:::BlockQuote
\{&#x20;
"request\_id": "bfc1544ab0ab4df3ae49173ccc744331",&#x20;
"method": "DELETE",&#x20;
"http\_code": 200,&#x20;
"response":&#x20;
\{ "code": 200,&#x20;
"error\_data": null,&#x20;
"status": "success",&#x20;
"data":&#x20;
\{ "id": "2543",&#x20;
"destination": "sip:44.248.146.11:5061;transport=tls",&#x20;
"date\_created": "2026-01-23T13:38:32Z",&#x20;
"date\_updated": "2026-01-23T13:38:32Z",&#x20;
"type": "public",&#x20;
"priority": 0,&#x20;
"weight": 1,&#x20;
"trunk\_sid": "trmum1f708622631150902801a1n"&#x20;
}&#x20;
}&#x20;
}
:::

### Response Parameters

| **Parameter Name** | **Type & Value**                               |
| ------------------ | ---------------------------------------------- |
| id                 | String; Deleted destination URI id             |
| destination        | String; The SIP URI that was removed           |
| trunk\_sid         | String; The trunk this destination belonged to |

## Update SIP Credential

Updates an existing SIP digest credential entry (rotate password, rename label, or change username).

**Important:** Credential id is in the **path** (/credentials/\\\<credential\\\_id>), unlike Delete Credentials which uses query ?id=.

### HTTP Request

:::BlockQuote
PUT https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/credentials/\<credential\_id>
:::

### Request Headers

| **Header**   | **Value**        |
| ------------ | ---------------- |
| Content-Type | application/json |

### Request Parameters

| **Parameter Name** | **Mandatory/Optional** | **Value**                                                         |
| ------------------ | ---------------------- | ----------------------------------------------------------------- |
| user\_name         | Optional               | String; New SIP digest username                                   |
| password           | Optional               | String; New SIP digest password (use a strong secret)             |
| friendly\_name     | Optional               | String; Label to identify where the creds are used (max 32 chars) |

### Example Request

:::BlockQuote
curl -s -X PUT "https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/credentials/1234" \ -H "Content-Type: application/json" \ -d '\{ "friendly\_name": "elevenlabs\_prod", "password": "replace\_with\_strong\_password" }'
:::

### HTTP Response

On success, the HTTP response status code will be 200 OK.

### Example Response

:::BlockQuote
\{&#x20;
"request\_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",&#x20;
"method": "PUT",&#x20;
"http\_code": 200,&#x20;
"response":&#x20;
\{ "code": 200,&#x20;
"error\_data": null,&#x20;
"status": "success",&#x20;
"data": \{ "id": "1234",&#x20;
"trunk\_sid": "trmum17d8e9a37a3732ecbf91a3u",&#x20;
"user\_name": "voice\_ai\_user",&#x20;
"friendly\_name": "elevenlabs\_prod",&#x20;
"date\_created": "2026-01-23T11:37:36Z",&#x20;
"date\_updated": "2026-01-23T16:20:00Z"&#x20;
}&#x20;
}&#x20;
}
:::

### Response Parameters

| **Parameter Name** | **Type & Value**                                            |
| ------------------ | ----------------------------------------------------------- |
| id                 | String; Credential entry id                                 |
| trunk\_sid         | String; The associated trunk                                |
| user\_name         | String; SIP digest username                                 |
| friendly\_name     | String or null; Optional label                              |
| date\_updated      | String; ISO 8601 timestamp when credential was last updated |



## List Trunk Settings

Retrieves settings configured on the trunk (for example trunk\_external\_alias / caller ID).

### HTTP Request

:::BlockQuote
GET https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/settings
:::

### Example Request

:::BlockQuote
curl -s -X GET "https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/settings"
:::

### HTTP Response

On success, the HTTP response status code will be 200 OK.

### Example Response

:::BlockQuote
\{&#x20;
"request\_id": "8ce98845365f43fd97c2f46df38438c6",&#x20;
"method": "GET",&#x20;
"http\_code": 200,&#x20;
"response":&#x20;
\[&#x20;
\{ "code": 200,&#x20;
"error\_data": null,&#x20;
"status": "success",&#x20;
"data":&#x20;
\{ "name": "trunk\_external\_alias",&#x20;
"value": "+919876543210",&#x20;
"trunk\_sid": "trmum1f708622631150902801a1n",&#x20;
"date\_created": "2026-01-23T13:34:50Z",&#x20;
"date\_updated": "2026-01-23T13:34:50Z"&#x20;
}&#x20;
}&#x20;
]&#x20;
}
:::

### Response Parameters

| **Parameter Name** | **Type & Value**                                         |
| ------------------ | -------------------------------------------------------- |
| name               | String; Setting name (e.g. trunk\_external\_alias)       |
| value              | String; Setting value (e.g. caller ID in E.164)          |
| trunk\_sid         | String; The associated trunk                             |
| date\_created      | String; ISO 8601 timestamp when setting was created      |
| date\_updated      | String; ISO 8601 timestamp when setting was last updated |

## Delete Trunk Setting

Removes a trunk setting by name (for example clears the outbound caller ID alias).

**Important:** Setting key is passed as query param name.

### HTTP Request

:::BlockQuote
DELETE https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/settings?name=\<setting\_name>
:::

### Query Parameters

| **Parameter Name** | **Mandatory/Optional** | **Value**                                                      |
| ------------------ | ---------------------- | -------------------------------------------------------------- |
| name               | Mandatory              | String; Setting key to remove. Example: trunk\_external\_alias |

### Example Request

:::BlockQuote
curl -s -X DELETE "https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v2/accounts/\<your\_sid>/trunks/\<trunk\_sid>/settings?name=trunk\_external\_alias"
:::

### HTTP Response

On success, the HTTP response status code will be 200 OK.

### Example Response

:::BlockQuote
\{&#x20;
"request\_id": "8ce98845365f43fd97c2f46df38438c6",&#x20;
"method": "DELETE",&#x20;
"http\_code": 200,&#x20;
"response":&#x20;
\{ "code": 200,&#x20;
"error\_data": null,&#x20;
"status": "success",&#x20;
"data":&#x20;
\{ "name": "trunk\_external\_alias",&#x20;
"value": "+919876543210",&#x20;
"trunk\_sid": "trmum1f708622631150902801a1n",&#x20;
"date\_created": "2026-01-23T13:34:50Z",&#x20;
"date\_updated": "2026-01-23T13:34:50Z"&#x20;
}&#x20;
}&#x20;
}
:::

### Response Parameters

| **Parameter Name** | **Type & Value**               |
| ------------------ | ------------------------------ |
| name               | String; Deleted setting name   |
| value              | String; Value that was removed |
| trunk\_sid         | String; The associated trunk   |

#

