Twilio DialingPermissions API

The DialingPermissions API from Twilio — 4 operation(s) for dialingpermissions.

Documentation

Specifications

Other Resources

OpenAPI Specification

twilio-dialingpermissions-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Twilio - Accounts A2p DialingPermissions 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: DialingPermissions
paths:
  /v1/DialingPermissions/Countries/{IsoCode}:
    servers:
    - url: https://voice.twilio.com
    description: 'TODO: Resource-level docs'
    x-twilio:
      defaultOutputProperties:
      - iso_code
      - name
      - continent
      pathType: instance
      dependentProperties:
        highrisk_special_prefixes:
          mapping:
            iso_code: iso_code
          resource_url: /v1/DialingPermissions/Countries/{iso_code}/HighRiskSpecialPrefixes
      parent: /DialingPermissions
    get:
      description: Retrieve voice dialing country permissions identified by the given ISO country code
      tags:
      - DialingPermissions
      parameters:
      - name: IsoCode
        in: path
        description: The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the DialingPermissions Country resource to fetch
        schema:
          type: string
          format: iso-country-code
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voice.v1.dialing_permissions.dialing_permissions_country-instance'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: FetchDialingPermissionsCountry
      x-maturity:
      - Preview
  /v1/DialingPermissions/Countries:
    servers:
    - url: https://voice.twilio.com
    description: 'TODO: Resource-level docs'
    x-twilio:
      defaultOutputProperties:
      - iso_code
      - name
      - continent
      pathType: list
      dependentProperties:
        highrisk_special_prefixes:
          mapping:
            iso_code: iso_code
          resource_url: /v1/DialingPermissions/Countries/{iso_code}/HighRiskSpecialPrefixes
      parent: /DialingPermissions
    get:
      description: Retrieve all voice dialing country permissions for this account
      tags:
      - DialingPermissions
      parameters:
      - name: IsoCode
        in: query
        description: Filter to retrieve the country permissions by specifying the [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
        schema:
          type: string
          format: iso-country-code
      - name: Continent
        in: query
        description: Filter to retrieve the country permissions by specifying the continent
        schema:
          type: string
      - name: CountryCode
        in: query
        description: Filter the results by specified [country codes](https://www.itu.int/itudoc/itu-t/ob-lists/icc/e164_763.html)
        schema:
          type: string
      - name: LowRiskNumbersEnabled
        in: query
        description: 'Filter to retrieve the country permissions with dialing to low-risk numbers enabled. Can be: `true` or `false`.'
        schema:
          type: boolean
      - name: HighRiskSpecialNumbersEnabled
        in: query
        description: 'Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled. Can be: `true` or `false`'
        schema:
          type: boolean
      - name: HighRiskTollfraudNumbersEnabled
        in: query
        description: 'Filter to retrieve the country permissions with dialing to high-risk [toll fraud](https://www.twilio.com/blog/how-to-protect-your-account-from-toll-fraud-with-voice-dialing-geo-permissions-html) numbers enabled. Can be: `true` or `false`.'
        schema:
          type: boolean
      - 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/ListDialingPermissionsCountryResponse'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: ListDialingPermissionsCountry
      x-maturity:
      - Preview
  /v1/DialingPermissions/BulkCountryUpdates:
    servers:
    - url: https://voice.twilio.com
    description: 'TODO: Resource-level docs'
    x-twilio:
      defaultOutputProperties:
      - update_request
      - update_count
      pathType: list
      parent: /DialingPermissions
    post:
      description: Create a bulk update request to change voice dialing country permissions of one or more countries identified by the corresponding [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
      tags:
      - DialingPermissions
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voice.v1.dialing_permissions.dialing_permissions_country_bulk_update'
          description: Created
      security:
      - accountSid_authToken: []
      operationId: CreateDialingPermissionsCountryBulkUpdate
      x-maturity:
      - Preview
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CreateDialingPermissionsCountryBulkUpdateRequest'
  /v1/DialingPermissions/Countries/{IsoCode}/HighRiskSpecialPrefixes:
    servers:
    - url: https://voice.twilio.com
    description: 'TODO: Resource-level docs'
    x-twilio:
      defaultOutputProperties:
      - prefix
      pathType: list
      parent: /DialingPermissions/Countries/{IsoCode}
      mountName: highrisk_special_prefixes
    get:
      description: Fetch the high-risk special services prefixes from the country resource corresponding to the [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
      tags:
      - DialingPermissions
      parameters:
      - name: IsoCode
        in: path
        description: The [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) to identify the country permissions from which high-risk special service number prefixes are fetched
        schema:
          type: string
          format: iso-country-code
        required: true
      - 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/ListDialingPermissionsHrsPrefixesResponse'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: ListDialingPermissionsHrsPrefixes
      x-maturity:
      - Preview
components:
  schemas:
    ListDialingPermissionsCountryResponse:
      type: object
      properties:
        content:
          type: array
          items:
            $ref: '#/components/schemas/voice.v1.dialing_permissions.dialing_permissions_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
    voice.v1.dialing_permissions.dialing_permissions_country:
      type: object
      properties:
        iso_code:
          type: string
          format: iso-country-code
          nullable: true
          description: The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
        name:
          type: string
          nullable: true
          description: The name of the country.
        continent:
          type: string
          nullable: true
          description: The name of the continent in which the country is located.
        country_codes:
          type: array
          items:
            type: string
          nullable: true
          description: The E.164 assigned [country codes(s)](https://www.itu.int/itudoc/itu-t/ob-lists/icc/e164_763.html)
        low_risk_numbers_enabled:
          type: boolean
          nullable: true
          description: Whether dialing to low-risk numbers is enabled.
        high_risk_special_numbers_enabled:
          type: boolean
          nullable: true
          description: Whether dialing to high-risk special services numbers is enabled. These prefixes include number ranges allocated by the country and include premium numbers, special services, shared cost, and others
        high_risk_tollfraud_numbers_enabled:
          type: boolean
          nullable: true
          description: Whether dialing to high-risk [toll fraud](https://www.twilio.com/blog/how-to-protect-your-account-from-toll-fraud-with-voice-dialing-geo-permissions-html) numbers is enabled. These prefixes include narrow number ranges that have a high-risk of international revenue sharing fraud (IRSF) attacks, also known as [toll fraud](https://www.twilio.com/blog/how-to-protect-your-account-from-toll-fraud-with-voice-dialing-geo-permissions-html). These prefixes are collected from anti-fraud databases and verified by analyzing calls on our network. These prefixes are not available for download and are updated frequently
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of this resource.
        links:
          type: object
          format: uri-map
          nullable: true
          description: A list of URLs related to this resource.
    voice.v1.dialing_permissions.dialing_permissions_country_bulk_update:
      type: object
      properties:
        update_count:
          type: integer
          nullable: true
          description: The number of countries updated
        update_request:
          type: string
          nullable: true
          description: 'A bulk update request to change voice dialing country permissions stored as a URL-encoded, JSON array of update objects. For example : `[ { "iso_code": "GB", "low_risk_numbers_enabled": "true", "high_risk_special_numbers_enabled":"true", "high_risk_tollfraud_numbers_enabled": "false" } ]`'
    voice.v1.dialing_permissions.dialing_permissions_country.dialing_permissions_hrs_prefixes:
      type: object
      properties:
        prefix:
          type: string
          nullable: true
          description: A prefix is a contiguous number range for a block of E.164 numbers that includes the E.164 assigned country code. For example, a North American Numbering Plan prefix like `+1510720` written like `+1(510) 720` matches all numbers inclusive from `+1(510) 720-0000` to `+1(510) 720-9999`.
    ListDialingPermissionsHrsPrefixesResponse:
      type: object
      properties:
        content:
          type: array
          items:
            $ref: '#/components/schemas/voice.v1.dialing_permissions.dialing_permissions_country.dialing_permissions_hrs_prefixes'
        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.dialing_permissions.dialing_permissions_country-instance:
      type: object
      properties:
        iso_code:
          type: string
          format: iso-country-code
          nullable: true
          description: The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
        name:
          type: string
          nullable: true
          description: The name of the country.
        continent:
          type: string
          nullable: true
          description: The name of the continent in which the country is located.
        country_codes:
          type: array
          items:
            type: string
          nullable: true
          description: The E.164 assigned [country codes(s)](https://www.itu.int/itudoc/itu-t/ob-lists/icc/e164_763.html)
        low_risk_numbers_enabled:
          type: boolean
          nullable: true
          description: Whether dialing to low-risk numbers is enabled.
        high_risk_special_numbers_enabled:
          type: boolean
          nullable: true
          description: Whether dialing to high-risk special services numbers is enabled. These prefixes include number ranges allocated by the country and include premium numbers, special services, shared cost, and others
        high_risk_tollfraud_numbers_enabled:
          type: boolean
          nullable: true
          description: Whether dialing to high-risk [toll fraud](https://www.twilio.com/blog/how-to-protect-your-account-from-toll-fraud-with-voice-dialing-geo-permissions-html) numbers is enabled. These prefixes include narrow number ranges that have a high-risk of international revenue sharing fraud (IRSF) attacks, also known as [toll fraud](https://www.twilio.com/blog/how-to-protect-your-account-from-toll-fraud-with-voice-dialing-geo-permissions-html). These prefixes are collected from anti-fraud databases and verified by analyzing calls on our network. These prefixes are not available for download and are updated frequently
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of this resource.
        links:
          type: object
          format: uri-map
          nullable: true
          description: A list of URLs related to this resource.
    CreateDialingPermissionsCountryBulkUpdateRequest:
      type: object
      required:
      - UpdateRequest
      properties:
        UpdateRequest:
          type: string
          description: 'URL encoded JSON array of update objects. example : `[ { "iso_code": "GB", "low_risk_numbers_enabled": "true", "high_risk_special_numbers_enabled":"true", "high_risk_tollfraud_numbers_enabled": "false" } ]`'
  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.