List byoc trunk

GET /v1/ByocTrunks

BYOC Trunks allow you to bring your own voice carrier to Twilio, enabling your calls to use our Programmable Voice APIs.

Query parameters

  • PageSize integer(int64)

    How many resources to return in each list page. The default is 50, and the maximum is 1000.

    Minimum value is 1, maximum value is 1000.

  • Page integer

    The page index. This value is simply for client state.

    Minimum value is 0.

  • PageToken string

    The page token. This is provided by the API.

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • byoc_trunks array[object]
      Hide byoc_trunks attributes Show byoc_trunks attributes object
      • account_sid string | null

        The SID of the Account that created the BYOC Trunk resource.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

      • sid string | null

        The unique string that that we created to identify the BYOC Trunk resource.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^BY[0-9a-fA-F]{32}$.

      • friendly_name string | null

        The string that you assigned to describe the resource.

      • voice_url string(uri) | null

        The URL we call using the voice_method when the BYOC Trunk receives a call.

      • voice_method string(http-method) | null

        The HTTP method we use to call voice_url. Can be: GET or POST.

        Values are GET or POST.

      • voice_fallback_url string(uri) | null

        The URL that we call when an error occurs while retrieving or executing the TwiML requested from voice_url.

      • voice_fallback_method string(http-method) | null

        The HTTP method we use to call voice_fallback_url. Can be: GET or POST.

        Values are GET or POST.

      • status_callback_url string(uri) | null

        The URL that we call to pass status parameters (such as call ended) to your application.

      • status_callback_method string(http-method) | null

        The HTTP method we use to call status_callback_url. Either GET or POST.

        Values are GET or POST.

      • cnam_lookup_enabled boolean | null

        Whether Caller ID Name (CNAM) lookup is enabled for the trunk. If enabled, all inbound calls to the BYOC Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See CNAM Lookups for more information.

      • connection_policy_sid string | null

        The SID of the Connection Policy that Twilio will use when routing traffic to your communications infrastructure.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^NY[0-9a-fA-F]{32}$.

      • from_domain_sid string | null

        The SID of the SIP Domain that should be used in the From header of originating calls sent to your SIP infrastructure. If your SIP infrastructure allows users to "call back" an incoming call, configure this with a SIP Domain to ensure proper routing. If not configured, the from domain will default to "sip.twilio.com".

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^SD[0-9a-fA-F]{32}$.

      • date_created string(date-time) | null

        The date and time in GMT that the resource was created specified in RFC 2822 format.

      • date_updated string(date-time) | null

        The date and time in GMT that the resource was last updated specified in RFC 2822 format.

      • url string(uri) | null

        The absolute URL of the resource.

    • meta object
      Hide meta attributes Show meta attributes object
      • first_page_url string(uri)
      • key string
      • next_page_url string(uri) | null
      • page integer
      • page_size integer
      • previous_page_url string(uri) | null
      • url string(uri)
GET /v1/ByocTrunks
curl \
 --request GET 'https://voice.twilio.com/v1/ByocTrunks' \
 --user "username:password"
Response examples (200)
{
  "meta": {
    "key": "byoc_trunks",
    "url": "https://voice.twilio.com/v1/ByocTrunks?PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://voice.twilio.com/v1/ByocTrunks?PageSize=50&Page=0",
    "previous_page_url": null
  },
  "byoc_trunks": [
    {
      "sid": "BYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "url": "https://voice.twilio.com/v1/ByocTrunks/BYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "voice_url": "https://byoc.example.com/twilio/app",
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "date_created": "2020-03-18T23:31:36Z",
      "date_updated": "2020-03-18T23:31:37Z",
      "voice_method": "POST",
      "friendly_name": "friendly_name",
      "from_domain_sid": "SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "voice_fallback_url": "https://byoc.example.com/twilio/fallback",
      "cnam_lookup_enabled": false,
      "status_callback_url": "https://byoc.example.com/twilio/status_callback",
      "connection_policy_sid": "NYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "voice_fallback_method": "POST",
      "status_callback_method": "POST"
    }
  ]
}
{
  "meta": {
    "key": "byoc_trunks",
    "url": "https://voice.twilio.com/v1/ByocTrunks?PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://voice.twilio.com/v1/ByocTrunks?PageSize=50&Page=0",
    "previous_page_url": null
  },
  "byoc_trunks": []
}