×

Retrieves all phone numbers mapped to a trunk.

GET

https://<your_api_key>:<your_api_token>@<subdomain>/v2/accounts/<your_sid>/trunks/<trunk_sid>/phone-numbers

Replace <your_api_key> and <your_api_token> with the API key and token created by you.

  • Replace <your_sid> with your “Account sid”
  • Replace <subdomain> with the region of your account
    1. <subdomain> of Singapore cluster is @api.exotel.com
    2. <subdomain> of Mumbai cluster is @api.in.exotel.com

<your_api_key> , <your_api_token> and <your_sid> are available in the API settings page of your Exotel Dashboard

Request Headers

Header Value
Content-Type application/json

 

curl -X GET "https://<your_api_key>:<your_api_token>@<subdomain>/v2/accounts/<your_sid>/trunks/<trunk_sid>/phone-numbers"

HTTP Response

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

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
{
  "request_id": "785471d288054cbf8c677b75e0b5f2f8",
  "method": "GET",
  "http_code": 200,
  "metadata": {
    "page_size": 50,
    "first_page_uri": "/v2/accounts/ameyo5m/trunks/trmum1f708622631150902801a1n/phone-numbers?offset=0&page_size=50",
    "prev_page_uri": null,
    "next_page_uri": null
  },
  "response": [
    {
      "code": 200,
      "error_data": null,
      "status": "success",
      "data": {
        "id": "41523",
        "phone_number": "+918040264208",
        "trunk_sid": "trmum1f708622631150902801a1n",
        "date_created": "2026-01-23T13:28:11Z",
        "date_updated": "2026-01-23T13:41:59Z",
        "mode": "flow"
      }
    }
  ]
}