Twilio Pricing API

The Twilio Pricing API is a service provided by Twilio that allows users to query and access pricing information for various communication services offered by the company. This API enables users to retrieve real-time cost estimates for making calls, sending SMS messages, and other communication services across different countries and regions.

OpenAPI Specification

pricing-openapi-original.yml Raw ↑
components:
  schemas:
    pricing.v2.trunking_country:
      type: object
      properties:
        country:
          type: string
          nullable: true
          description: The name of the country.
        iso_country:
          type: string
          format: iso-country-code
          nullable: true
          description: >-
            The [ISO country
            code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the resource.
    pricing.v2.trunking_country-instance:
      type: object
      properties:
        country:
          type: string
          nullable: true
          description: The name of the country.
        iso_country:
          type: string
          format: iso-country-code
          nullable: true
          description: >-
            The [ISO country
            code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
        terminating_prefix_prices:
          type: array
          items:
            type: object
            format: outbound-prefix-price-with-origin
            properties:
              origination_prefixes:
                type: array
                items:
                  type: string
              destination_prefixes:
                type: array
                items:
                  type: string
              base_price:
                type: number
              current_price:
                type: number
              friendly_name:
                type: string
          nullable: true
          description: >-
            The list of
            [TerminatingPrefixPrice](https://www.twilio.com/docs/voice/pricing#outbound-prefix-price-with-origin)
            records.
        originating_call_prices:
          type: array
          items:
            type: object
            format: inbound-call-price
            properties:
              base_price:
                type: number
              current_price:
                type: number
              number_type:
                type: string
          nullable: true
          description: >-
            The list of
            [OriginatingCallPrice](https://www.twilio.com/docs/voice/pricing#inbound-call-price)
            records.
        price_unit:
          type: string
          format: currency
          nullable: true
          description: >-
            The currency in which prices are measured, specified in [ISO
            4127](https://www.iso.org/iso/home/standards/currency_codes.htm)
            format (e.g. `usd`, `eur`, `jpy`).
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the resource.
    pricing.v2.trunking_number:
      type: object
      properties:
        destination_number:
          type: string
          format: phone-number
          nullable: true
          description: >-
            The destination phone number in
            [E.164](https://www.twilio.com/docs/glossary/what-e164) format,
            which consists of a + followed by the country code and subscriber
            number.
        origination_number:
          type: string
          format: phone-number
          nullable: true
          description: >-
            The origination phone number in
            [[E.164](https://www.twilio.com/docs/glossary/what-e164) format,
            which consists of a + followed by the country code and subscriber
            number.
        country:
          type: string
          nullable: true
          description: The name of the country.
        iso_country:
          type: string
          format: iso-country-code
          nullable: true
          description: >-
            The [ISO country
            code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
        terminating_prefix_prices:
          type: array
          items:
            type: object
            format: outbound-prefix-price-with-origin
            properties:
              origination_prefixes:
                type: array
                items:
                  type: string
              destination_prefixes:
                type: array
                items:
                  type: string
              base_price:
                type: number
              current_price:
                type: number
              friendly_name:
                type: string
          nullable: true
        originating_call_price:
          type: object
          format: inbound-call-price
          properties:
            base_price:
              type: number
            current_price:
              type: number
            number_type:
              type: string
          nullable: true
          description: >-
            The
            [OriginatingCallPrice](https://www.twilio.com/docs/voice/pricing#inbound-call-price)
            record.
        price_unit:
          type: string
          format: currency
          nullable: true
          description: >-
            The currency in which prices are measured, specified in [ISO
            4127](https://www.iso.org/iso/home/standards/currency_codes.htm)
            format (e.g. `usd`, `eur`, `jpy`).
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the resource.
    pricing.v2.voice:
      type: object
      properties:
        name:
          type: string
          nullable: true
          description: The resource name.
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the resource.
        links:
          type: object
          format: uri-map
          nullable: true
          description: The URLs of the related Countries and Numbers resources.
    pricing.v2.voice.voice_country:
      type: object
      properties:
        country:
          type: string
          nullable: true
          description: The name of the country.
        iso_country:
          type: string
          format: iso-country-code
          nullable: true
          description: >-
            The [ISO country
            code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the resource.
    pricing.v2.voice.voice_country-instance:
      type: object
      properties:
        country:
          type: string
          nullable: true
          description: The name of the country.
        iso_country:
          type: string
          format: iso-country-code
          nullable: true
          description: >-
            The [ISO country
            code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
        outbound_prefix_prices:
          type: array
          items:
            type: object
            format: outbound-prefix-price-with-origin
            properties:
              origination_prefixes:
                type: array
                items:
                  type: string
              destination_prefixes:
                type: array
                items:
                  type: string
              base_price:
                type: number
              current_price:
                type: number
              friendly_name:
                type: string
          nullable: true
          description: >-
            The list of
            [OutboundPrefixPriceWithOrigin](https://www.twilio.com/docs/voice/pricing#outbound-prefix-price-with-origin)
            records.
        inbound_call_prices:
          type: array
          items:
            type: object
            format: inbound-call-price
            properties:
              base_price:
                type: number
              current_price:
                type: number
              number_type:
                type: string
          nullable: true
          description: >-
            The list of
            [InboundCallPrice](https://www.twilio.com/docs/voice/pricing#inbound-call-price)
            records.
        price_unit:
          type: string
          format: currency
          nullable: true
          description: >-
            The currency in which prices are measured, specified in [ISO
            4127](https://www.iso.org/iso/home/standards/currency_codes.htm)
            format (e.g. `usd`, `eur`, `jpy`).
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the resource.
    pricing.v2.voice.voice_number:
      type: object
      properties:
        destination_number:
          type: string
          format: phone-number
          nullable: true
          description: >-
            The destination phone number in
            [E.164](https://www.twilio.com/docs/glossary/what-e164) format,
            which consists of a + followed by the country code and subscriber
            number.
        origination_number:
          type: string
          format: phone-number
          nullable: true
          description: >-
            The origination phone number in
            [[E.164](https://www.twilio.com/docs/glossary/what-e164) format,
            which consists of a + followed by the country code and subscriber
            number.
        country:
          type: string
          nullable: true
          description: The name of the country.
        iso_country:
          type: string
          format: iso-country-code
          nullable: true
          description: >-
            The [ISO country
            code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
        outbound_call_prices:
          type: array
          items:
            type: object
            format: outbound-call-price-with-origin
            properties:
              base_price:
                type: number
              current_price:
                type: number
              origination_prefixes:
                type: array
                items:
                  type: string
          nullable: true
          description: >-
            The list of
            [OutboundCallPriceWithOrigin](https://www.twilio.com/docs/voice/pricing#outbound-call-price-with-origin)
            records.
        inbound_call_price:
          type: object
          format: inbound-call-price
          properties:
            base_price:
              type: number
            current_price:
              type: number
            number_type:
              type: string
          nullable: true
          description: >-
            The
            [InboundCallPrice](https://www.twilio.com/docs/voice/pricing#inbound-call-price)
            record.
        price_unit:
          type: string
          format: currency
          nullable: true
          description: >-
            The currency in which prices are measured, specified in [ISO
            4127](https://www.iso.org/iso/home/standards/currency_codes.htm)
            format (e.g. `usd`, `eur`, `jpy`).
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the resource.
    ListTrunkingCountryResponse:
      type: object
      properties:
        countries:
          type: array
          items:
            $ref: '#/components/schemas/pricing.v2.trunking_country'
        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
    ListVoiceCountryResponse:
      type: object
      properties:
        countries:
          type: array
          items:
            $ref: '#/components/schemas/pricing.v2.voice.voice_country'
        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
  securitySchemes:
    accountSid_authToken:
      type: http
      scheme: basic
info:
  title: Twilio - Pricing
  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: [email protected]
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.52.0
openapi: 3.0.1
paths:
  /v2/Trunking/Countries:
    servers:
      - url: https://pricing.twilio.com
    description: Trunking pricing by country
    x-twilio:
      defaultOutputProperties:
        - country
        - price_unit
      pathType: list
    get:
      description: ''
      tags:
        - Trunking
      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/ListTrunkingCountryResponse'
          description: OK
      security:
        - accountSid_authToken: []
      operationId: ListTrunkingCountry
      x-maturity:
        - GA
  /v2/Trunking/Countries/{IsoCountry}:
    servers:
      - url: https://pricing.twilio.com
    description: Trunking pricing by country
    x-twilio:
      defaultOutputProperties:
        - country
        - price_unit
      pathType: instance
    get:
      description: Fetch a specific Country.
      tags:
        - Trunking
      parameters:
        - name: IsoCountry
          in: path
          description: >-
            The [ISO country
            code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the
            origin-based voice pricing information to fetch.
          schema:
            type: string
            format: iso-country-code
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pricing.v2.trunking_country-instance'
          description: OK
      security:
        - accountSid_authToken: []
      operationId: FetchTrunkingCountry
      x-maturity:
        - GA
  /v2/Trunking/Numbers/{DestinationNumber}:
    servers:
      - url: https://pricing.twilio.com
    description: Trunking pricing for a specific phone number
    x-twilio:
      defaultOutputProperties:
        - country
        - inbound_call_price
        - price_unit
      pathType: instance
    get:
      description: >-
        Fetch pricing information for a specific destination and, optionally,
        origination phone number.
      tags:
        - Trunking
      parameters:
        - name: DestinationNumber
          in: path
          description: >-
            The destination phone number, in
            [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for
            which to fetch the origin-based voice pricing information. E.164
            format consists of a + followed by the country code and subscriber
            number.
          schema:
            type: string
            format: phone-number
          required: true
        - name: OriginationNumber
          in: query
          description: >-
            The origination phone number, in
            [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for
            which to fetch the origin-based voice pricing information. E.164
            format consists of a + followed by the country code and subscriber
            number.
          schema:
            type: string
            format: phone-number
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pricing.v2.trunking_number'
          description: OK
      security:
        - accountSid_authToken: []
      operationId: FetchTrunkingNumber
      x-maturity:
        - GA
  /v2/Trunking/Numbers:
    servers:
      - url: https://pricing.twilio.com
    description: Trunking pricing for a specific phone number
    x-twilio:
      defaultOutputProperties:
        - country
        - inbound_call_price
        - price_unit
      pathType: list
  /v2/Voice:
    servers:
      - url: https://pricing.twilio.com
    description: Voice pricing
    x-twilio:
      defaultOutputProperties:
        - name
      pathType: instance
  /v2/Voice/Countries:
    servers:
      - url: https://pricing.twilio.com
    description: Voice pricing by country
    x-twilio:
      defaultOutputProperties:
        - country
        - price_unit
      pathType: list
      parent: /Voice
    get:
      description: ''
      tags:
        - Voice
      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/ListVoiceCountryResponse'
          description: OK
      security:
        - accountSid_authToken: []
      operationId: ListVoiceCountry
      x-maturity:
        - GA
  /v2/Voice/Countries/{IsoCountry}:
    servers:
      - url: https://pricing.twilio.com
    description: Voice pricing by country
    x-twilio:
      defaultOutputProperties:
        - country
        - price_unit
      pathType: instance
      parent: /Voice
    get:
      description: Fetch a specific Country.
      tags:
        - Voice
      parameters:
        - name: IsoCountry
          in: path
          description: >-
            The [ISO country
            code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the
            origin-based voice pricing information to fetch.
          schema:
            type: string
            format: iso-country-code
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pricing.v2.voice.voice_country-instance'
          description: OK
      security:
        - accountSid_authToken: []
      operationId: FetchVoiceCountry
      x-maturity:
        - GA
  /v2/Voice/Numbers/{DestinationNumber}:
    servers:
      - url: https://pricing.twilio.com
    description: Voice pricing for a specific phone number
    x-twilio:
      defaultOutputProperties:
        - country
        - inbound_call_price
        - price_unit
      pathType: instance
      parent: /Voice
    get:
      description: >-
        Fetch pricing information for a specific destination and, optionally,
        origination phone number.
      tags:
        - Voice
      parameters:
        - name: DestinationNumber
          in: path
          description: >-
            The destination phone number, in
            [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for
            which to fetch the origin-based voice pricing information. E.164
            format consists of a + followed by the country code and subscriber
            number.
          schema:
            type: string
            format: phone-number
          required: true
        - name: OriginationNumber
          in: query
          description: >-
            The origination phone number, in
            [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for
            which to fetch the origin-based voice pricing information. E.164
            format consists of a + followed by the country code and subscriber
            number.
          schema:
            type: string
            format: phone-number
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pricing.v2.voice.voice_number'
          description: OK
      security:
        - accountSid_authToken: []
      operationId: FetchVoiceNumber
      x-maturity:
        - GA
  /v2/Voice/Numbers:
    servers:
      - url: https://pricing.twilio.com
    description: Voice pricing for a specific phone number
    x-twilio:
      defaultOutputProperties:
        - country
        - inbound_call_price
        - price_unit
      pathType: list
      parent: /Voice
servers:
  - url: https://pricing.twilio.com
tags:
  - name: Trunking
  - name: Voice
x-maturity:
  - name: GA
    description: This product is Generally Available.