Twilio ByocTrunks API

The ByocTrunks API from Twilio — 2 operation(s) for byoctrunks.

Documentation

Specifications

Other Resources

OpenAPI Specification

twilio-byoctrunks-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Twilio - Accounts A2p ByocTrunks API
  description: This is the public Twilio REST API.
  termsOfService: https://www.twilio.com/legal/tos
  contact:
    name: Twilio Support
    url: https://support.twilio.com
    email: support@twilio.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.52.0
servers:
- url: https://accounts.twilio.com
tags:
- name: ByocTrunks
paths:
  /v1/ByocTrunks:
    servers:
    - url: https://voice.twilio.com
    description: BYOC Trunks allow you to bring your own voice carrier to Twilio, enabling your calls to use our Programmable Voice APIs.
    x-twilio:
      defaultOutputProperties:
      - sid
      - friendly_name
      - voice_url
      pathType: list
    post:
      description: ''
      tags:
      - ByocTrunks
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voice.v1.byoc_trunk'
          description: Created
      security:
      - accountSid_authToken: []
      operationId: CreateByocTrunk
      x-maturity:
      - GA
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CreateByocTrunkRequest'
    get:
      description: ''
      tags:
      - ByocTrunks
      parameters:
      - name: PageSize
        in: query
        description: How many resources to return in each list page. The default is 50, and the maximum is 1000.
        schema:
          type: integer
          minimum: 1
          maximum: 1000
      - name: Page
        in: query
        description: The page index. This value is simply for client state.
        schema:
          type: integer
          minimum: 0
      - name: PageToken
        in: query
        description: The page token. This is provided by the API.
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListByocTrunkResponse'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: ListByocTrunk
      x-maturity:
      - GA
  /v1/ByocTrunks/{Sid}:
    servers:
    - url: https://voice.twilio.com
    description: BYOC Trunks allow you to bring your own voice carrier to Twilio, enabling your calls to use our Programmable Voice APIs.
    x-twilio:
      defaultOutputProperties:
      - sid
      - friendly_name
      - voice_url
      pathType: instance
    get:
      description: ''
      tags:
      - ByocTrunks
      parameters:
      - name: Sid
        in: path
        description: The Twilio-provided string that uniquely identifies the BYOC Trunk resource to fetch.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^BY[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voice.v1.byoc_trunk'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: FetchByocTrunk
      x-maturity:
      - GA
    post:
      description: ''
      tags:
      - ByocTrunks
      parameters:
      - name: Sid
        in: path
        description: The Twilio-provided string that uniquely identifies the BYOC Trunk resource to update.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^BY[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voice.v1.byoc_trunk'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: UpdateByocTrunk
      x-maturity:
      - GA
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/UpdateByocTrunkRequest'
    delete:
      description: ''
      tags:
      - ByocTrunks
      parameters:
      - name: Sid
        in: path
        description: The Twilio-provided string that uniquely identifies the BYOC Trunk resource to delete.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^BY[0-9a-fA-F]{32}$
        required: true
      responses:
        '204':
          description: The resource was deleted successfully.
      security:
      - accountSid_authToken: []
      operationId: DeleteByocTrunk
      x-maturity:
      - GA
components:
  schemas:
    ListByocTrunkResponse:
      type: object
      properties:
        byoc_trunks:
          type: array
          items:
            $ref: '#/components/schemas/voice.v1.byoc_trunk'
        meta:
          type: object
          properties:
            first_page_url:
              type: string
              format: uri
            next_page_url:
              type: string
              format: uri
              nullable: true
            page:
              type: integer
            page_size:
              type: integer
            previous_page_url:
              type: string
              format: uri
              nullable: true
            url:
              type: string
              format: uri
            key:
              type: string
    voice.v1.byoc_trunk:
      type: object
      properties:
        account_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^AC[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the BYOC Trunk resource.
        sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^BY[0-9a-fA-F]{32}$
          nullable: true
          description: The unique string that that we created to identify the BYOC Trunk resource.
        friendly_name:
          type: string
          nullable: true
          description: The string that you assigned to describe the resource.
        voice_url:
          type: string
          format: uri
          nullable: true
          description: The URL we call using the `voice_method` when the BYOC Trunk receives a call.
          x-twilio:
            pii:
              handling: standard
              deleteSla: 30
        voice_method:
          type: string
          format: http-method
          enum:
          - HEAD
          - GET
          - POST
          - PATCH
          - PUT
          - DELETE
          nullable: true
          description: 'The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`.'
        voice_fallback_url:
          type: string
          format: uri
          nullable: true
          description: The URL that we call when an error occurs while retrieving or executing the TwiML requested from `voice_url`.
          x-twilio:
            pii:
              handling: standard
              deleteSla: 30
        voice_fallback_method:
          type: string
          format: http-method
          enum:
          - HEAD
          - GET
          - POST
          - PATCH
          - PUT
          - DELETE
          nullable: true
          description: 'The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`.'
        status_callback_url:
          type: string
          format: uri
          nullable: true
          description: The URL that we call to pass status parameters (such as call ended) to your application.
          x-twilio:
            pii:
              handling: standard
              deleteSla: 30
        status_callback_method:
          type: string
          format: http-method
          enum:
          - HEAD
          - GET
          - POST
          - PATCH
          - PUT
          - DELETE
          nullable: true
          description: The HTTP method we use to call `status_callback_url`. Either `GET` or `POST`.
        cnam_lookup_enabled:
          type: boolean
          nullable: true
          description: 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](https://www.twilio.com/docs/sip-trunking#CNAM) for more information.
        connection_policy_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^NY[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the Connection Policy that Twilio will use when routing traffic to your communications infrastructure.
        from_domain_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^SD[0-9a-fA-F]{32}$
          nullable: true
          description: 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](https://www.twilio.com/docs/voice/api/sending-sip) to ensure proper routing. If not configured, the from domain will default to "sip.twilio.com".
        date_created:
          type: string
          format: date-time
          nullable: true
          description: The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
        date_updated:
          type: string
          format: date-time
          nullable: true
          description: The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the resource.
    UpdateByocTrunkRequest:
      type: object
      properties:
        FriendlyName:
          type: string
          description: A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
        VoiceUrl:
          type: string
          format: uri
          description: The URL we should call when the BYOC Trunk receives a call.
        VoiceMethod:
          type: string
          format: http-method
          enum:
          - HEAD
          - GET
          - POST
          - PATCH
          - PUT
          - DELETE
          description: The HTTP method we should use to call `voice_url`
        VoiceFallbackUrl:
          type: string
          format: uri
          description: The URL that we should call when an error occurs while retrieving or executing the TwiML requested by `voice_url`.
        VoiceFallbackMethod:
          type: string
          format: http-method
          enum:
          - HEAD
          - GET
          - POST
          - PATCH
          - PUT
          - DELETE
          description: 'The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`.'
        StatusCallbackUrl:
          type: string
          format: uri
          description: The URL that we should call to pass status parameters (such as call ended) to your application.
        StatusCallbackMethod:
          type: string
          format: http-method
          enum:
          - HEAD
          - GET
          - POST
          - PATCH
          - PUT
          - DELETE
          description: 'The HTTP method we should use to call `status_callback_url`. Can be: `GET` or `POST`.'
        CnamLookupEnabled:
          type: boolean
          description: 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](https://www.twilio.com/docs/sip-trunking#CNAM) for more information.
        ConnectionPolicySid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^NY[0-9a-fA-F]{32}$
          description: The SID of the Connection Policy that Twilio will use when routing traffic to your communications infrastructure.
        FromDomainSid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^SD[0-9a-fA-F]{32}$
          description: 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](https://www.twilio.com/docs/voice/api/sending-sip) to ensure proper routing. If not configured, the from domain will default to "sip.twilio.com".
    CreateByocTrunkRequest:
      type: object
      properties:
        FriendlyName:
          type: string
          description: A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
        VoiceUrl:
          type: string
          format: uri
          description: The URL we should call when the BYOC Trunk receives a call.
        VoiceMethod:
          type: string
          format: http-method
          enum:
          - HEAD
          - GET
          - POST
          - PATCH
          - PUT
          - DELETE
          description: 'The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`.'
        VoiceFallbackUrl:
          type: string
          format: uri
          description: The URL that we should call when an error occurs while retrieving or executing the TwiML from `voice_url`.
        VoiceFallbackMethod:
          type: string
          format: http-method
          enum:
          - HEAD
          - GET
          - POST
          - PATCH
          - PUT
          - DELETE
          description: 'The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`.'
        StatusCallbackUrl:
          type: string
          format: uri
          description: The URL that we should call to pass status parameters (such as call ended) to your application.
        StatusCallbackMethod:
          type: string
          format: http-method
          enum:
          - HEAD
          - GET
          - POST
          - PATCH
          - PUT
          - DELETE
          description: 'The HTTP method we should use to call `status_callback_url`. Can be: `GET` or `POST`.'
        CnamLookupEnabled:
          type: boolean
          description: 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](https://www.twilio.com/docs/sip-trunking#CNAM) for more information.
        ConnectionPolicySid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^NY[0-9a-fA-F]{32}$
          description: The SID of the Connection Policy that Twilio will use when routing traffic to your communications infrastructure.
        FromDomainSid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^SD[0-9a-fA-F]{32}$
          description: 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](https://www.twilio.com/docs/voice/api/sending-sip) to ensure proper routing. If not configured, the from domain will default to "sip.twilio.com".
  securitySchemes:
    accountSid_authToken:
      type: http
      scheme: basic
x-maturity:
- name: GA
  description: This product is Generally Available.
- name: Beta
  description: PLEASE NOTE that this is a Beta product that is subject to change. Use it with caution.