diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 02827a2a..b90e0e23 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,4 +4,4 @@ # See: https://help.github.com/articles/about-codeowners/ # These owners will be the default owners for everything in the repo. -* @indikasampath2000 @abeykoon @SanduDS +* @NipunaRanasinghe @ayeshLK diff --git a/issue_template.md b/.github/issue_template.md similarity index 97% rename from issue_template.md rename to .github/issue_template.md index 757e13ef..f275c800 100644 --- a/issue_template.md +++ b/.github/issue_template.md @@ -1,18 +1,18 @@ -**Description:** - - -**Suggested Labels:** - - -**Suggested Assignees:** - - -**Affected Product Version:** - -**OS, DB, other environment details and versions:** - -**Steps to reproduce:** - - -**Related Issues:** +**Description:** + + +**Suggested Labels:** + + +**Suggested Assignees:** + + +**Affected Product Version:** + +**OS, DB, other environment details and versions:** + +**Steps to reproduce:** + + +**Related Issues:** \ No newline at end of file diff --git a/pull_request_template.md b/.github/pull_request_template.md similarity index 95% rename from pull_request_template.md rename to .github/pull_request_template.md index 731e0985..a3fd6a0d 100644 --- a/pull_request_template.md +++ b/.github/pull_request_template.md @@ -30,10 +30,9 @@ Please describe the tests that you ran to verify your changes. Provide instructi **Test Configuration**: * Ballerina Version: * Operating System: -* Java SDK: # Checklist: ### Security checks - [ ] Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? - - [ ] Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? + - [ ] Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? \ No newline at end of file diff --git a/.github/workflows/build-with-bal-test-native.yml b/.github/workflows/build-with-bal-test-native.yml index b8887e24..a319c46f 100644 --- a/.github/workflows/build-with-bal-test-native.yml +++ b/.github/workflows/build-with-bal-test-native.yml @@ -2,34 +2,16 @@ name: GraalVM Check on: schedule: - - cron: '30 18 * * *' + - cron: "30 18 * * *" workflow_dispatch: -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Set up GraalVM - uses: graalvm/setup-graalvm@v1 - with: - java-version: '17' - distribution: 'graalvm-community' - set-java-home: false - github-token: ${{ secrets.GITHUB_TOKEN }} +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: true - - name: Check GraalVM installation - run: | - echo "GRAALVM_HOME: ${{ env.GRAALVM_HOME }}" - echo "JAVA_HOME: ${{ env.JAVA_HOME }}" - native-image --version - - - name: Set Up Ballerina - uses: ballerina-platform/setup-ballerina@v1.1.0 - with: - version: latest - - - name: Run Ballerina build using the native executable - run: bal build --graalvm ./ballerina +jobs: + call_stdlib_workflow: + name: Run StdLib Workflow + if: ${{ github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'ballerina-platform') }} + uses: ballerina-platform/ballerina-standard-library/.github/workflows/build-with-bal-test-graalvm-connector-template.yml@main + secrets: inherit diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e43b4563..97866629 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI +name: Build on: push: @@ -6,45 +6,13 @@ on: - master - 2201.[0-9]+.x repository_dispatch: - types: - check_connector_for_breaking_changes + types: check_connector_for_breaking_changes jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - # Setup Ballerina Environment - - name: Set Up Ballerina - uses: ballerina-platform/setup-ballerina@v1.1.0 - with: - version: latest - - # Build Ballerina Project - - name: Ballerina Build - run: bal pack ./ballerina - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - - # Build Module Examples - - name: Ballerina Examples Build - run: chmod +x ./examples/build.sh && ./examples/build.sh build - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - - # Send notification when build fails - - name: Alert notifier on failure - if: failure() && (github.event.action == 'check_connector_for_breaking_changes') - run: | - curl -X POST \ - 'https://api.github.com/repos/ballerina-platform/ballerina-release/dispatches' \ - --header 'Accept: application/vnd.github.v3+json' \ - --header 'Authorization: Bearer ${{ secrets.BALLERINA_BOT_TOKEN }}' \ - --data-raw '{ - "event_type": "notify-ballerinax-connector-build-failure", - "client_payload": { - "repoName": "module-ballerinax-twilio", - "workflow": "CI" - } - }' + call_workflow: + name: Run Connector Build Workflow + if: ${{ github.repository_owner == 'ballerina-platform' }} + uses: ballerina-platform/ballerina-standard-library/.github/workflows/build-connector-template.yml@main + secrets: inherit + with: + repo-name: module-ballerinax-twilio diff --git a/.github/workflows/daily-build.yml b/.github/workflows/daily-build.yml index 4f93493f..ff3464ca 100644 --- a/.github/workflows/daily-build.yml +++ b/.github/workflows/daily-build.yml @@ -2,44 +2,13 @@ name: Daily build on: schedule: - - cron: '30 2 * * *' + - cron: "30 2 * * *" jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - # Setup Ballerina Environment - - name: Set Up Ballerina - uses: ballerina-platform/setup-ballerina@v1.1.0 - with: - version: latest - - # Build Ballerina Project - - name: Ballerina Build - run: bal pack ./ballerina - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - - # Build Module Examples - - name: Ballerina Examples Build - run: chmod +x ./examples/build.sh && ./examples/build.sh build - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - - # Send notification when build fails - - name: Notify failure - if: ${{ failure() }} - run: | - curl -X POST \ - 'https://api.github.com/repos/ballerina-platform/ballerina-release/dispatches' \ - -H 'Accept: application/vnd.github.v3+json' \ - -H 'Authorization: Bearer ${{ secrets.BALLERINA_BOT_TOKEN }}' \ - --data "{ - \"event_type\": \"notify-build-failure\", - \"client_payload\": { - \"repoName\": \"module-ballerinax-twilio\" - } - }" + call_workflow: + name: Run Daily Build Workflow + if: ${{ github.repository_owner == 'ballerina-platform' }} + uses: ballerina-platform/ballerina-standard-library/.github/workflows/daily-build-connector-template.yml@main + secrets: inherit + with: + repo-name: module-ballerinax-twilio diff --git a/.github/workflows/dev-stage-release.yml b/.github/workflows/dev-stage-release.yml new file mode 100644 index 00000000..49d6f529 --- /dev/null +++ b/.github/workflows/dev-stage-release.yml @@ -0,0 +1,21 @@ +name: Publish to the Ballerina Dev\Stage Central + +on: + workflow_dispatch: + inputs: + environment: + type: choice + description: Select Environment + required: true + options: + - DEV CENTRAL + - STAGE CENTRAL + +jobs: + call_workflow: + name: Run Dev\Stage Central Publish Workflow + if: ${{ github.repository_owner == 'ballerina-platform' }} + uses: ballerina-platform/ballerina-standard-library/.github/workflows/dev-stage-central-publish-connector-template.yml@main + secrets: inherit + with: + environment: ${{ github.event.inputs.environment }} diff --git a/.github/workflows/dev-stg-release.yml b/.github/workflows/dev-stg-release.yml deleted file mode 100644 index 8ca8c0cb..00000000 --- a/.github/workflows/dev-stg-release.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Dev/Staging BCentral Release - -on: - workflow_dispatch: - inputs: - bal_central_environment: - description: Ballerina Central Environment - type: choice - options: - - STAGE - - DEV - required: true - -jobs: - release: - runs-on: ubuntu-latest - env: - BALLERINA_${{ github.event.inputs.bal_central_environment }}_CENTRAL: true - steps: - - uses: actions/checkout@v2 - - # Setup Ballerina Environment - - name: Set Up Ballerina - uses: ballerina-platform/setup-ballerina@v1.1.0 - with: - version: 2201.2.1 - - # Build Ballerina Project - - name: Ballerina Build - run: bal pack ./ballerina - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - - # Push to Ballerina Staging Central - - name: Push to Staging - if: github.event.inputs.bal_central_environment == 'STAGE' - run: bal push - working-directory: ./ballerina - env: - BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_STAGE_ACCESS_TOKEN }} - JAVA_HOME: /usr/lib/jvm/default-jvm - - # Push to Ballerina Dev Central - - name: Push to Dev - if: github.event.inputs.bal_central_environment == 'DEV' - run: bal push - working-directory: ./ballerina - env: - BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_DEV_ACCESS_TOKEN }} - JAVA_HOME: /usr/lib/jvm/default-jvm diff --git a/.github/workflows/monthly-build-with-tests.yml b/.github/workflows/monthly-build-with-tests.yml deleted file mode 100644 index 6517cb52..00000000 --- a/.github/workflows/monthly-build-with-tests.yml +++ /dev/null @@ -1,56 +0,0 @@ -# This workflow is introduced (instead of running tests daily) to avoid exceeding Twilio account credit limits. -name: Monthly build with tests - -on: - schedule: - # Runs on the first day of every month at 00:00 UTC - - cron: '0 0 1 * *' - -jobs: - build: - runs-on: ubuntu-latest - steps: - # Checkout the repository - - uses: actions/checkout@v2 - - # Build Ballerina package - - name: Ballerina Build - uses: ballerina-platform/ballerina-action/@nightly - with: - args: build ./twilio - - # Run Ballerina tests - - name: Ballerina Tests - uses: ballerina-platform/ballerina-action@nightly - with: - args: - test --test-report --code-coverage --coverage-format=xml ./twilio - env: - ACCOUNT_SID: ${{ secrets.ACCOUNT_SID }} - AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }} - SAMPLE_FROM_MOBILE: ${{ secrets.SAMPLE_FROM_MOBILE }} - SAMPLE_TO_MOBILE: ${{ secrets.SAMPLE_TO_MOBILE }} - SAMPLE_MESSAGE: ${{ secrets.SAMPLE_MESSAGE }} - SAMPLE_TWIML_URL: ${{ secrets.SAMPLE_TWIML_URL }} - SAMPLE_WHATSAPP_SANDBOX: ${{ secrets.SAMPLE_WHATSAPP_SANDBOX }} - CALLBACK_URL: ${{ secrets.CALLBACK_URL }} - PORT: ${{ secrets.PORT }} - - # Read the ballerina test results - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 - - # Send notification when build fails - - name: Notify failure - if: ${{ failure() }} - run: | - curl -X POST \ - 'https://api.github.com/repos/ballerina-platform/ballerina-release/dispatches' \ - -H 'Accept: application/vnd.github.v3+json' \ - -H 'Authorization: Bearer ${{ secrets.BALLERINA_BOT_TOKEN }}' \ - --data "{ - \"event_type\": \"notify-build-failure\", - \"client_payload\": { - \"repoName\": \"module-ballerinax-twilio\" - } - }" diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0e1dc728..bcbb743f 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,27 +1,16 @@ -name: Pull Request +name: PR Build -on: [ pull_request ] +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: true -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - # Setup Ballerina Environment - - name: Set Up Ballerina - uses: ballerina-platform/setup-ballerina@v1.1.0 - with: - version: latest +on: pull_request - # Build Ballerina Project - - name: Ballerina Build - run: bal pack ./ballerina - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - - # Build Module Examples - - name: Ballerina Examples Build - run: chmod +x ./examples/build.sh && ./examples/build.sh build - env: - JAVA_HOME: /usr/lib/jvm/default-jvm +jobs: + call_workflow: + name: Run PR Build Workflow + if: ${{ github.repository_owner == 'ballerina-platform' }} + uses: ballerina-platform/ballerina-standard-library/.github/workflows/pr-build-connector-template.yml@main + secrets: inherit + with: + additional-test-flags: ${{ github.event.pull_request.head.repo.full_name != github.repository && '-x test' || ''}} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 495f63aa..812d7fdb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,37 +1,16 @@ -name: Deployment +name: Publish Release on: - release: - types: [ published ] + workflow_dispatch: + repository_dispatch: + types: [ stdlib-release-pipeline ] jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - # Setup Ballerina Environment - - name: Set Up Ballerina - uses: ballerina-platform/setup-ballerina@v1.1.0 - with: - version: 2201.2.1 - - # Build Ballerina Project - - name: Ballerina Build - run: bal pack ./ballerina - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - - # Build Module Examples - - name: Ballerina Examples Build - run: chmod +x ./examples/build.sh && ./examples/build.sh build - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - - # Push to Ballerina Central - - name: Ballerina Push - run: bal push - working-directory: ./ballerina - env: - BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_DEV_ACCESS_TOKEN }} - JAVA_HOME: /usr/lib/jvm/default-jvm + call_workflow: + name: Run Release Workflow + if: ${{ github.repository_owner == 'ballerina-platform' }} + uses: ballerina-platform/ballerina-standard-library/.github/workflows/release-package-connector-template.yml@main + secrets: inherit + with: + package-name: twilio + package-org: ballerinax diff --git a/.github/workflows/trivy-scan.yml b/.github/workflows/trivy-scan.yml new file mode 100644 index 00000000..e70a2164 --- /dev/null +++ b/.github/workflows/trivy-scan.yml @@ -0,0 +1,16 @@ +name: Trivy + +on: + workflow_dispatch: + schedule: + - cron: "30 20 * * *" + +jobs: + call_workflow: + name: Run Trivy Scan Workflow + if: ${{ github.repository_owner == 'ballerina-platform' }} + uses: ballerina-platform/ballerina-standard-library/.github/workflows/trivy-scan-template.yml@main + secrets: inherit + with: + additional-build-flags: "-x :twilio-examples:build" + \ No newline at end of file diff --git a/.gitignore b/.gitignore index e89a7d55..899dbdc7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,11 @@ # Compiled class file *.class -*.balx + # Log file *.log -#conf file -ballerina.conf +#Config file +**/Config.toml # BlueJ files *.ctxt @@ -15,7 +15,7 @@ ballerina.conf # Package Files # *.jar -*.jar +!gradle-wrapper/*.jar *.war *.ear *.zip @@ -27,37 +27,24 @@ hs_err_pid* # Ignore everything in this directory target + +# mac +.DS_Store + .classpath .settings .project -*.iml -*.iws -*.ipr -.idea -.m2 -.vscode/ -# Ignore ballerina files -accessToken.bal -temp.bal.ballerina/ -target/ -.DS_Store -*Ballerina.lock -#test CI file -test.yml - -# Ignore resource .json files -**/resources/*.json -!**/resources/*_data.json -# Ignore Config.toml -Config.toml +.vscode -# Ignore Gradle files -.gradle/** - -# Ignore Java Wrapper build -java-wrapper/build/** -build/** +target +.idea +*.iml +*.ipr +*.iws +.gradle +build +generated -# Docker build caches -.ballerina +# Environment files +*.env diff --git a/LICENSE b/LICENSE.txt similarity index 100% rename from LICENSE rename to LICENSE.txt diff --git a/README.md b/README.md index 86a85383..d86ce437 100644 --- a/README.md +++ b/README.md @@ -1,57 +1,180 @@ -Ballerina Twilio Connector -=================== +# Ballerina Twilio Connector -[![Build](https://travis-ci.org/ballerina-platform/module-ballerinax-twilio.svg?branch=master)](https://travis-ci.org/ballerina-platform/module-ballerinax-twilio) +[![Build](https://github.com/ballerina-platform/module-ballerinax-twilio/actions/workflows/ci.yml/badge.svg)](https://github.com/ballerina-platform/module-ballerinax-twilio/actions/workflows/ci.yml) +[![Trivy](https://github.com/ballerina-platform/module-ballerinax-twilio/actions/workflows/trivy-scan.yml/badge.svg)](https://github.com/ballerina-platform/module-ballerinax-twilio/actions/workflows/trivy-scan.yml) [![codecov](https://codecov.io/gh/ballerina-platform/module-ballerinax-twilio/branch/master/graph/badge.svg)](https://codecov.io/gh/ballerina-platform/module-ballerinax-twilio) -![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/ballerina-platform/module-ballerinax-twilio?color=green&include_prereleases&label=latest%20release) [![GraalVM Check](https://github.com/ballerina-platform/module-ballerinax-twilio/actions/workflows/build-with-bal-test-native.yml/badge.svg)](https://github.com/ballerina-platform/module-ballerinax-twilio/actions/workflows/build-with-bal-test-native.yml) -[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) +[![GitHub Last Commit](https://img.shields.io/github/last-commit/ballerina-platform/module-ballerinax-twilio.svg)](https://github.com/ballerina-platform/module-ballerinax-twilio/commits/master) +[![GitHub Issues](https://img.shields.io/github/issues/ballerina-platform/ballerina-library/module/twilio.svg?label=Open%20Issues)](https://github.com/ballerina-platform/ballerina-library/labels/module/twilio) -Twilio’s APIs power its platform for communications. +## Overview -The Twilio connector allows you to send SMS, voice, and WhatsApp messages via the Twilio REST API. It also facilitates receiving inbound HTTP(S) requests (also known as webhooks) from Twilio's servers. - -For more information about configuration and operations, go to the module. -- [twilio](twilio/Module.md) +Twilio is a cloud communications platform that allows software developers to programmatically make and receive phone calls, send and receive text messages, and perform other communication functions using its web service APIs. -## Building from the Source -### Setting Up the Prerequisites -1. Download and install Java SE Development Kit (JDK) version 11 from one of the following locations. - - * [Oracle](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html) - - * [OpenJDK](https://adoptopenjdk.net/) - - > **Note:** Set the JAVA_HOME environment variable to the path name of the directory into which you installed - JDK. - -2. Download and install [Ballerina](https://ballerina.io/) - - -### Building the Source - -Execute the commands below to build from the source: +The Ballerina Twilio connector supports the [Twilio Basic API version 2010-04-01](https://www.twilio.com/docs/all), enabling users to leverage these communication capabilities within their Ballerina applications. + +## Setting up the Twilio +Before using the ballerinax-twilio connector you must have access to Twilio API, If you do not have access to Twilio API please complete the following steps: + +### Step 1: Create a Twilio account. +Creating a Twilio account can be done by visiting [Twilio](https://www.twilio.com) and clicking the "Try Twilio for Free" button. + +### Step 2: Obtain a Twilio phone number. + +All trial projects can provision a free trial phone number for testing. Here's how to get started. + +`Notice: Trial project phone number selection may be limited. You must upgrade your Twilio project to provision more than one phone number, or to provision a number that is not available to trial projects`. + +1. Access the Buy a Number page in the Console. +![Get Phone Number](https://github.com/ballerina-platform/module-ballerinax-twilio/tree/master/ballerina/resources/get-phone-number.png?raw=true) + +2. Enter the criteria for the phone number you need, and then click Search. +![Configure Phone Number](https://github.com/ballerina-platform/module-ballerinax-twilio/tree/master/ballerina/resources/phone-number-config.png?raw=true) + +- Country: Select the desired country from the drop-down menu. +- Number or Location: Select the desired option to search by digits/phrases, or a specific City or Region. +- Capabilities: Select your service needs for this number. + +3. Click Buy to purchase a phone number for your current project or sub-account. +![Search Results](https://github.com/ballerina-platform/module-ballerinax-twilio/tree/master/ballerina/resources/search-phone-number.png?raw=true) +> **Notice:** Many countries require identity documentation for Phone Number compliance. Requests to provision phone numbers with these regulations will be required to select or add the required documentation after clicking Buy in Console. To see which countries and phone number types are affected by these requirements, please see twilio's [Phone Number Regulations](https://www.twilio.com/guidelines/regulatory) site. + +### Step 3: Obtain a Twilio Account SID with Auth Token. +Twilio uses two credentials to determine which account an API request is coming from: The Account SID, which acts as a `username`, and the Auth Token which acts as a `password`. You can find your account SID and auth token in your [Twilio console](https://www.twilio.com/console). + +![Twilio Credentails](https://github.com/ballerina-platform/module-ballerinax-twilio/tree/master/ballerina/resources/get-credentails.png?raw=true) + +Your account's Auth Token is hidden by default. Click show to display the token, and hide to conceal it again. For further information click [here](https://support.twilio.com/hc/en-us/articles/223136027-Auth-Tokens-and-How-to-Change-Them) + +## Sample + +This sample demonstrates a scenario where the Twilio connector is used to send a text message to a phone number. + +### Step 1 - Import the package + +Import the Twilio package into your Ballerina program as shown below: + +```ballerina +import ballerinax/twilio; +``` + +### Step 2 - Create a new connector instance + +To create a new connector instance, add a configuration as follows (You can use [configurable variables](https://ballerina.io/learn/by-example/configurable.html) to provide the necessary credentials): + +```ballerina +configurable string accountSID= ?; +configurable string authToken = ?; + +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +twilio:Client twilio = check new (twilioConfig); +``` + +### Step 3 - Invoke the connector operation + +1. Invoke the connector operation using the client as shown below: + +```ballerina +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + + twilio:CreateMessageRequest messageRequest = { + To: "+XXXXXXXXXXX", + From: "+XXXXXXXXXXX", + Body: "Hello from Ballerina" + }; + + twilio:Message response = check twilio->createMessage(accountSID, messageRequest); + + io:println("Message Status: ", response?.status); +} +``` + +2. Use `bal run` command to compile and run the Ballerina program. + +**[You can find more samples here](https://github.com/ballerina-platform/module-ballerinax-twilio/tree/master/examples)** + +## Issues and projects + +The **Issues** and **Projects** tabs are disabled for this repository as this is part of the Ballerina library. To report bugs, request new features, start new discussions, view project boards, etc., visit the Ballerina library [parent repository](https://github.com/ballerina-platform/ballerina-library). + +This repository only contains the source code for the package. -* To build the package: - ``` - bal build ./ballerina +## Build from the source + +### Prerequisites + +1. Download and install Java SE Development Kit (JDK) version 17. You can download it from either of the following sources: + + * [Oracle JDK](https://www.oracle.com/java/technologies/downloads/) + * [OpenJDK](https://adoptium.net/) + + > **Note:** After installation, remember to set the `JAVA_HOME` environment variable to the directory where JDK was installed. + +2. Download and install [Ballerina Swan Lake](https://ballerina.io/). + +3. Download and install [Docker](https://www.docker.com/get-started). + + > **Note**: Ensure that the Docker daemon is running before executing any tests. + +### Build options + +Execute the commands below to build from the source. + +1. To build the package: ``` -* To run tests after build: + ./gradlew clean build ``` - bal test ./ballerina + +2. To run the tests: ``` -## Contributing to Ballerina - -As an open source project, Ballerina welcomes contributions from the community. - -For more information, see [contribution guidelines](https://github.com/ballerina-platform/ballerina-lang/blob/master/CONTRIBUTING.md). - -## Code of Conduct - -All contributors are encouraged to read the [Ballerina Code of Conduct](https://ballerina.io/code-of-conduct). - -## Useful Links - -* Discuss code changes of the Ballerina project via [ballerina-dev@googlegroups.com](mailto:ballerina-dev@googlegroups.com). + ./gradlew clean test + ``` + +3. To build the without the tests: + ``` + ./gradlew clean build -x test + ``` + +5. To debug the package with a remote debugger: + ``` + ./gradlew clean build -Pdebug= + ``` + +6. To debug with the Ballerina language: + ``` + ./gradlew clean build -PbalJavaDebug= + ``` + +7. Publish the generated artifacts to the local Ballerina Central repository: + ``` + ./gradlew clean build -PpublishToLocalCentral=true + ``` + +8. Publish the generated artifacts to the Ballerina Central repository: + ``` + ./gradlew clean build -PpublishToCentral=true + ``` + +## Contribute to Ballerina + +As an open-source project, Ballerina welcomes contributions from the community. + +For more information, go to the [contribution guidelines](https://github.com/ballerina-platform/ballerina-lang/blob/master/CONTRIBUTING.md). + +## Code of conduct + +All the contributors are encouraged to read the [Ballerina Code of Conduct](https://ballerina.io/code-of-conduct). + +## Useful links + +* For more information go to the [`twilio` package](https://central.ballerina.io/ballerinax/twilio/latest). +* For example demonstrations of the usage, go to [Ballerina By Examples](https://ballerina.io/learn/by-example/). * Chat live with us via our [Discord server](https://discord.gg/ballerinalang). -* Post all technical questions on Stack Overflow with the [#ballerina](https://stackoverflow.com/questions/tagged/ballerina) tag. +* Post all technical questions on Stack Overflow with the [#ballerina](https://stackoverflow.com/questions/tagged/ballerina) tag. \ No newline at end of file diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 030947d3..6da42a00 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,10 +1,13 @@ [package] -distribution = "2201.3.0" +distribution = "2201.8.0" org = "ballerinax" name = "twilio" -version = "3.1.0" +version = "4.0.0" authors = ["Ballerina"] repository = "https://github.com/ballerina-platform/module-ballerinax-twilio" keywords = ["Communication/Call & SMS", "Cost/Paid"] icon = "icon.png" license = ["Apache-2.0"] + +[build-options] +observabilityIncluded = true diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml new file mode 100644 index 00000000..af859d97 --- /dev/null +++ b/ballerina/Dependencies.toml @@ -0,0 +1,330 @@ +# AUTO-GENERATED FILE. DO NOT MODIFY. + +# This file is auto-generated by Ballerina for managing dependency versions. +# It should not be modified by hand. + +[ballerina] +dependencies-toml-version = "2" +distribution-version = "2201.8.0-20230830-220400-8a7556d8" + +[[package]] +org = "ballerina" +name = "auth" +version = "2.10.0" +dependencies = [ + {org = "ballerina", name = "crypto"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.array"}, + {org = "ballerina", name = "lang.string"}, + {org = "ballerina", name = "log"} +] + +[[package]] +org = "ballerina" +name = "cache" +version = "3.7.0" +dependencies = [ + {org = "ballerina", name = "constraint"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "task"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "constraint" +version = "1.5.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] +modules = [ + {org = "ballerina", packageName = "constraint", moduleName = "constraint"} +] + +[[package]] +org = "ballerina" +name = "crypto" +version = "2.5.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "file" +version = "1.9.0" +dependencies = [ + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "os"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "http" +version = "2.10.4" +dependencies = [ + {org = "ballerina", name = "auth"}, + {org = "ballerina", name = "cache"}, + {org = "ballerina", name = "constraint"}, + {org = "ballerina", name = "crypto"}, + {org = "ballerina", name = "file"}, + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "jwt"}, + {org = "ballerina", name = "lang.array"}, + {org = "ballerina", name = "lang.decimal"}, + {org = "ballerina", name = "lang.int"}, + {org = "ballerina", name = "lang.regexp"}, + {org = "ballerina", name = "lang.runtime"}, + {org = "ballerina", name = "lang.string"}, + {org = "ballerina", name = "lang.value"}, + {org = "ballerina", name = "log"}, + {org = "ballerina", name = "mime"}, + {org = "ballerina", name = "oauth2"}, + {org = "ballerina", name = "observe"}, + {org = "ballerina", name = "time"}, + {org = "ballerina", name = "url"} +] +modules = [ + {org = "ballerina", packageName = "http", moduleName = "http"}, + {org = "ballerina", packageName = "http", moduleName = "http.httpscerr"} +] + +[[package]] +org = "ballerina" +name = "io" +version = "1.6.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.value"} +] + +[[package]] +org = "ballerina" +name = "jballerina.java" +version = "0.0.0" + +[[package]] +org = "ballerina" +name = "jwt" +version = "2.10.0" +dependencies = [ + {org = "ballerina", name = "cache"}, + {org = "ballerina", name = "crypto"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.int"}, + {org = "ballerina", name = "lang.string"}, + {org = "ballerina", name = "log"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "lang.__internal" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.object"} +] + +[[package]] +org = "ballerina" +name = "lang.array" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.__internal"} +] + +[[package]] +org = "ballerina" +name = "lang.decimal" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "lang.error" +version = "0.0.0" +scope = "testOnly" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "lang.int" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.__internal"}, + {org = "ballerina", name = "lang.object"} +] + +[[package]] +org = "ballerina" +name = "lang.object" +version = "0.0.0" + +[[package]] +org = "ballerina" +name = "lang.regexp" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "lang.runtime" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "lang.string" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.regexp"} +] + +[[package]] +org = "ballerina" +name = "lang.value" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "log" +version = "2.9.0" +dependencies = [ + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.value"}, + {org = "ballerina", name = "observe"} +] + +[[package]] +org = "ballerina" +name = "mime" +version = "2.9.0" +dependencies = [ + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.int"} +] + +[[package]] +org = "ballerina" +name = "oauth2" +version = "2.10.0" +dependencies = [ + {org = "ballerina", name = "cache"}, + {org = "ballerina", name = "crypto"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "log"}, + {org = "ballerina", name = "time"}, + {org = "ballerina", name = "url"} +] + +[[package]] +org = "ballerina" +name = "observe" +version = "1.2.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "os" +version = "1.8.0" +dependencies = [ + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"} +] +modules = [ + {org = "ballerina", packageName = "os", moduleName = "os"} +] + +[[package]] +org = "ballerina" +name = "task" +version = "2.5.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "test" +version = "0.0.0" +scope = "testOnly" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.error"} +] +modules = [ + {org = "ballerina", packageName = "test", moduleName = "test"} +] + +[[package]] +org = "ballerina" +name = "time" +version = "2.4.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "url" +version = "2.4.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] +modules = [ + {org = "ballerina", packageName = "url", moduleName = "url"} +] + +[[package]] +org = "ballerinai" +name = "observe" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "observe"} +] +modules = [ + {org = "ballerinai", packageName = "observe", moduleName = "observe"} +] + +[[package]] +org = "ballerinax" +name = "twilio" +version = "4.0.0" +dependencies = [ + {org = "ballerina", name = "constraint"}, + {org = "ballerina", name = "http"}, + {org = "ballerina", name = "os"}, + {org = "ballerina", name = "test"}, + {org = "ballerina", name = "url"}, + {org = "ballerinai", name = "observe"} +] +modules = [ + {org = "ballerinax", packageName = "twilio", moduleName = "twilio"}, + {org = "ballerinax", packageName = "twilio", moduleName = "twilio.oas"} +] + diff --git a/ballerina/Module.md b/ballerina/Module.md index bf668866..7a235a64 100644 --- a/ballerina/Module.md +++ b/ballerina/Module.md @@ -1,33 +1,49 @@ ## Overview -The Twilio API provides the capability to access its platform for communications. These APIs connect the software layer and -communications networks around the world to allow users to call and message anyone globally. +Twilio is a cloud communications platform that allows software developers to programmatically make and receive phone calls, send and receive text messages, and perform other communication functions using its web service APIs. -This package supports [Twilio Basic API version 2010-04-01](https://www.twilio.com/docs/all). +The Ballerina Twilio connector currently supports the [Twilio Basic API version 2010-04-01](https://www.twilio.com/docs/all), enabling users to leverage these communication capabilities within their Ballerina applications. -## Prerequisites +## Setting up the Twilio +Before using the ballerinax-twilio connector you must have access to Twilio API, If you do not have access to Twilio API please complete the following steps: -Before using this connector in your Ballerina application, complete the following: +### Step 1: Create a Twilio account. +Creating a Twilio account can be done by visiting [Twilio](https://www.twilio.com) and clicking the "Try Twilio for Free" button. -1. Create a [Twilio account](https://www.twilio.com/). +### Step 2: Obtain a Twilio phone number. -2. Obtain a [Twilio phone number](https://support.twilio.com/hc/en-us/articles/223136107-How-does-Twilio-s-Free-Trial-work-). +All trial projects can provision a free trial phone number for testing. Here's how to get started. - >**Tip:** If you use a trial account, you may need to verify your recipient's phone numbers before having any communication with them. +`Notice: Trial project phone number selection may be limited. You must upgrade your Twilio project to provision more than one phone number, or to provision a number that is not available to trial projects`. -3. Obtain a [Twilio Account Auth Token](https://support.twilio.com/hc/en-us/articles/223136027-Auth-Tokens-and-How-to-Change-Them). +1. Access the Buy a Number page in the Console. +![Get Phone Number](https://github.com/ballerina-platform/module-ballerinax-twilio/tree/master/ballerina/resources/get-phone-number.png?raw=true) -4. If you want to use WhatsApp service, Configure your Twilio phone number to use WhatsApp services. For instructions, see [Twilio Documentation - Manage and Configure Your WhatsApp-enabled Twilio Numbers](https://www.twilio.com/docs/whatsapp/api#manage-and-configure-your-whatsapp-enabled-twilio-numbers). +2. Enter the criteria for the phone number you need, and then click Search. +![Configure Phone Number](https://github.com/ballerina-platform/module-ballerinax-twilio/tree/master/ballerina/resources/phone-number-config.png?raw=true) -5. Configure the connector with obtained tokens. +- Country: Select the desired country from the drop-down menu. +- Number or Location: Select the desired option to search by digits/phrases, or a specific City or Region. +- Capabilities: Select your service needs for this number. -# Quickstart +3. Click Buy to purchase a phone number for your current project or sub-account. +![Search Results](https://github.com/ballerina-platform/module-ballerinax-twilio/tree/master/ballerina/resources/search-phone-number.png?raw=true) +> **Notice:** Many countries require identity documentation for Phone Number compliance. Requests to provision phone numbers with these regulations will be required to select or add the required documentation after clicking Buy in Console. To see which countries and phone number types are affected by these requirements, please see twilio's [Phone Number Regulations](https://www.twilio.com/guidelines/regulatory) site. -To use the Twilio connector in your Ballerina application, update the `.bal` file as follows: +### Step 3: Obtain a Twilio Account SID with Auth Token. +Twilio uses two credentials to determine which account an API request is coming from: The Account SID, which acts as a `username`, and the Auth Token which acts as a `password`. You can find your account SID and auth token in your [Twilio console](https://www.twilio.com/console). + +![Twilio Credentails](https://github.com/ballerina-platform/module-ballerinax-twilio/tree/master/ballerina/resources/get-credentails.png?raw=true) + +Your account's Auth Token is hidden by default. Click show to display the token, and hide to conceal it again. For further information click [here](https://support.twilio.com/hc/en-us/articles/223136027-Auth-Tokens-and-How-to-Change-Them) + +## Sample + +This sample demonstrates a scenario where the Twilio connector is used to send a text message to a phone number. ### Step 1 - Import the package -Import the Twilio package to your Ballerina program as follows. You can use [configurable variables](https://ballerina.io/learn/by-example/configurable.html) to provide the necessary credentials. +Import the Twilio package into your Ballerina program as shown below: ```ballerina import ballerinax/twilio; @@ -35,32 +51,42 @@ import ballerinax/twilio; ### Step 2 - Create a new connector instance -To create a new connector instance, add a configuration as follows: +To create a new connector instance, add a configuration as follows (You can use [configurable variables](https://ballerina.io/learn/by-example/configurable.html) to provide the necessary credentials): ```ballerina -configurable string accountSId = ?; +configurable string accountSID= ?; configurable string authToken = ?; twilio:ConnectionConfig twilioConfig = { auth: { - accountSId, - authToken + username: accountSID, + password: authToken } }; -twilio:Client twilio = new (twilioConfig); +twilio:Client twilio = check new (twilioConfig); ``` -### Step 3 - Invoke connector operation +### Step 3 - Invoke the connector operation -1. Invoke the connector operation using the client as follows: +1. Invoke the connector operation using the client as shown below: ```ballerina public function main() returns error? { - twilio:Account response = check twilio->getAccountDetails(); + twilio:Client twilio = check new (twilioConfig); + + twilio:CreateMessageRequest messageRequest = { + To: "+XXXXXXXXXXX", + From: "+XXXXXXXXXXX", + Body: "Hello from Ballerina" + }; + + twilio:Message response = check twilio->createMessage(accountSID, messageRequest); + + io:println("Message Status: ", response?.status); } ``` 2. Use `bal run` command to compile and run the Ballerina program. -**[You can find more samples here](https://github.com/ballerina-platform/module-ballerinax-twilio/tree/master/twilio/samples)** +**[You can find more samples here](https://github.com/ballerina-platform/module-ballerinax-twilio/tree/master/examples)** \ No newline at end of file diff --git a/ballerina/Package.md b/ballerina/Package.md index b4223f02..f28a3b9a 100644 --- a/ballerina/Package.md +++ b/ballerina/Package.md @@ -1,20 +1,92 @@ -Connects to Twilio from Ballerina - -## Package Overview -The `ballerinax/twilio` is a [Ballerina](https://ballerina.io/) connector for Twilio. -This package provides the capability to access [Twilio communication services](https://www.twilio.com/docs/all) such as -sending an SMS, getting message details, making a voice call etc. - -### Compatibility -| | Version | -|------------------------|---------------------| -| Ballerina Language | Swan Lake 2201.3.0 | -| Twilio Basic API | 2010-04-01 | - -## Report issues -To report bugs, request new features, start new discussions, view project boards, etc., go to the [Ballerina Extended Library repository](https://github.com/ballerina-platform/ballerina-extended-library) - -## Useful links -- Discuss code changes of the Ballerina project via [ballerina-dev@googlegroups.com](mailto:ballerina-dev@googlegroups.com). -- Chat live with us via our [Discord server](https://discord.gg/ballerinalang). -- Post all technical questions on Stack Overflow with the [#ballerina](https://stackoverflow.com/questions/tagged/ballerina) tag +## Overview + +Twilio is a cloud communications platform that allows software developers to programmatically make and receive phone calls, send and receive text messages, and perform other communication functions using its web service APIs. + +The Ballerina Twilio connector currently supports the [Twilio Basic API version 2010-04-01](https://www.twilio.com/docs/all), enabling users to leverage these communication capabilities within their Ballerina applications. + +## Setting up the Twilio +Before using the ballerinax-twilio connector you must have access to Twilio API, If you do not have access to Twilio API please complete the following steps: + +### Step 1: Create a Twilio account. +Creating a Twilio account can be done by visiting [Twilio](https://www.twilio.com) and clicking the "Try Twilio for Free" button. + +### Step 2: Obtain a Twilio phone number. + +All trial projects can provision a free trial phone number for testing. Here's how to get started. + +`Notice: Trial project phone number selection may be limited. You must upgrade your Twilio project to provision more than one phone number, or to provision a number that is not available to trial projects`. + +1. Access the Buy a Number page in the Console. +![Get Phone Number](https://github.com/ballerina-platform/module-ballerinax-twilio/tree/master/ballerina/resources/get-phone-number.png?raw=true) + +2. Enter the criteria for the phone number you need, and then click Search. +![Configure Phone Number](https://github.com/ballerina-platform/module-ballerinax-twilio/tree/master/ballerina/resources/phone-number-config.png?raw=true) + +- Country: Select the desired country from the drop-down menu. +- Number or Location: Select the desired option to search by digits/phrases, or a specific City or Region. +- Capabilities: Select your service needs for this number. + +3. Click Buy to purchase a phone number for your current project or sub-account. +![Search Results](https://github.com/ballerina-platform/module-ballerinax-twilio/tree/master/ballerina/resources/search-phone-number.png?raw=true) +> **Notice:** Many countries require identity documentation for Phone Number compliance. Requests to provision phone numbers with these regulations will be required to select or add the required documentation after clicking Buy in Console. To see which countries and phone number types are affected by these requirements, please see twilio's [Phone Number Regulations](https://www.twilio.com/guidelines/regulatory) site. + +### Step 3: Obtain a Twilio Account SID with Auth Token. +Twilio uses two credentials to determine which account an API request is coming from: The Account SID, which acts as a `username`, and the Auth Token which acts as a `password`. You can find your account SID and auth token in your [Twilio console](https://www.twilio.com/console). + +![Twilio Credentails](https://github.com/ballerina-platform/module-ballerinax-twilio/tree/master/ballerina/resources/get-credentails.png?raw=true) + +Your account's Auth Token is hidden by default. Click show to display the token, and hide to conceal it again. For further information click [here](https://support.twilio.com/hc/en-us/articles/223136027-Auth-Tokens-and-How-to-Change-Them) + +## Sample + +This sample demonstrates a scenario where the Twilio connector is used to send a text message to a phone number. + +### Step 1 - Import the package + +Import the Twilio package into your Ballerina program as shown below: + +```ballerina +import ballerinax/twilio; +``` + +### Step 2 - Create a new connector instance + +To create a new connector instance, add a configuration as follows (You can use [configurable variables](https://ballerina.io/learn/by-example/configurable.html) to provide the necessary credentials): + +```ballerina +configurable string accountSID= ?; +configurable string authToken = ?; + +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +twilio:Client twilio = check new (twilioConfig); +``` + +### Step 3 - Invoke the connector operation + +1. Invoke the connector operation using the client as shown below: + +```ballerina +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + + twilio:CreateMessageRequest messageRequest = { + To: "+XXXXXXXXXXX", + From: "+XXXXXXXXXXX", + Body: "Hello from Ballerina" + }; + + twilio:Message response = check twilio->createMessage(accountSID, messageRequest); + + io:println("Message Status: ", response?.status); +} +``` + +2. Use `bal run` command to compile and run the Ballerina program. + +**[You can find more samples here](https://github.com/ballerina-platform/module-ballerinax-twilio/tree/master/examples)** \ No newline at end of file diff --git a/ballerina/build.gradle b/ballerina/build.gradle new file mode 100644 index 00000000..c285ff98 --- /dev/null +++ b/ballerina/build.gradle @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.apache.tools.ant.taskdefs.condition.Os + +plugins { + id 'io.ballerina.plugin' +} + +description = 'Twilio - Ballerina' + +def packageName = "twilio" +def packageOrg = "ballerinax" +def tomlVersion = stripBallerinaExtensionVersion("${project.version}") +def ballerinaTomlFilePlaceHolder = new File("${project.rootDir}/build-config/resources/Ballerina.toml") +def ballerinaTomlFile = new File("$project.projectDir/Ballerina.toml") + +def stripBallerinaExtensionVersion(String extVersion) { + if (extVersion.matches(project.ext.timestampedVersionRegex)) { + def splitVersion = extVersion.split('-') + if (splitVersion.length > 3) { + def strippedValues = splitVersion[0..-4] + return strippedValues.join('-') + } else { + return extVersion + } + } else { + return extVersion.replace("${project.ext.snapshotVersion}", "") + } +} + +ballerina { + packageOrganization = packageOrg + module = packageName + testCoverageParam = "--code-coverage --coverage-format=xml" + buildOnDockerImage = "nightly" +} + +task updateTomlFiles { + doLast { + def newBallerinaToml = ballerinaTomlFilePlaceHolder.text.replace("@project.version@", project.version) + newBallerinaToml = newBallerinaToml.replace("@toml.version@", tomlVersion) + ballerinaTomlFile.text = newBallerinaToml + } +} + +task commitTomlFiles { + doLast { + project.exec { + ignoreExitValue true + if (Os.isFamily(Os.FAMILY_WINDOWS)) { + commandLine 'cmd', '/c', "git commit -m \"[Automated] Update the toml files\" Ballerina.toml Dependencies.toml" + } else { + commandLine 'sh', '-c', "git commit -m '[Automated] Update the toml files' Ballerina.toml Dependencies.toml" + } + } + } +} + +clean { + delete 'build' +} + +publishToMavenLocal.dependsOn build +publish.dependsOn build diff --git a/ballerina/client.bal b/ballerina/client.bal new file mode 100644 index 00000000..a40d231a --- /dev/null +++ b/ballerina/client.bal @@ -0,0 +1,1989 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/http; +import twilio.oas; + +# This is the public Twilio REST API. +public isolated client class Client { + final oas:Client generatedClient; + final string accountSid; + # Gets invoked to initialize the `connector`. + # + # + config - The configurations to be used when initializing the `connector` + # + serviceUrl - URL of the target service + # + return - An error if connector initialization failed + public isolated function init(ConnectionConfig config, string serviceUrl = "https://api.twilio.com") returns error? { + self.accountSid = config.auth.username; + self.generatedClient = check new (config, serviceUrl); + } + # Retrieves a collection of Accounts belonging to the account used to make the request + # + # + friendlyName - Only return the Account resources with friendly names that exactly match this name. + # + status - Only return Account resources with the given status. Can be `closed`, `suspended` or `active`. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listAccount(string? friendlyName = (), Account_enum_status? status = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListAccountResponse|error { + return self.generatedClient->listAccount(friendlyName, status, pageSize, page, pageToken); + } + # Create a new Twilio Subaccount from the account making the request + # + # + return - Created + remote isolated function createAccount(CreateAccountRequest payload) returns Account|error { + return self.generatedClient->createAccount(payload); + } + # Fetch the account specified by the provided Account Sid + # + # + sid - The Account Sid that uniquely identifies the account to fetch + # + return - OK + remote isolated function fetchAccount(string sid) returns Account|error { + return self.generatedClient->fetchAccount(sid); + } + # Modify the properties of a given Account + # + payload - UpdateAccountRequest + # + sid - The Account Sid that uniquely identifies the account to update + # + return - OK + remote isolated function updateAccount(string sid, UpdateAccountRequest payload) returns Account|error { + return self.generatedClient->updateAccount(sid, payload); + } + # List Address + # + # + customerName - The `customer_name` of the Address resources to read. + # + friendlyName - The string that identifies the Address resources to read. + # + isoCountry - The ISO country code of the Address resources to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource to read. + # + return - OK + remote isolated function listAddress(string? customerName = (), string? friendlyName = (), string? isoCountry = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListAddressResponse|error { + return self.generatedClient->listAddress(accountSid ?: self.accountSid, customerName, friendlyName, isoCountry, pageSize, page, pageToken); + } + # Create Address + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Address resource. + # + return - Created + remote isolated function createAddress(CreateAddressRequest payload, string? accountSid = ()) returns Address|error { + return self.generatedClient->createAddress(accountSid ?: self.accountSid, payload); + } + # Fetch Address + # + # + sid - The Twilio-provided string that uniquely identifies the Address resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource to fetch. + # + return - OK + remote isolated function fetchAddress(string sid, string? accountSid = ()) returns Address|error { + return self.generatedClient->fetchAddress(accountSid ?: self.accountSid, sid); + } + # Update Address + # + # + sid - The Twilio-provided string that uniquely identifies the Address resource to update. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource to update. + # + return - OK + remote isolated function updateAddress(string sid, UpdateAddressRequest payload, string? accountSid = ()) returns Address|error { + return self.generatedClient->updateAddress(accountSid ?: self.accountSid, sid, payload); + } + # Delete Address + # + # + sid - The Twilio-provided string that uniquely identifies the Address resource to delete. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteAddress(string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteAddress(accountSid ?: self.accountSid, sid); + } + # Retrieve a list of applications representing an application within the requesting account + # + # + friendlyName - The string that identifies the Application resources to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resources to read. + # + return - OK + remote isolated function listApplication(string? friendlyName = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListApplicationResponse|error { + return self.generatedClient->listApplication(accountSid ?: self.accountSid, friendlyName, pageSize, page, pageToken); + } + # Create a new application within your account + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createApplication(CreateApplicationRequest payload, string? accountSid = ()) returns Application|error { + return self.generatedClient->createApplication(accountSid ?: self.accountSid, payload); + } + # Fetch the application specified by the provided sid + # + # + sid - The Twilio-provided string that uniquely identifies the Application resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resource to fetch. + # + return - OK + remote isolated function fetchApplication(string sid, string? accountSid = ()) returns Application|error { + return self.generatedClient->fetchApplication(accountSid ?: self.accountSid, sid); + } + # Updates the application's properties + # + # + sid - The Twilio-provided string that uniquely identifies the Application resource to update. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resources to update. + # + return - OK + remote isolated function updateApplication(string sid, UpdateApplicationRequest payload, string? accountSid = ()) returns Application|error { + return self.generatedClient->updateApplication(accountSid ?: self.accountSid, sid, payload); + } + # Delete the application by the specified application sid + # + # + sid - The Twilio-provided string that uniquely identifies the Application resource to delete. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resources to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteApplication(string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteApplication(accountSid ?: self.accountSid, sid); + } + # Fetch an instance of an authorized-connect-app + # + # + connectAppSid - The SID of the Connect App to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AuthorizedConnectApp resource to fetch. + # + return - OK + remote isolated function fetchAuthorizedConnectApp(string connectAppSid, string? accountSid = ()) returns Authorized_connect_app|error { + return self.generatedClient->fetchAuthorizedConnectApp(accountSid ?: self.accountSid, connectAppSid); + } + # Retrieve a list of authorized-connect-apps belonging to the account used to make the request + # + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AuthorizedConnectApp resources to read. + # + return - OK + remote isolated function listAuthorizedConnectApp(int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListAuthorizedConnectAppResponse|error { + return self.generatedClient->listAuthorizedConnectApp(accountSid ?: self.accountSid, pageSize, page, pageToken); + } + # + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the available phone number Country resources. + # + return - OK + remote isolated function listAvailablePhoneNumberCountry(int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListAvailablePhoneNumberCountryResponse|error { + return self.generatedClient->listAvailablePhoneNumberCountry(accountSid ?: self.accountSid, pageSize, page, pageToken); + } + # + # + countryCode - The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country to fetch available phone number information about. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the available phone number Country resource. + # + return - OK + remote isolated function fetchAvailablePhoneNumberCountry(string countryCode, string? accountSid = ()) returns Available_phone_number_country|error { + return self.generatedClient->fetchAvailablePhoneNumberCountry(accountSid ?: self.accountSid, countryCode); + } + # + # + countryCode - The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + # + areaCode - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + # + contains - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-number-pattern) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-character-pattern). If specified, this value must have at least two characters. + # + smsEnabled - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + # + mmsEnabled - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + # + voiceEnabled - Whether the phone numbers can receive calls. Can be: `true` or `false`. + # + excludeAllAddressRequired - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeLocalAddressRequired - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeForeignAddressRequired - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + beta - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + nearNumber - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + # + nearLatLong - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + # + distance - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + # + inPostalCode - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + # + inRegion - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + # + inRateCenter - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + # + inLata - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + # + inLocality - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + # + faxEnabled - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + # + return - OK + remote isolated function listAvailablePhoneNumberLocal(string countryCode, int? areaCode = (), string? contains = (), boolean? smsEnabled = (), boolean? mmsEnabled = (), boolean? voiceEnabled = (), boolean? excludeAllAddressRequired = (), boolean? excludeLocalAddressRequired = (), boolean? excludeForeignAddressRequired = (), boolean? beta = (), string? nearNumber = (), string? nearLatLong = (), int? distance = (), string? inPostalCode = (), string? inRegion = (), string? inRateCenter = (), string? inLata = (), string? inLocality = (), boolean? faxEnabled = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListAvailablePhoneNumberLocalResponse|error { + return self.generatedClient->listAvailablePhoneNumberLocal(accountSid ?: self.accountSid, countryCode, areaCode, contains, smsEnabled, mmsEnabled, voiceEnabled, excludeAllAddressRequired, excludeLocalAddressRequired, excludeForeignAddressRequired, beta, nearNumber, nearLatLong, distance, inPostalCode, inRegion, inRateCenter, inLata, inLocality, faxEnabled, pageSize, page, pageToken); + } + # + # + countryCode - The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + # + areaCode - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + # + contains - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. + # + smsEnabled - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + # + mmsEnabled - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + # + voiceEnabled - Whether the phone numbers can receive calls. Can be: `true` or `false`. + # + excludeAllAddressRequired - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeLocalAddressRequired - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeForeignAddressRequired - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + beta - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + nearNumber - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + # + nearLatLong - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + # + distance - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + # + inPostalCode - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + # + inRegion - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + # + inRateCenter - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + # + inLata - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + # + inLocality - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + # + faxEnabled - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + # + return - OK + remote isolated function listAvailablePhoneNumberMachineToMachine(string countryCode, int? areaCode = (), string? contains = (), boolean? smsEnabled = (), boolean? mmsEnabled = (), boolean? voiceEnabled = (), boolean? excludeAllAddressRequired = (), boolean? excludeLocalAddressRequired = (), boolean? excludeForeignAddressRequired = (), boolean? beta = (), string? nearNumber = (), string? nearLatLong = (), int? distance = (), string? inPostalCode = (), string? inRegion = (), string? inRateCenter = (), string? inLata = (), string? inLocality = (), boolean? faxEnabled = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListAvailablePhoneNumberMachineToMachineResponse|error { + return self.generatedClient->listAvailablePhoneNumberMachineToMachine(accountSid ?: self.accountSid, countryCode, areaCode, contains, smsEnabled, mmsEnabled, voiceEnabled, excludeAllAddressRequired, excludeLocalAddressRequired, excludeForeignAddressRequired, beta, nearNumber, nearLatLong, distance, inPostalCode, inRegion, inRateCenter, inLata, inLocality, faxEnabled, pageSize, page, pageToken); + } + # + # + countryCode - The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + # + areaCode - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + # + contains - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. + # + smsEnabled - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + # + mmsEnabled - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + # + voiceEnabled - Whether the phone numbers can receive calls. Can be: `true` or `false`. + # + excludeAllAddressRequired - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeLocalAddressRequired - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeForeignAddressRequired - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + beta - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + nearNumber - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + # + nearLatLong - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + # + distance - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + # + inPostalCode - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + # + inRegion - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + # + inRateCenter - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + # + inLata - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + # + inLocality - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + # + faxEnabled - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + # + return - OK + remote isolated function listAvailablePhoneNumberMobile(string countryCode, int? areaCode = (), string? contains = (), boolean? smsEnabled = (), boolean? mmsEnabled = (), boolean? voiceEnabled = (), boolean? excludeAllAddressRequired = (), boolean? excludeLocalAddressRequired = (), boolean? excludeForeignAddressRequired = (), boolean? beta = (), string? nearNumber = (), string? nearLatLong = (), int? distance = (), string? inPostalCode = (), string? inRegion = (), string? inRateCenter = (), string? inLata = (), string? inLocality = (), boolean? faxEnabled = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListAvailablePhoneNumberMobileResponse|error { + return self.generatedClient->listAvailablePhoneNumberMobile(accountSid ?: self.accountSid, countryCode, areaCode, contains, smsEnabled, mmsEnabled, voiceEnabled, excludeAllAddressRequired, excludeLocalAddressRequired, excludeForeignAddressRequired, beta, nearNumber, nearLatLong, distance, inPostalCode, inRegion, inRateCenter, inLata, inLocality, faxEnabled, pageSize, page, pageToken); + } + # + # + countryCode - The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + # + areaCode - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + # + contains - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. + # + smsEnabled - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + # + mmsEnabled - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + # + voiceEnabled - Whether the phone numbers can receive calls. Can be: `true` or `false`. + # + excludeAllAddressRequired - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeLocalAddressRequired - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeForeignAddressRequired - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + beta - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + nearNumber - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + # + nearLatLong - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + # + distance - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + # + inPostalCode - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + # + inRegion - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + # + inRateCenter - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + # + inLata - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + # + inLocality - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + # + faxEnabled - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + # + return - OK + remote isolated function listAvailablePhoneNumberNational(string countryCode, int? areaCode = (), string? contains = (), boolean? smsEnabled = (), boolean? mmsEnabled = (), boolean? voiceEnabled = (), boolean? excludeAllAddressRequired = (), boolean? excludeLocalAddressRequired = (), boolean? excludeForeignAddressRequired = (), boolean? beta = (), string? nearNumber = (), string? nearLatLong = (), int? distance = (), string? inPostalCode = (), string? inRegion = (), string? inRateCenter = (), string? inLata = (), string? inLocality = (), boolean? faxEnabled = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListAvailablePhoneNumberNationalResponse|error { + return self.generatedClient->listAvailablePhoneNumberNational(accountSid ?: self.accountSid, countryCode, areaCode, contains, smsEnabled, mmsEnabled, voiceEnabled, excludeAllAddressRequired, excludeLocalAddressRequired, excludeForeignAddressRequired, beta, nearNumber, nearLatLong, distance, inPostalCode, inRegion, inRateCenter, inLata, inLocality, faxEnabled, pageSize, page, pageToken); + } + # + # + countryCode - The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + # + areaCode - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + # + contains - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. + # + smsEnabled - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + # + mmsEnabled - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + # + voiceEnabled - Whether the phone numbers can receive calls. Can be: `true` or `false`. + # + excludeAllAddressRequired - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeLocalAddressRequired - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeForeignAddressRequired - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + beta - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + nearNumber - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + # + nearLatLong - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + # + distance - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + # + inPostalCode - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + # + inRegion - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + # + inRateCenter - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + # + inLata - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + # + inLocality - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + # + faxEnabled - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + # + return - OK + remote isolated function listAvailablePhoneNumberSharedCost(string countryCode, int? areaCode = (), string? contains = (), boolean? smsEnabled = (), boolean? mmsEnabled = (), boolean? voiceEnabled = (), boolean? excludeAllAddressRequired = (), boolean? excludeLocalAddressRequired = (), boolean? excludeForeignAddressRequired = (), boolean? beta = (), string? nearNumber = (), string? nearLatLong = (), int? distance = (), string? inPostalCode = (), string? inRegion = (), string? inRateCenter = (), string? inLata = (), string? inLocality = (), boolean? faxEnabled = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListAvailablePhoneNumberSharedCostResponse|error { + return self.generatedClient->listAvailablePhoneNumberSharedCost(accountSid ?: self.accountSid, countryCode, areaCode, contains, smsEnabled, mmsEnabled, voiceEnabled, excludeAllAddressRequired, excludeLocalAddressRequired, excludeForeignAddressRequired, beta, nearNumber, nearLatLong, distance, inPostalCode, inRegion, inRateCenter, inLata, inLocality, faxEnabled, pageSize, page, pageToken); + } + # + # + countryCode - The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + # + areaCode - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + # + contains - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. + # + smsEnabled - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + # + mmsEnabled - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + # + voiceEnabled - Whether the phone numbers can receive calls. Can be: `true` or `false`. + # + excludeAllAddressRequired - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeLocalAddressRequired - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeForeignAddressRequired - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + beta - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + nearNumber - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + # + nearLatLong - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + # + distance - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + # + inPostalCode - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + # + inRegion - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + # + inRateCenter - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + # + inLata - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + # + inLocality - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + # + faxEnabled - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + # + return - OK + remote isolated function listAvailablePhoneNumberTollFree(string countryCode, int? areaCode = (), string? contains = (), boolean? smsEnabled = (), boolean? mmsEnabled = (), boolean? voiceEnabled = (), boolean? excludeAllAddressRequired = (), boolean? excludeLocalAddressRequired = (), boolean? excludeForeignAddressRequired = (), boolean? beta = (), string? nearNumber = (), string? nearLatLong = (), int? distance = (), string? inPostalCode = (), string? inRegion = (), string? inRateCenter = (), string? inLata = (), string? inLocality = (), boolean? faxEnabled = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListAvailablePhoneNumberTollFreeResponse|error { + return self.generatedClient->listAvailablePhoneNumberTollFree(accountSid ?: self.accountSid, countryCode, areaCode, contains, smsEnabled, mmsEnabled, voiceEnabled, excludeAllAddressRequired, excludeLocalAddressRequired, excludeForeignAddressRequired, beta, nearNumber, nearLatLong, distance, inPostalCode, inRegion, inRateCenter, inLata, inLocality, faxEnabled, pageSize, page, pageToken); + } + # + # + countryCode - The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + # + areaCode - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + # + contains - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. + # + smsEnabled - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + # + mmsEnabled - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + # + voiceEnabled - Whether the phone numbers can receive calls. Can be: `true` or `false`. + # + excludeAllAddressRequired - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeLocalAddressRequired - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeForeignAddressRequired - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + beta - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + nearNumber - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + # + nearLatLong - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + # + distance - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + # + inPostalCode - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + # + inRegion - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + # + inRateCenter - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + # + inLata - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + # + inLocality - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + # + faxEnabled - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + # + return - OK + remote isolated function listAvailablePhoneNumberVoip(string countryCode, int? areaCode = (), string? contains = (), boolean? smsEnabled = (), boolean? mmsEnabled = (), boolean? voiceEnabled = (), boolean? excludeAllAddressRequired = (), boolean? excludeLocalAddressRequired = (), boolean? excludeForeignAddressRequired = (), boolean? beta = (), string? nearNumber = (), string? nearLatLong = (), int? distance = (), string? inPostalCode = (), string? inRegion = (), string? inRateCenter = (), string? inLata = (), string? inLocality = (), boolean? faxEnabled = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListAvailablePhoneNumberVoipResponse|error { + return self.generatedClient->listAvailablePhoneNumberVoip(accountSid ?: self.accountSid, countryCode, areaCode, contains, smsEnabled, mmsEnabled, voiceEnabled, excludeAllAddressRequired, excludeLocalAddressRequired, excludeForeignAddressRequired, beta, nearNumber, nearLatLong, distance, inPostalCode, inRegion, inRateCenter, inLata, inLocality, faxEnabled, pageSize, page, pageToken); + } + # Fetch the balance for an Account based on Account Sid. Balance changes may not be reflected immediately. Child accounts do not contain balance information + # + # + accountSid - The unique SID identifier of the Account. + # + return - OK + remote isolated function fetchBalance(string? accountSid = ()) returns Balance|error { + return self.generatedClient->fetchBalance(accountSid ?: self.accountSid); + } + # Retrieves a collection of calls made to and from your account + # + # + to - Only show calls made to this phone number, SIP address, Client identifier or SIM SID. + # + 'from - Only include calls from this phone number, SIP address, Client identifier or SIM SID. + # + parentCallSid - Only include calls spawned by calls with this SID. + # + status - The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`. + # + startTime - Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. + # + startedOnOrBefore - Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. + # + startedOnOrAfter - Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. + # + endTime - Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. + # + endedOnOrBefore - Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. + # + endedOnOrAfter - Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to read. + # + return - OK + remote isolated function listCall(string? to = (), string? 'from = (), string? parentCallSid = (), Call_enum_status? status = (), string? startTime = (), string? startedOnOrBefore = (), string? startedOnOrAfter = (), string? endTime = (), string? endedOnOrBefore = (), string? endedOnOrAfter = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListCallResponse|error { + return self.generatedClient->listCall(accountSid ?: self.accountSid, to, 'from, parentCallSid, status, startTime, startedOnOrBefore, startedOnOrAfter, endTime, endedOnOrBefore, endedOnOrAfter, pageSize, page, pageToken); + } + # Create a new outgoing call to phones, SIP-enabled endpoints or Twilio Client connections + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createCall(CreateCallRequest payload, string? accountSid = ()) returns Call|error { + return self.generatedClient->createCall(accountSid ?: self.accountSid, payload); + } + # Fetch the call specified by the provided Call SID + # + # + sid - The SID of the Call resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to fetch. + # + return - OK + remote isolated function fetchCall(string sid, string? accountSid = ()) returns Call|error { + return self.generatedClient->fetchCall(accountSid ?: self.accountSid, sid); + } + # Initiates a call redirect or terminates a call + # + # + sid - The Twilio-provided string that uniquely identifies the Call resource to update + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to update. + # + return - OK + remote isolated function updateCall(string sid, UpdateCallRequest payload, string? accountSid = ()) returns Call|error { + return self.generatedClient->updateCall(accountSid ?: self.accountSid, sid, payload); + } + # Delete a Call record from your account. Once the record is deleted, it will no longer appear in the API and Account Portal logs. + # + # + sid - The Twilio-provided Call SID that uniquely identifies the Call resource to delete + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteCall(string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteCall(accountSid ?: self.accountSid, sid); + } + # Retrieve a list of all events for a call. + # + # + callSid - The unique SID identifier of the Call. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The unique SID identifier of the Account. + # + return - OK + remote isolated function listCallEvent(string callSid, int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListCallEventResponse|error { + return self.generatedClient->listCallEvent(accountSid ?: self.accountSid, callSid, pageSize, page, pageToken); + } + # Fetch a Feedback resource from a call + # + # + callSid - The call sid that uniquely identifies the call + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - OK + remote isolated function fetchCallFeedback(string callSid, string? accountSid = ()) returns CallCall_feedback|error { + return self.generatedClient->fetchCallFeedback(accountSid ?: self.accountSid, callSid); + } + # Update a Feedback resource for a call + # + # + callSid - The call sid that uniquely identifies the call + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - OK + remote isolated function updateCallFeedback(string callSid, UpdateCallFeedbackRequest payload, string? accountSid = ()) returns CallCall_feedback|error { + return self.generatedClient->updateCallFeedback(accountSid ?: self.accountSid, callSid, payload); + } + # Create a FeedbackSummary resource for a call + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - Created + remote isolated function createCallFeedbackSummary(CreateCallFeedbackSummaryRequest payload, string? accountSid = ()) returns CallCall_feedback_summary|error { + return self.generatedClient->createCallFeedbackSummary(accountSid ?: self.accountSid, payload); + } + # Fetch a FeedbackSummary resource from a call + # + # + sid - A 34 character string that uniquely identifies this resource. + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - OK + remote isolated function fetchCallFeedbackSummary(string sid, string? accountSid = ()) returns CallCall_feedback_summary|error { + return self.generatedClient->fetchCallFeedbackSummary(accountSid ?: self.accountSid, sid); + } + # Delete a FeedbackSummary resource from a call + # + # + sid - A 34 character string that uniquely identifies this resource. + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - The resource was deleted successfully. + remote isolated function deleteCallFeedbackSummary(string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteCallFeedbackSummary(accountSid ?: self.accountSid, sid); + } + # + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the Call Notification resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the Call Notification resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call Notification resource to fetch. + # + return - OK + remote isolated function fetchCallNotification(string callSid, string sid, string? accountSid = ()) returns CallCall_notificationInstance|error { + return self.generatedClient->fetchCallNotification(accountSid ?: self.accountSid, callSid, sid); + } + # + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the Call Notification resources to read. + # + log - Only read notifications of the specified log level. Can be: `0` to read only ERROR notifications or `1` to read only WARNING notifications. By default, all notifications are read. + # + messageDate - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. + # + loggedAtOrBefore - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. + # + loggedAtOrAfter - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call Notification resources to read. + # + return - OK + remote isolated function listCallNotification(string callSid, int? log = (), string? messageDate = (), string? loggedAtOrBefore = (), string? loggedAtOrAfter = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListCallNotificationResponse|error { + return self.generatedClient->listCallNotification(accountSid ?: self.accountSid, callSid, log, messageDate, loggedAtOrBefore, loggedAtOrAfter, pageSize, page, pageToken); + } + # Retrieve a list of recordings belonging to the call used to make the request + # + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to read. + # + dateCreated - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. + # + dateCreatedOnOrBefore - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. + # + dateCreatedOnOrAfter - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to read. + # + return - OK + remote isolated function listCallRecording(string callSid, string? dateCreated = (), string? dateCreatedOnOrBefore = (), string? dateCreatedOnOrAfter = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListCallRecordingResponse|error { + return self.generatedClient->listCallRecording(accountSid ?: self.accountSid, callSid, dateCreated, dateCreatedOnOrBefore, dateCreatedOnOrAfter, pageSize, page, pageToken); + } + # Create a recording for the call + # + # + callSid - The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) to associate the resource with. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createCallRecording(string callSid, CreateCallRecordingRequest payload, string? accountSid = ()) returns CallCall_recording|error { + return self.generatedClient->createCallRecording(accountSid ?: self.accountSid, callSid, payload); + } + # Fetch an instance of a recording for a call + # + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the Recording resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource to fetch. + # + return - OK + remote isolated function fetchCallRecording(string callSid, string sid, string? accountSid = ()) returns CallCall_recording|error { + return self.generatedClient->fetchCallRecording(accountSid ?: self.accountSid, callSid, sid); + } + # Changes the status of the recording to paused, stopped, or in-progress. Note: Pass `Twilio.CURRENT` instead of recording sid to reference current active recording. + # + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource to update. + # + sid - The Twilio-provided string that uniquely identifies the Recording resource to update. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource to update. + # + return - OK + remote isolated function updateCallRecording(string callSid, string sid, UpdateCallRecordingRequest payload, string? accountSid = ()) returns CallCall_recording|error { + return self.generatedClient->updateCallRecording(accountSid ?: self.accountSid, callSid, sid, payload); + } + # Delete a recording from your account + # + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to delete. + # + sid - The Twilio-provided string that uniquely identifies the Recording resource to delete. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteCallRecording(string callSid, string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteCallRecording(accountSid ?: self.accountSid, callSid, sid); + } + # Fetch an instance of a conference + # + # + sid - The Twilio-provided string that uniquely identifies the Conference resource to fetch + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference resource(s) to fetch. + # + return - OK + remote isolated function fetchConference(string sid, string? accountSid = ()) returns Conference|error { + return self.generatedClient->fetchConference(accountSid ?: self.accountSid, sid); + } + # + # + sid - The Twilio-provided string that uniquely identifies the Conference resource to update + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference resource(s) to update. + # + return - OK + remote isolated function updateConference(string sid, UpdateConferenceRequest payload, string? accountSid = ()) returns Conference|error { + return self.generatedClient->updateConference(accountSid ?: self.accountSid, sid, payload); + } + # Retrieve a list of conferences belonging to the account used to make the request + # + # + dateCreated - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. + # + dateCreatedOnOrBefore - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. + # + dateCreatedOnOrAfter - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. + # + dateUpdated - The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. + # + dateUpdatedOnOrBefore - The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. + # + dateUpdatedOnOrAfter - The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. + # + friendlyName - The string that identifies the Conference resources to read. + # + status - The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference resource(s) to read. + # + return - OK + remote isolated function listConference(string? dateCreated = (), string? dateCreatedOnOrBefore = (), string? dateCreatedOnOrAfter = (), string? dateUpdated = (), string? dateUpdatedOnOrBefore = (), string? dateUpdatedOnOrAfter = (), string? friendlyName = (), Conference_enum_status? status = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListConferenceResponse|error { + return self.generatedClient->listConference(accountSid ?: self.accountSid, dateCreated, dateCreatedOnOrBefore, dateCreatedOnOrAfter, dateUpdated, dateUpdatedOnOrBefore, dateUpdatedOnOrAfter, friendlyName, status, pageSize, page, pageToken); + } + # Fetch an instance of a recording for a call + # + # + conferenceSid - The Conference SID that identifies the conference associated with the recording to fetch. + # + sid - The Twilio-provided string that uniquely identifies the Conference Recording resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resource to fetch. + # + return - OK + remote isolated function fetchConferenceRecording(string conferenceSid, string sid, string? accountSid = ()) returns ConferenceConference_recording|error { + return self.generatedClient->fetchConferenceRecording(accountSid ?: self.accountSid, conferenceSid, sid); + } + # Changes the status of the recording to paused, stopped, or in-progress. Note: To use `Twilio.CURRENT`, pass it as recording sid. + # + # + conferenceSid - The Conference SID that identifies the conference associated with the recording to update. + # + sid - The Twilio-provided string that uniquely identifies the Conference Recording resource to update. Use `Twilio.CURRENT` to reference the current active recording. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resource to update. + # + return - OK + remote isolated function updateConferenceRecording(string conferenceSid, string sid, UpdateConferenceRecordingRequest payload, string? accountSid = ()) returns ConferenceConference_recording|error { + return self.generatedClient->updateConferenceRecording(accountSid ?: self.accountSid, conferenceSid, sid, payload); + } + # Delete a recording from your account + # + # + conferenceSid - The Conference SID that identifies the conference associated with the recording to delete. + # + sid - The Twilio-provided string that uniquely identifies the Conference Recording resource to delete. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resources to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteConferenceRecording(string conferenceSid, string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteConferenceRecording(accountSid ?: self.accountSid, conferenceSid, sid); + } + # Retrieve a list of recordings belonging to the call used to make the request + # + # + conferenceSid - The Conference SID that identifies the conference associated with the recording to read. + # + dateCreated - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. + # + dateCreatedOnOrBefore - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. + # + dateCreatedOnOrAfter - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resources to read. + # + return - OK + remote isolated function listConferenceRecording(string conferenceSid, string? dateCreated = (), string? dateCreatedOnOrBefore = (), string? dateCreatedOnOrAfter = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListConferenceRecordingResponse|error { + return self.generatedClient->listConferenceRecording(accountSid ?: self.accountSid, conferenceSid, dateCreated, dateCreatedOnOrBefore, dateCreatedOnOrAfter, pageSize, page, pageToken); + } + # Fetch an instance of a connect-app + # + # + sid - The Twilio-provided string that uniquely identifies the ConnectApp resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resource to fetch. + # + return - OK + remote isolated function fetchConnectApp(string sid, string? accountSid = ()) returns Connect_app|error { + return self.generatedClient->fetchConnectApp(accountSid ?: self.accountSid, sid); + } + # Update a connect-app with the specified parameters + # + # + sid - The Twilio-provided string that uniquely identifies the ConnectApp resource to update. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resources to update. + # + return - OK + remote isolated function updateConnectApp(string sid, UpdateConnectAppRequest payload, string? accountSid = ()) returns Connect_app|error { + return self.generatedClient->updateConnectApp(accountSid ?: self.accountSid, sid, payload); + } + # Delete an instance of a connect-app + # + # + sid - The Twilio-provided string that uniquely identifies the ConnectApp resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resource to fetch. + # + return - The resource was deleted successfully. + remote isolated function deleteConnectApp(string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteConnectApp(accountSid ?: self.accountSid, sid); + } + # Retrieve a list of connect-apps belonging to the account used to make the request + # + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resources to read. + # + return - OK + remote isolated function listConnectApp(int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListConnectAppResponse|error { + return self.generatedClient->listConnectApp(accountSid ?: self.accountSid, pageSize, page, pageToken); + } + # + # + addressSid - The SID of the Address resource associated with the phone number. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the DependentPhoneNumber resources to read. + # + return - OK + remote isolated function listDependentPhoneNumber(string addressSid, int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListDependentPhoneNumberResponse|error { + return self.generatedClient->listDependentPhoneNumber(accountSid ?: self.accountSid, addressSid, pageSize, page, pageToken); + } + # Fetch an incoming-phone-number belonging to the account used to make the request. + # + # + sid - The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to fetch. + # + return - OK + remote isolated function fetchIncomingPhoneNumber(string sid, string? accountSid = ()) returns Incoming_phone_number|error { + return self.generatedClient->fetchIncomingPhoneNumber(accountSid ?: self.accountSid, sid); + } + # Update an incoming-phone-number instance. + # + # + sid - The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to update. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers). + # + return - OK + remote isolated function updateIncomingPhoneNumber(string sid, UpdateIncomingPhoneNumberRequest payload, string? accountSid = ()) returns Incoming_phone_number|error { + return self.generatedClient->updateIncomingPhoneNumber(accountSid ?: self.accountSid, sid, payload); + } + # Delete a phone-numbers belonging to the account used to make the request. + # + # + sid - The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to delete. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resources to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteIncomingPhoneNumber(string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteIncomingPhoneNumber(accountSid ?: self.accountSid, sid); + } + # Retrieve a list of incoming-phone-numbers belonging to the account used to make the request. + # + # + beta - Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + friendlyName - A string that identifies the IncomingPhoneNumber resources to read. + # + phoneNumber - The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. + # + origin - Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resources to read. + # + return - OK + remote isolated function listIncomingPhoneNumber(boolean? beta = (), string? friendlyName = (), string? phoneNumber = (), string? origin = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListIncomingPhoneNumberResponse|error { + return self.generatedClient->listIncomingPhoneNumber(accountSid ?: self.accountSid, beta, friendlyName, phoneNumber, origin, pageSize, page, pageToken); + } + # Purchase a phone-number for the account. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createIncomingPhoneNumber(CreateIncomingPhoneNumberRequest payload, string? accountSid = ()) returns Incoming_phone_number|error { + return self.generatedClient->createIncomingPhoneNumber(accountSid ?: self.accountSid, payload); + } + # Fetch an instance of an Add-on installation currently assigned to this Number. + # + # + resourceSid - The SID of the Phone Number to which the Add-on is assigned. + # + sid - The Twilio-provided string that uniquely identifies the resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource to fetch. + # + return - OK + remote isolated function fetchIncomingPhoneNumberAssignedAddOn(string resourceSid, string sid, string? accountSid = ()) returns Incoming_phone_numberIncoming_phone_number_assigned_add_on|error { + return self.generatedClient->fetchIncomingPhoneNumberAssignedAddOn(accountSid ?: self.accountSid, resourceSid, sid); + } + # Remove the assignment of an Add-on installation from the Number specified. + # + # + resourceSid - The SID of the Phone Number to which the Add-on is assigned. + # + sid - The Twilio-provided string that uniquely identifies the resource to delete. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteIncomingPhoneNumberAssignedAddOn(string resourceSid, string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteIncomingPhoneNumberAssignedAddOn(accountSid ?: self.accountSid, resourceSid, sid); + } + # Retrieve a list of Add-on installations currently assigned to this Number. + # + # + resourceSid - The SID of the Phone Number to which the Add-on is assigned. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to read. + # + return - OK + remote isolated function listIncomingPhoneNumberAssignedAddOn(string resourceSid, int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListIncomingPhoneNumberAssignedAddOnResponse|error { + return self.generatedClient->listIncomingPhoneNumberAssignedAddOn(accountSid ?: self.accountSid, resourceSid, pageSize, page, pageToken); + } + # Assign an Add-on installation to the Number specified. + # + # + resourceSid - The SID of the Phone Number to assign the Add-on. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createIncomingPhoneNumberAssignedAddOn(string resourceSid, CreateIncomingPhoneNumberAssignedAddOnRequest payload, string? accountSid = ()) returns Incoming_phone_numberIncoming_phone_number_assigned_add_on|error { + return self.generatedClient->createIncomingPhoneNumberAssignedAddOn(accountSid ?: self.accountSid, resourceSid, payload); + } + # Fetch an instance of an Extension for the Assigned Add-on. + # + # + resourceSid - The SID of the Phone Number to which the Add-on is assigned. + # + assignedAddOnSid - The SID that uniquely identifies the assigned Add-on installation. + # + sid - The Twilio-provided string that uniquely identifies the resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource to fetch. + # + return - OK + remote isolated function fetchIncomingPhoneNumberAssignedAddOnExtension(string resourceSid, string assignedAddOnSid, string sid, string? accountSid = ()) returns Incoming_phone_numberIncoming_phone_number_assigned_add_onIncoming_phone_number_assigned_add_on_extension|error { + return self.generatedClient->fetchIncomingPhoneNumberAssignedAddOnExtension(accountSid ?: self.accountSid, resourceSid, assignedAddOnSid, sid); + } + # Retrieve a list of Extensions for the Assigned Add-on. + # + # + resourceSid - The SID of the Phone Number to which the Add-on is assigned. + # + assignedAddOnSid - The SID that uniquely identifies the assigned Add-on installation. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to read. + # + return - OK + remote isolated function listIncomingPhoneNumberAssignedAddOnExtension(string resourceSid, string assignedAddOnSid, int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListIncomingPhoneNumberAssignedAddOnExtensionResponse|error { + return self.generatedClient->listIncomingPhoneNumberAssignedAddOnExtension(accountSid ?: self.accountSid, resourceSid, assignedAddOnSid, pageSize, page, pageToken); + } + # + # + beta - Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + friendlyName - A string that identifies the resources to read. + # + phoneNumber - The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. + # + origin - Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to read. + # + return - OK + remote isolated function listIncomingPhoneNumberLocal(boolean? beta = (), string? friendlyName = (), string? phoneNumber = (), string? origin = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListIncomingPhoneNumberLocalResponse|error { + return self.generatedClient->listIncomingPhoneNumberLocal(accountSid ?: self.accountSid, beta, friendlyName, phoneNumber, origin, pageSize, page, pageToken); + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createIncomingPhoneNumberLocal(CreateIncomingPhoneNumberLocalRequest payload, string? accountSid = ()) returns Incoming_phone_numberIncoming_phone_number_local|error { + return self.generatedClient->createIncomingPhoneNumberLocal(accountSid ?: self.accountSid, payload); + } + # + # + beta - Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + friendlyName - A string that identifies the resources to read. + # + phoneNumber - The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. + # + origin - Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to read. + # + return - OK + remote isolated function listIncomingPhoneNumberMobile(boolean? beta = (), string? friendlyName = (), string? phoneNumber = (), string? origin = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListIncomingPhoneNumberMobileResponse|error { + return self.generatedClient->listIncomingPhoneNumberMobile(accountSid ?: self.accountSid, beta, friendlyName, phoneNumber, origin, pageSize, page, pageToken); + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createIncomingPhoneNumberMobile(CreateIncomingPhoneNumberMobileRequest payload, string? accountSid = ()) returns Incoming_phone_numberIncoming_phone_number_mobile|error { + return self.generatedClient->createIncomingPhoneNumberMobile(accountSid ?: self.accountSid, payload); + } + # + # + beta - Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + friendlyName - A string that identifies the resources to read. + # + phoneNumber - The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. + # + origin - Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to read. + # + return - OK + remote isolated function listIncomingPhoneNumberTollFree(boolean? beta = (), string? friendlyName = (), string? phoneNumber = (), string? origin = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListIncomingPhoneNumberTollFreeResponse|error { + return self.generatedClient->listIncomingPhoneNumberTollFree(accountSid ?: self.accountSid, beta, friendlyName, phoneNumber, origin, pageSize, page, pageToken); + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createIncomingPhoneNumberTollFree(CreateIncomingPhoneNumberTollFreeRequest payload, string? accountSid = ()) returns Incoming_phone_numberIncoming_phone_number_toll_free|error { + return self.generatedClient->createIncomingPhoneNumberTollFree(accountSid ?: self.accountSid, payload); + } + # + # + sid - The Twilio-provided string that uniquely identifies the Key resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resource to fetch. + # + return - OK + remote isolated function fetchKey(string sid, string? accountSid = ()) returns Key|error { + return self.generatedClient->fetchKey(accountSid ?: self.accountSid, sid); + } + # + # + sid - The Twilio-provided string that uniquely identifies the Key resource to update. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resources to update. + # + return - OK + remote isolated function updateKey(string sid, UpdateKeyRequest payload, string? accountSid = ()) returns Key|error { + return self.generatedClient->updateKey(accountSid ?: self.accountSid, sid, payload); + } + # + # + sid - The Twilio-provided string that uniquely identifies the Key resource to delete. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resources to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteKey(string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteKey(accountSid ?: self.accountSid, sid); + } + # + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resources to read. + # + return - OK + remote isolated function listKey(int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListKeyResponse|error { + return self.generatedClient->listKey(accountSid ?: self.accountSid, pageSize, page, pageToken); + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Key resource. + # + return - Created + remote isolated function createNewKey(CreateNewKeyRequest payload, string? accountSid = ()) returns New_key|error { + return self.generatedClient->createNewKey(accountSid ?: self.accountSid, payload); + } + # Fetch a single Media resource associated with a specific Message resource + # + # + messageSid - The SID of the Message resource that is associated with the Media resource. + # + sid - The Twilio-provided string that uniquely identifies the Media resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with the Media resource. + # + return - OK + remote isolated function fetchMedia(string messageSid, string sid, string? accountSid = ()) returns MessageMedia|error { + return self.generatedClient->fetchMedia(accountSid ?: self.accountSid, messageSid, sid); + } + # Delete the Media resource. + # + # + messageSid - The SID of the Message resource that is associated with the Media resource. + # + sid - The unique identifier of the to-be-deleted Media resource. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is associated with the Media resource. + # + return - The resource was deleted successfully. + remote isolated function deleteMedia(string messageSid, string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteMedia(accountSid ?: self.accountSid, messageSid, sid); + } + # Read a list of Media resources associated with a specific Message resource + # + # + messageSid - The SID of the Message resource that is associated with the Media resources. + # + dateCreated - Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date. + # + dateCreatedOnOrBefore - Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date. + # + dateCreatedOnOrAfter - Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is associated with the Media resources. + # + return - OK + remote isolated function listMedia(string messageSid, string? dateCreated = (), string? dateCreatedOnOrBefore = (), string? dateCreatedOnOrAfter = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListMediaResponse|error { + return self.generatedClient->listMedia(accountSid ?: self.accountSid, messageSid, dateCreated, dateCreatedOnOrBefore, dateCreatedOnOrAfter, pageSize, page, pageToken); + } + # Fetch a specific member from the queue + # + # + queueSid - The SID of the Queue in which to find the members to fetch. + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource(s) to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Member resource(s) to fetch. + # + return - OK + remote isolated function fetchMember(string queueSid, string callSid, string? accountSid = ()) returns QueueMember|error { + return self.generatedClient->fetchMember(accountSid ?: self.accountSid, queueSid, callSid); + } + # Dequeue a member from a queue and have the member's call begin executing the TwiML document at that URL + # + # + queueSid - The SID of the Queue in which to find the members to update. + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource(s) to update. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Member resource(s) to update. + # + return - OK + remote isolated function updateMember(string queueSid, string callSid, UpdateMemberRequest payload, string? accountSid = ()) returns QueueMember|error { + return self.generatedClient->updateMember(accountSid ?: self.accountSid, queueSid, callSid, payload); + } + # Retrieve the members of the queue + # + # + queueSid - The SID of the Queue in which to find the members + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Member resource(s) to read. + # + return - OK + remote isolated function listMember(string queueSid, int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListMemberResponse|error { + return self.generatedClient->listMember(accountSid ?: self.accountSid, queueSid, pageSize, page, pageToken); + } + # Retrieve a list of Message resources associated with a Twilio Account + # + # + to - Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111` + # + 'from - Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999` + # + dateSent - Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). + # + dateSentOnOrBefore - Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). + # + dateSentOnOrAfter - Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with the Message resources. + # + return - OK + remote isolated function listMessage(string? to = (), string? 'from = (), string? dateSent = (), string? dateSentOnOrBefore = (), string? dateSentOnOrAfter = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListMessageResponse|error { + return self.generatedClient->listMessage(accountSid ?: self.accountSid, to, 'from, dateSent, dateSentOnOrBefore, dateSentOnOrAfter, pageSize, page, pageToken); + } + # Send a message + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) creating the Message resource. + # + return - Created + remote isolated function createMessage(CreateMessageRequest payload, string? accountSid = ()) returns Message|error { + return self.generatedClient->createMessage(accountSid ?: self.accountSid, payload); + } + # Fetch a specific Message + # + # + sid - The SID of the Message resource to be fetched + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with the Message resource + # + return - OK + remote isolated function fetchMessage(string sid, string? accountSid = ()) returns Message|error { + return self.generatedClient->fetchMessage(accountSid ?: self.accountSid, sid); + } + # Update a Message resource (used to redact Message `body` text and to cancel not-yet-sent messages) + # + # + sid - The SID of the Message resource to be updated + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Message resources to update. + # + return - OK + remote isolated function updateMessage(string sid, UpdateMessageRequest payload, string? accountSid = ()) returns Message|error { + return self.generatedClient->updateMessage(accountSid ?: self.accountSid, sid, payload); + } + # Deletes a Message resource from your account + # + # + sid - The SID of the Message resource you wish to delete + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with the Message resource + # + return - The resource was deleted successfully. + remote isolated function deleteMessage(string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteMessage(accountSid ?: self.accountSid, sid); + } + # Create Message Feedback to confirm a tracked user action was performed by the recipient of the associated Message + # + # + messageSid - The SID of the Message resource for which to create MessageFeedback. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with the Message resource for which to create MessageFeedback. + # + return - Created + remote isolated function createMessageFeedback(string messageSid, CreateMessageFeedbackRequest payload, string? accountSid = ()) returns MessageMessage_feedback|error { + return self.generatedClient->createMessageFeedback(accountSid ?: self.accountSid, messageSid, payload); + } + # + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listSigningKey(int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListSigningKeyResponse|error { + return self.generatedClient->listSigningKey(accountSid ?: self.accountSid, pageSize, page, pageToken); + } + # Create a new Signing Key for the account making the request. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Key resource. + # + return - Created + remote isolated function createNewSigningKey(CreateNewSigningKeyRequest payload, string? accountSid = ()) returns New_signing_key|error { + return self.generatedClient->createNewSigningKey(accountSid ?: self.accountSid, payload); + } + # Fetch a notification belonging to the account used to make the request + # + # + sid - The Twilio-provided string that uniquely identifies the Notification resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Notification resource to fetch. + # + return - OK + remote isolated function fetchNotification(string sid, string? accountSid = ()) returns NotificationInstance|error { + return self.generatedClient->fetchNotification(accountSid ?: self.accountSid, sid); + } + # Retrieve a list of notifications belonging to the account used to make the request + # + # + log - Only read notifications of the specified log level. Can be: `0` to read only ERROR notifications or `1` to read only WARNING notifications. By default, all notifications are read. + # + messageDate - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. + # + loggedAtOrBefore - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. + # + loggedAtOrAfter - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Notification resources to read. + # + return - OK + remote isolated function listNotification(int? log = (), string? messageDate = (), string? loggedAtOrBefore = (), string? loggedAtOrAfter = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListNotificationResponse|error { + return self.generatedClient->listNotification(accountSid ?: self.accountSid, log, messageDate, loggedAtOrBefore, loggedAtOrAfter, pageSize, page, pageToken); + } + # Fetch an outgoing-caller-id belonging to the account used to make the request + # + # + sid - The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resource to fetch. + # + return - OK + remote isolated function fetchOutgoingCallerId(string sid, string? accountSid = ()) returns Outgoing_caller_id|error { + return self.generatedClient->fetchOutgoingCallerId(accountSid ?: self.accountSid, sid); + } + # Updates the caller-id + # + # + sid - The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to update. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resources to update. + # + return - OK + remote isolated function updateOutgoingCallerId(string sid, UpdateOutgoingCallerIdRequest payload, string? accountSid = ()) returns Outgoing_caller_id|error { + return self.generatedClient->updateOutgoingCallerId(accountSid ?: self.accountSid, sid, payload); + } + # Delete the caller-id specified from the account + # + # + sid - The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to delete. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resources to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteOutgoingCallerId(string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteOutgoingCallerId(accountSid ?: self.accountSid, sid); + } + # Retrieve a list of outgoing-caller-ids belonging to the account used to make the request + # + # + phoneNumber - The phone number of the OutgoingCallerId resources to read. + # + friendlyName - The string that identifies the OutgoingCallerId resources to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resources to read. + # + return - OK + remote isolated function listOutgoingCallerId(string? phoneNumber = (), string? friendlyName = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListOutgoingCallerIdResponse|error { + return self.generatedClient->listOutgoingCallerId(accountSid ?: self.accountSid, phoneNumber, friendlyName, pageSize, page, pageToken); + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for the new caller ID resource. + # + return - Created + remote isolated function createValidationRequest(CreateValidationRequestRequest payload, string? accountSid = ()) returns Validation_request|error { + return self.generatedClient->createValidationRequest(accountSid ?: self.accountSid, payload); + } + # Fetch an instance of a participant + # + # + conferenceSid - The SID of the conference with the participant to fetch. + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the participant to fetch. Non URL safe characters in a label must be percent encoded, for example, a space character is represented as %20. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resource to fetch. + # + return - OK + remote isolated function fetchParticipant(string conferenceSid, string callSid, string? accountSid = ()) returns ConferenceParticipant|error { + return self.generatedClient->fetchParticipant(accountSid ?: self.accountSid, conferenceSid, callSid); + } + # Update the properties of the participant + # + # + conferenceSid - The SID of the conference with the participant to update. + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the participant to update. Non URL safe characters in a label must be percent encoded, for example, a space character is represented as %20. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resources to update. + # + return - OK + remote isolated function updateParticipant(string conferenceSid, string callSid, UpdateParticipantRequest payload, string? accountSid = ()) returns ConferenceParticipant|error { + return self.generatedClient->updateParticipant(accountSid ?: self.accountSid, conferenceSid, callSid, payload); + } + # Kick a participant from a given conference + # + # + conferenceSid - The SID of the conference with the participants to delete. + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the participant to delete. Non URL safe characters in a label must be percent encoded, for example, a space character is represented as %20. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resources to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteParticipant(string conferenceSid, string callSid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteParticipant(accountSid ?: self.accountSid, conferenceSid, callSid); + } + # Retrieve a list of participants belonging to the account used to make the request + # + # + conferenceSid - The SID of the conference with the participants to read. + # + muted - Whether to return only participants that are muted. Can be: `true` or `false`. + # + hold - Whether to return only participants that are on hold. Can be: `true` or `false`. + # + coaching - Whether to return only participants who are coaching another call. Can be: `true` or `false`. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resources to read. + # + return - OK + remote isolated function listParticipant(string conferenceSid, boolean? muted = (), boolean? hold = (), boolean? coaching = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListParticipantResponse|error { + return self.generatedClient->listParticipant(accountSid ?: self.accountSid, conferenceSid, muted, hold, coaching, pageSize, page, pageToken); + } + # + # + conferenceSid - The SID of the participant's conference. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createParticipant(string conferenceSid, CreateParticipantRequest payload, string? accountSid = ()) returns ConferenceParticipant|error { + return self.generatedClient->createParticipant(accountSid ?: self.accountSid, conferenceSid, payload); + } + # create an instance of payments. This will start a new payments session + # + # + callSid - The SID of the call that will create the resource. Call leg associated with this sid is expected to provide payment information thru DTMF. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createPayments(string callSid, CreatePaymentsRequest payload, string? accountSid = ()) returns CallPayments|error { + return self.generatedClient->createPayments(accountSid ?: self.accountSid, callSid, payload); + } + # update an instance of payments with different phases of payment flows. + # + # + callSid - The SID of the call that will update the resource. This should be the same call sid that was used to create payments resource. + # + sid - The SID of Payments session that needs to be updated. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will update the resource. + # + return - Accepted + remote isolated function updatePayments(string callSid, string sid, UpdatePaymentsRequest payload, string? accountSid = ()) returns CallPayments|error { + return self.generatedClient->updatePayments(accountSid ?: self.accountSid, callSid, sid, payload); + } + # Fetch an instance of a queue identified by the QueueSid + # + # + sid - The Twilio-provided string that uniquely identifies the Queue resource to fetch + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resource to fetch. + # + return - OK + remote isolated function fetchQueue(string sid, string? accountSid = ()) returns Queue|error { + return self.generatedClient->fetchQueue(accountSid ?: self.accountSid, sid); + } + # Update the queue with the new parameters + # + # + sid - The Twilio-provided string that uniquely identifies the Queue resource to update + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resource to update. + # + return - OK + remote isolated function updateQueue(string sid, UpdateQueueRequest payload, string? accountSid = ()) returns Queue|error { + return self.generatedClient->updateQueue(accountSid ?: self.accountSid, sid, payload); + } + # Remove an empty queue + # + # + sid - The Twilio-provided string that uniquely identifies the Queue resource to delete + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteQueue(string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteQueue(accountSid ?: self.accountSid, sid); + } + # Retrieve a list of queues belonging to the account used to make the request + # + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resources to read. + # + return - OK + remote isolated function listQueue(int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListQueueResponse|error { + return self.generatedClient->listQueue(accountSid ?: self.accountSid, pageSize, page, pageToken); + } + # Create a queue + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createQueue(CreateQueueRequest payload, string? accountSid = ()) returns Queue|error { + return self.generatedClient->createQueue(accountSid ?: self.accountSid, payload); + } + # Fetch an instance of a recording + # + # + sid - The Twilio-provided string that uniquely identifies the Recording resource to fetch. + # + includeSoftDeleted - A boolean parameter indicating whether to retrieve soft deleted recordings or not. Recordings metadata are kept after deletion for a retention period of 40 days. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource to fetch. + # + return - OK + remote isolated function fetchRecording(string sid, boolean? includeSoftDeleted = (), string? accountSid = ()) returns Recording|error { + return self.generatedClient->fetchRecording(accountSid ?: self.accountSid, sid, includeSoftDeleted); + } + # Delete a recording from your account + # + # + sid - The Twilio-provided string that uniquely identifies the Recording resource to delete. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteRecording(string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteRecording(accountSid ?: self.accountSid, sid); + } + # Retrieve a list of recordings belonging to the account used to make the request + # + # + dateCreated - Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. + # + dateCreatedOnOrBefore - Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. + # + dateCreatedOnOrAfter - Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to read. + # + conferenceSid - The Conference SID that identifies the conference associated with the recording to read. + # + includeSoftDeleted - A boolean parameter indicating whether to retrieve soft deleted recordings or not. Recordings metadata are kept after deletion for a retention period of 40 days. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to read. + # + return - OK + remote isolated function listRecording(string? dateCreated = (), string? dateCreatedOnOrBefore = (), string? dateCreatedOnOrAfter = (), string? callSid = (), string? conferenceSid = (), boolean? includeSoftDeleted = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListRecordingResponse|error { + return self.generatedClient->listRecording(accountSid ?: self.accountSid, dateCreated, dateCreatedOnOrBefore, dateCreatedOnOrAfter, callSid, conferenceSid, includeSoftDeleted, pageSize, page, pageToken); + } + # Fetch an instance of an AddOnResult + # + # + referenceSid - The SID of the recording to which the result to fetch belongs. + # + sid - The Twilio-provided string that uniquely identifies the Recording AddOnResult resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult resource to fetch. + # + return - OK + remote isolated function fetchRecordingAddOnResult(string referenceSid, string sid, string? accountSid = ()) returns RecordingRecording_add_on_result|error { + return self.generatedClient->fetchRecordingAddOnResult(accountSid ?: self.accountSid, referenceSid, sid); + } + # Delete a result and purge all associated Payloads + # + # + referenceSid - The SID of the recording to which the result to delete belongs. + # + sid - The Twilio-provided string that uniquely identifies the Recording AddOnResult resource to delete. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult resources to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteRecordingAddOnResult(string referenceSid, string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteRecordingAddOnResult(accountSid ?: self.accountSid, referenceSid, sid); + } + # Retrieve a list of results belonging to the recording + # + # + referenceSid - The SID of the recording to which the result to read belongs. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult resources to read. + # + return - OK + remote isolated function listRecordingAddOnResult(string referenceSid, int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListRecordingAddOnResultResponse|error { + return self.generatedClient->listRecordingAddOnResult(accountSid ?: self.accountSid, referenceSid, pageSize, page, pageToken); + } + # Fetch an instance of a result payload + # + # + referenceSid - The SID of the recording to which the AddOnResult resource that contains the payload to fetch belongs. + # + addOnResultSid - The SID of the AddOnResult to which the payload to fetch belongs. + # + sid - The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resource to fetch. + # + return - OK + remote isolated function fetchRecordingAddOnResultPayload(string referenceSid, string addOnResultSid, string sid, string? accountSid = ()) returns RecordingRecording_add_on_resultRecording_add_on_result_payload|error { + return self.generatedClient->fetchRecordingAddOnResultPayload(accountSid ?: self.accountSid, referenceSid, addOnResultSid, sid); + } + # Delete a payload from the result along with all associated Data + # + # + referenceSid - The SID of the recording to which the AddOnResult resource that contains the payloads to delete belongs. + # + addOnResultSid - The SID of the AddOnResult to which the payloads to delete belongs. + # + sid - The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to delete. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resources to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteRecordingAddOnResultPayload(string referenceSid, string addOnResultSid, string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteRecordingAddOnResultPayload(accountSid ?: self.accountSid, referenceSid, addOnResultSid, sid); + } + # Retrieve a list of payloads belonging to the AddOnResult + # + # + referenceSid - The SID of the recording to which the AddOnResult resource that contains the payloads to read belongs. + # + addOnResultSid - The SID of the AddOnResult to which the payloads to read belongs. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resources to read. + # + return - OK + remote isolated function listRecordingAddOnResultPayload(string referenceSid, string addOnResultSid, int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListRecordingAddOnResultPayloadResponse|error { + return self.generatedClient->listRecordingAddOnResultPayload(accountSid ?: self.accountSid, referenceSid, addOnResultSid, pageSize, page, pageToken); + } + # + # + recordingSid - The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) that created the transcription to fetch. + # + sid - The Twilio-provided string that uniquely identifies the Transcription resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resource to fetch. + # + return - OK + remote isolated function fetchRecordingTranscription(string recordingSid, string sid, string? accountSid = ()) returns RecordingRecording_transcription|error { + return self.generatedClient->fetchRecordingTranscription(accountSid ?: self.accountSid, recordingSid, sid); + } + # + # + recordingSid - The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) that created the transcription to delete. + # + sid - The Twilio-provided string that uniquely identifies the Transcription resource to delete. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteRecordingTranscription(string recordingSid, string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteRecordingTranscription(accountSid ?: self.accountSid, recordingSid, sid); + } + # + # + recordingSid - The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) that created the transcriptions to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to read. + # + return - OK + remote isolated function listRecordingTranscription(string recordingSid, int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListRecordingTranscriptionResponse|error { + return self.generatedClient->listRecordingTranscription(accountSid ?: self.accountSid, recordingSid, pageSize, page, pageToken); + } + # Fetch an instance of a short code + # + # + sid - The Twilio-provided string that uniquely identifies the ShortCode resource to fetch + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource(s) to fetch. + # + return - OK + remote isolated function fetchShortCode(string sid, string? accountSid = ()) returns Short_code|error { + return self.generatedClient->fetchShortCode(accountSid ?: self.accountSid, sid); + } + # Update a short code with the following parameters + # + # + sid - The Twilio-provided string that uniquely identifies the ShortCode resource to update + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource(s) to update. + # + return - OK + remote isolated function updateShortCode(string sid, UpdateShortCodeRequest payload, string? accountSid = ()) returns Short_code|error { + return self.generatedClient->updateShortCode(accountSid ?: self.accountSid, sid, payload); + } + # Retrieve a list of short-codes belonging to the account used to make the request + # + # + friendlyName - The string that identifies the ShortCode resources to read. + # + shortCode - Only show the ShortCode resources that match this pattern. You can specify partial numbers and use '*' as a wildcard for any digit. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource(s) to read. + # + return - OK + remote isolated function listShortCode(string? friendlyName = (), string? shortCode = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListShortCodeResponse|error { + return self.generatedClient->listShortCode(accountSid ?: self.accountSid, friendlyName, shortCode, pageSize, page, pageToken); + } + # + # + return - OK + remote isolated function fetchSigningKey(string sid, string? accountSid = ()) returns Signing_key|error { + return self.generatedClient->fetchSigningKey(accountSid ?: self.accountSid, sid); + } + # + # + return - OK + remote isolated function updateSigningKey(string sid, UpdateSigningKeyRequest payload, string? accountSid = ()) returns Signing_key|error { + return self.generatedClient->updateSigningKey(accountSid ?: self.accountSid, sid, payload); + } + # + # + return - The resource was deleted successfully. + remote isolated function deleteSigningKey(string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteSigningKey(accountSid ?: self.accountSid, sid); + } + # Retrieve a list of credential list mappings belonging to the domain used in the request + # + # + domainSid - The SID of the SIP domain that contains the resources to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resources to read. + # + return - OK + remote isolated function listSipAuthCallsCredentialListMapping(string domainSid, int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListSipAuthCallsCredentialListMappingResponse|error { + return self.generatedClient->listSipAuthCallsCredentialListMapping(accountSid ?: self.accountSid, domainSid, pageSize, page, pageToken); + } + # Create a new credential list mapping resource + # + # + domainSid - The SID of the SIP domain that will contain the new resource. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createSipAuthCallsCredentialListMapping(string domainSid, CreateSipAuthCallsCredentialListMappingRequest payload, string? accountSid = ()) returns SipSip_domainSip_authSip_auth_callsSip_auth_calls_credential_list_mapping|error { + return self.generatedClient->createSipAuthCallsCredentialListMapping(accountSid ?: self.accountSid, domainSid, payload); + } + # Fetch a specific instance of a credential list mapping + # + # + domainSid - The SID of the SIP domain that contains the resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the CredentialListMapping resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resource to fetch. + # + return - OK + remote isolated function fetchSipAuthCallsCredentialListMapping(string domainSid, string sid, string? accountSid = ()) returns SipSip_domainSip_authSip_auth_callsSip_auth_calls_credential_list_mapping|error { + return self.generatedClient->fetchSipAuthCallsCredentialListMapping(accountSid ?: self.accountSid, domainSid, sid); + } + # Delete a credential list mapping from the requested domain + # + # + domainSid - The SID of the SIP domain that contains the resource to delete. + # + sid - The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resources to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteSipAuthCallsCredentialListMapping(string domainSid, string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteSipAuthCallsCredentialListMapping(accountSid ?: self.accountSid, domainSid, sid); + } + # Retrieve a list of IP Access Control List mappings belonging to the domain used in the request + # + # + domainSid - The SID of the SIP domain that contains the resources to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IpAccessControlListMapping resources to read. + # + return - OK + remote isolated function listSipAuthCallsIpAccessControlListMapping(string domainSid, int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListSipAuthCallsIpAccessControlListMappingResponse|error { + return self.generatedClient->listSipAuthCallsIpAccessControlListMapping(accountSid ?: self.accountSid, domainSid, pageSize, page, pageToken); + } + # Create a new IP Access Control List mapping + # + # + domainSid - The SID of the SIP domain that will contain the new resource. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createSipAuthCallsIpAccessControlListMapping(string domainSid, CreateSipAuthCallsIpAccessControlListMappingRequest payload, string? accountSid = ()) returns SipSip_domainSip_authSip_auth_callsSip_auth_calls_ip_access_control_list_mapping|error { + return self.generatedClient->createSipAuthCallsIpAccessControlListMapping(accountSid ?: self.accountSid, domainSid, payload); + } + # Fetch a specific instance of an IP Access Control List mapping + # + # + domainSid - The SID of the SIP domain that contains the resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the IpAccessControlListMapping resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IpAccessControlListMapping resource to fetch. + # + return - OK + remote isolated function fetchSipAuthCallsIpAccessControlListMapping(string domainSid, string sid, string? accountSid = ()) returns SipSip_domainSip_authSip_auth_callsSip_auth_calls_ip_access_control_list_mapping|error { + return self.generatedClient->fetchSipAuthCallsIpAccessControlListMapping(accountSid ?: self.accountSid, domainSid, sid); + } + # Delete an IP Access Control List mapping from the requested domain + # + # + domainSid - The SID of the SIP domain that contains the resources to delete. + # + sid - The Twilio-provided string that uniquely identifies the IpAccessControlListMapping resource to delete. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IpAccessControlListMapping resources to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteSipAuthCallsIpAccessControlListMapping(string domainSid, string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteSipAuthCallsIpAccessControlListMapping(accountSid ?: self.accountSid, domainSid, sid); + } + # Retrieve a list of credential list mappings belonging to the domain used in the request + # + # + domainSid - The SID of the SIP domain that contains the resources to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resources to read. + # + return - OK + remote isolated function listSipAuthRegistrationsCredentialListMapping(string domainSid, int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListSipAuthRegistrationsCredentialListMappingResponse|error { + return self.generatedClient->listSipAuthRegistrationsCredentialListMapping(accountSid ?: self.accountSid, domainSid, pageSize, page, pageToken); + } + # Create a new credential list mapping resource + # + # + domainSid - The SID of the SIP domain that will contain the new resource. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createSipAuthRegistrationsCredentialListMapping(string domainSid, CreateSipAuthRegistrationsCredentialListMappingRequest payload, string? accountSid = ()) returns SipSip_domainSip_authSip_auth_registrationsSip_auth_registrations_credential_list_mapping|error { + return self.generatedClient->createSipAuthRegistrationsCredentialListMapping(accountSid ?: self.accountSid, domainSid, payload); + } + # Fetch a specific instance of a credential list mapping + # + # + domainSid - The SID of the SIP domain that contains the resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the CredentialListMapping resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resource to fetch. + # + return - OK + remote isolated function fetchSipAuthRegistrationsCredentialListMapping(string domainSid, string sid, string? accountSid = ()) returns SipSip_domainSip_authSip_auth_registrationsSip_auth_registrations_credential_list_mapping|error { + return self.generatedClient->fetchSipAuthRegistrationsCredentialListMapping(accountSid ?: self.accountSid, domainSid, sid); + } + # Delete a credential list mapping from the requested domain + # + # + domainSid - The SID of the SIP domain that contains the resources to delete. + # + sid - The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resources to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteSipAuthRegistrationsCredentialListMapping(string domainSid, string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteSipAuthRegistrationsCredentialListMapping(accountSid ?: self.accountSid, domainSid, sid); + } + # Retrieve a list of credentials. + # + # + credentialListSid - The unique id that identifies the credential list that contains the desired credentials. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The unique id of the Account that is responsible for this resource. + # + return - OK + remote isolated function listSipCredential(string credentialListSid, int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListSipCredentialResponse|error { + return self.generatedClient->listSipCredential(accountSid ?: self.accountSid, credentialListSid, pageSize, page, pageToken); + } + # Create a new credential resource. + # + # + credentialListSid - The unique id that identifies the credential list to include the created credential. + # + accountSid - The unique id of the Account that is responsible for this resource. + # + return - Created + remote isolated function createSipCredential(string credentialListSid, CreateSipCredentialRequest payload, string? accountSid = ()) returns SipSip_credential_listSip_credential|error { + return self.generatedClient->createSipCredential(accountSid ?: self.accountSid, credentialListSid, payload); + } + # Fetch a single credential. + # + # + credentialListSid - The unique id that identifies the credential list that contains the desired credential. + # + sid - The unique id that identifies the resource to fetch. + # + accountSid - The unique id of the Account that is responsible for this resource. + # + return - OK + remote isolated function fetchSipCredential(string credentialListSid, string sid, string? accountSid = ()) returns SipSip_credential_listSip_credential|error { + return self.generatedClient->fetchSipCredential(accountSid ?: self.accountSid, credentialListSid, sid); + } + # Update a credential resource. + # + # + credentialListSid - The unique id that identifies the credential list that includes this credential. + # + sid - The unique id that identifies the resource to update. + # + accountSid - The unique id of the Account that is responsible for this resource. + # + return - OK + remote isolated function updateSipCredential(string credentialListSid, string sid, UpdateSipCredentialRequest payload, string? accountSid = ()) returns SipSip_credential_listSip_credential|error { + return self.generatedClient->updateSipCredential(accountSid ?: self.accountSid, credentialListSid, sid, payload); + } + # Delete a credential resource. + # + # + credentialListSid - The unique id that identifies the credential list that contains the desired credentials. + # + sid - The unique id that identifies the resource to delete. + # + accountSid - The unique id of the Account that is responsible for this resource. + # + return - The resource was deleted successfully. + remote isolated function deleteSipCredential(string credentialListSid, string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteSipCredential(accountSid ?: self.accountSid, credentialListSid, sid); + } + # Get All Credential Lists + # + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The unique id of the Account that is responsible for this resource. + # + return - OK + remote isolated function listSipCredentialList(int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListSipCredentialListResponse|error { + return self.generatedClient->listSipCredentialList(accountSid ?: self.accountSid, pageSize, page, pageToken); + } + # Create a Credential List + # + # + accountSid - The unique id of the Account that is responsible for this resource. + # + return - Created + remote isolated function createSipCredentialList(CreateSipCredentialListRequest payload, string? accountSid = ()) returns SipSip_credential_list|error { + return self.generatedClient->createSipCredentialList(accountSid ?: self.accountSid, payload); + } + # Get a Credential List + # + # + sid - The credential list Sid that uniquely identifies this resource + # + accountSid - The unique id of the Account that is responsible for this resource. + # + return - OK + remote isolated function fetchSipCredentialList(string sid, string? accountSid = ()) returns SipSip_credential_list|error { + return self.generatedClient->fetchSipCredentialList(accountSid ?: self.accountSid, sid); + } + # Update a Credential List + # + # + sid - The credential list Sid that uniquely identifies this resource + # + accountSid - The unique id of the Account that is responsible for this resource. + # + return - OK + remote isolated function updateSipCredentialList(string sid, UpdateSipCredentialListRequest payload, string? accountSid = ()) returns SipSip_credential_list|error { + return self.generatedClient->updateSipCredentialList(accountSid ?: self.accountSid, sid, payload); + } + # Delete a Credential List + # + # + sid - The credential list Sid that uniquely identifies this resource + # + accountSid - The unique id of the Account that is responsible for this resource. + # + return - The resource was deleted successfully. + remote isolated function deleteSipCredentialList(string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteSipCredentialList(accountSid ?: self.accountSid, sid); + } + # Read multiple CredentialListMapping resources from an account. + # + # + domainSid - A 34 character string that uniquely identifies the SIP Domain that includes the resource to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - OK + remote isolated function listSipCredentialListMapping(string domainSid, int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListSipCredentialListMappingResponse|error { + return self.generatedClient->listSipCredentialListMapping(accountSid ?: self.accountSid, domainSid, pageSize, page, pageToken); + } + # Create a CredentialListMapping resource for an account. + # + # + domainSid - A 34 character string that uniquely identifies the SIP Domain for which the CredentialList resource will be mapped. + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - Created + remote isolated function createSipCredentialListMapping(string domainSid, CreateSipCredentialListMappingRequest payload, string? accountSid = ()) returns SipSip_domainSip_credential_list_mapping|error { + return self.generatedClient->createSipCredentialListMapping(accountSid ?: self.accountSid, domainSid, payload); + } + # Fetch a single CredentialListMapping resource from an account. + # + # + domainSid - A 34 character string that uniquely identifies the SIP Domain that includes the resource to fetch. + # + sid - A 34 character string that uniquely identifies the resource to fetch. + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - OK + remote isolated function fetchSipCredentialListMapping(string domainSid, string sid, string? accountSid = ()) returns SipSip_domainSip_credential_list_mapping|error { + return self.generatedClient->fetchSipCredentialListMapping(accountSid ?: self.accountSid, domainSid, sid); + } + # Delete a CredentialListMapping resource from an account. + # + # + domainSid - A 34 character string that uniquely identifies the SIP Domain that includes the resource to delete. + # + sid - A 34 character string that uniquely identifies the resource to delete. + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - The resource was deleted successfully. + remote isolated function deleteSipCredentialListMapping(string domainSid, string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteSipCredentialListMapping(accountSid ?: self.accountSid, domainSid, sid); + } + # Retrieve a list of domains belonging to the account used to make the request + # + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resources to read. + # + return - OK + remote isolated function listSipDomain(int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListSipDomainResponse|error { + return self.generatedClient->listSipDomain(accountSid ?: self.accountSid, pageSize, page, pageToken); + } + # Create a new Domain + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createSipDomain(CreateSipDomainRequest payload, string? accountSid = ()) returns SipSip_domain|error { + return self.generatedClient->createSipDomain(accountSid ?: self.accountSid, payload); + } + # Fetch an instance of a Domain + # + # + sid - The Twilio-provided string that uniquely identifies the SipDomain resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resource to fetch. + # + return - OK + remote isolated function fetchSipDomain(string sid, string? accountSid = ()) returns SipSip_domain|error { + return self.generatedClient->fetchSipDomain(accountSid ?: self.accountSid, sid); + } + # Update the attributes of a domain + # + # + sid - The Twilio-provided string that uniquely identifies the SipDomain resource to update. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resource to update. + # + return - OK + remote isolated function updateSipDomain(string sid, UpdateSipDomainRequest payload, string? accountSid = ()) returns SipSip_domain|error { + return self.generatedClient->updateSipDomain(accountSid ?: self.accountSid, sid, payload); + } + # Delete an instance of a Domain + # + # + sid - The Twilio-provided string that uniquely identifies the SipDomain resource to delete. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resources to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteSipDomain(string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteSipDomain(accountSid ?: self.accountSid, sid); + } + # Retrieve a list of IpAccessControlLists that belong to the account used to make the request + # + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - OK + remote isolated function listSipIpAccessControlList(int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListSipIpAccessControlListResponse|error { + return self.generatedClient->listSipIpAccessControlList(accountSid ?: self.accountSid, pageSize, page, pageToken); + } + # Create a new IpAccessControlList resource + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - Created + remote isolated function createSipIpAccessControlList(CreateSipIpAccessControlListRequest payload, string? accountSid = ()) returns SipSip_ip_access_control_list|error { + return self.generatedClient->createSipIpAccessControlList(accountSid ?: self.accountSid, payload); + } + # Fetch a specific instance of an IpAccessControlList + # + # + sid - A 34 character string that uniquely identifies the resource to fetch. + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - OK + remote isolated function fetchSipIpAccessControlList(string sid, string? accountSid = ()) returns SipSip_ip_access_control_list|error { + return self.generatedClient->fetchSipIpAccessControlList(accountSid ?: self.accountSid, sid); + } + # Rename an IpAccessControlList + # + # + sid - A 34 character string that uniquely identifies the resource to udpate. + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - OK + remote isolated function updateSipIpAccessControlList(string sid, UpdateSipIpAccessControlListRequest payload, string? accountSid = ()) returns SipSip_ip_access_control_list|error { + return self.generatedClient->updateSipIpAccessControlList(accountSid ?: self.accountSid, sid, payload); + } + # Delete an IpAccessControlList from the requested account + # + # + sid - A 34 character string that uniquely identifies the resource to delete. + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - The resource was deleted successfully. + remote isolated function deleteSipIpAccessControlList(string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteSipIpAccessControlList(accountSid ?: self.accountSid, sid); + } + # Fetch an IpAccessControlListMapping resource. + # + # + domainSid - A 34 character string that uniquely identifies the SIP domain. + # + sid - A 34 character string that uniquely identifies the resource to fetch. + # + accountSid - The unique id of the Account that is responsible for this resource. + # + return - OK + remote isolated function fetchSipIpAccessControlListMapping(string domainSid, string sid, string? accountSid = ()) returns SipSip_domainSip_ip_access_control_list_mapping|error { + return self.generatedClient->fetchSipIpAccessControlListMapping(accountSid ?: self.accountSid, domainSid, sid); + } + # Delete an IpAccessControlListMapping resource. + # + # + domainSid - A 34 character string that uniquely identifies the SIP domain. + # + sid - A 34 character string that uniquely identifies the resource to delete. + # + accountSid - The unique id of the Account that is responsible for this resource. + # + return - The resource was deleted successfully. + remote isolated function deleteSipIpAccessControlListMapping(string domainSid, string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteSipIpAccessControlListMapping(accountSid ?: self.accountSid, domainSid, sid); + } + # Retrieve a list of IpAccessControlListMapping resources. + # + # + domainSid - A 34 character string that uniquely identifies the SIP domain. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The unique id of the Account that is responsible for this resource. + # + return - OK + remote isolated function listSipIpAccessControlListMapping(string domainSid, int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListSipIpAccessControlListMappingResponse|error { + return self.generatedClient->listSipIpAccessControlListMapping(accountSid ?: self.accountSid, domainSid, pageSize, page, pageToken); + } + # Create a new IpAccessControlListMapping resource. + # + # + domainSid - A 34 character string that uniquely identifies the SIP domain. + # + accountSid - The unique id of the Account that is responsible for this resource. + # + return - Created + remote isolated function createSipIpAccessControlListMapping(string domainSid, CreateSipIpAccessControlListMappingRequest payload, string? accountSid = ()) returns SipSip_domainSip_ip_access_control_list_mapping|error { + return self.generatedClient->createSipIpAccessControlListMapping(accountSid ?: self.accountSid, domainSid, payload); + } + # Read multiple IpAddress resources. + # + # + ipAccessControlListSid - The IpAccessControlList Sid that identifies the IpAddress resources to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - OK + remote isolated function listSipIpAddress(string ipAccessControlListSid, int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListSipIpAddressResponse|error { + return self.generatedClient->listSipIpAddress(accountSid ?: self.accountSid, ipAccessControlListSid, pageSize, page, pageToken); + } + # Create a new IpAddress resource. + # + # + ipAccessControlListSid - The IpAccessControlList Sid with which to associate the created IpAddress resource. + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - Created + remote isolated function createSipIpAddress(string ipAccessControlListSid, CreateSipIpAddressRequest payload, string? accountSid = ()) returns SipSip_ip_access_control_listSip_ip_address|error { + return self.generatedClient->createSipIpAddress(accountSid ?: self.accountSid, ipAccessControlListSid, payload); + } + # Read one IpAddress resource. + # + # + ipAccessControlListSid - The IpAccessControlList Sid that identifies the IpAddress resources to fetch. + # + sid - A 34 character string that uniquely identifies the IpAddress resource to fetch. + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - OK + remote isolated function fetchSipIpAddress(string ipAccessControlListSid, string sid, string? accountSid = ()) returns SipSip_ip_access_control_listSip_ip_address|error { + return self.generatedClient->fetchSipIpAddress(accountSid ?: self.accountSid, ipAccessControlListSid, sid); + } + # Update an IpAddress resource. + # + # + ipAccessControlListSid - The IpAccessControlList Sid that identifies the IpAddress resources to update. + # + sid - A 34 character string that identifies the IpAddress resource to update. + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - OK + remote isolated function updateSipIpAddress(string ipAccessControlListSid, string sid, UpdateSipIpAddressRequest payload, string? accountSid = ()) returns SipSip_ip_access_control_listSip_ip_address|error { + return self.generatedClient->updateSipIpAddress(accountSid ?: self.accountSid, ipAccessControlListSid, sid, payload); + } + # Delete an IpAddress resource. + # + # + ipAccessControlListSid - The IpAccessControlList Sid that identifies the IpAddress resources to delete. + # + sid - A 34 character string that uniquely identifies the resource to delete. + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - The resource was deleted successfully. + remote isolated function deleteSipIpAddress(string ipAccessControlListSid, string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteSipIpAddress(accountSid ?: self.accountSid, ipAccessControlListSid, sid); + } + # Create a Siprec + # + # + callSid - The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Siprec resource is associated with. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Siprec resource. + # + return - Created + remote isolated function createSiprec(string callSid, CreateSiprecRequest payload, string? accountSid = ()) returns CallSiprec|error { + return self.generatedClient->createSiprec(accountSid ?: self.accountSid, callSid, payload); + } + # Stop a Siprec using either the SID of the Siprec resource or the `name` used when creating the resource + # + # + callSid - The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Siprec resource is associated with. + # + sid - The SID of the Siprec resource, or the `name` used when creating the resource + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Siprec resource. + # + return - OK + remote isolated function updateSiprec(string callSid, string sid, UpdateSiprecRequest payload, string? accountSid = ()) returns CallSiprec|error { + return self.generatedClient->updateSiprec(accountSid ?: self.accountSid, callSid, sid, payload); + } + # Create a Stream + # + # + callSid - The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Stream resource is associated with. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Stream resource. + # + return - Created + remote isolated function createStream(string callSid, CreateStreamRequest payload, string? accountSid = ()) returns CallStream|error { + return self.generatedClient->createStream(accountSid ?: self.accountSid, callSid, payload); + } + # Stop a Stream using either the SID of the Stream resource or the `name` used when creating the resource + # + # + callSid - The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Stream resource is associated with. + # + sid - The SID of the Stream resource, or the `name` used when creating the resource + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Stream resource. + # + return - OK + remote isolated function updateStream(string callSid, string sid, UpdateStreamRequest payload, string? accountSid = ()) returns CallStream|error { + return self.generatedClient->updateStream(accountSid ?: self.accountSid, callSid, sid, payload); + } + # Create a new token for ICE servers + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createToken(CreateTokenRequest payload, string? accountSid = ()) returns Token|error { + return self.generatedClient->createToken(accountSid ?: self.accountSid, payload); + } + # Fetch an instance of a Transcription + # + # + sid - The Twilio-provided string that uniquely identifies the Transcription resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resource to fetch. + # + return - OK + remote isolated function fetchTranscription(string sid, string? accountSid = ()) returns Transcription|error { + return self.generatedClient->fetchTranscription(accountSid ?: self.accountSid, sid); + } + # Delete a transcription from the account used to make the request + # + # + sid - The Twilio-provided string that uniquely identifies the Transcription resource to delete. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteTranscription(string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteTranscription(accountSid ?: self.accountSid, sid); + } + # Retrieve a list of transcriptions belonging to the account used to make the request + # + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to read. + # + return - OK + remote isolated function listTranscription(int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListTranscriptionResponse|error { + return self.generatedClient->listTranscription(accountSid ?: self.accountSid, pageSize, page, pageToken); + } + # Retrieve a list of usage-records belonging to the account used to make the request + # + # + category - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + # + startDate - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + # + endDate - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + # + includeSubaccounts - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + # + return - OK + remote isolated function listUsageRecord(Usage_record_enum_category? category = (), string? startDate = (), string? endDate = (), boolean? includeSubaccounts = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListUsageRecordResponse|error { + return self.generatedClient->listUsageRecord(accountSid ?: self.accountSid, category, startDate, endDate, includeSubaccounts, pageSize, page, pageToken); + } + # + # + category - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + # + startDate - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + # + endDate - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + # + includeSubaccounts - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + # + return - OK + remote isolated function listUsageRecordAllTime(Usage_record_all_time_enum_category? category = (), string? startDate = (), string? endDate = (), boolean? includeSubaccounts = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListUsageRecordAllTimeResponse|error { + return self.generatedClient->listUsageRecordAllTime(accountSid ?: self.accountSid, category, startDate, endDate, includeSubaccounts, pageSize, page, pageToken); + } + # + # + category - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + # + startDate - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + # + endDate - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + # + includeSubaccounts - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + # + return - OK + remote isolated function listUsageRecordDaily(Usage_record_daily_enum_category? category = (), string? startDate = (), string? endDate = (), boolean? includeSubaccounts = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListUsageRecordDailyResponse|error { + return self.generatedClient->listUsageRecordDaily(accountSid ?: self.accountSid, category, startDate, endDate, includeSubaccounts, pageSize, page, pageToken); + } + # + # + category - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + # + startDate - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + # + endDate - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + # + includeSubaccounts - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + # + return - OK + remote isolated function listUsageRecordLastMonth(Usage_record_last_month_enum_category? category = (), string? startDate = (), string? endDate = (), boolean? includeSubaccounts = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListUsageRecordLastMonthResponse|error { + return self.generatedClient->listUsageRecordLastMonth(accountSid ?: self.accountSid, category, startDate, endDate, includeSubaccounts, pageSize, page, pageToken); + } + # + # + category - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + # + startDate - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + # + endDate - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + # + includeSubaccounts - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + # + return - OK + remote isolated function listUsageRecordMonthly(Usage_record_monthly_enum_category? category = (), string? startDate = (), string? endDate = (), boolean? includeSubaccounts = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListUsageRecordMonthlyResponse|error { + return self.generatedClient->listUsageRecordMonthly(accountSid ?: self.accountSid, category, startDate, endDate, includeSubaccounts, pageSize, page, pageToken); + } + # + # + category - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + # + startDate - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + # + endDate - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + # + includeSubaccounts - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + # + return - OK + remote isolated function listUsageRecordThisMonth(Usage_record_this_month_enum_category? category = (), string? startDate = (), string? endDate = (), boolean? includeSubaccounts = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListUsageRecordThisMonthResponse|error { + return self.generatedClient->listUsageRecordThisMonth(accountSid ?: self.accountSid, category, startDate, endDate, includeSubaccounts, pageSize, page, pageToken); + } + # + # + category - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + # + startDate - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + # + endDate - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + # + includeSubaccounts - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + # + return - OK + remote isolated function listUsageRecordToday(Usage_record_today_enum_category? category = (), string? startDate = (), string? endDate = (), boolean? includeSubaccounts = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListUsageRecordTodayResponse|error { + return self.generatedClient->listUsageRecordToday(accountSid ?: self.accountSid, category, startDate, endDate, includeSubaccounts, pageSize, page, pageToken); + } + # + # + category - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + # + startDate - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + # + endDate - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + # + includeSubaccounts - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + # + return - OK + remote isolated function listUsageRecordYearly(Usage_record_yearly_enum_category? category = (), string? startDate = (), string? endDate = (), boolean? includeSubaccounts = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListUsageRecordYearlyResponse|error { + return self.generatedClient->listUsageRecordYearly(accountSid ?: self.accountSid, category, startDate, endDate, includeSubaccounts, pageSize, page, pageToken); + } + # + # + category - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + # + startDate - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + # + endDate - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + # + includeSubaccounts - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + # + return - OK + remote isolated function listUsageRecordYesterday(Usage_record_yesterday_enum_category? category = (), string? startDate = (), string? endDate = (), boolean? includeSubaccounts = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListUsageRecordYesterdayResponse|error { + return self.generatedClient->listUsageRecordYesterday(accountSid ?: self.accountSid, category, startDate, endDate, includeSubaccounts, pageSize, page, pageToken); + } + # Fetch and instance of a usage-trigger + # + # + sid - The Twilio-provided string that uniquely identifies the UsageTrigger resource to fetch. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageTrigger resource to fetch. + # + return - OK + remote isolated function fetchUsageTrigger(string sid, string? accountSid = ()) returns UsageUsage_trigger|error { + return self.generatedClient->fetchUsageTrigger(accountSid ?: self.accountSid, sid); + } + # Update an instance of a usage trigger + # + # + sid - The Twilio-provided string that uniquely identifies the UsageTrigger resource to update. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageTrigger resources to update. + # + return - OK + remote isolated function updateUsageTrigger(string sid, UpdateUsageTriggerRequest payload, string? accountSid = ()) returns UsageUsage_trigger|error { + return self.generatedClient->updateUsageTrigger(accountSid ?: self.accountSid, sid, payload); + } + # + # + sid - The Twilio-provided string that uniquely identifies the UsageTrigger resource to delete. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageTrigger resources to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteUsageTrigger(string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteUsageTrigger(accountSid ?: self.accountSid, sid); + } + # Retrieve a list of usage-triggers belonging to the account used to make the request + # + # + recurring - The frequency of recurring UsageTriggers to read. Can be: `daily`, `monthly`, or `yearly` to read recurring UsageTriggers. An empty value or a value of `alltime` reads non-recurring UsageTriggers. + # + triggerBy - The trigger field of the UsageTriggers to read. Can be: `count`, `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price). + # + usageCategory - The usage category of the UsageTriggers to read. Must be a supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories). + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageTrigger resources to read. + # + return - OK + remote isolated function listUsageTrigger(Usage_trigger_enum_recurring? recurring = (), Usage_trigger_enum_trigger_field? triggerBy = (), Usage_trigger_enum_usage_category? usageCategory = (), int? pageSize = (), int? page = (), string? pageToken = (), string? accountSid = ()) returns ListUsageTriggerResponse|error { + return self.generatedClient->listUsageTrigger(accountSid ?: self.accountSid, recurring, triggerBy, usageCategory, pageSize, page, pageToken); + } + # Create a new UsageTrigger + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createUsageTrigger(CreateUsageTriggerRequest payload, string? accountSid = ()) returns UsageUsage_trigger|error { + return self.generatedClient->createUsageTrigger(accountSid ?: self.accountSid, payload); + } + # Create a new User Defined Message for the given Call SID. + # + # + callSid - The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the User Defined Message is associated with. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created User Defined Message. + # + return - Created + remote isolated function createUserDefinedMessage(string callSid, CreateUserDefinedMessageRequest payload, string? accountSid = ()) returns CallUser_defined_message|error { + return self.generatedClient->createUserDefinedMessage(accountSid ?: self.accountSid, callSid, payload); + } + # Subscribe to User Defined Messages for a given Call SID. + # + # + callSid - The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the User Defined Messages subscription is associated with. This refers to the Call SID that is producing the user defined messages. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that subscribed to the User Defined Messages. + # + return - Created + remote isolated function createUserDefinedMessageSubscription(string callSid, CreateUserDefinedMessageSubscriptionRequest payload, string? accountSid = ()) returns CallUser_defined_message_subscription|error { + return self.generatedClient->createUserDefinedMessageSubscription(accountSid ?: self.accountSid, callSid, payload); + } + # Delete a specific User Defined Message Subscription. + # + # + callSid - The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the User Defined Message Subscription is associated with. This refers to the Call SID that is producing the User Defined Messages. + # + sid - The SID that uniquely identifies this User Defined Message Subscription. + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that subscribed to the User Defined Messages. + # + return - The resource was deleted successfully. + remote isolated function deleteUserDefinedMessageSubscription(string callSid, string sid, string? accountSid = ()) returns http:Response|error { + return self.generatedClient->deleteUserDefinedMessageSubscription(accountSid ?: self.accountSid, callSid, sid); + } +} diff --git a/ballerina/constants.bal b/ballerina/constants.bal deleted file mode 100644 index 563041d0..00000000 --- a/ballerina/constants.bal +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -// Twilio API urls -final string TWILIO_API_BASE_URL = "https://api.twilio.com/2010-04-01"; -final string AUTHY_API_BASE_URL = "https://api.authy.com/protected"; - -final string TWILIO_ACCOUNTS_API = "/Accounts"; -final string AUTHY_APP_API = "/json/app/details"; -final string AUTHY_USER_API = "/json/users"; -final string AUTHY_OTP_SMS_API = "/json/sms"; -final string AUTHY_OTP_CALL_API = "/json/call"; -final string AUTHY_OTP_VERIFY_API = "/json/verify"; - -final string SMS_SEND = "/Messages.json"; -final string WHATSAPP_SEND = "/Messages.json"; -final string VOICE_CALL = "/Calls.json"; -final string JSON_EXTENSION = ".json"; - -final string USER_ADD = "/new"; -final string USER_STATUS = "/status"; -final string USER_REMOVE = "/remove"; -final string USER_SECRET = "/secret"; -final string MESSAGE = "/Messages/"; - -// Pre defined strings -final string CHARSET_UTF8 = "utf-8"; -final string AUTHORIZATION = "Authorization"; -final string BASIC = "Basic"; -final string CONTENT_TYPE = "Content-Type"; -final string X_AUTHY_API_KEY = "X-Authy-API-Key"; -final string WHATSAPP = "whatsapp"; - -// API related parameters -final string TO = "To"; -final string FROM = "From"; -final string BODY = "Body"; -final string URL = "Url"; -final string TWIML = "Twiml"; -final string STATUS_CALLBACK_URL = "StatusCallback"; -final string STATUS_CALLBACK_METHOD = "StatusCallbackMethod"; -final string STATUS_CALLBACK_EVENT = "StatusCallbackEvent"; - -// Conf parameter keys -final string ACCOUNT_SID = "ACCOUNT_SID"; -final string AUTH_TOKEN = "AUTH_TOKEN"; -final string AUTHY_API_KEY = "AUTHY_API_KEY"; - -// HTTP methods for incoming event payload -public const POST = "POST"; -public const GET = "GET"; - -//Symbols -const string FORWARD_SLASH = "/"; -const string EMPTY_STRING = ""; -const string COLON = ":"; diff --git a/ballerina/data_mappings.bal b/ballerina/data_mappings.bal deleted file mode 100644 index 3891fcdf..00000000 --- a/ballerina/data_mappings.bal +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -isolated function mapJsonToAccount(map jsonPayload) returns Account|error { - Account account = {}; - account.sid = jsonPayload["sid"].toString(); - account.name = jsonPayload["friendly_name"].toString(); - account.status = jsonPayload["status"].toString(); - account.'type = jsonPayload["type"].toString(); - account.createdDate = jsonPayload["date_created"].toString(); - account.updatedDate = jsonPayload["date_updated"].toString(); - return account; -} - -isolated function mapJsonToSmsResponse(map jsonPayload) returns SmsResponse|error { - SmsResponse smsResponse = {}; - smsResponse.sid = jsonPayload["sid"].toString(); - smsResponse.dateCreated = jsonPayload["date_created"].toString(); - smsResponse.dateUpdated = jsonPayload["date_updated"].toString(); - smsResponse.dateSent = jsonPayload["date_sent"].toString(); - smsResponse.accountSid = jsonPayload["account_sid"].toString(); - smsResponse.toNumber = jsonPayload["to"].toString(); - smsResponse.fromNumber = jsonPayload["from"].toString(); - smsResponse.body = jsonPayload["body"].toString(); - smsResponse.status = jsonPayload["status"].toString(); - smsResponse.direction = jsonPayload["direction"].toString(); - smsResponse.apiVersion = jsonPayload["api_version"].toString(); - smsResponse.price = jsonPayload["price"].toString(); - smsResponse.priceUnit = jsonPayload["price_unit"].toString(); - smsResponse.uri = jsonPayload["uri"].toString(); - smsResponse.numSegments = jsonPayload["num_segments"].toString(); - return smsResponse; -} - -isolated function mapJsonToWhatsAppResponse(map jsonPayload) returns WhatsAppResponse|error { - WhatsAppResponse whatsAppResponse = {}; - whatsAppResponse.sid = jsonPayload["sid"].toString(); - whatsAppResponse.dateCreated = jsonPayload["date_created"].toString(); - whatsAppResponse.dateUpdated = jsonPayload["date_updated"].toString(); - whatsAppResponse.dateSent = jsonPayload["date_sent"].toString(); - whatsAppResponse.accountSid = jsonPayload["account_sid"].toString(); - whatsAppResponse.toNumber = jsonPayload["to"].toString(); - whatsAppResponse.fromNumber = jsonPayload["from"].toString(); - whatsAppResponse.messageServiceSid = jsonPayload["messaging_service_sid"].toString(); - whatsAppResponse.body = jsonPayload["body"].toString(); - whatsAppResponse.status = jsonPayload["status"].toString(); - whatsAppResponse.numSegments = jsonPayload["num_segments"].toString(); - whatsAppResponse.numMedia = jsonPayload["num_media"].toString(); - whatsAppResponse.direction = jsonPayload["direction"].toString(); - whatsAppResponse.apiVersion = jsonPayload["api_version"].toString(); - whatsAppResponse.price = jsonPayload["price"].toString(); - whatsAppResponse.priceUnit = jsonPayload["price_unit"].toString(); - whatsAppResponse.errorCode = jsonPayload["error_code"].toString(); - whatsAppResponse.errorMessage = jsonPayload["error_message"].toString(); - whatsAppResponse.subresourceUris = jsonPayload["subresource_uris"].toString(); - return whatsAppResponse; -} - -isolated function mapJsonToVoiceCallResponse(map jsonPayload) returns VoiceCallResponse|error { - VoiceCallResponse voiceCallResponse = {}; - voiceCallResponse.sid = jsonPayload["sid"].toString(); - voiceCallResponse.status = jsonPayload["status"].toString(); - voiceCallResponse.price = jsonPayload["price"].toString(); - voiceCallResponse.priceUnit = jsonPayload["price_unit"].toString(); - return voiceCallResponse; -} - -isolated function mapJsonToMessageResourceResponse(map jsonPayload) returns MessageResourceResponse|error { - MessageResourceResponse messageResourceResponse = {}; - messageResourceResponse.body = jsonPayload["body"].toString(); - messageResourceResponse.numSegments = jsonPayload["num_segments"].toString(); - messageResourceResponse.direction = jsonPayload["direction"].toString(); - messageResourceResponse.fromNumber = jsonPayload["direction"].toString(); - messageResourceResponse.toNumber = jsonPayload["to"].toString(); - messageResourceResponse.dateUpdated = jsonPayload["date_updated"].toString(); - messageResourceResponse.price = jsonPayload["price"].toString(); - messageResourceResponse.errorMessage = jsonPayload["error_message"].toString(); - messageResourceResponse.uri = jsonPayload["uri"].toString(); - messageResourceResponse.accountSid = jsonPayload["account_sid"].toString(); - messageResourceResponse.numMedia = jsonPayload["num_media"].toString(); - messageResourceResponse.status = jsonPayload["status"].toString(); - messageResourceResponse.messagingServiceSid = jsonPayload["messaging_service_sid"].toString(); - messageResourceResponse.sid = jsonPayload["sid"].toString(); - messageResourceResponse.dateSent = jsonPayload["date_sent"].toString(); - messageResourceResponse.dateCreated = jsonPayload["date_created"].toString(); - messageResourceResponse.errorCode = jsonPayload["error_code"].toString(); - messageResourceResponse.priceUnit = jsonPayload["price_unit"].toString(); - messageResourceResponse.apiVersion = jsonPayload["api_version"].toString(); - messageResourceResponse.subresourceUris = jsonPayload["subresource_uris"].toString(); - return messageResourceResponse; -} diff --git a/ballerina/endpoint.bal b/ballerina/endpoint.bal deleted file mode 100644 index 995719e5..00000000 --- a/ballerina/endpoint.bal +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerina/auth; -import ballerina/http; -import ballerina/mime; -import ballerinax/'client.config; - -# The Twilio API provides capability to access its platform for communications. These APIs connects -# the software layer and communications networks around the world to allow users to call and message anyone, globally. -# -# + accountSId - Unique identifier of the account -# + basicClient - HTTP client endpoint for basic api -@display {label: "Twilio Client", iconPath: "icon.png"} -public isolated client class Client { - private final string accountSId; - private final http:Client basicClient; - - # Gets invoked to initialize the `connector`. - # The connector initialization requires setting the API credentials. - # Create a [Twilio](https://www.twilio.com/) account and obtain account SID and auth token at [console](twilio.com/console) - # or else follow this [guide](https://www.twilio.com/docs/usage/api#authenticate-with-http) for more details. - # - # + twilioConfig - Twilio connection configuration - # + return - `http:Error` in case of failure to initialize or `null` if successfully initialized - public isolated function init(ConnectionConfig config) returns error? { - http:ClientConfiguration httpClientConfig = check config:constructHTTPClientConfig(config); - self.accountSId = config.twilioAuth.accountSId; - if (config.twilioAuth is TokenBasedAuthentication) { - auth:CredentialsConfig credentialsConfig = { - username: self.accountSId, - password: config.twilioAuth?.authToken.toString() - }; - httpClientConfig.auth = credentialsConfig; - } else { - auth:CredentialsConfig credentialsConfig = { - username: config.twilioAuth?.apiKey.toString(), - password: config.twilioAuth?.apiSecret.toString() - }; - httpClientConfig.auth = credentialsConfig; - } - self.basicClient = check new (TWILIO_API_BASE_URL, httpClientConfig); - } - - # Gets account details of the given account-sid. - # - # + return - An account object with basic details or else an error - @display {label: "Get Twilio Account Details"} - remote isolated function getAccountDetails() returns @tainted @display {label: "Account"} Account|error { - string requestPath = TWILIO_ACCOUNTS_API + FORWARD_SLASH + self.accountSId + JSON_EXTENSION; - http:Response response = check self.basicClient->get(requestPath); - map payloadMap = > check parseResponseToJson(response); - return mapJsonToAccount(payloadMap); - } - - # Sends SMS from the given account-sid. - # - # + fromNo - Mobile number which the SMS should be sent from - # + toNo - Mobile number which the SMS should be received to - # + message - Message body of the SMS - # + statusCallbackUrl - (optional) Callback URL where the status callback events are needed to be dispatched - # + return - A programmable SMS response object or else an error - @display {label: "Send SMS"} - remote isolated function sendSms(@display {label: "Sender's Number"} string fromNo, - @display {label: "Recipient's Number"} string toNo, - @display {label: "Message"} string message, - @display {label: "Callback URL"} string? statusCallbackUrl = ()) returns - @tainted @display {label: "SMS Response"} SmsResponse|error { - http:Request req = new; - string requestBody = EMPTY_STRING; - requestBody = check createUrlEncodedRequestBody(requestBody, FROM, fromNo); - requestBody = check createUrlEncodedRequestBody(requestBody, TO, toNo); - requestBody = check createUrlEncodedRequestBody(requestBody, BODY, message); - if (statusCallbackUrl is string) { - requestBody = check createUrlEncodedRequestBody(requestBody, STATUS_CALLBACK_URL, statusCallbackUrl); - } - - req.setTextPayload(requestBody, contentType = mime:APPLICATION_FORM_URLENCODED); - string requestPath = TWILIO_ACCOUNTS_API + FORWARD_SLASH + self.accountSId + SMS_SEND; - http:Response response = check self.basicClient->post(requestPath, req); - json jsonResponse = check parseResponseToJson(response); - map payloadMap = >jsonResponse; - return mapJsonToSmsResponse(payloadMap); - } - - # Gets the relevant message from a given message-sid. - # - # + messageSid - Message-sid of a relevant message - # + return - A message resource response record or else an error - @display {label: "Get Message Details"} - remote isolated function getMessage(@display {label: "Message SID"} string messageSid) returns @tainted - @display {label: "Message Resource Response"} MessageResourceResponse|error { - string requestPath = TWILIO_ACCOUNTS_API + FORWARD_SLASH + self.accountSId + MESSAGE + messageSid - + JSON_EXTENSION; - http:Response response = check self.basicClient->get(requestPath); - json jsonResponse = check parseResponseToJson(response); - map payloadMap = >jsonResponse; - return mapJsonToMessageResourceResponse(payloadMap); - } - - # Sends WhatsApp message from the given Sender ID of the account. - # - # + fromNo - Mobile number from which the WhatsApp message should be sent - # + toNo - Mobile number by which the WhatsApp message should be received - # + message - Message body of the WhatsApp message - # + return - A whatsAppResponse object or else an error - @display {label: "Send WhatsApp Message"} - remote isolated function sendWhatsAppMessage(@display {label: "Sender's Number"} string fromNo, - @display {label: "Recipient's Number"} string toNo, - @display {label: "Message"} string message) returns - @tainted @display {label: "WhatsApp Message Response"} WhatsAppResponse - |error { - http:Request req = new; - string requestBody = EMPTY_STRING; - requestBody = check createUrlEncodedRequestBody(requestBody, FROM, WHATSAPP + COLON + fromNo); - requestBody = check createUrlEncodedRequestBody(requestBody, TO, WHATSAPP + COLON + toNo); - requestBody = check createUrlEncodedRequestBody(requestBody, BODY, message); - req.setTextPayload(requestBody, contentType = mime:APPLICATION_FORM_URLENCODED); - string requestPath = TWILIO_ACCOUNTS_API + FORWARD_SLASH + self.accountSId + WHATSAPP_SEND; - http:Response response = check self.basicClient->post(requestPath, req); - json jsonResponse = check parseResponseToJson(response); - map payloadMap = >jsonResponse; - return mapJsonToWhatsAppResponse(payloadMap); - } - - # Makes a voice call from the given account-sid. - # - # + fromNo - Mobile number which the voice call should be sent from - # + toNo - Mobile number which the voice call should be received to - # + voiceCallInput - What should be heard when the other party picks up the phone (a Url that returns TwiML Voice instructions or - # inline message. example: "http://demo.twilio.com/docs/voice.xml" or "Thank you for calling") - # + statusCallback - (optional) StatusCallback record which contains the callback url and the events whose status - # needs to be delivered - # + return - A voiceCallresponse object with basic details or else an error - @display {label: "Make Voice Call"} - remote isolated function makeVoiceCall(@display {label: "Caller Number"} string fromNo, - @display {label: "Callee Number"} string toNo, - @display {label: "Input"} VoiceCallInput voiceCallInput, - @display {label: "Callback URL"} StatusCallback? statusCallback = ()) returns - @tainted @display {label: "Voice Call Response"} VoiceCallResponse|error { - http:Request req = new; - string requestBody = EMPTY_STRING; - requestBody = check createUrlEncodedRequestBody(requestBody, FROM, fromNo); - requestBody = check createUrlEncodedRequestBody(requestBody, TO, toNo); - if(voiceCallInput.userInputType == TWIML_URL) { - requestBody = check createUrlEncodedRequestBody(requestBody, URL, voiceCallInput.userInput); - } else { - string voiceMessage = string `${voiceCallInput.userInput}`; - requestBody = check createUrlEncodedRequestBody(requestBody, TWIML, voiceMessage); - } - if (statusCallback is StatusCallback) { - requestBody = check createUrlEncodedRequestBody(requestBody, STATUS_CALLBACK_URL, statusCallback.url); - requestBody = check createUrlEncodedRequestBody(requestBody, STATUS_CALLBACK_METHOD, statusCallback.method); - string[]? events = statusCallback?.events; - - if (events is string[]) { - foreach string event in events { - requestBody = check createUrlEncodedRequestBody(requestBody, STATUS_CALLBACK_EVENT, event); - } - } - } - - req.setTextPayload(requestBody, contentType = mime:APPLICATION_FORM_URLENCODED); - string requestPath = TWILIO_ACCOUNTS_API + FORWARD_SLASH + self.accountSId + VOICE_CALL; - http:Response response = check self.basicClient->post(requestPath, req); - json jsonResponse = check parseResponseToJson(response); - map payloadMap = >jsonResponse; - return mapJsonToVoiceCallResponse(payloadMap); - } -} - - diff --git a/ballerina/modules/oas/client.bal b/ballerina/modules/oas/client.bal new file mode 100644 index 00000000..becf5e15 --- /dev/null +++ b/ballerina/modules/oas/client.bal @@ -0,0 +1,2717 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// AUTO-GENERATED FILE. DO NOT MODIFY. +// This file is auto-generated by the Ballerina OpenAPI tool. + +import ballerina/http; + +# This is the public Twilio REST API. +public isolated client class Client { + final http:Client clientEp; + # Gets invoked to initialize the `connector`. + # + # + config - The configurations to be used when initializing the `connector` + # + serviceUrl - URL of the target service + # + return - An error if connector initialization failed + public isolated function init(ConnectionConfig config, string serviceUrl = "https://api.twilio.com") returns error? { + http:ClientConfiguration httpClientConfig = {auth: config.auth, httpVersion: config.httpVersion, timeout: config.timeout, forwarded: config.forwarded, poolConfig: config.poolConfig, compression: config.compression, circuitBreaker: config.circuitBreaker, retryConfig: config.retryConfig, validation: config.validation}; + do { + if config.http1Settings is ClientHttp1Settings { + ClientHttp1Settings settings = check config.http1Settings.ensureType(ClientHttp1Settings); + httpClientConfig.http1Settings = {...settings}; + } + if config.http2Settings is http:ClientHttp2Settings { + httpClientConfig.http2Settings = check config.http2Settings.ensureType(http:ClientHttp2Settings); + } + if config.cache is http:CacheConfig { + httpClientConfig.cache = check config.cache.ensureType(http:CacheConfig); + } + if config.responseLimits is http:ResponseLimitConfigs { + httpClientConfig.responseLimits = check config.responseLimits.ensureType(http:ResponseLimitConfigs); + } + if config.secureSocket is http:ClientSecureSocket { + httpClientConfig.secureSocket = check config.secureSocket.ensureType(http:ClientSecureSocket); + } + if config.proxy is http:ProxyConfig { + httpClientConfig.proxy = check config.proxy.ensureType(http:ProxyConfig); + } + } + http:Client httpEp = check new (serviceUrl, httpClientConfig); + self.clientEp = httpEp; + return; + } + # Retrieves a collection of Accounts belonging to the account used to make the request + # + # + friendlyName - Only return the Account resources with friendly names that exactly match this name. + # + status - Only return Account resources with the given status. Can be `closed`, `suspended` or `active`. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listAccount(string? friendlyName = (), Account_enum_status? status = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListAccountResponse|error { + string resourcePath = string `/2010-04-01/Accounts.json`; + map queryParam = {"FriendlyName": friendlyName, "Status": status, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListAccountResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Create a new Twilio Subaccount from the account making the request + # + # + return - Created + remote isolated function createAccount(CreateAccountRequest payload) returns Account|error { + string resourcePath = string `/2010-04-01/Accounts.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Account response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch the account specified by the provided Account Sid + # + # + sid - The Account Sid that uniquely identifies the account to fetch + # + return - OK + remote isolated function fetchAccount(string sid) returns Account|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(sid)}.json`; + Account response = check self.clientEp->get(resourcePath); + return response; + } + # Modify the properties of a given Account + # + # + sid - The Account Sid that uniquely identifies the account to update + # + return - OK + remote isolated function updateAccount(string sid, UpdateAccountRequest payload) returns Account|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Account response = check self.clientEp->post(resourcePath, request); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource to read. + # + customerName - The `customer_name` of the Address resources to read. + # + friendlyName - The string that identifies the Address resources to read. + # + isoCountry - The ISO country code of the Address resources to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listAddress(string accountSid, string? customerName = (), string? friendlyName = (), string? isoCountry = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListAddressResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Addresses.json`; + map queryParam = {"CustomerName": customerName, "FriendlyName": friendlyName, "IsoCountry": isoCountry, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListAddressResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Address resource. + # + return - Created + remote isolated function createAddress(string accountSid, CreateAddressRequest payload) returns Address|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Addresses.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Address response = check self.clientEp->post(resourcePath, request); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the Address resource to fetch. + # + return - OK + remote isolated function fetchAddress(string accountSid, string sid) returns Address|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Addresses/${getEncodedUri(sid)}.json`; + Address response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource to update. + # + sid - The Twilio-provided string that uniquely identifies the Address resource to update. + # + return - OK + remote isolated function updateAddress(string accountSid, string sid, UpdateAddressRequest payload) returns Address|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Addresses/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Address response = check self.clientEp->post(resourcePath, request); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource to delete. + # + sid - The Twilio-provided string that uniquely identifies the Address resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteAddress(string accountSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Addresses/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of applications representing an application within the requesting account + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resources to read. + # + friendlyName - The string that identifies the Application resources to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listApplication(string accountSid, string? friendlyName = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListApplicationResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Applications.json`; + map queryParam = {"FriendlyName": friendlyName, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListApplicationResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Create a new application within your account + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createApplication(string accountSid, CreateApplicationRequest payload) returns Application|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Applications.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Application response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch the application specified by the provided sid + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the Application resource to fetch. + # + return - OK + remote isolated function fetchApplication(string accountSid, string sid) returns Application|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Applications/${getEncodedUri(sid)}.json`; + Application response = check self.clientEp->get(resourcePath); + return response; + } + # Updates the application's properties + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resources to update. + # + sid - The Twilio-provided string that uniquely identifies the Application resource to update. + # + return - OK + remote isolated function updateApplication(string accountSid, string sid, UpdateApplicationRequest payload) returns Application|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Applications/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Application response = check self.clientEp->post(resourcePath, request); + return response; + } + # Delete the application by the specified application sid + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resources to delete. + # + sid - The Twilio-provided string that uniquely identifies the Application resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteApplication(string accountSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Applications/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Fetch an instance of an authorized-connect-app + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AuthorizedConnectApp resource to fetch. + # + connectAppSid - The SID of the Connect App to fetch. + # + return - OK + remote isolated function fetchAuthorizedConnectApp(string accountSid, string connectAppSid) returns Authorized_connect_app|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/AuthorizedConnectApps/${getEncodedUri(connectAppSid)}.json`; + Authorized_connect_app response = check self.clientEp->get(resourcePath); + return response; + } + # Retrieve a list of authorized-connect-apps belonging to the account used to make the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AuthorizedConnectApp resources to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listAuthorizedConnectApp(string accountSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListAuthorizedConnectAppResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/AuthorizedConnectApps.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListAuthorizedConnectAppResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the available phone number Country resources. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listAvailablePhoneNumberCountry(string accountSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListAvailablePhoneNumberCountryResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/AvailablePhoneNumbers.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListAvailablePhoneNumberCountryResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the available phone number Country resource. + # + countryCode - The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country to fetch available phone number information about. + # + return - OK + remote isolated function fetchAvailablePhoneNumberCountry(string accountSid, string countryCode) returns Available_phone_number_country|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/AvailablePhoneNumbers/${getEncodedUri(countryCode)}.json`; + Available_phone_number_country response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + # + countryCode - The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + # + areaCode - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + # + contains - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-number-pattern) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-character-pattern). If specified, this value must have at least two characters. + # + smsEnabled - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + # + mmsEnabled - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + # + voiceEnabled - Whether the phone numbers can receive calls. Can be: `true` or `false`. + # + excludeAllAddressRequired - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeLocalAddressRequired - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeForeignAddressRequired - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + beta - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + nearNumber - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + # + nearLatLong - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + # + distance - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + # + inPostalCode - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + # + inRegion - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + # + inRateCenter - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + # + inLata - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + # + inLocality - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + # + faxEnabled - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listAvailablePhoneNumberLocal(string accountSid, string countryCode, int? areaCode = (), string? contains = (), boolean? smsEnabled = (), boolean? mmsEnabled = (), boolean? voiceEnabled = (), boolean? excludeAllAddressRequired = (), boolean? excludeLocalAddressRequired = (), boolean? excludeForeignAddressRequired = (), boolean? beta = (), string? nearNumber = (), string? nearLatLong = (), int? distance = (), string? inPostalCode = (), string? inRegion = (), string? inRateCenter = (), string? inLata = (), string? inLocality = (), boolean? faxEnabled = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListAvailablePhoneNumberLocalResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/AvailablePhoneNumbers/${getEncodedUri(countryCode)}/Local.json`; + map queryParam = {"AreaCode": areaCode, "Contains": contains, "SmsEnabled": smsEnabled, "MmsEnabled": mmsEnabled, "VoiceEnabled": voiceEnabled, "ExcludeAllAddressRequired": excludeAllAddressRequired, "ExcludeLocalAddressRequired": excludeLocalAddressRequired, "ExcludeForeignAddressRequired": excludeForeignAddressRequired, "Beta": beta, "NearNumber": nearNumber, "NearLatLong": nearLatLong, "Distance": distance, "InPostalCode": inPostalCode, "InRegion": inRegion, "InRateCenter": inRateCenter, "InLata": inLata, "InLocality": inLocality, "FaxEnabled": faxEnabled, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListAvailablePhoneNumberLocalResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + # + countryCode - The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + # + areaCode - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + # + contains - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. + # + smsEnabled - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + # + mmsEnabled - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + # + voiceEnabled - Whether the phone numbers can receive calls. Can be: `true` or `false`. + # + excludeAllAddressRequired - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeLocalAddressRequired - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeForeignAddressRequired - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + beta - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + nearNumber - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + # + nearLatLong - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + # + distance - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + # + inPostalCode - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + # + inRegion - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + # + inRateCenter - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + # + inLata - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + # + inLocality - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + # + faxEnabled - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listAvailablePhoneNumberMachineToMachine(string accountSid, string countryCode, int? areaCode = (), string? contains = (), boolean? smsEnabled = (), boolean? mmsEnabled = (), boolean? voiceEnabled = (), boolean? excludeAllAddressRequired = (), boolean? excludeLocalAddressRequired = (), boolean? excludeForeignAddressRequired = (), boolean? beta = (), string? nearNumber = (), string? nearLatLong = (), int? distance = (), string? inPostalCode = (), string? inRegion = (), string? inRateCenter = (), string? inLata = (), string? inLocality = (), boolean? faxEnabled = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListAvailablePhoneNumberMachineToMachineResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/AvailablePhoneNumbers/${getEncodedUri(countryCode)}/MachineToMachine.json`; + map queryParam = {"AreaCode": areaCode, "Contains": contains, "SmsEnabled": smsEnabled, "MmsEnabled": mmsEnabled, "VoiceEnabled": voiceEnabled, "ExcludeAllAddressRequired": excludeAllAddressRequired, "ExcludeLocalAddressRequired": excludeLocalAddressRequired, "ExcludeForeignAddressRequired": excludeForeignAddressRequired, "Beta": beta, "NearNumber": nearNumber, "NearLatLong": nearLatLong, "Distance": distance, "InPostalCode": inPostalCode, "InRegion": inRegion, "InRateCenter": inRateCenter, "InLata": inLata, "InLocality": inLocality, "FaxEnabled": faxEnabled, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListAvailablePhoneNumberMachineToMachineResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + # + countryCode - The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + # + areaCode - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + # + contains - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. + # + smsEnabled - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + # + mmsEnabled - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + # + voiceEnabled - Whether the phone numbers can receive calls. Can be: `true` or `false`. + # + excludeAllAddressRequired - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeLocalAddressRequired - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeForeignAddressRequired - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + beta - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + nearNumber - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + # + nearLatLong - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + # + distance - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + # + inPostalCode - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + # + inRegion - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + # + inRateCenter - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + # + inLata - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + # + inLocality - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + # + faxEnabled - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listAvailablePhoneNumberMobile(string accountSid, string countryCode, int? areaCode = (), string? contains = (), boolean? smsEnabled = (), boolean? mmsEnabled = (), boolean? voiceEnabled = (), boolean? excludeAllAddressRequired = (), boolean? excludeLocalAddressRequired = (), boolean? excludeForeignAddressRequired = (), boolean? beta = (), string? nearNumber = (), string? nearLatLong = (), int? distance = (), string? inPostalCode = (), string? inRegion = (), string? inRateCenter = (), string? inLata = (), string? inLocality = (), boolean? faxEnabled = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListAvailablePhoneNumberMobileResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/AvailablePhoneNumbers/${getEncodedUri(countryCode)}/Mobile.json`; + map queryParam = {"AreaCode": areaCode, "Contains": contains, "SmsEnabled": smsEnabled, "MmsEnabled": mmsEnabled, "VoiceEnabled": voiceEnabled, "ExcludeAllAddressRequired": excludeAllAddressRequired, "ExcludeLocalAddressRequired": excludeLocalAddressRequired, "ExcludeForeignAddressRequired": excludeForeignAddressRequired, "Beta": beta, "NearNumber": nearNumber, "NearLatLong": nearLatLong, "Distance": distance, "InPostalCode": inPostalCode, "InRegion": inRegion, "InRateCenter": inRateCenter, "InLata": inLata, "InLocality": inLocality, "FaxEnabled": faxEnabled, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListAvailablePhoneNumberMobileResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + # + countryCode - The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + # + areaCode - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + # + contains - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. + # + smsEnabled - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + # + mmsEnabled - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + # + voiceEnabled - Whether the phone numbers can receive calls. Can be: `true` or `false`. + # + excludeAllAddressRequired - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeLocalAddressRequired - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeForeignAddressRequired - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + beta - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + nearNumber - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + # + nearLatLong - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + # + distance - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + # + inPostalCode - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + # + inRegion - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + # + inRateCenter - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + # + inLata - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + # + inLocality - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + # + faxEnabled - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listAvailablePhoneNumberNational(string accountSid, string countryCode, int? areaCode = (), string? contains = (), boolean? smsEnabled = (), boolean? mmsEnabled = (), boolean? voiceEnabled = (), boolean? excludeAllAddressRequired = (), boolean? excludeLocalAddressRequired = (), boolean? excludeForeignAddressRequired = (), boolean? beta = (), string? nearNumber = (), string? nearLatLong = (), int? distance = (), string? inPostalCode = (), string? inRegion = (), string? inRateCenter = (), string? inLata = (), string? inLocality = (), boolean? faxEnabled = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListAvailablePhoneNumberNationalResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/AvailablePhoneNumbers/${getEncodedUri(countryCode)}/National.json`; + map queryParam = {"AreaCode": areaCode, "Contains": contains, "SmsEnabled": smsEnabled, "MmsEnabled": mmsEnabled, "VoiceEnabled": voiceEnabled, "ExcludeAllAddressRequired": excludeAllAddressRequired, "ExcludeLocalAddressRequired": excludeLocalAddressRequired, "ExcludeForeignAddressRequired": excludeForeignAddressRequired, "Beta": beta, "NearNumber": nearNumber, "NearLatLong": nearLatLong, "Distance": distance, "InPostalCode": inPostalCode, "InRegion": inRegion, "InRateCenter": inRateCenter, "InLata": inLata, "InLocality": inLocality, "FaxEnabled": faxEnabled, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListAvailablePhoneNumberNationalResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + # + countryCode - The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + # + areaCode - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + # + contains - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. + # + smsEnabled - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + # + mmsEnabled - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + # + voiceEnabled - Whether the phone numbers can receive calls. Can be: `true` or `false`. + # + excludeAllAddressRequired - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeLocalAddressRequired - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeForeignAddressRequired - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + beta - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + nearNumber - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + # + nearLatLong - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + # + distance - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + # + inPostalCode - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + # + inRegion - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + # + inRateCenter - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + # + inLata - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + # + inLocality - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + # + faxEnabled - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listAvailablePhoneNumberSharedCost(string accountSid, string countryCode, int? areaCode = (), string? contains = (), boolean? smsEnabled = (), boolean? mmsEnabled = (), boolean? voiceEnabled = (), boolean? excludeAllAddressRequired = (), boolean? excludeLocalAddressRequired = (), boolean? excludeForeignAddressRequired = (), boolean? beta = (), string? nearNumber = (), string? nearLatLong = (), int? distance = (), string? inPostalCode = (), string? inRegion = (), string? inRateCenter = (), string? inLata = (), string? inLocality = (), boolean? faxEnabled = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListAvailablePhoneNumberSharedCostResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/AvailablePhoneNumbers/${getEncodedUri(countryCode)}/SharedCost.json`; + map queryParam = {"AreaCode": areaCode, "Contains": contains, "SmsEnabled": smsEnabled, "MmsEnabled": mmsEnabled, "VoiceEnabled": voiceEnabled, "ExcludeAllAddressRequired": excludeAllAddressRequired, "ExcludeLocalAddressRequired": excludeLocalAddressRequired, "ExcludeForeignAddressRequired": excludeForeignAddressRequired, "Beta": beta, "NearNumber": nearNumber, "NearLatLong": nearLatLong, "Distance": distance, "InPostalCode": inPostalCode, "InRegion": inRegion, "InRateCenter": inRateCenter, "InLata": inLata, "InLocality": inLocality, "FaxEnabled": faxEnabled, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListAvailablePhoneNumberSharedCostResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + # + countryCode - The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + # + areaCode - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + # + contains - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. + # + smsEnabled - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + # + mmsEnabled - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + # + voiceEnabled - Whether the phone numbers can receive calls. Can be: `true` or `false`. + # + excludeAllAddressRequired - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeLocalAddressRequired - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeForeignAddressRequired - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + beta - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + nearNumber - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + # + nearLatLong - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + # + distance - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + # + inPostalCode - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + # + inRegion - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + # + inRateCenter - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + # + inLata - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + # + inLocality - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + # + faxEnabled - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listAvailablePhoneNumberTollFree(string accountSid, string countryCode, int? areaCode = (), string? contains = (), boolean? smsEnabled = (), boolean? mmsEnabled = (), boolean? voiceEnabled = (), boolean? excludeAllAddressRequired = (), boolean? excludeLocalAddressRequired = (), boolean? excludeForeignAddressRequired = (), boolean? beta = (), string? nearNumber = (), string? nearLatLong = (), int? distance = (), string? inPostalCode = (), string? inRegion = (), string? inRateCenter = (), string? inLata = (), string? inLocality = (), boolean? faxEnabled = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListAvailablePhoneNumberTollFreeResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/AvailablePhoneNumbers/${getEncodedUri(countryCode)}/TollFree.json`; + map queryParam = {"AreaCode": areaCode, "Contains": contains, "SmsEnabled": smsEnabled, "MmsEnabled": mmsEnabled, "VoiceEnabled": voiceEnabled, "ExcludeAllAddressRequired": excludeAllAddressRequired, "ExcludeLocalAddressRequired": excludeLocalAddressRequired, "ExcludeForeignAddressRequired": excludeForeignAddressRequired, "Beta": beta, "NearNumber": nearNumber, "NearLatLong": nearLatLong, "Distance": distance, "InPostalCode": inPostalCode, "InRegion": inRegion, "InRateCenter": inRateCenter, "InLata": inLata, "InLocality": inLocality, "FaxEnabled": faxEnabled, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListAvailablePhoneNumberTollFreeResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + # + countryCode - The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + # + areaCode - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + # + contains - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. + # + smsEnabled - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + # + mmsEnabled - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + # + voiceEnabled - Whether the phone numbers can receive calls. Can be: `true` or `false`. + # + excludeAllAddressRequired - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeLocalAddressRequired - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + excludeForeignAddressRequired - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + # + beta - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + nearNumber - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + # + nearLatLong - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + # + distance - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + # + inPostalCode - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + # + inRegion - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + # + inRateCenter - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + # + inLata - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + # + inLocality - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + # + faxEnabled - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listAvailablePhoneNumberVoip(string accountSid, string countryCode, int? areaCode = (), string? contains = (), boolean? smsEnabled = (), boolean? mmsEnabled = (), boolean? voiceEnabled = (), boolean? excludeAllAddressRequired = (), boolean? excludeLocalAddressRequired = (), boolean? excludeForeignAddressRequired = (), boolean? beta = (), string? nearNumber = (), string? nearLatLong = (), int? distance = (), string? inPostalCode = (), string? inRegion = (), string? inRateCenter = (), string? inLata = (), string? inLocality = (), boolean? faxEnabled = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListAvailablePhoneNumberVoipResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/AvailablePhoneNumbers/${getEncodedUri(countryCode)}/Voip.json`; + map queryParam = {"AreaCode": areaCode, "Contains": contains, "SmsEnabled": smsEnabled, "MmsEnabled": mmsEnabled, "VoiceEnabled": voiceEnabled, "ExcludeAllAddressRequired": excludeAllAddressRequired, "ExcludeLocalAddressRequired": excludeLocalAddressRequired, "ExcludeForeignAddressRequired": excludeForeignAddressRequired, "Beta": beta, "NearNumber": nearNumber, "NearLatLong": nearLatLong, "Distance": distance, "InPostalCode": inPostalCode, "InRegion": inRegion, "InRateCenter": inRateCenter, "InLata": inLata, "InLocality": inLocality, "FaxEnabled": faxEnabled, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListAvailablePhoneNumberVoipResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Fetch the balance for an Account based on Account Sid. Balance changes may not be reflected immediately. Child accounts do not contain balance information + # + # + accountSid - The unique SID identifier of the Account. + # + return - OK + remote isolated function fetchBalance(string accountSid) returns Balance|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Balance.json`; + Balance response = check self.clientEp->get(resourcePath); + return response; + } + # Retrieves a collection of calls made to and from your account + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to read. + # + to - Only show calls made to this phone number, SIP address, Client identifier or SIM SID. + # + 'from - Only include calls from this phone number, SIP address, Client identifier or SIM SID. + # + parentCallSid - Only include calls spawned by calls with this SID. + # + status - The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`. + # + startTime - Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. + # + startedOnOrBefore - Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. + # + startedOnOrAfter - Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. + # + endTime - Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. + # + endedOnOrBefore - Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. + # + endedOnOrAfter - Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listCall(string accountSid, string? to = (), string? 'from = (), string? parentCallSid = (), Call_enum_status? status = (), string? startTime = (), string? startedOnOrBefore = (), string? startedOnOrAfter = (), string? endTime = (), string? endedOnOrBefore = (), string? endedOnOrAfter = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListCallResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls.json`; + map queryParam = {"To": to, "From": 'from, "ParentCallSid": parentCallSid, "Status": status, "StartTime": startTime, "startedOnOrBefore": startedOnOrBefore, "startedOnOrAfter": startedOnOrAfter, "EndTime": endTime, "endedOnOrBefore": endedOnOrBefore, "endedOnOrAfter": endedOnOrAfter, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListCallResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Create a new outgoing call to phones, SIP-enabled endpoints or Twilio Client connections + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createCall(string accountSid, CreateCallRequest payload) returns Call|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Call response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch the call specified by the provided Call SID + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to fetch. + # + sid - The SID of the Call resource to fetch. + # + return - OK + remote isolated function fetchCall(string accountSid, string sid) returns Call|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(sid)}.json`; + Call response = check self.clientEp->get(resourcePath); + return response; + } + # Initiates a call redirect or terminates a call + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to update. + # + sid - The Twilio-provided string that uniquely identifies the Call resource to update + # + return - OK + remote isolated function updateCall(string accountSid, string sid, UpdateCallRequest payload) returns Call|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Call response = check self.clientEp->post(resourcePath, request); + return response; + } + # Delete a Call record from your account. Once the record is deleted, it will no longer appear in the API and Account Portal logs. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to delete. + # + sid - The Twilio-provided Call SID that uniquely identifies the Call resource to delete + # + return - The resource was deleted successfully. + remote isolated function deleteCall(string accountSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of all events for a call. + # + # + accountSid - The unique SID identifier of the Account. + # + callSid - The unique SID identifier of the Call. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listCallEvent(string accountSid, string callSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListCallEventResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(callSid)}/Events.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListCallEventResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Fetch a Feedback resource from a call + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + callSid - The call sid that uniquely identifies the call + # + return - OK + remote isolated function fetchCallFeedback(string accountSid, string callSid) returns CallCall_feedback|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(callSid)}/Feedback.json`; + CallCall_feedback response = check self.clientEp->get(resourcePath); + return response; + } + # Update a Feedback resource for a call + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + callSid - The call sid that uniquely identifies the call + # + return - OK + remote isolated function updateCallFeedback(string accountSid, string callSid, UpdateCallFeedbackRequest payload) returns CallCall_feedback|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(callSid)}/Feedback.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + CallCall_feedback response = check self.clientEp->post(resourcePath, request); + return response; + } + # Create a FeedbackSummary resource for a call + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - Created + remote isolated function createCallFeedbackSummary(string accountSid, CreateCallFeedbackSummaryRequest payload) returns CallCall_feedback_summary|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/FeedbackSummary.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + CallCall_feedback_summary response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch a FeedbackSummary resource from a call + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + sid - A 34 character string that uniquely identifies this resource. + # + return - OK + remote isolated function fetchCallFeedbackSummary(string accountSid, string sid) returns CallCall_feedback_summary|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/FeedbackSummary/${getEncodedUri(sid)}.json`; + CallCall_feedback_summary response = check self.clientEp->get(resourcePath); + return response; + } + # Delete a FeedbackSummary resource from a call + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + sid - A 34 character string that uniquely identifies this resource. + # + return - The resource was deleted successfully. + remote isolated function deleteCallFeedbackSummary(string accountSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/FeedbackSummary/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call Notification resource to fetch. + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the Call Notification resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the Call Notification resource to fetch. + # + return - OK + remote isolated function fetchCallNotification(string accountSid, string callSid, string sid) returns CallCall_notificationInstance|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(callSid)}/Notifications/${getEncodedUri(sid)}.json`; + CallCall_notificationInstance response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call Notification resources to read. + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the Call Notification resources to read. + # + log - Only read notifications of the specified log level. Can be: `0` to read only ERROR notifications or `1` to read only WARNING notifications. By default, all notifications are read. + # + messageDate - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. + # + loggedAtOrBefore - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. + # + loggedAtOrAfter - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listCallNotification(string accountSid, string callSid, int? log = (), string? messageDate = (), string? loggedAtOrBefore = (), string? loggedAtOrAfter = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListCallNotificationResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(callSid)}/Notifications.json`; + map queryParam = {"Log": log, "MessageDate": messageDate, "loggedAtOrBefore": loggedAtOrBefore, "loggedAtOrAfter": loggedAtOrAfter, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListCallNotificationResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Retrieve a list of recordings belonging to the call used to make the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to read. + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to read. + # + dateCreated - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. + # + dateCreatedOnOrBefore - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. + # + dateCreatedOnOrAfter - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listCallRecording(string accountSid, string callSid, string? dateCreated = (), string? dateCreatedOnOrBefore = (), string? dateCreatedOnOrAfter = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListCallRecordingResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(callSid)}/Recordings.json`; + map queryParam = {"DateCreated": dateCreated, "dateCreatedOnOrBefore": dateCreatedOnOrBefore, "dateCreatedOnOrAfter": dateCreatedOnOrAfter, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListCallRecordingResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Create a recording for the call + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + callSid - The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) to associate the resource with. + # + return - Created + remote isolated function createCallRecording(string accountSid, string callSid, CreateCallRecordingRequest payload) returns CallCall_recording|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(callSid)}/Recordings.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + CallCall_recording response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch an instance of a recording for a call + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource to fetch. + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the Recording resource to fetch. + # + return - OK + remote isolated function fetchCallRecording(string accountSid, string callSid, string sid) returns CallCall_recording|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(callSid)}/Recordings/${getEncodedUri(sid)}.json`; + CallCall_recording response = check self.clientEp->get(resourcePath); + return response; + } + # Changes the status of the recording to paused, stopped, or in-progress. Note: Pass `Twilio.CURRENT` instead of recording sid to reference current active recording. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource to update. + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource to update. + # + sid - The Twilio-provided string that uniquely identifies the Recording resource to update. + # + return - OK + remote isolated function updateCallRecording(string accountSid, string callSid, string sid, UpdateCallRecordingRequest payload) returns CallCall_recording|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(callSid)}/Recordings/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + CallCall_recording response = check self.clientEp->post(resourcePath, request); + return response; + } + # Delete a recording from your account + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to delete. + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to delete. + # + sid - The Twilio-provided string that uniquely identifies the Recording resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteCallRecording(string accountSid, string callSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(callSid)}/Recordings/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Fetch an instance of a conference + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference resource(s) to fetch. + # + sid - The Twilio-provided string that uniquely identifies the Conference resource to fetch + # + return - OK + remote isolated function fetchConference(string accountSid, string sid) returns Conference|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Conferences/${getEncodedUri(sid)}.json`; + Conference response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference resource(s) to update. + # + sid - The Twilio-provided string that uniquely identifies the Conference resource to update + # + return - OK + remote isolated function updateConference(string accountSid, string sid, UpdateConferenceRequest payload) returns Conference|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Conferences/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Conference response = check self.clientEp->post(resourcePath, request); + return response; + } + # Retrieve a list of conferences belonging to the account used to make the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference resource(s) to read. + # + dateCreated - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. + # + dateCreatedOnOrBefore - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. + # + dateCreatedOnOrAfter - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. + # + dateUpdated - The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. + # + dateUpdatedOnOrBefore - The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. + # + dateUpdatedOnOrAfter - The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. + # + friendlyName - The string that identifies the Conference resources to read. + # + status - The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listConference(string accountSid, string? dateCreated = (), string? dateCreatedOnOrBefore = (), string? dateCreatedOnOrAfter = (), string? dateUpdated = (), string? dateUpdatedOnOrBefore = (), string? dateUpdatedOnOrAfter = (), string? friendlyName = (), Conference_enum_status? status = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListConferenceResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Conferences.json`; + map queryParam = {"DateCreated": dateCreated, "dateCreatedOnOrBefore": dateCreatedOnOrBefore, "dateCreatedOnOrAfter": dateCreatedOnOrAfter, "DateUpdated": dateUpdated, "dateUpdatedOnOrBefore": dateUpdatedOnOrBefore, "dateUpdatedOnOrAfter": dateUpdatedOnOrAfter, "FriendlyName": friendlyName, "Status": status, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListConferenceResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Fetch an instance of a recording for a call + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resource to fetch. + # + conferenceSid - The Conference SID that identifies the conference associated with the recording to fetch. + # + sid - The Twilio-provided string that uniquely identifies the Conference Recording resource to fetch. + # + return - OK + remote isolated function fetchConferenceRecording(string accountSid, string conferenceSid, string sid) returns ConferenceConference_recording|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Conferences/${getEncodedUri(conferenceSid)}/Recordings/${getEncodedUri(sid)}.json`; + ConferenceConference_recording response = check self.clientEp->get(resourcePath); + return response; + } + # Changes the status of the recording to paused, stopped, or in-progress. Note: To use `Twilio.CURRENT`, pass it as recording sid. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resource to update. + # + conferenceSid - The Conference SID that identifies the conference associated with the recording to update. + # + sid - The Twilio-provided string that uniquely identifies the Conference Recording resource to update. Use `Twilio.CURRENT` to reference the current active recording. + # + return - OK + remote isolated function updateConferenceRecording(string accountSid, string conferenceSid, string sid, UpdateConferenceRecordingRequest payload) returns ConferenceConference_recording|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Conferences/${getEncodedUri(conferenceSid)}/Recordings/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + ConferenceConference_recording response = check self.clientEp->post(resourcePath, request); + return response; + } + # Delete a recording from your account + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resources to delete. + # + conferenceSid - The Conference SID that identifies the conference associated with the recording to delete. + # + sid - The Twilio-provided string that uniquely identifies the Conference Recording resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteConferenceRecording(string accountSid, string conferenceSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Conferences/${getEncodedUri(conferenceSid)}/Recordings/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of recordings belonging to the call used to make the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resources to read. + # + conferenceSid - The Conference SID that identifies the conference associated with the recording to read. + # + dateCreated - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. + # + dateCreatedOnOrBefore - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. + # + dateCreatedOnOrAfter - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listConferenceRecording(string accountSid, string conferenceSid, string? dateCreated = (), string? dateCreatedOnOrBefore = (), string? dateCreatedOnOrAfter = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListConferenceRecordingResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Conferences/${getEncodedUri(conferenceSid)}/Recordings.json`; + map queryParam = {"DateCreated": dateCreated, "dateCreatedOnOrBefore": dateCreatedOnOrBefore, "dateCreatedOnOrAfter": dateCreatedOnOrAfter, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListConferenceRecordingResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Fetch an instance of a connect-app + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the ConnectApp resource to fetch. + # + return - OK + remote isolated function fetchConnectApp(string accountSid, string sid) returns Connect_app|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/ConnectApps/${getEncodedUri(sid)}.json`; + Connect_app response = check self.clientEp->get(resourcePath); + return response; + } + # Update a connect-app with the specified parameters + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resources to update. + # + sid - The Twilio-provided string that uniquely identifies the ConnectApp resource to update. + # + return - OK + remote isolated function updateConnectApp(string accountSid, string sid, UpdateConnectAppRequest payload) returns Connect_app|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/ConnectApps/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Connect_app response = check self.clientEp->post(resourcePath, request); + return response; + } + # Delete an instance of a connect-app + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the ConnectApp resource to fetch. + # + return - The resource was deleted successfully. + remote isolated function deleteConnectApp(string accountSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/ConnectApps/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of connect-apps belonging to the account used to make the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resources to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listConnectApp(string accountSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListConnectAppResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/ConnectApps.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListConnectAppResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the DependentPhoneNumber resources to read. + # + addressSid - The SID of the Address resource associated with the phone number. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listDependentPhoneNumber(string accountSid, string addressSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListDependentPhoneNumberResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Addresses/${getEncodedUri(addressSid)}/DependentPhoneNumbers.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListDependentPhoneNumberResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Fetch an incoming-phone-number belonging to the account used to make the request. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to fetch. + # + return - OK + remote isolated function fetchIncomingPhoneNumber(string accountSid, string sid) returns Incoming_phone_number|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/IncomingPhoneNumbers/${getEncodedUri(sid)}.json`; + Incoming_phone_number response = check self.clientEp->get(resourcePath); + return response; + } + # Update an incoming-phone-number instance. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers). + # + sid - The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to update. + # + return - OK + remote isolated function updateIncomingPhoneNumber(string accountSid, string sid, UpdateIncomingPhoneNumberRequest payload) returns Incoming_phone_number|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/IncomingPhoneNumbers/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Incoming_phone_number response = check self.clientEp->post(resourcePath, request); + return response; + } + # Delete a phone-numbers belonging to the account used to make the request. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resources to delete. + # + sid - The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteIncomingPhoneNumber(string accountSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/IncomingPhoneNumbers/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of incoming-phone-numbers belonging to the account used to make the request. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resources to read. + # + beta - Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + friendlyName - A string that identifies the IncomingPhoneNumber resources to read. + # + phoneNumber - The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. + # + origin - Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listIncomingPhoneNumber(string accountSid, boolean? beta = (), string? friendlyName = (), string? phoneNumber = (), string? origin = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListIncomingPhoneNumberResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/IncomingPhoneNumbers.json`; + map queryParam = {"Beta": beta, "FriendlyName": friendlyName, "PhoneNumber": phoneNumber, "Origin": origin, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListIncomingPhoneNumberResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Purchase a phone-number for the account. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createIncomingPhoneNumber(string accountSid, CreateIncomingPhoneNumberRequest payload) returns Incoming_phone_number|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/IncomingPhoneNumbers.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Incoming_phone_number response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch an instance of an Add-on installation currently assigned to this Number. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource to fetch. + # + resourceSid - The SID of the Phone Number to which the Add-on is assigned. + # + sid - The Twilio-provided string that uniquely identifies the resource to fetch. + # + return - OK + remote isolated function fetchIncomingPhoneNumberAssignedAddOn(string accountSid, string resourceSid, string sid) returns Incoming_phone_numberIncoming_phone_number_assigned_add_on|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/IncomingPhoneNumbers/${getEncodedUri(resourceSid)}/AssignedAddOns/${getEncodedUri(sid)}.json`; + Incoming_phone_numberIncoming_phone_number_assigned_add_on response = check self.clientEp->get(resourcePath); + return response; + } + # Remove the assignment of an Add-on installation from the Number specified. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to delete. + # + resourceSid - The SID of the Phone Number to which the Add-on is assigned. + # + sid - The Twilio-provided string that uniquely identifies the resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteIncomingPhoneNumberAssignedAddOn(string accountSid, string resourceSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/IncomingPhoneNumbers/${getEncodedUri(resourceSid)}/AssignedAddOns/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of Add-on installations currently assigned to this Number. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to read. + # + resourceSid - The SID of the Phone Number to which the Add-on is assigned. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listIncomingPhoneNumberAssignedAddOn(string accountSid, string resourceSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListIncomingPhoneNumberAssignedAddOnResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/IncomingPhoneNumbers/${getEncodedUri(resourceSid)}/AssignedAddOns.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListIncomingPhoneNumberAssignedAddOnResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Assign an Add-on installation to the Number specified. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + resourceSid - The SID of the Phone Number to assign the Add-on. + # + return - Created + remote isolated function createIncomingPhoneNumberAssignedAddOn(string accountSid, string resourceSid, CreateIncomingPhoneNumberAssignedAddOnRequest payload) returns Incoming_phone_numberIncoming_phone_number_assigned_add_on|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/IncomingPhoneNumbers/${getEncodedUri(resourceSid)}/AssignedAddOns.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Incoming_phone_numberIncoming_phone_number_assigned_add_on response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch an instance of an Extension for the Assigned Add-on. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource to fetch. + # + resourceSid - The SID of the Phone Number to which the Add-on is assigned. + # + assignedAddOnSid - The SID that uniquely identifies the assigned Add-on installation. + # + sid - The Twilio-provided string that uniquely identifies the resource to fetch. + # + return - OK + remote isolated function fetchIncomingPhoneNumberAssignedAddOnExtension(string accountSid, string resourceSid, string assignedAddOnSid, string sid) returns Incoming_phone_numberIncoming_phone_number_assigned_add_onIncoming_phone_number_assigned_add_on_extension|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/IncomingPhoneNumbers/${getEncodedUri(resourceSid)}/AssignedAddOns/${getEncodedUri(assignedAddOnSid)}/Extensions/${getEncodedUri(sid)}.json`; + Incoming_phone_numberIncoming_phone_number_assigned_add_onIncoming_phone_number_assigned_add_on_extension response = check self.clientEp->get(resourcePath); + return response; + } + # Retrieve a list of Extensions for the Assigned Add-on. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to read. + # + resourceSid - The SID of the Phone Number to which the Add-on is assigned. + # + assignedAddOnSid - The SID that uniquely identifies the assigned Add-on installation. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listIncomingPhoneNumberAssignedAddOnExtension(string accountSid, string resourceSid, string assignedAddOnSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListIncomingPhoneNumberAssignedAddOnExtensionResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/IncomingPhoneNumbers/${getEncodedUri(resourceSid)}/AssignedAddOns/${getEncodedUri(assignedAddOnSid)}/Extensions.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListIncomingPhoneNumberAssignedAddOnExtensionResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to read. + # + beta - Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + friendlyName - A string that identifies the resources to read. + # + phoneNumber - The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. + # + origin - Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listIncomingPhoneNumberLocal(string accountSid, boolean? beta = (), string? friendlyName = (), string? phoneNumber = (), string? origin = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListIncomingPhoneNumberLocalResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/IncomingPhoneNumbers/Local.json`; + map queryParam = {"Beta": beta, "FriendlyName": friendlyName, "PhoneNumber": phoneNumber, "Origin": origin, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListIncomingPhoneNumberLocalResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createIncomingPhoneNumberLocal(string accountSid, CreateIncomingPhoneNumberLocalRequest payload) returns Incoming_phone_numberIncoming_phone_number_local|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/IncomingPhoneNumbers/Local.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Incoming_phone_numberIncoming_phone_number_local response = check self.clientEp->post(resourcePath, request); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to read. + # + beta - Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + friendlyName - A string that identifies the resources to read. + # + phoneNumber - The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. + # + origin - Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listIncomingPhoneNumberMobile(string accountSid, boolean? beta = (), string? friendlyName = (), string? phoneNumber = (), string? origin = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListIncomingPhoneNumberMobileResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/IncomingPhoneNumbers/Mobile.json`; + map queryParam = {"Beta": beta, "FriendlyName": friendlyName, "PhoneNumber": phoneNumber, "Origin": origin, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListIncomingPhoneNumberMobileResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createIncomingPhoneNumberMobile(string accountSid, CreateIncomingPhoneNumberMobileRequest payload) returns Incoming_phone_numberIncoming_phone_number_mobile|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/IncomingPhoneNumbers/Mobile.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Incoming_phone_numberIncoming_phone_number_mobile response = check self.clientEp->post(resourcePath, request); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to read. + # + beta - Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + # + friendlyName - A string that identifies the resources to read. + # + phoneNumber - The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. + # + origin - Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listIncomingPhoneNumberTollFree(string accountSid, boolean? beta = (), string? friendlyName = (), string? phoneNumber = (), string? origin = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListIncomingPhoneNumberTollFreeResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/IncomingPhoneNumbers/TollFree.json`; + map queryParam = {"Beta": beta, "FriendlyName": friendlyName, "PhoneNumber": phoneNumber, "Origin": origin, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListIncomingPhoneNumberTollFreeResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createIncomingPhoneNumberTollFree(string accountSid, CreateIncomingPhoneNumberTollFreeRequest payload) returns Incoming_phone_numberIncoming_phone_number_toll_free|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/IncomingPhoneNumbers/TollFree.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Incoming_phone_numberIncoming_phone_number_toll_free response = check self.clientEp->post(resourcePath, request); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the Key resource to fetch. + # + return - OK + remote isolated function fetchKey(string accountSid, string sid) returns Key|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Keys/${getEncodedUri(sid)}.json`; + Key response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resources to update. + # + sid - The Twilio-provided string that uniquely identifies the Key resource to update. + # + return - OK + remote isolated function updateKey(string accountSid, string sid, UpdateKeyRequest payload) returns Key|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Keys/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Key response = check self.clientEp->post(resourcePath, request); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resources to delete. + # + sid - The Twilio-provided string that uniquely identifies the Key resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteKey(string accountSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Keys/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resources to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listKey(string accountSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListKeyResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Keys.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListKeyResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Key resource. + # + return - Created + remote isolated function createNewKey(string accountSid, CreateNewKeyRequest payload) returns New_key|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Keys.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + New_key response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch a single Media resource associated with a specific Message resource + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with the Media resource. + # + messageSid - The SID of the Message resource that is associated with the Media resource. + # + sid - The Twilio-provided string that uniquely identifies the Media resource to fetch. + # + return - OK + remote isolated function fetchMedia(string accountSid, string messageSid, string sid) returns MessageMedia|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Messages/${getEncodedUri(messageSid)}/Media/${getEncodedUri(sid)}.json`; + MessageMedia response = check self.clientEp->get(resourcePath); + return response; + } + # Delete the Media resource. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is associated with the Media resource. + # + messageSid - The SID of the Message resource that is associated with the Media resource. + # + sid - The unique identifier of the to-be-deleted Media resource. + # + return - The resource was deleted successfully. + remote isolated function deleteMedia(string accountSid, string messageSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Messages/${getEncodedUri(messageSid)}/Media/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Read a list of Media resources associated with a specific Message resource + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is associated with the Media resources. + # + messageSid - The SID of the Message resource that is associated with the Media resources. + # + dateCreated - Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date. + # + dateCreatedOnOrBefore - Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date. + # + dateCreatedOnOrAfter - Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listMedia(string accountSid, string messageSid, string? dateCreated = (), string? dateCreatedOnOrBefore = (), string? dateCreatedOnOrAfter = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListMediaResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Messages/${getEncodedUri(messageSid)}/Media.json`; + map queryParam = {"DateCreated": dateCreated, "dateCreatedOnOrBefore": dateCreatedOnOrBefore, "dateCreatedOnOrAfter": dateCreatedOnOrAfter, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListMediaResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Fetch a specific member from the queue + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Member resource(s) to fetch. + # + queueSid - The SID of the Queue in which to find the members to fetch. + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource(s) to fetch. + # + return - OK + remote isolated function fetchMember(string accountSid, string queueSid, string callSid) returns QueueMember|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Queues/${getEncodedUri(queueSid)}/Members/${getEncodedUri(callSid)}.json`; + QueueMember response = check self.clientEp->get(resourcePath); + return response; + } + # Dequeue a member from a queue and have the member's call begin executing the TwiML document at that URL + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Member resource(s) to update. + # + queueSid - The SID of the Queue in which to find the members to update. + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource(s) to update. + # + return - OK + remote isolated function updateMember(string accountSid, string queueSid, string callSid, UpdateMemberRequest payload) returns QueueMember|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Queues/${getEncodedUri(queueSid)}/Members/${getEncodedUri(callSid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + QueueMember response = check self.clientEp->post(resourcePath, request); + return response; + } + # Retrieve the members of the queue + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Member resource(s) to read. + # + queueSid - The SID of the Queue in which to find the members + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listMember(string accountSid, string queueSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListMemberResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Queues/${getEncodedUri(queueSid)}/Members.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListMemberResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Retrieve a list of Message resources associated with a Twilio Account + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with the Message resources. + # + to - Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111` + # + 'from - Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999` + # + dateSent - Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). + # + dateSentOnOrBefore - Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). + # + dateSentOnOrAfter - Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listMessage(string accountSid, string? to = (), string? 'from = (), string? dateSent = (), string? dateSentOnOrBefore = (), string? dateSentOnOrAfter = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListMessageResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Messages.json`; + map queryParam = {"To": to, "From": 'from, "DateSent": dateSent, "dateSentOnOrBefore": dateSentOnOrBefore, "dateSentOnOrAfter": dateSentOnOrAfter, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListMessageResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Send a message + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) creating the Message resource. + # + return - Created + remote isolated function createMessage(string accountSid, CreateMessageRequest payload) returns Message|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Messages.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Message response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch a specific Message + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with the Message resource + # + sid - The SID of the Message resource to be fetched + # + return - OK + remote isolated function fetchMessage(string accountSid, string sid) returns Message|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Messages/${getEncodedUri(sid)}.json`; + Message response = check self.clientEp->get(resourcePath); + return response; + } + # Update a Message resource (used to redact Message `body` text and to cancel not-yet-sent messages) + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Message resources to update. + # + sid - The SID of the Message resource to be updated + # + return - OK + remote isolated function updateMessage(string accountSid, string sid, UpdateMessageRequest payload) returns Message|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Messages/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Message response = check self.clientEp->post(resourcePath, request); + return response; + } + # Deletes a Message resource from your account + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with the Message resource + # + sid - The SID of the Message resource you wish to delete + # + return - The resource was deleted successfully. + remote isolated function deleteMessage(string accountSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Messages/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Create Message Feedback to confirm a tracked user action was performed by the recipient of the associated Message + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with the Message resource for which to create MessageFeedback. + # + messageSid - The SID of the Message resource for which to create MessageFeedback. + # + return - Created + remote isolated function createMessageFeedback(string accountSid, string messageSid, CreateMessageFeedbackRequest payload) returns MessageMessage_feedback|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Messages/${getEncodedUri(messageSid)}/Feedback.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + MessageMessage_feedback response = check self.clientEp->post(resourcePath, request); + return response; + } + # + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listSigningKey(string accountSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListSigningKeyResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SigningKeys.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListSigningKeyResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Create a new Signing Key for the account making the request. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Key resource. + # + return - Created + remote isolated function createNewSigningKey(string accountSid, CreateNewSigningKeyRequest payload) returns New_signing_key|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SigningKeys.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + New_signing_key response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch a notification belonging to the account used to make the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Notification resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the Notification resource to fetch. + # + return - OK + remote isolated function fetchNotification(string accountSid, string sid) returns NotificationInstance|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Notifications/${getEncodedUri(sid)}.json`; + NotificationInstance response = check self.clientEp->get(resourcePath); + return response; + } + # Retrieve a list of notifications belonging to the account used to make the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Notification resources to read. + # + log - Only read notifications of the specified log level. Can be: `0` to read only ERROR notifications or `1` to read only WARNING notifications. By default, all notifications are read. + # + messageDate - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. + # + loggedAtOrBefore - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. + # + loggedAtOrAfter - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listNotification(string accountSid, int? log = (), string? messageDate = (), string? loggedAtOrBefore = (), string? loggedAtOrAfter = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListNotificationResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Notifications.json`; + map queryParam = {"Log": log, "MessageDate": messageDate, "loggedAtOrBefore": loggedAtOrBefore, "loggedAtOrAfter": loggedAtOrAfter, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListNotificationResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Fetch an outgoing-caller-id belonging to the account used to make the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to fetch. + # + return - OK + remote isolated function fetchOutgoingCallerId(string accountSid, string sid) returns Outgoing_caller_id|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/OutgoingCallerIds/${getEncodedUri(sid)}.json`; + Outgoing_caller_id response = check self.clientEp->get(resourcePath); + return response; + } + # Updates the caller-id + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resources to update. + # + sid - The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to update. + # + return - OK + remote isolated function updateOutgoingCallerId(string accountSid, string sid, UpdateOutgoingCallerIdRequest payload) returns Outgoing_caller_id|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/OutgoingCallerIds/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Outgoing_caller_id response = check self.clientEp->post(resourcePath, request); + return response; + } + # Delete the caller-id specified from the account + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resources to delete. + # + sid - The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteOutgoingCallerId(string accountSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/OutgoingCallerIds/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of outgoing-caller-ids belonging to the account used to make the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resources to read. + # + phoneNumber - The phone number of the OutgoingCallerId resources to read. + # + friendlyName - The string that identifies the OutgoingCallerId resources to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listOutgoingCallerId(string accountSid, string? phoneNumber = (), string? friendlyName = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListOutgoingCallerIdResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/OutgoingCallerIds.json`; + map queryParam = {"PhoneNumber": phoneNumber, "FriendlyName": friendlyName, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListOutgoingCallerIdResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for the new caller ID resource. + # + return - Created + remote isolated function createValidationRequest(string accountSid, CreateValidationRequestRequest payload) returns Validation_request|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/OutgoingCallerIds.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Validation_request response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch an instance of a participant + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resource to fetch. + # + conferenceSid - The SID of the conference with the participant to fetch. + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the participant to fetch. Non URL safe characters in a label must be percent encoded, for example, a space character is represented as %20. + # + return - OK + remote isolated function fetchParticipant(string accountSid, string conferenceSid, string callSid) returns ConferenceParticipant|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Conferences/${getEncodedUri(conferenceSid)}/Participants/${getEncodedUri(callSid)}.json`; + ConferenceParticipant response = check self.clientEp->get(resourcePath); + return response; + } + # Update the properties of the participant + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resources to update. + # + conferenceSid - The SID of the conference with the participant to update. + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the participant to update. Non URL safe characters in a label must be percent encoded, for example, a space character is represented as %20. + # + return - OK + remote isolated function updateParticipant(string accountSid, string conferenceSid, string callSid, UpdateParticipantRequest payload) returns ConferenceParticipant|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Conferences/${getEncodedUri(conferenceSid)}/Participants/${getEncodedUri(callSid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + ConferenceParticipant response = check self.clientEp->post(resourcePath, request); + return response; + } + # Kick a participant from a given conference + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resources to delete. + # + conferenceSid - The SID of the conference with the participants to delete. + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the participant to delete. Non URL safe characters in a label must be percent encoded, for example, a space character is represented as %20. + # + return - The resource was deleted successfully. + remote isolated function deleteParticipant(string accountSid, string conferenceSid, string callSid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Conferences/${getEncodedUri(conferenceSid)}/Participants/${getEncodedUri(callSid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of participants belonging to the account used to make the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resources to read. + # + conferenceSid - The SID of the conference with the participants to read. + # + muted - Whether to return only participants that are muted. Can be: `true` or `false`. + # + hold - Whether to return only participants that are on hold. Can be: `true` or `false`. + # + coaching - Whether to return only participants who are coaching another call. Can be: `true` or `false`. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listParticipant(string accountSid, string conferenceSid, boolean? muted = (), boolean? hold = (), boolean? coaching = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListParticipantResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Conferences/${getEncodedUri(conferenceSid)}/Participants.json`; + map queryParam = {"Muted": muted, "Hold": hold, "Coaching": coaching, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListParticipantResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + conferenceSid - The SID of the participant's conference. + # + return - Created + remote isolated function createParticipant(string accountSid, string conferenceSid, CreateParticipantRequest payload) returns ConferenceParticipant|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Conferences/${getEncodedUri(conferenceSid)}/Participants.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + ConferenceParticipant response = check self.clientEp->post(resourcePath, request); + return response; + } + # create an instance of payments. This will start a new payments session + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + callSid - The SID of the call that will create the resource. Call leg associated with this sid is expected to provide payment information thru DTMF. + # + return - Created + remote isolated function createPayments(string accountSid, string callSid, CreatePaymentsRequest payload) returns CallPayments|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(callSid)}/Payments.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + CallPayments response = check self.clientEp->post(resourcePath, request); + return response; + } + # update an instance of payments with different phases of payment flows. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will update the resource. + # + callSid - The SID of the call that will update the resource. This should be the same call sid that was used to create payments resource. + # + sid - The SID of Payments session that needs to be updated. + # + return - Accepted + remote isolated function updatePayments(string accountSid, string callSid, string sid, UpdatePaymentsRequest payload) returns CallPayments|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(callSid)}/Payments/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + CallPayments response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch an instance of a queue identified by the QueueSid + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the Queue resource to fetch + # + return - OK + remote isolated function fetchQueue(string accountSid, string sid) returns Queue|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Queues/${getEncodedUri(sid)}.json`; + Queue response = check self.clientEp->get(resourcePath); + return response; + } + # Update the queue with the new parameters + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resource to update. + # + sid - The Twilio-provided string that uniquely identifies the Queue resource to update + # + return - OK + remote isolated function updateQueue(string accountSid, string sid, UpdateQueueRequest payload) returns Queue|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Queues/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Queue response = check self.clientEp->post(resourcePath, request); + return response; + } + # Remove an empty queue + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resource to delete. + # + sid - The Twilio-provided string that uniquely identifies the Queue resource to delete + # + return - The resource was deleted successfully. + remote isolated function deleteQueue(string accountSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Queues/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of queues belonging to the account used to make the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resources to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listQueue(string accountSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListQueueResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Queues.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListQueueResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Create a queue + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createQueue(string accountSid, CreateQueueRequest payload) returns Queue|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Queues.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Queue response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch an instance of a recording + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the Recording resource to fetch. + # + includeSoftDeleted - A boolean parameter indicating whether to retrieve soft deleted recordings or not. Recordings metadata are kept after deletion for a retention period of 40 days. + # + return - OK + remote isolated function fetchRecording(string accountSid, string sid, boolean? includeSoftDeleted = ()) returns Recording|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Recordings/${getEncodedUri(sid)}.json`; + map queryParam = {"IncludeSoftDeleted": includeSoftDeleted}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + Recording response = check self.clientEp->get(resourcePath); + return response; + } + # Delete a recording from your account + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to delete. + # + sid - The Twilio-provided string that uniquely identifies the Recording resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteRecording(string accountSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Recordings/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of recordings belonging to the account used to make the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to read. + # + dateCreated - Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. + # + dateCreatedOnOrBefore - Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. + # + dateCreatedOnOrAfter - Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. + # + callSid - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to read. + # + conferenceSid - The Conference SID that identifies the conference associated with the recording to read. + # + includeSoftDeleted - A boolean parameter indicating whether to retrieve soft deleted recordings or not. Recordings metadata are kept after deletion for a retention period of 40 days. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listRecording(string accountSid, string? dateCreated = (), string? dateCreatedOnOrBefore = (), string? dateCreatedOnOrAfter = (), string? callSid = (), string? conferenceSid = (), boolean? includeSoftDeleted = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListRecordingResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Recordings.json`; + map queryParam = {"DateCreated": dateCreated, "dateCreatedOnOrBefore": dateCreatedOnOrBefore, "dateCreatedOnOrAfter": dateCreatedOnOrAfter, "CallSid": callSid, "ConferenceSid": conferenceSid, "IncludeSoftDeleted": includeSoftDeleted, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListRecordingResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Fetch an instance of an AddOnResult + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult resource to fetch. + # + referenceSid - The SID of the recording to which the result to fetch belongs. + # + sid - The Twilio-provided string that uniquely identifies the Recording AddOnResult resource to fetch. + # + return - OK + remote isolated function fetchRecordingAddOnResult(string accountSid, string referenceSid, string sid) returns RecordingRecording_add_on_result|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Recordings/${getEncodedUri(referenceSid)}/AddOnResults/${getEncodedUri(sid)}.json`; + RecordingRecording_add_on_result response = check self.clientEp->get(resourcePath); + return response; + } + # Delete a result and purge all associated Payloads + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult resources to delete. + # + referenceSid - The SID of the recording to which the result to delete belongs. + # + sid - The Twilio-provided string that uniquely identifies the Recording AddOnResult resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteRecordingAddOnResult(string accountSid, string referenceSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Recordings/${getEncodedUri(referenceSid)}/AddOnResults/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of results belonging to the recording + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult resources to read. + # + referenceSid - The SID of the recording to which the result to read belongs. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listRecordingAddOnResult(string accountSid, string referenceSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListRecordingAddOnResultResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Recordings/${getEncodedUri(referenceSid)}/AddOnResults.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListRecordingAddOnResultResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Fetch an instance of a result payload + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resource to fetch. + # + referenceSid - The SID of the recording to which the AddOnResult resource that contains the payload to fetch belongs. + # + addOnResultSid - The SID of the AddOnResult to which the payload to fetch belongs. + # + sid - The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to fetch. + # + return - OK + remote isolated function fetchRecordingAddOnResultPayload(string accountSid, string referenceSid, string addOnResultSid, string sid) returns RecordingRecording_add_on_resultRecording_add_on_result_payload|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Recordings/${getEncodedUri(referenceSid)}/AddOnResults/${getEncodedUri(addOnResultSid)}/Payloads/${getEncodedUri(sid)}.json`; + RecordingRecording_add_on_resultRecording_add_on_result_payload response = check self.clientEp->get(resourcePath); + return response; + } + # Delete a payload from the result along with all associated Data + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resources to delete. + # + referenceSid - The SID of the recording to which the AddOnResult resource that contains the payloads to delete belongs. + # + addOnResultSid - The SID of the AddOnResult to which the payloads to delete belongs. + # + sid - The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteRecordingAddOnResultPayload(string accountSid, string referenceSid, string addOnResultSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Recordings/${getEncodedUri(referenceSid)}/AddOnResults/${getEncodedUri(addOnResultSid)}/Payloads/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of payloads belonging to the AddOnResult + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resources to read. + # + referenceSid - The SID of the recording to which the AddOnResult resource that contains the payloads to read belongs. + # + addOnResultSid - The SID of the AddOnResult to which the payloads to read belongs. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listRecordingAddOnResultPayload(string accountSid, string referenceSid, string addOnResultSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListRecordingAddOnResultPayloadResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Recordings/${getEncodedUri(referenceSid)}/AddOnResults/${getEncodedUri(addOnResultSid)}/Payloads.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListRecordingAddOnResultPayloadResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resource to fetch. + # + recordingSid - The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) that created the transcription to fetch. + # + sid - The Twilio-provided string that uniquely identifies the Transcription resource to fetch. + # + return - OK + remote isolated function fetchRecordingTranscription(string accountSid, string recordingSid, string sid) returns RecordingRecording_transcription|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Recordings/${getEncodedUri(recordingSid)}/Transcriptions/${getEncodedUri(sid)}.json`; + RecordingRecording_transcription response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to delete. + # + recordingSid - The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) that created the transcription to delete. + # + sid - The Twilio-provided string that uniquely identifies the Transcription resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteRecordingTranscription(string accountSid, string recordingSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Recordings/${getEncodedUri(recordingSid)}/Transcriptions/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to read. + # + recordingSid - The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) that created the transcriptions to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listRecordingTranscription(string accountSid, string recordingSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListRecordingTranscriptionResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Recordings/${getEncodedUri(recordingSid)}/Transcriptions.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListRecordingTranscriptionResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Fetch an instance of a short code + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource(s) to fetch. + # + sid - The Twilio-provided string that uniquely identifies the ShortCode resource to fetch + # + return - OK + remote isolated function fetchShortCode(string accountSid, string sid) returns Short_code|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SMS/ShortCodes/${getEncodedUri(sid)}.json`; + Short_code response = check self.clientEp->get(resourcePath); + return response; + } + # Update a short code with the following parameters + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource(s) to update. + # + sid - The Twilio-provided string that uniquely identifies the ShortCode resource to update + # + return - OK + remote isolated function updateShortCode(string accountSid, string sid, UpdateShortCodeRequest payload) returns Short_code|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SMS/ShortCodes/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Short_code response = check self.clientEp->post(resourcePath, request); + return response; + } + # Retrieve a list of short-codes belonging to the account used to make the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource(s) to read. + # + friendlyName - The string that identifies the ShortCode resources to read. + # + shortCode - Only show the ShortCode resources that match this pattern. You can specify partial numbers and use '*' as a wildcard for any digit. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listShortCode(string accountSid, string? friendlyName = (), string? shortCode = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListShortCodeResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SMS/ShortCodes.json`; + map queryParam = {"FriendlyName": friendlyName, "ShortCode": shortCode, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListShortCodeResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + return - OK + remote isolated function fetchSigningKey(string accountSid, string sid) returns Signing_key|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SigningKeys/${getEncodedUri(sid)}.json`; + Signing_key response = check self.clientEp->get(resourcePath); + return response; + } + # + # + return - OK + remote isolated function updateSigningKey(string accountSid, string sid, UpdateSigningKeyRequest payload) returns Signing_key|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SigningKeys/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Signing_key response = check self.clientEp->post(resourcePath, request); + return response; + } + # + # + return - The resource was deleted successfully. + remote isolated function deleteSigningKey(string accountSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SigningKeys/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of credential list mappings belonging to the domain used in the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resources to read. + # + domainSid - The SID of the SIP domain that contains the resources to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listSipAuthCallsCredentialListMapping(string accountSid, string domainSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListSipAuthCallsCredentialListMappingResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(domainSid)}/Auth/Calls/CredentialListMappings.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListSipAuthCallsCredentialListMappingResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Create a new credential list mapping resource + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + domainSid - The SID of the SIP domain that will contain the new resource. + # + return - Created + remote isolated function createSipAuthCallsCredentialListMapping(string accountSid, string domainSid, CreateSipAuthCallsCredentialListMappingRequest payload) returns SipSip_domainSip_authSip_auth_callsSip_auth_calls_credential_list_mapping|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(domainSid)}/Auth/Calls/CredentialListMappings.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + SipSip_domainSip_authSip_auth_callsSip_auth_calls_credential_list_mapping response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch a specific instance of a credential list mapping + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resource to fetch. + # + domainSid - The SID of the SIP domain that contains the resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the CredentialListMapping resource to fetch. + # + return - OK + remote isolated function fetchSipAuthCallsCredentialListMapping(string accountSid, string domainSid, string sid) returns SipSip_domainSip_authSip_auth_callsSip_auth_calls_credential_list_mapping|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(domainSid)}/Auth/Calls/CredentialListMappings/${getEncodedUri(sid)}.json`; + SipSip_domainSip_authSip_auth_callsSip_auth_calls_credential_list_mapping response = check self.clientEp->get(resourcePath); + return response; + } + # Delete a credential list mapping from the requested domain + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resources to delete. + # + domainSid - The SID of the SIP domain that contains the resource to delete. + # + sid - The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteSipAuthCallsCredentialListMapping(string accountSid, string domainSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(domainSid)}/Auth/Calls/CredentialListMappings/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of IP Access Control List mappings belonging to the domain used in the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IpAccessControlListMapping resources to read. + # + domainSid - The SID of the SIP domain that contains the resources to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listSipAuthCallsIpAccessControlListMapping(string accountSid, string domainSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListSipAuthCallsIpAccessControlListMappingResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(domainSid)}/Auth/Calls/IpAccessControlListMappings.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListSipAuthCallsIpAccessControlListMappingResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Create a new IP Access Control List mapping + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + domainSid - The SID of the SIP domain that will contain the new resource. + # + return - Created + remote isolated function createSipAuthCallsIpAccessControlListMapping(string accountSid, string domainSid, CreateSipAuthCallsIpAccessControlListMappingRequest payload) returns SipSip_domainSip_authSip_auth_callsSip_auth_calls_ip_access_control_list_mapping|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(domainSid)}/Auth/Calls/IpAccessControlListMappings.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + SipSip_domainSip_authSip_auth_callsSip_auth_calls_ip_access_control_list_mapping response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch a specific instance of an IP Access Control List mapping + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IpAccessControlListMapping resource to fetch. + # + domainSid - The SID of the SIP domain that contains the resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the IpAccessControlListMapping resource to fetch. + # + return - OK + remote isolated function fetchSipAuthCallsIpAccessControlListMapping(string accountSid, string domainSid, string sid) returns SipSip_domainSip_authSip_auth_callsSip_auth_calls_ip_access_control_list_mapping|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(domainSid)}/Auth/Calls/IpAccessControlListMappings/${getEncodedUri(sid)}.json`; + SipSip_domainSip_authSip_auth_callsSip_auth_calls_ip_access_control_list_mapping response = check self.clientEp->get(resourcePath); + return response; + } + # Delete an IP Access Control List mapping from the requested domain + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IpAccessControlListMapping resources to delete. + # + domainSid - The SID of the SIP domain that contains the resources to delete. + # + sid - The Twilio-provided string that uniquely identifies the IpAccessControlListMapping resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteSipAuthCallsIpAccessControlListMapping(string accountSid, string domainSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(domainSid)}/Auth/Calls/IpAccessControlListMappings/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of credential list mappings belonging to the domain used in the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resources to read. + # + domainSid - The SID of the SIP domain that contains the resources to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listSipAuthRegistrationsCredentialListMapping(string accountSid, string domainSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListSipAuthRegistrationsCredentialListMappingResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(domainSid)}/Auth/Registrations/CredentialListMappings.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListSipAuthRegistrationsCredentialListMappingResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Create a new credential list mapping resource + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + domainSid - The SID of the SIP domain that will contain the new resource. + # + return - Created + remote isolated function createSipAuthRegistrationsCredentialListMapping(string accountSid, string domainSid, CreateSipAuthRegistrationsCredentialListMappingRequest payload) returns SipSip_domainSip_authSip_auth_registrationsSip_auth_registrations_credential_list_mapping|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(domainSid)}/Auth/Registrations/CredentialListMappings.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + SipSip_domainSip_authSip_auth_registrationsSip_auth_registrations_credential_list_mapping response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch a specific instance of a credential list mapping + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resource to fetch. + # + domainSid - The SID of the SIP domain that contains the resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the CredentialListMapping resource to fetch. + # + return - OK + remote isolated function fetchSipAuthRegistrationsCredentialListMapping(string accountSid, string domainSid, string sid) returns SipSip_domainSip_authSip_auth_registrationsSip_auth_registrations_credential_list_mapping|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(domainSid)}/Auth/Registrations/CredentialListMappings/${getEncodedUri(sid)}.json`; + SipSip_domainSip_authSip_auth_registrationsSip_auth_registrations_credential_list_mapping response = check self.clientEp->get(resourcePath); + return response; + } + # Delete a credential list mapping from the requested domain + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resources to delete. + # + domainSid - The SID of the SIP domain that contains the resources to delete. + # + sid - The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteSipAuthRegistrationsCredentialListMapping(string accountSid, string domainSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(domainSid)}/Auth/Registrations/CredentialListMappings/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of credentials. + # + # + accountSid - The unique id of the Account that is responsible for this resource. + # + credentialListSid - The unique id that identifies the credential list that contains the desired credentials. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listSipCredential(string accountSid, string credentialListSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListSipCredentialResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/CredentialLists/${getEncodedUri(credentialListSid)}/Credentials.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListSipCredentialResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Create a new credential resource. + # + # + accountSid - The unique id of the Account that is responsible for this resource. + # + credentialListSid - The unique id that identifies the credential list to include the created credential. + # + return - Created + remote isolated function createSipCredential(string accountSid, string credentialListSid, CreateSipCredentialRequest payload) returns SipSip_credential_listSip_credential|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/CredentialLists/${getEncodedUri(credentialListSid)}/Credentials.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + SipSip_credential_listSip_credential response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch a single credential. + # + # + accountSid - The unique id of the Account that is responsible for this resource. + # + credentialListSid - The unique id that identifies the credential list that contains the desired credential. + # + sid - The unique id that identifies the resource to fetch. + # + return - OK + remote isolated function fetchSipCredential(string accountSid, string credentialListSid, string sid) returns SipSip_credential_listSip_credential|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/CredentialLists/${getEncodedUri(credentialListSid)}/Credentials/${getEncodedUri(sid)}.json`; + SipSip_credential_listSip_credential response = check self.clientEp->get(resourcePath); + return response; + } + # Update a credential resource. + # + # + accountSid - The unique id of the Account that is responsible for this resource. + # + credentialListSid - The unique id that identifies the credential list that includes this credential. + # + sid - The unique id that identifies the resource to update. + # + return - OK + remote isolated function updateSipCredential(string accountSid, string credentialListSid, string sid, UpdateSipCredentialRequest payload) returns SipSip_credential_listSip_credential|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/CredentialLists/${getEncodedUri(credentialListSid)}/Credentials/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + SipSip_credential_listSip_credential response = check self.clientEp->post(resourcePath, request); + return response; + } + # Delete a credential resource. + # + # + accountSid - The unique id of the Account that is responsible for this resource. + # + credentialListSid - The unique id that identifies the credential list that contains the desired credentials. + # + sid - The unique id that identifies the resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteSipCredential(string accountSid, string credentialListSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/CredentialLists/${getEncodedUri(credentialListSid)}/Credentials/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Get All Credential Lists + # + # + accountSid - The unique id of the Account that is responsible for this resource. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listSipCredentialList(string accountSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListSipCredentialListResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/CredentialLists.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListSipCredentialListResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Create a Credential List + # + # + accountSid - The unique id of the Account that is responsible for this resource. + # + return - Created + remote isolated function createSipCredentialList(string accountSid, CreateSipCredentialListRequest payload) returns SipSip_credential_list|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/CredentialLists.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + SipSip_credential_list response = check self.clientEp->post(resourcePath, request); + return response; + } + # Get a Credential List + # + # + accountSid - The unique id of the Account that is responsible for this resource. + # + sid - The credential list Sid that uniquely identifies this resource + # + return - OK + remote isolated function fetchSipCredentialList(string accountSid, string sid) returns SipSip_credential_list|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/CredentialLists/${getEncodedUri(sid)}.json`; + SipSip_credential_list response = check self.clientEp->get(resourcePath); + return response; + } + # Update a Credential List + # + # + accountSid - The unique id of the Account that is responsible for this resource. + # + sid - The credential list Sid that uniquely identifies this resource + # + return - OK + remote isolated function updateSipCredentialList(string accountSid, string sid, UpdateSipCredentialListRequest payload) returns SipSip_credential_list|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/CredentialLists/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + SipSip_credential_list response = check self.clientEp->post(resourcePath, request); + return response; + } + # Delete a Credential List + # + # + accountSid - The unique id of the Account that is responsible for this resource. + # + sid - The credential list Sid that uniquely identifies this resource + # + return - The resource was deleted successfully. + remote isolated function deleteSipCredentialList(string accountSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/CredentialLists/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Read multiple CredentialListMapping resources from an account. + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + domainSid - A 34 character string that uniquely identifies the SIP Domain that includes the resource to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listSipCredentialListMapping(string accountSid, string domainSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListSipCredentialListMappingResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(domainSid)}/CredentialListMappings.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListSipCredentialListMappingResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Create a CredentialListMapping resource for an account. + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + domainSid - A 34 character string that uniquely identifies the SIP Domain for which the CredentialList resource will be mapped. + # + return - Created + remote isolated function createSipCredentialListMapping(string accountSid, string domainSid, CreateSipCredentialListMappingRequest payload) returns SipSip_domainSip_credential_list_mapping|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(domainSid)}/CredentialListMappings.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + SipSip_domainSip_credential_list_mapping response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch a single CredentialListMapping resource from an account. + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + domainSid - A 34 character string that uniquely identifies the SIP Domain that includes the resource to fetch. + # + sid - A 34 character string that uniquely identifies the resource to fetch. + # + return - OK + remote isolated function fetchSipCredentialListMapping(string accountSid, string domainSid, string sid) returns SipSip_domainSip_credential_list_mapping|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(domainSid)}/CredentialListMappings/${getEncodedUri(sid)}.json`; + SipSip_domainSip_credential_list_mapping response = check self.clientEp->get(resourcePath); + return response; + } + # Delete a CredentialListMapping resource from an account. + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + domainSid - A 34 character string that uniquely identifies the SIP Domain that includes the resource to delete. + # + sid - A 34 character string that uniquely identifies the resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteSipCredentialListMapping(string accountSid, string domainSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(domainSid)}/CredentialListMappings/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of domains belonging to the account used to make the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resources to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listSipDomain(string accountSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListSipDomainResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListSipDomainResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Create a new Domain + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createSipDomain(string accountSid, CreateSipDomainRequest payload) returns SipSip_domain|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + SipSip_domain response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch an instance of a Domain + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the SipDomain resource to fetch. + # + return - OK + remote isolated function fetchSipDomain(string accountSid, string sid) returns SipSip_domain|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(sid)}.json`; + SipSip_domain response = check self.clientEp->get(resourcePath); + return response; + } + # Update the attributes of a domain + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resource to update. + # + sid - The Twilio-provided string that uniquely identifies the SipDomain resource to update. + # + return - OK + remote isolated function updateSipDomain(string accountSid, string sid, UpdateSipDomainRequest payload) returns SipSip_domain|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + SipSip_domain response = check self.clientEp->post(resourcePath, request); + return response; + } + # Delete an instance of a Domain + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resources to delete. + # + sid - The Twilio-provided string that uniquely identifies the SipDomain resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteSipDomain(string accountSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of IpAccessControlLists that belong to the account used to make the request + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listSipIpAccessControlList(string accountSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListSipIpAccessControlListResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/IpAccessControlLists.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListSipIpAccessControlListResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Create a new IpAccessControlList resource + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + return - Created + remote isolated function createSipIpAccessControlList(string accountSid, CreateSipIpAccessControlListRequest payload) returns SipSip_ip_access_control_list|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/IpAccessControlLists.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + SipSip_ip_access_control_list response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch a specific instance of an IpAccessControlList + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + sid - A 34 character string that uniquely identifies the resource to fetch. + # + return - OK + remote isolated function fetchSipIpAccessControlList(string accountSid, string sid) returns SipSip_ip_access_control_list|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/IpAccessControlLists/${getEncodedUri(sid)}.json`; + SipSip_ip_access_control_list response = check self.clientEp->get(resourcePath); + return response; + } + # Rename an IpAccessControlList + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + sid - A 34 character string that uniquely identifies the resource to udpate. + # + return - OK + remote isolated function updateSipIpAccessControlList(string accountSid, string sid, UpdateSipIpAccessControlListRequest payload) returns SipSip_ip_access_control_list|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/IpAccessControlLists/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + SipSip_ip_access_control_list response = check self.clientEp->post(resourcePath, request); + return response; + } + # Delete an IpAccessControlList from the requested account + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + sid - A 34 character string that uniquely identifies the resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteSipIpAccessControlList(string accountSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/IpAccessControlLists/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Fetch an IpAccessControlListMapping resource. + # + # + accountSid - The unique id of the Account that is responsible for this resource. + # + domainSid - A 34 character string that uniquely identifies the SIP domain. + # + sid - A 34 character string that uniquely identifies the resource to fetch. + # + return - OK + remote isolated function fetchSipIpAccessControlListMapping(string accountSid, string domainSid, string sid) returns SipSip_domainSip_ip_access_control_list_mapping|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(domainSid)}/IpAccessControlListMappings/${getEncodedUri(sid)}.json`; + SipSip_domainSip_ip_access_control_list_mapping response = check self.clientEp->get(resourcePath); + return response; + } + # Delete an IpAccessControlListMapping resource. + # + # + accountSid - The unique id of the Account that is responsible for this resource. + # + domainSid - A 34 character string that uniquely identifies the SIP domain. + # + sid - A 34 character string that uniquely identifies the resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteSipIpAccessControlListMapping(string accountSid, string domainSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(domainSid)}/IpAccessControlListMappings/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of IpAccessControlListMapping resources. + # + # + accountSid - The unique id of the Account that is responsible for this resource. + # + domainSid - A 34 character string that uniquely identifies the SIP domain. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listSipIpAccessControlListMapping(string accountSid, string domainSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListSipIpAccessControlListMappingResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(domainSid)}/IpAccessControlListMappings.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListSipIpAccessControlListMappingResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Create a new IpAccessControlListMapping resource. + # + # + accountSid - The unique id of the Account that is responsible for this resource. + # + domainSid - A 34 character string that uniquely identifies the SIP domain. + # + return - Created + remote isolated function createSipIpAccessControlListMapping(string accountSid, string domainSid, CreateSipIpAccessControlListMappingRequest payload) returns SipSip_domainSip_ip_access_control_list_mapping|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/Domains/${getEncodedUri(domainSid)}/IpAccessControlListMappings.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + SipSip_domainSip_ip_access_control_list_mapping response = check self.clientEp->post(resourcePath, request); + return response; + } + # Read multiple IpAddress resources. + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + ipAccessControlListSid - The IpAccessControlList Sid that identifies the IpAddress resources to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listSipIpAddress(string accountSid, string ipAccessControlListSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListSipIpAddressResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/IpAccessControlLists/${getEncodedUri(ipAccessControlListSid)}/IpAddresses.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListSipIpAddressResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Create a new IpAddress resource. + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + ipAccessControlListSid - The IpAccessControlList Sid with which to associate the created IpAddress resource. + # + return - Created + remote isolated function createSipIpAddress(string accountSid, string ipAccessControlListSid, CreateSipIpAddressRequest payload) returns SipSip_ip_access_control_listSip_ip_address|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/IpAccessControlLists/${getEncodedUri(ipAccessControlListSid)}/IpAddresses.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + SipSip_ip_access_control_listSip_ip_address response = check self.clientEp->post(resourcePath, request); + return response; + } + # Read one IpAddress resource. + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + ipAccessControlListSid - The IpAccessControlList Sid that identifies the IpAddress resources to fetch. + # + sid - A 34 character string that uniquely identifies the IpAddress resource to fetch. + # + return - OK + remote isolated function fetchSipIpAddress(string accountSid, string ipAccessControlListSid, string sid) returns SipSip_ip_access_control_listSip_ip_address|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/IpAccessControlLists/${getEncodedUri(ipAccessControlListSid)}/IpAddresses/${getEncodedUri(sid)}.json`; + SipSip_ip_access_control_listSip_ip_address response = check self.clientEp->get(resourcePath); + return response; + } + # Update an IpAddress resource. + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + ipAccessControlListSid - The IpAccessControlList Sid that identifies the IpAddress resources to update. + # + sid - A 34 character string that identifies the IpAddress resource to update. + # + return - OK + remote isolated function updateSipIpAddress(string accountSid, string ipAccessControlListSid, string sid, UpdateSipIpAddressRequest payload) returns SipSip_ip_access_control_listSip_ip_address|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/IpAccessControlLists/${getEncodedUri(ipAccessControlListSid)}/IpAddresses/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + SipSip_ip_access_control_listSip_ip_address response = check self.clientEp->post(resourcePath, request); + return response; + } + # Delete an IpAddress resource. + # + # + accountSid - The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + # + ipAccessControlListSid - The IpAccessControlList Sid that identifies the IpAddress resources to delete. + # + sid - A 34 character string that uniquely identifies the resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteSipIpAddress(string accountSid, string ipAccessControlListSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/SIP/IpAccessControlLists/${getEncodedUri(ipAccessControlListSid)}/IpAddresses/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Create a Siprec + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Siprec resource. + # + callSid - The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Siprec resource is associated with. + # + return - Created + remote isolated function createSiprec(string accountSid, string callSid, CreateSiprecRequest payload) returns CallSiprec|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(callSid)}/Siprec.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + CallSiprec response = check self.clientEp->post(resourcePath, request); + return response; + } + # Stop a Siprec using either the SID of the Siprec resource or the `name` used when creating the resource + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Siprec resource. + # + callSid - The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Siprec resource is associated with. + # + sid - The SID of the Siprec resource, or the `name` used when creating the resource + # + return - OK + remote isolated function updateSiprec(string accountSid, string callSid, string sid, UpdateSiprecRequest payload) returns CallSiprec|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(callSid)}/Siprec/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + CallSiprec response = check self.clientEp->post(resourcePath, request); + return response; + } + # Create a Stream + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Stream resource. + # + callSid - The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Stream resource is associated with. + # + return - Created + remote isolated function createStream(string accountSid, string callSid, CreateStreamRequest payload) returns CallStream|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(callSid)}/Streams.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + CallStream response = check self.clientEp->post(resourcePath, request); + return response; + } + # Stop a Stream using either the SID of the Stream resource or the `name` used when creating the resource + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Stream resource. + # + callSid - The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Stream resource is associated with. + # + sid - The SID of the Stream resource, or the `name` used when creating the resource + # + return - OK + remote isolated function updateStream(string accountSid, string callSid, string sid, UpdateStreamRequest payload) returns CallStream|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(callSid)}/Streams/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + CallStream response = check self.clientEp->post(resourcePath, request); + return response; + } + # Create a new token for ICE servers + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createToken(string accountSid, CreateTokenRequest payload) returns Token|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Tokens.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + Token response = check self.clientEp->post(resourcePath, request); + return response; + } + # Fetch an instance of a Transcription + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the Transcription resource to fetch. + # + return - OK + remote isolated function fetchTranscription(string accountSid, string sid) returns Transcription|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Transcriptions/${getEncodedUri(sid)}.json`; + Transcription response = check self.clientEp->get(resourcePath); + return response; + } + # Delete a transcription from the account used to make the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to delete. + # + sid - The Twilio-provided string that uniquely identifies the Transcription resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteTranscription(string accountSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Transcriptions/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of transcriptions belonging to the account used to make the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to read. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listTranscription(string accountSid, int? pageSize = (), int? page = (), string? pageToken = ()) returns ListTranscriptionResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Transcriptions.json`; + map queryParam = {"PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListTranscriptionResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Retrieve a list of usage-records belonging to the account used to make the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + # + category - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + # + startDate - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + # + endDate - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + # + includeSubaccounts - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listUsageRecord(string accountSid, Usage_record_enum_category? category = (), string? startDate = (), string? endDate = (), boolean? includeSubaccounts = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListUsageRecordResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Usage/Records.json`; + map queryParam = {"Category": category, "StartDate": startDate, "EndDate": endDate, "IncludeSubaccounts": includeSubaccounts, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListUsageRecordResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + # + category - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + # + startDate - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + # + endDate - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + # + includeSubaccounts - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listUsageRecordAllTime(string accountSid, Usage_record_all_time_enum_category? category = (), string? startDate = (), string? endDate = (), boolean? includeSubaccounts = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListUsageRecordAllTimeResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Usage/Records/AllTime.json`; + map queryParam = {"Category": category, "StartDate": startDate, "EndDate": endDate, "IncludeSubaccounts": includeSubaccounts, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListUsageRecordAllTimeResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + # + category - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + # + startDate - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + # + endDate - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + # + includeSubaccounts - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listUsageRecordDaily(string accountSid, Usage_record_daily_enum_category? category = (), string? startDate = (), string? endDate = (), boolean? includeSubaccounts = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListUsageRecordDailyResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Usage/Records/Daily.json`; + map queryParam = {"Category": category, "StartDate": startDate, "EndDate": endDate, "IncludeSubaccounts": includeSubaccounts, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListUsageRecordDailyResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + # + category - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + # + startDate - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + # + endDate - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + # + includeSubaccounts - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listUsageRecordLastMonth(string accountSid, Usage_record_last_month_enum_category? category = (), string? startDate = (), string? endDate = (), boolean? includeSubaccounts = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListUsageRecordLastMonthResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Usage/Records/LastMonth.json`; + map queryParam = {"Category": category, "StartDate": startDate, "EndDate": endDate, "IncludeSubaccounts": includeSubaccounts, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListUsageRecordLastMonthResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + # + category - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + # + startDate - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + # + endDate - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + # + includeSubaccounts - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listUsageRecordMonthly(string accountSid, Usage_record_monthly_enum_category? category = (), string? startDate = (), string? endDate = (), boolean? includeSubaccounts = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListUsageRecordMonthlyResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Usage/Records/Monthly.json`; + map queryParam = {"Category": category, "StartDate": startDate, "EndDate": endDate, "IncludeSubaccounts": includeSubaccounts, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListUsageRecordMonthlyResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + # + category - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + # + startDate - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + # + endDate - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + # + includeSubaccounts - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listUsageRecordThisMonth(string accountSid, Usage_record_this_month_enum_category? category = (), string? startDate = (), string? endDate = (), boolean? includeSubaccounts = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListUsageRecordThisMonthResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Usage/Records/ThisMonth.json`; + map queryParam = {"Category": category, "StartDate": startDate, "EndDate": endDate, "IncludeSubaccounts": includeSubaccounts, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListUsageRecordThisMonthResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + # + category - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + # + startDate - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + # + endDate - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + # + includeSubaccounts - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listUsageRecordToday(string accountSid, Usage_record_today_enum_category? category = (), string? startDate = (), string? endDate = (), boolean? includeSubaccounts = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListUsageRecordTodayResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Usage/Records/Today.json`; + map queryParam = {"Category": category, "StartDate": startDate, "EndDate": endDate, "IncludeSubaccounts": includeSubaccounts, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListUsageRecordTodayResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + # + category - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + # + startDate - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + # + endDate - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + # + includeSubaccounts - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listUsageRecordYearly(string accountSid, Usage_record_yearly_enum_category? category = (), string? startDate = (), string? endDate = (), boolean? includeSubaccounts = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListUsageRecordYearlyResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Usage/Records/Yearly.json`; + map queryParam = {"Category": category, "StartDate": startDate, "EndDate": endDate, "IncludeSubaccounts": includeSubaccounts, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListUsageRecordYearlyResponse response = check self.clientEp->get(resourcePath); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + # + category - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + # + startDate - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + # + endDate - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + # + includeSubaccounts - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listUsageRecordYesterday(string accountSid, Usage_record_yesterday_enum_category? category = (), string? startDate = (), string? endDate = (), boolean? includeSubaccounts = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListUsageRecordYesterdayResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Usage/Records/Yesterday.json`; + map queryParam = {"Category": category, "StartDate": startDate, "EndDate": endDate, "IncludeSubaccounts": includeSubaccounts, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListUsageRecordYesterdayResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Fetch and instance of a usage-trigger + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageTrigger resource to fetch. + # + sid - The Twilio-provided string that uniquely identifies the UsageTrigger resource to fetch. + # + return - OK + remote isolated function fetchUsageTrigger(string accountSid, string sid) returns UsageUsage_trigger|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Usage/Triggers/${getEncodedUri(sid)}.json`; + UsageUsage_trigger response = check self.clientEp->get(resourcePath); + return response; + } + # Update an instance of a usage trigger + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageTrigger resources to update. + # + sid - The Twilio-provided string that uniquely identifies the UsageTrigger resource to update. + # + return - OK + remote isolated function updateUsageTrigger(string accountSid, string sid, UpdateUsageTriggerRequest payload) returns UsageUsage_trigger|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Usage/Triggers/${getEncodedUri(sid)}.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + UsageUsage_trigger response = check self.clientEp->post(resourcePath, request); + return response; + } + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageTrigger resources to delete. + # + sid - The Twilio-provided string that uniquely identifies the UsageTrigger resource to delete. + # + return - The resource was deleted successfully. + remote isolated function deleteUsageTrigger(string accountSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Usage/Triggers/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } + # Retrieve a list of usage-triggers belonging to the account used to make the request + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageTrigger resources to read. + # + recurring - The frequency of recurring UsageTriggers to read. Can be: `daily`, `monthly`, or `yearly` to read recurring UsageTriggers. An empty value or a value of `alltime` reads non-recurring UsageTriggers. + # + triggerBy - The trigger field of the UsageTriggers to read. Can be: `count`, `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price). + # + usageCategory - The usage category of the UsageTriggers to read. Must be a supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories). + # + pageSize - How many resources to return in each list page. The default is 50, and the maximum is 1000. + # + page - The page index. This value is simply for client state. + # + pageToken - The page token. This is provided by the API. + # + return - OK + remote isolated function listUsageTrigger(string accountSid, Usage_trigger_enum_recurring? recurring = (), Usage_trigger_enum_trigger_field? triggerBy = (), Usage_trigger_enum_usage_category? usageCategory = (), int? pageSize = (), int? page = (), string? pageToken = ()) returns ListUsageTriggerResponse|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Usage/Triggers.json`; + map queryParam = {"Recurring": recurring, "TriggerBy": triggerBy, "UsageCategory": usageCategory, "PageSize": pageSize, "Page": page, "PageToken": pageToken}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + ListUsageTriggerResponse response = check self.clientEp->get(resourcePath); + return response; + } + # Create a new UsageTrigger + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + # + return - Created + remote isolated function createUsageTrigger(string accountSid, CreateUsageTriggerRequest payload) returns UsageUsage_trigger|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Usage/Triggers.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + UsageUsage_trigger response = check self.clientEp->post(resourcePath, request); + return response; + } + # Create a new User Defined Message for the given Call SID. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created User Defined Message. + # + callSid - The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the User Defined Message is associated with. + # + return - Created + remote isolated function createUserDefinedMessage(string accountSid, string callSid, CreateUserDefinedMessageRequest payload) returns CallUser_defined_message|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(callSid)}/UserDefinedMessages.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + CallUser_defined_message response = check self.clientEp->post(resourcePath, request); + return response; + } + # Subscribe to User Defined Messages for a given Call SID. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that subscribed to the User Defined Messages. + # + callSid - The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the User Defined Messages subscription is associated with. This refers to the Call SID that is producing the user defined messages. + # + return - Created + remote isolated function createUserDefinedMessageSubscription(string accountSid, string callSid, CreateUserDefinedMessageSubscriptionRequest payload) returns CallUser_defined_message_subscription|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(callSid)}/UserDefinedMessageSubscriptions.json`; + http:Request request = new; + string encodedRequestBody = createFormURLEncodedRequestBody(payload); + request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded"); + CallUser_defined_message_subscription response = check self.clientEp->post(resourcePath, request); + return response; + } + # Delete a specific User Defined Message Subscription. + # + # + accountSid - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that subscribed to the User Defined Messages. + # + callSid - The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the User Defined Message Subscription is associated with. This refers to the Call SID that is producing the User Defined Messages. + # + sid - The SID that uniquely identifies this User Defined Message Subscription. + # + return - The resource was deleted successfully. + remote isolated function deleteUserDefinedMessageSubscription(string accountSid, string callSid, string sid) returns http:Response|error { + string resourcePath = string `/2010-04-01/Accounts/${getEncodedUri(accountSid)}/Calls/${getEncodedUri(callSid)}/UserDefinedMessageSubscriptions/${getEncodedUri(sid)}.json`; + http:Response response = check self.clientEp-> delete(resourcePath); + return response; + } +} diff --git a/ballerina/modules/oas/types.bal b/ballerina/modules/oas/types.bal new file mode 100644 index 00000000..8315f5a4 --- /dev/null +++ b/ballerina/modules/oas/types.bal @@ -0,0 +1,4935 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// AUTO-GENERATED FILE. DO NOT MODIFY. +// This file is auto-generated by the Ballerina OpenAPI tool. + +import ballerina/constraint; +import ballerina/http; + +# Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint. +@display {label: "Connection Config"} +public type ConnectionConfig record {| + # Configurations related to client authentication + http:CredentialsConfig auth; + # The HTTP version understood by the client + http:HttpVersion httpVersion = http:HTTP_2_0; + # Configurations related to HTTP/1.x protocol + ClientHttp1Settings http1Settings?; + # Configurations related to HTTP/2 protocol + http:ClientHttp2Settings http2Settings?; + # The maximum time to wait (in seconds) for a response before closing the connection + decimal timeout = 60; + # The choice of setting `forwarded`/`x-forwarded` header + string forwarded = "disable"; + # Configurations associated with request pooling + http:PoolConfiguration poolConfig?; + # HTTP caching related configurations + http:CacheConfig cache?; + # Specifies the way of handling compression (`accept-encoding`) header + http:Compression compression = http:COMPRESSION_AUTO; + # Configurations associated with the behaviour of the Circuit Breaker + http:CircuitBreakerConfig circuitBreaker?; + # Configurations associated with retrying + http:RetryConfig retryConfig?; + # Configurations associated with inbound response size limits + http:ResponseLimitConfigs responseLimits?; + # SSL/TLS-related options + http:ClientSecureSocket secureSocket?; + # Proxy server related options + http:ProxyConfig proxy?; + # Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default + boolean validation = true; +|}; + +# Provides settings related to HTTP/1.x protocol. +public type ClientHttp1Settings record {| + # Specifies whether to reuse a connection for multiple requests + http:KeepAlive keepAlive = http:KEEPALIVE_AUTO; + # The chunking behaviour of the request + http:Chunking chunking = http:CHUNKING_AUTO; + # Proxy server related options + ProxyConfig proxy?; +|}; + +# Proxy server configurations to be used with the HTTP client endpoint. +public type ProxyConfig record {| + # Host name of the proxy server + string host = ""; + # Proxy server port + int port = 0; + # Proxy server username + string userName = ""; + # Proxy server password + @display {label: "", kind: "password"} + string password = ""; +|}; + +public type UpdateParticipantRequest record { + # Whether the participant should be muted. Can be `true` or `false`. `true` will mute the participant, and `false` will un-mute them. Anything value other than `true` or `false` is interpreted as `false`. + boolean Muted?; + # Whether the participant should be on hold. Can be: `true` or `false`. `true` puts the participant on hold, and `false` lets them rejoin the conference. + boolean Hold?; + # The URL we call using the `hold_method` for music that plays when the participant is on hold. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs. + string HoldUrl?; + # The HTTP method we should use to call `hold_url`. Can be: `GET` or `POST` and the default is `GET`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" HoldMethod?; + # The URL we call using the `announce_method` for an announcement to the participant. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs. + string AnnounceUrl?; + # The HTTP method we should use to call `announce_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" AnnounceMethod?; + # The URL we call using the `wait_method` for the music to play while participants are waiting for the conference to start. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). + string WaitUrl?; + # The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" WaitMethod?; + # Whether to play a notification beep to the conference when the participant exits. Can be: `true` or `false`. + boolean BeepOnExit?; + # Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`. + boolean EndConferenceOnExit?; + # Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined. + boolean Coaching?; + # The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^CA[0-9a-fA-F]{32}$`} + string CallSidToCoach?; +}; + +public type ListConferenceRecordingResponse record { + ConferenceConference_recording[] recordings?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Token_ice_servers record { + string credential?; + string username?; + string url?; + string urls?; +}; + +public type Conference_recording_enum_source "DialVerb"|"Conference"|"OutboundAPI"|"Trunking"|"RecordVerb"|"StartCallRecordingAPI"|"StartConferenceRecordingAPI"; + +public type ListApplicationResponse record { + Application[] applications?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListIncomingPhoneNumberLocalResponse record { + Incoming_phone_numberIncoming_phone_number_local[] incoming_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CreateSiprecRequest record { + # The user-specified name of this Siprec, if one was given when the Siprec was created. This may be used to stop the Siprec. + string Name?; + # Unique name used when configuring the connector via Marketplace Add-on. + string ConnectorName?; + Siprec_enum_track Track?; + # Absolute URL of the status callback. + string StatusCallback?; + # The http method for the status_callback (one of GET, POST). + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # Parameter name + string Parameter1\.Name?; + # Parameter value + string Parameter1\.Value?; + # Parameter name + string Parameter2\.Name?; + # Parameter value + string Parameter2\.Value?; + # Parameter name + string Parameter3\.Name?; + # Parameter value + string Parameter3\.Value?; + # Parameter name + string Parameter4\.Name?; + # Parameter value + string Parameter4\.Value?; + # Parameter name + string Parameter5\.Name?; + # Parameter value + string Parameter5\.Value?; + # Parameter name + string Parameter6\.Name?; + # Parameter value + string Parameter6\.Value?; + # Parameter name + string Parameter7\.Name?; + # Parameter value + string Parameter7\.Value?; + # Parameter name + string Parameter8\.Name?; + # Parameter value + string Parameter8\.Value?; + # Parameter name + string Parameter9\.Name?; + # Parameter value + string Parameter9\.Value?; + # Parameter name + string Parameter10\.Name?; + # Parameter value + string Parameter10\.Value?; + # Parameter name + string Parameter11\.Name?; + # Parameter value + string Parameter11\.Value?; + # Parameter name + string Parameter12\.Name?; + # Parameter value + string Parameter12\.Value?; + # Parameter name + string Parameter13\.Name?; + # Parameter value + string Parameter13\.Value?; + # Parameter name + string Parameter14\.Name?; + # Parameter value + string Parameter14\.Value?; + # Parameter name + string Parameter15\.Name?; + # Parameter value + string Parameter15\.Value?; + # Parameter name + string Parameter16\.Name?; + # Parameter value + string Parameter16\.Value?; + # Parameter name + string Parameter17\.Name?; + # Parameter value + string Parameter17\.Value?; + # Parameter name + string Parameter18\.Name?; + # Parameter value + string Parameter18\.Value?; + # Parameter name + string Parameter19\.Name?; + # Parameter value + string Parameter19\.Value?; + # Parameter name + string Parameter20\.Name?; + # Parameter value + string Parameter20\.Value?; + # Parameter name + string Parameter21\.Name?; + # Parameter value + string Parameter21\.Value?; + # Parameter name + string Parameter22\.Name?; + # Parameter value + string Parameter22\.Value?; + # Parameter name + string Parameter23\.Name?; + # Parameter value + string Parameter23\.Value?; + # Parameter name + string Parameter24\.Name?; + # Parameter value + string Parameter24\.Value?; + # Parameter name + string Parameter25\.Name?; + # Parameter value + string Parameter25\.Value?; + # Parameter name + string Parameter26\.Name?; + # Parameter value + string Parameter26\.Value?; + # Parameter name + string Parameter27\.Name?; + # Parameter value + string Parameter27\.Value?; + # Parameter name + string Parameter28\.Name?; + # Parameter value + string Parameter28\.Value?; + # Parameter name + string Parameter29\.Name?; + # Parameter value + string Parameter29\.Value?; + # Parameter name + string Parameter30\.Name?; + # Parameter value + string Parameter30\.Value?; + # Parameter name + string Parameter31\.Name?; + # Parameter value + string Parameter31\.Value?; + # Parameter name + string Parameter32\.Name?; + # Parameter value + string Parameter32\.Value?; + # Parameter name + string Parameter33\.Name?; + # Parameter value + string Parameter33\.Value?; + # Parameter name + string Parameter34\.Name?; + # Parameter value + string Parameter34\.Value?; + # Parameter name + string Parameter35\.Name?; + # Parameter value + string Parameter35\.Value?; + # Parameter name + string Parameter36\.Name?; + # Parameter value + string Parameter36\.Value?; + # Parameter name + string Parameter37\.Name?; + # Parameter value + string Parameter37\.Value?; + # Parameter name + string Parameter38\.Name?; + # Parameter value + string Parameter38\.Value?; + # Parameter name + string Parameter39\.Name?; + # Parameter value + string Parameter39\.Value?; + # Parameter name + string Parameter40\.Name?; + # Parameter value + string Parameter40\.Value?; + # Parameter name + string Parameter41\.Name?; + # Parameter value + string Parameter41\.Value?; + # Parameter name + string Parameter42\.Name?; + # Parameter value + string Parameter42\.Value?; + # Parameter name + string Parameter43\.Name?; + # Parameter value + string Parameter43\.Value?; + # Parameter name + string Parameter44\.Name?; + # Parameter value + string Parameter44\.Value?; + # Parameter name + string Parameter45\.Name?; + # Parameter value + string Parameter45\.Value?; + # Parameter name + string Parameter46\.Name?; + # Parameter value + string Parameter46\.Value?; + # Parameter name + string Parameter47\.Name?; + # Parameter value + string Parameter47\.Value?; + # Parameter name + string Parameter48\.Name?; + # Parameter value + string Parameter48\.Value?; + # Parameter name + string Parameter49\.Name?; + # Parameter value + string Parameter49\.Value?; + # Parameter name + string Parameter50\.Name?; + # Parameter value + string Parameter50\.Value?; + # Parameter name + string Parameter51\.Name?; + # Parameter value + string Parameter51\.Value?; + # Parameter name + string Parameter52\.Name?; + # Parameter value + string Parameter52\.Value?; + # Parameter name + string Parameter53\.Name?; + # Parameter value + string Parameter53\.Value?; + # Parameter name + string Parameter54\.Name?; + # Parameter value + string Parameter54\.Value?; + # Parameter name + string Parameter55\.Name?; + # Parameter value + string Parameter55\.Value?; + # Parameter name + string Parameter56\.Name?; + # Parameter value + string Parameter56\.Value?; + # Parameter name + string Parameter57\.Name?; + # Parameter value + string Parameter57\.Value?; + # Parameter name + string Parameter58\.Name?; + # Parameter value + string Parameter58\.Value?; + # Parameter name + string Parameter59\.Name?; + # Parameter value + string Parameter59\.Value?; + # Parameter name + string Parameter60\.Name?; + # Parameter value + string Parameter60\.Value?; + # Parameter name + string Parameter61\.Name?; + # Parameter value + string Parameter61\.Value?; + # Parameter name + string Parameter62\.Name?; + # Parameter value + string Parameter62\.Value?; + # Parameter name + string Parameter63\.Name?; + # Parameter value + string Parameter63\.Value?; + # Parameter name + string Parameter64\.Name?; + # Parameter value + string Parameter64\.Value?; + # Parameter name + string Parameter65\.Name?; + # Parameter value + string Parameter65\.Value?; + # Parameter name + string Parameter66\.Name?; + # Parameter value + string Parameter66\.Value?; + # Parameter name + string Parameter67\.Name?; + # Parameter value + string Parameter67\.Value?; + # Parameter name + string Parameter68\.Name?; + # Parameter value + string Parameter68\.Value?; + # Parameter name + string Parameter69\.Name?; + # Parameter value + string Parameter69\.Value?; + # Parameter name + string Parameter70\.Name?; + # Parameter value + string Parameter70\.Value?; + # Parameter name + string Parameter71\.Name?; + # Parameter value + string Parameter71\.Value?; + # Parameter name + string Parameter72\.Name?; + # Parameter value + string Parameter72\.Value?; + # Parameter name + string Parameter73\.Name?; + # Parameter value + string Parameter73\.Value?; + # Parameter name + string Parameter74\.Name?; + # Parameter value + string Parameter74\.Value?; + # Parameter name + string Parameter75\.Name?; + # Parameter value + string Parameter75\.Value?; + # Parameter name + string Parameter76\.Name?; + # Parameter value + string Parameter76\.Value?; + # Parameter name + string Parameter77\.Name?; + # Parameter value + string Parameter77\.Value?; + # Parameter name + string Parameter78\.Name?; + # Parameter value + string Parameter78\.Value?; + # Parameter name + string Parameter79\.Name?; + # Parameter value + string Parameter79\.Value?; + # Parameter name + string Parameter80\.Name?; + # Parameter value + string Parameter80\.Value?; + # Parameter name + string Parameter81\.Name?; + # Parameter value + string Parameter81\.Value?; + # Parameter name + string Parameter82\.Name?; + # Parameter value + string Parameter82\.Value?; + # Parameter name + string Parameter83\.Name?; + # Parameter value + string Parameter83\.Value?; + # Parameter name + string Parameter84\.Name?; + # Parameter value + string Parameter84\.Value?; + # Parameter name + string Parameter85\.Name?; + # Parameter value + string Parameter85\.Value?; + # Parameter name + string Parameter86\.Name?; + # Parameter value + string Parameter86\.Value?; + # Parameter name + string Parameter87\.Name?; + # Parameter value + string Parameter87\.Value?; + # Parameter name + string Parameter88\.Name?; + # Parameter value + string Parameter88\.Value?; + # Parameter name + string Parameter89\.Name?; + # Parameter value + string Parameter89\.Value?; + # Parameter name + string Parameter90\.Name?; + # Parameter value + string Parameter90\.Value?; + # Parameter name + string Parameter91\.Name?; + # Parameter value + string Parameter91\.Value?; + # Parameter name + string Parameter92\.Name?; + # Parameter value + string Parameter92\.Value?; + # Parameter name + string Parameter93\.Name?; + # Parameter value + string Parameter93\.Value?; + # Parameter name + string Parameter94\.Name?; + # Parameter value + string Parameter94\.Value?; + # Parameter name + string Parameter95\.Name?; + # Parameter value + string Parameter95\.Value?; + # Parameter name + string Parameter96\.Name?; + # Parameter value + string Parameter96\.Value?; + # Parameter name + string Parameter97\.Name?; + # Parameter value + string Parameter97\.Value?; + # Parameter name + string Parameter98\.Name?; + # Parameter value + string Parameter98\.Value?; + # Parameter name + string Parameter99\.Name?; + # Parameter value + string Parameter99\.Value?; +}; + +public type Usage_record_monthly_enum_category "a2p-registration-fees"|"agent-conference"|"amazon-polly"|"answering-machine-detection"|"authy-authentications"|"authy-calls-outbound"|"authy-monthly-fees"|"authy-phone-intelligence"|"authy-phone-verifications"|"authy-sms-outbound"|"call-progess-events"|"calleridlookups"|"calls"|"calls-client"|"calls-globalconference"|"calls-inbound"|"calls-inbound-local"|"calls-inbound-mobile"|"calls-inbound-tollfree"|"calls-outbound"|"calls-pay-verb-transactions"|"calls-recordings"|"calls-sip"|"calls-sip-inbound"|"calls-sip-outbound"|"calls-transfers"|"carrier-lookups"|"conversations"|"conversations-api-requests"|"conversations-conversation-events"|"conversations-endpoint-connectivity"|"conversations-events"|"conversations-participant-events"|"conversations-participants"|"cps"|"flex-usage"|"fraud-lookups"|"group-rooms"|"group-rooms-data-track"|"group-rooms-encrypted-media-recorded"|"group-rooms-media-downloaded"|"group-rooms-media-recorded"|"group-rooms-media-routed"|"group-rooms-media-stored"|"group-rooms-participant-minutes"|"group-rooms-recorded-minutes"|"imp-v1-usage"|"lookups"|"marketplace"|"marketplace-algorithmia-named-entity-recognition"|"marketplace-cadence-transcription"|"marketplace-cadence-translation"|"marketplace-capio-speech-to-text"|"marketplace-convriza-ababa"|"marketplace-deepgram-phrase-detector"|"marketplace-digital-segment-business-info"|"marketplace-facebook-offline-conversions"|"marketplace-google-speech-to-text"|"marketplace-ibm-watson-message-insights"|"marketplace-ibm-watson-message-sentiment"|"marketplace-ibm-watson-recording-analysis"|"marketplace-ibm-watson-tone-analyzer"|"marketplace-icehook-systems-scout"|"marketplace-infogroup-dataaxle-bizinfo"|"marketplace-keen-io-contact-center-analytics"|"marketplace-marchex-cleancall"|"marketplace-marchex-sentiment-analysis-for-sms"|"marketplace-marketplace-nextcaller-social-id"|"marketplace-mobile-commons-opt-out-classifier"|"marketplace-nexiwave-voicemail-to-text"|"marketplace-nextcaller-advanced-caller-identification"|"marketplace-nomorobo-spam-score"|"marketplace-payfone-tcpa-compliance"|"marketplace-remeeting-automatic-speech-recognition"|"marketplace-tcpa-defense-solutions-blacklist-feed"|"marketplace-telo-opencnam"|"marketplace-truecnam-true-spam"|"marketplace-twilio-caller-name-lookup-us"|"marketplace-twilio-carrier-information-lookup"|"marketplace-voicebase-pci"|"marketplace-voicebase-transcription"|"marketplace-voicebase-transcription-custom-vocabulary"|"marketplace-whitepages-pro-caller-identification"|"marketplace-whitepages-pro-phone-intelligence"|"marketplace-whitepages-pro-phone-reputation"|"marketplace-wolfarm-spoken-results"|"marketplace-wolfram-short-answer"|"marketplace-ytica-contact-center-reporting-analytics"|"mediastorage"|"mms"|"mms-inbound"|"mms-inbound-longcode"|"mms-inbound-shortcode"|"mms-messages-carrierfees"|"mms-outbound"|"mms-outbound-longcode"|"mms-outbound-shortcode"|"monitor-reads"|"monitor-storage"|"monitor-writes"|"notify"|"notify-actions-attempts"|"notify-channels"|"number-format-lookups"|"pchat"|"pchat-users"|"peer-to-peer-rooms-participant-minutes"|"pfax"|"pfax-minutes"|"pfax-minutes-inbound"|"pfax-minutes-outbound"|"pfax-pages"|"phonenumbers"|"phonenumbers-cps"|"phonenumbers-emergency"|"phonenumbers-local"|"phonenumbers-mobile"|"phonenumbers-setups"|"phonenumbers-tollfree"|"premiumsupport"|"proxy"|"proxy-active-sessions"|"pstnconnectivity"|"pv"|"pv-composition-media-downloaded"|"pv-composition-media-encrypted"|"pv-composition-media-stored"|"pv-composition-minutes"|"pv-recording-compositions"|"pv-room-participants"|"pv-room-participants-au1"|"pv-room-participants-br1"|"pv-room-participants-ie1"|"pv-room-participants-jp1"|"pv-room-participants-sg1"|"pv-room-participants-us1"|"pv-room-participants-us2"|"pv-rooms"|"pv-sip-endpoint-registrations"|"recordings"|"recordingstorage"|"rooms-group-bandwidth"|"rooms-group-minutes"|"rooms-peer-to-peer-minutes"|"shortcodes"|"shortcodes-customerowned"|"shortcodes-mms-enablement"|"shortcodes-mps"|"shortcodes-random"|"shortcodes-uk"|"shortcodes-vanity"|"small-group-rooms"|"small-group-rooms-data-track"|"small-group-rooms-participant-minutes"|"sms"|"sms-inbound"|"sms-inbound-longcode"|"sms-inbound-shortcode"|"sms-messages-carrierfees"|"sms-messages-features"|"sms-messages-features-senderid"|"sms-outbound"|"sms-outbound-content-inspection"|"sms-outbound-longcode"|"sms-outbound-shortcode"|"speech-recognition"|"studio-engagements"|"sync"|"sync-actions"|"sync-endpoint-hours"|"sync-endpoint-hours-above-daily-cap"|"taskrouter-tasks"|"totalprice"|"transcriptions"|"trunking-cps"|"trunking-emergency-calls"|"trunking-origination"|"trunking-origination-local"|"trunking-origination-mobile"|"trunking-origination-tollfree"|"trunking-recordings"|"trunking-secure"|"trunking-termination"|"tts-google"|"turnmegabytes"|"turnmegabytes-australia"|"turnmegabytes-brasil"|"turnmegabytes-germany"|"turnmegabytes-india"|"turnmegabytes-ireland"|"turnmegabytes-japan"|"turnmegabytes-singapore"|"turnmegabytes-useast"|"turnmegabytes-uswest"|"twilio-interconnect"|"verify-push"|"verify-totp"|"verify-whatsapp-conversations-business-initiated"|"video-recordings"|"virtual-agent"|"voice-insights"|"voice-insights-client-insights-on-demand-minute"|"voice-insights-ptsn-insights-on-demand-minute"|"voice-insights-sip-interface-insights-on-demand-minute"|"voice-insights-sip-trunking-insights-on-demand-minute"|"voice-intelligence"|"voice-intelligence-transcription"|"voice-intelligence-operators"|"wireless"|"wireless-orders"|"wireless-orders-artwork"|"wireless-orders-bulk"|"wireless-orders-esim"|"wireless-orders-starter"|"wireless-usage"|"wireless-usage-commands"|"wireless-usage-commands-africa"|"wireless-usage-commands-asia"|"wireless-usage-commands-centralandsouthamerica"|"wireless-usage-commands-europe"|"wireless-usage-commands-home"|"wireless-usage-commands-northamerica"|"wireless-usage-commands-oceania"|"wireless-usage-commands-roaming"|"wireless-usage-data"|"wireless-usage-data-africa"|"wireless-usage-data-asia"|"wireless-usage-data-centralandsouthamerica"|"wireless-usage-data-custom-additionalmb"|"wireless-usage-data-custom-first5mb"|"wireless-usage-data-domestic-roaming"|"wireless-usage-data-europe"|"wireless-usage-data-individual-additionalgb"|"wireless-usage-data-individual-firstgb"|"wireless-usage-data-international-roaming-canada"|"wireless-usage-data-international-roaming-india"|"wireless-usage-data-international-roaming-mexico"|"wireless-usage-data-northamerica"|"wireless-usage-data-oceania"|"wireless-usage-data-pooled"|"wireless-usage-data-pooled-downlink"|"wireless-usage-data-pooled-uplink"|"wireless-usage-mrc"|"wireless-usage-mrc-custom"|"wireless-usage-mrc-individual"|"wireless-usage-mrc-pooled"|"wireless-usage-mrc-suspended"|"wireless-usage-sms"|"wireless-usage-voice"; + +public type ListMessageResponse record { + Message[] messages?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Payments_enum_capture "payment-card-number"|"expiration-date"|"security-code"|"postal-code"|"bank-routing-number"|"bank-account-number"; + +public type SipSip_ip_access_control_list record { + # A 34 character string that uniquely identifies this resource. + string? sid?; + # The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) that owns this resource. + string? account_sid?; + # A human readable descriptive text, up to 255 characters long. + string? friendly_name?; + # The date that this resource was created, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_created?; + # The date that this resource was last updated, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_updated?; + # A list of the IpAddress resources associated with this IP access control list resource. + record {}? subresource_uris?; + # The URI for this resource, relative to `https://api.twilio.com` + string? uri?; +}; + +public type CreateIncomingPhoneNumberTollFreeRequest record { + # The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234. + string PhoneNumber; + # The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. + string ApiVersion?; + # A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. + string FriendlyName?; + # The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string SmsApplicationSid?; + # The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsFallbackMethod?; + # The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. + string SmsFallbackUrl?; + # The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsMethod?; + # The URL we should call when the new phone number receives an incoming SMS message. + string SmsUrl?; + # The URL we should call using the `status_callback_method` to send status information to your application. + string StatusCallback?; + # The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string VoiceApplicationSid?; + # Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. + boolean VoiceCallerIdLookup?; + # The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceFallbackMethod?; + # The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + string VoiceFallbackUrl?; + # The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceMethod?; + # The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. + string VoiceUrl?; + # The SID of the Identity resource that we should associate with the new phone number. Some regions require an Identity to meet local regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^RI[0-9a-fA-F]{32}$`} + string IdentitySid?; + # The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AD[0-9a-fA-F]{32}$`} + string AddressSid?; + Incoming_phone_number_toll_free_enum_emergency_status EmergencyStatus?; + # The SID of the emergency address configuration to use for emergency calling from the new phone number. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AD[0-9a-fA-F]{32}$`} + string EmergencyAddressSid?; + # The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^TK[0-9a-fA-F]{32}$`} + string TrunkSid?; + Incoming_phone_number_toll_free_enum_voice_receive_mode VoiceReceiveMode?; + # The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^BU[0-9a-fA-F]{32}$`} + string BundleSid?; +}; + +public type UpdateKeyRequest record { + # A descriptive string that you create to describe the resource. It can be up to 64 characters long. + string FriendlyName?; +}; + +public type ListRecordingAddOnResultPayloadResponse record { + RecordingRecording_add_on_resultRecording_add_on_result_payload[] payloads?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Account_enum_status "active"|"suspended"|"closed"; + +public type ListConnectAppResponse record { + Connect_app[] connect_apps?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Payments_enum_payment_method "credit-card"|"ach-debit"; + +public type UsageUsage_recordUsage_record_this_month record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage. + string? account_sid?; + # The API version used to create the resource. + string? api_version?; + # Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + string? as_of?; + Usage_record_this_month_enum_category category?; + # The number of usage events, such as the number of calls. + string? count?; + # The units in which `count` is measured, such as `calls` for calls or `messages` for SMS. + string? count_unit?; + # A plain-language description of the usage category. + string? description?; + # The last date for which usage is included in the UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? end_date?; + # The total price of the usage in the currency specified in `price_unit` and associated with the account. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format, such as `usd`, `eur`, and `jpy`. + string? price_unit?; + # The first date for which usage is included in this UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? start_date?; + # A list of related resources identified by their URIs. For more information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + record {}? subresource_uris?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The amount used to bill usage and measured in units described in `usage_unit`. + string? usage?; + # The units in which `usage` is measured, such as `minutes` for calls or `messages` for SMS. + string? usage_unit?; +}; + +public type New_key record { + # The unique string that that we created to identify the NewKey resource. You will use this as the basic-auth `user` when authenticating to the API. + string? sid?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The date and time in GMT that the API Key was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the new API Key was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth `password`). **Note that for security reasons, this field is ONLY returned when the API Key is first created.** + string? secret?; +}; + +public type ConferenceParticipant record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resource. + string? account_sid?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Participant resource is associated with. + string? call_sid?; + # The user-specified label of this participant, if one was given when the participant was created. This may be used to fetch, update or delete the participant. + string? label?; + # The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`. + string? call_sid_to_coach?; + # Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined. + boolean? coaching?; + # The SID of the conference the participant is in. + string? conference_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # Whether the conference ends when the participant leaves. Can be: `true` or `false` and the default is `false`. If `true`, the conference ends and all other participants drop out when the participant leaves. + boolean? end_conference_on_exit?; + # Whether the participant is muted. Can be `true` or `false`. + boolean? muted?; + # Whether the participant is on hold. Can be `true` or `false`. + boolean? hold?; + # Whether the conference starts when the participant joins the conference, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference. + boolean? start_conference_on_enter?; + Participant_enum_status status?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type CallStream record { + # The SID of the Stream resource. + string? sid?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Stream resource. + string? account_sid?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Stream resource is associated with. + string? call_sid?; + # The user-specified name of this Stream, if one was given when the Stream was created. This may be used to stop the Stream. + string? name?; + Stream_enum_status status?; + # The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type MessageMedia record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with this Media resource. + string? account_sid?; + # The default [MIME type](https://en.wikipedia.org/wiki/Internet_media_type) of the media, for example `image/jpeg`, `image/png`, or `image/gif`. + string? content_type?; + # The date and time in GMT when this Media resource was created, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT when this Media resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The SID of the Message resource that is associated with this Media resource. + string? parent_sid?; + # The unique string that identifies this Media resource. + string? sid?; + # The URI of this Media resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type CreateSipAuthCallsCredentialListMappingRequest record { + # The SID of the CredentialList resource to map to the SIP domain. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^CL[0-9a-fA-F]{32}$`} + string CredentialListSid; +}; + +public type ListUsageRecordMonthlyResponse record { + UsageUsage_recordUsage_record_monthly[] usage_records?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CreateIncomingPhoneNumberMobileRequest record { + # The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234. + string PhoneNumber; + # The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. + string ApiVersion?; + # A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, the is a formatted version of the phone number. + string FriendlyName?; + # The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those of the application. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string SmsApplicationSid?; + # The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsFallbackMethod?; + # The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. + string SmsFallbackUrl?; + # The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsMethod?; + # The URL we should call when the new phone number receives an incoming SMS message. + string SmsUrl?; + # The URL we should call using the `status_callback_method` to send status information to your application. + string StatusCallback?; + # The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string VoiceApplicationSid?; + # Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. + boolean VoiceCallerIdLookup?; + # The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceFallbackMethod?; + # The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + string VoiceFallbackUrl?; + # The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceMethod?; + # The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. + string VoiceUrl?; + # The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^RI[0-9a-fA-F]{32}$`} + string IdentitySid?; + # The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AD[0-9a-fA-F]{32}$`} + string AddressSid?; + Incoming_phone_number_mobile_enum_emergency_status EmergencyStatus?; + # The SID of the emergency address configuration to use for emergency calling from the new phone number. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AD[0-9a-fA-F]{32}$`} + string EmergencyAddressSid?; + # The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^TK[0-9a-fA-F]{32}$`} + string TrunkSid?; + Incoming_phone_number_mobile_enum_voice_receive_mode VoiceReceiveMode?; + # The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^BU[0-9a-fA-F]{32}$`} + string BundleSid?; +}; + +public type SipSip_domainSip_authSip_auth_calls record { +}; + +public type ListUsageRecordLastMonthResponse record { + UsageUsage_recordUsage_record_last_month[] usage_records?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListSigningKeyResponse record { + Signing_key[] signing_keys?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CreateUsageTriggerRequest record { + # The URL we should call using `callback_method` when the trigger fires. + string CallbackUrl; + # The usage value at which the trigger should fire. For convenience, you can use an offset value such as `+30` to specify a trigger_value that is 30 units more than the current usage value. Be sure to urlencode a `+` as `%2B`. + string TriggerValue; + Usage_trigger_enum_usage_category UsageCategory; + # The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" CallbackMethod?; + # A descriptive string that you create to describe the resource. It can be up to 64 characters long. + string FriendlyName?; + Usage_trigger_enum_recurring Recurring?; + Usage_trigger_enum_trigger_field TriggerBy?; +}; + +public type Incoming_phone_number_local_enum_emergency_status "Active"|"Inactive"; + +public type Call_recording_enum_source "DialVerb"|"Conference"|"OutboundAPI"|"Trunking"|"RecordVerb"|"StartCallRecordingAPI"|"StartConferenceRecordingAPI"; + +public type QueueMember record { + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Member resource is associated with. + string? call_sid?; + # The date that the member was enqueued, given in RFC 2822 format. + string? date_enqueued?; + # This member's current position in the queue. + int? position?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The number of seconds the member has been in the queue. + int? wait_time?; + # The SID of the Queue the member is in. + string? queue_sid?; +}; + +public type SipSip_credential_listSip_credential record { + # A 34 character string that uniquely identifies this resource. + string? sid?; + # The unique id of the Account that is responsible for this resource. + string? account_sid?; + # The unique id that identifies the credential list that includes this credential. + string? credential_list_sid?; + # The username for this credential. + string? username?; + # The date that this resource was created, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_created?; + # The date that this resource was last updated, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_updated?; + # The URI for this resource, relative to `https://api.twilio.com` + string? uri?; +}; + +public type CreateIncomingPhoneNumberRequest record { + # The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. + string ApiVersion?; + # A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the new phone number. + string FriendlyName?; + # The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string SmsApplicationSid?; + # The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsFallbackMethod?; + # The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. + string SmsFallbackUrl?; + # The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsMethod?; + # The URL we should call when the new phone number receives an incoming SMS message. + string SmsUrl?; + # The URL we should call using the `status_callback_method` to send status information to your application. + string StatusCallback?; + # The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string VoiceApplicationSid?; + # Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. + boolean VoiceCallerIdLookup?; + # The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceFallbackMethod?; + # The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + string VoiceFallbackUrl?; + # The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceMethod?; + # The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. + string VoiceUrl?; + Incoming_phone_number_enum_emergency_status EmergencyStatus?; + # The SID of the emergency address configuration to use for emergency calling from the new phone number. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AD[0-9a-fA-F]{32}$`} + string EmergencyAddressSid?; + # The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^TK[0-9a-fA-F]{32}$`} + string TrunkSid?; + # The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^RI[0-9a-fA-F]{32}$`} + string IdentitySid?; + # The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AD[0-9a-fA-F]{32}$`} + string AddressSid?; + Incoming_phone_number_enum_voice_receive_mode VoiceReceiveMode?; + # The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^BU[0-9a-fA-F]{32}$`} + string BundleSid?; + # The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234. + string PhoneNumber?; + # The desired area code for your new incoming phone number. Can be any three-digit, US or Canada area code. We will provision an available phone number within this area code for you. **You must provide an `area_code` or a `phone_number`.** (US and Canada only). + string AreaCode?; +}; + +public type Available_phone_number_local record { + # A formatted version of the phone number. + string? friendly_name?; + # The 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. + string? phone_number?; + # The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) of this phone number. Available for only phone numbers from the US and Canada. + string? lata?; + # The locality or city of this phone number's location. + string? locality?; + # The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) of this phone number. Available for only phone numbers from the US and Canada. + string? rate_center?; + # The latitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? latitude?; + # The longitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? longitude?; + # The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada. + string? region?; + # The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada. + string? postal_code?; + # The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of this phone number. + string? iso_country?; + # The type of [Address](https://www.twilio.com/docs/usage/api/address) resource the phone number requires. Can be: `none`, `any`, `local`, or `foreign`. `none` means no address is required. `any` means an address is required, but it can be anywhere in the world. `local` means an address in the phone number's country is required. `foreign` means an address outside of the phone number's country is required. + string? address_requirements?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are: `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Available_phone_number_local_capabilities? capabilities?; +}; + +public type Conference_enum_status "init"|"in-progress"|"completed"; + +public type Recording_add_on_result_enum_status "canceled"|"completed"|"deleted"|"failed"|"in-progress"|"init"|"processing"|"queued"; + +public type SipSip_credential_list record { + # The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) that owns this resource. + string? account_sid?; + # The date that this resource was created, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_created?; + # The date that this resource was last updated, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_updated?; + # A human readable descriptive text that describes the CredentialList, up to 64 characters long. + string? friendly_name?; + # A 34 character string that uniquely identifies this resource. + string? sid?; + # A list of credentials associated with this credential list. + record {}? subresource_uris?; + # The URI for this resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type ListAvailablePhoneNumberVoipResponse record { + Available_phone_number_voip[] available_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Key record { + # The unique string that that we created to identify the Key resource. + string? sid?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; +}; + +public type ListShortCodeResponse record { + Short_code[] short_codes?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type UpdateAccountRequest record { + # Update the human-readable description of this Account + string FriendlyName?; + Account_enum_status Status?; +}; + +public type CreateSipIpAccessControlListRequest record { + # A human readable descriptive text that describes the IpAccessControlList, up to 255 characters long. + string FriendlyName; +}; + +public type CreateSipIpAccessControlListMappingRequest record { + # The unique id of the IP access control list to map to the SIP domain. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AL[0-9a-fA-F]{32}$`} + string IpAccessControlListSid; +}; + +public type UsageUsage_recordUsage_record_all_time record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage. + string? account_sid?; + # The API version used to create the resource. + string? api_version?; + # Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + string? as_of?; + Usage_record_all_time_enum_category category?; + # The number of usage events, such as the number of calls. + string? count?; + # The units in which `count` is measured, such as `calls` for calls or `messages` for SMS. + string? count_unit?; + # A plain-language description of the usage category. + string? description?; + # The last date for which usage is included in the UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? end_date?; + # The total price of the usage in the currency specified in `price_unit` and associated with the account. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format, such as `usd`, `eur`, and `jpy`. + string? price_unit?; + # The first date for which usage is included in this UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? start_date?; + # A list of related resources identified by their URIs. For more information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + record {}? subresource_uris?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The amount used to bill usage and measured in units described in `usage_unit`. + string? usage?; + # The units in which `usage` is measured, such as `minutes` for calls or `messages` for SMS. + string? usage_unit?; +}; + +public type ListAddressResponse record { + Address[] addresses?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Payments_enum_status "complete"|"cancel"; + +public type Notification record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Notification resource. + string? account_sid?; + # The API version used to generate the notification. Can be empty for events that don't have a specific API version, such as incoming phone calls. + string? api_version?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Notification resource is associated with. + string? call_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # A unique error code for the error condition that is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + string? error_code?; + # An integer log level that corresponds to the type of notification: `0` is ERROR, `1` is WARNING. + string? log?; + # The date the notification was actually generated in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. Message buffering can cause this value to differ from `date_created`. + string? message_date?; + # The text of the notification. + string? message_text?; + # The URL for more information about the error condition. This value is a page in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + string? more_info?; + # The HTTP method used to generate the notification. If the notification was generated during a phone call, this is the HTTP Method used to request the resource on your server. If the notification was generated by your use of our REST API, this is the HTTP method used to call the resource on our servers. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" request_method?; + # The URL of the resource that generated the notification. If the notification was generated during a phone call, this is the URL of the resource on your server that caused the notification. If the notification was generated by your use of our REST API, this is the URL of the resource you called. + string? request_url?; + # The unique string that that we created to identify the Notification resource. + string? sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type CallCall_recording record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource. + string? account_sid?; + # The API version used to make the recording. + string? api_version?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Recording resource is associated with. + string? call_sid?; + # The Conference SID that identifies the conference associated with the recording, if a conference recording. + string? conference_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The start time of the recording in GMT and in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? start_time?; + # The length of the recording in seconds. + string? duration?; + # The unique string that that we created to identify the Recording resource. + string? sid?; + # The one-time cost of creating the recording in the `price_unit` currency. + decimal? price?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # How to decrypt the recording if it was encrypted using [Call Recording Encryption](https://www.twilio.com/docs/voice/tutorials/voice-recording-encryption) feature. + anydata? encryption_details?; + # The currency used in the `price` property. Example: `USD`. + string? price_unit?; + Call_recording_enum_status status?; + # The number of channels in the final recording file. Can be: `1`, or `2`. Separating a two leg call into two separate channels of the recording file is supported in [Dial](https://www.twilio.com/docs/voice/twiml/dial#attributes-record) and [Outbound Rest API](https://www.twilio.com/docs/voice/make-calls) record options. + int? channels?; + Call_recording_enum_source 'source?; + # The error code that describes why the recording is `absent`. The error code is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). This value is null if the recording `status` is not `absent`. + int? error_code?; + # The recorded track. Can be: `inbound`, `outbound`, or `both`. + string? track?; +}; + +public type MessageMessage_feedback record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with this MessageFeedback resource. + string? account_sid?; + # The SID of the Message resource associated with this MessageFeedback resource. + string? message_sid?; + Message_feedback_enum_outcome outcome?; + # The date and time in GMT when this MessageFeedback resource was created, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT when this MessageFeedback resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type UpdateSipIpAddressRequest record { + # An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. + string IpAddress?; + # A human readable descriptive text for this resource, up to 255 characters long. + string FriendlyName?; + # An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used. + int CidrPrefixLength?; +}; + +public type Queue record { + # The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The number of calls currently in the queue. + int? current_size?; + # A string that you assigned to describe this resource. + string? friendly_name?; + # The URI of this resource, relative to `https://api.twilio.com`. + string? uri?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Queue resource. + string? account_sid?; + # The average wait time in seconds of the members in this queue. This is calculated at the time of the request. + int? average_wait_time?; + # The unique string that that we created to identify this Queue resource. + string? sid?; + # The date and time in GMT that this resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The maximum number of calls that can be in the queue. The default is 1000 and the maximum is 5000. + int? max_size?; +}; + +public type Incoming_phone_number_mobile_enum_emergency_status "Active"|"Inactive"; + +public type UpdateSipCredentialListRequest record { + # A human readable descriptive text for a CredentialList, up to 64 characters long. + string FriendlyName; +}; + +public type Call record { + # The unique string that we created to identify this Call resource. + string? sid?; + # The date and time in GMT that this resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The SID that identifies the call that created this leg. + string? parent_call_sid?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Call resource. + string? account_sid?; + # The phone number, SIP address, Client identifier or SIM SID that received this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. Client identifiers are formatted `client:name`. SIM SIDs are formatted as `sim:sid`. + string? to?; + # The phone number, SIP address or Client identifier that received this call. Formatted for display. Non-North American phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +442071838750). + string? to_formatted?; + # The phone number, SIP address, Client identifier or SIM SID that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. Client identifiers are formatted `client:name`. SIM SIDs are formatted as `sim:sid`. + string? 'from?; + # The calling phone number, SIP address, or Client identifier formatted for display. Non-North American phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +442071838750). + string? from_formatted?; + # If the call was inbound, this is the SID of the IncomingPhoneNumber resource that received the call. If the call was outbound, it is the SID of the OutgoingCallerId resource from which the call was placed. + string? phone_number_sid?; + Call_enum_status status?; + # The start time of the call, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. Empty if the call has not yet been dialed. + string? start_time?; + # The time the call ended, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. Empty if the call did not complete successfully. + string? end_time?; + # The length of the call in seconds. This value is empty for busy, failed, unanswered, or ongoing calls. + string? duration?; + # The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available. + string? price?; + # The currency in which `Price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format (e.g., `USD`, `EUR`, `JPY`). Always capitalized for calls. + string? price_unit?; + # A string describing the direction of the call. Can be: `inbound` for inbound calls, `outbound-api` for calls initiated via the REST API or `outbound-dial` for calls initiated by a `` verb. Using [Elastic SIP Trunking](https://www.twilio.com/docs/sip-trunking), the values can be [`trunking-terminating`](https://www.twilio.com/docs/sip-trunking#termination) for outgoing calls from your communications infrastructure to the PSTN or [`trunking-originating`](https://www.twilio.com/docs/sip-trunking#origination) for incoming calls to your communications infrastructure from the PSTN. + string? direction?; + # Either `human` or `machine` if this call was initiated with answering machine detection. Empty otherwise. + string? answered_by?; + # The API version used to create the call. + string? api_version?; + # The forwarding phone number if this call was an incoming call forwarded from another number (depends on carrier supporting forwarding). Otherwise, empty. + string? forwarded_from?; + # The Group SID associated with this call. If no Group is associated with the call, the field is empty. + string? group_sid?; + # The caller's name if this call was an incoming call to a phone number with caller ID Lookup enabled. Otherwise, empty. + string? caller_name?; + # The wait time in milliseconds before the call is placed. + string? queue_time?; + # The unique identifier of the trunk resource that was used for this call. The field is empty if the call was not made using a SIP trunk or if the call is not terminated. + string? trunk_sid?; + # The URI of this resource, relative to `https://api.twilio.com`. + string? uri?; + # A list of subresources available to this call, identified by their URIs relative to `https://api.twilio.com`. + record {}? subresource_uris?; +}; + +public type ListUsageRecordTodayResponse record { + UsageUsage_recordUsage_record_today[] usage_records?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Transcription_enum_status "in-progress"|"completed"|"failed"; + +public type Incoming_phone_number_local_enum_address_requirement "none"|"any"|"local"|"foreign"; + +public type Call_feedback_enum_issues "audio-latency"|"digits-not-captured"|"dropped-call"|"imperfect-audio"|"incorrect-caller-id"|"one-way-audio"|"post-dial-delay"|"unsolicited-call"; + +public type Stream_enum_status "in-progress"|"stopped"; + +public type SipSip_domainSip_authSip_auth_callsSip_auth_calls_credential_list_mapping record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resource. + string? account_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The unique string that that we created to identify the CredentialListMapping resource. + string? sid?; +}; + +public type ListAvailablePhoneNumberMachineToMachineResponse record { + Available_phone_number_machine_to_machine[] available_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Message_enum_address_retention "retain"|"obfuscate"; + +public type UsageUsage_record record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage. + string? account_sid?; + # The API version used to create the resource. + string? api_version?; + # Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + string? as_of?; + Usage_record_enum_category category?; + # The number of usage events, such as the number of calls. + string? count?; + # The units in which `count` is measured, such as `calls` for calls or `messages` for SMS. + string? count_unit?; + # A plain-language description of the usage category. + string? description?; + # The last date for which usage is included in the UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? end_date?; + # The total price of the usage in the currency specified in `price_unit` and associated with the account. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format, such as `usd`, `eur`, and `jpy`. + string? price_unit?; + # The first date for which usage is included in this UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? start_date?; + # A list of related resources identified by their URIs. For more information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + record {}? subresource_uris?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The amount used to bill usage and measured in units described in `usage_unit`. + string? usage?; + # The units in which `usage` is measured, such as `minutes` for calls or `messages` for SMS. + string? usage_unit?; +}; + +public type Usage_record_enum_category "a2p-registration-fees"|"agent-conference"|"amazon-polly"|"answering-machine-detection"|"authy-authentications"|"authy-calls-outbound"|"authy-monthly-fees"|"authy-phone-intelligence"|"authy-phone-verifications"|"authy-sms-outbound"|"call-progess-events"|"calleridlookups"|"calls"|"calls-client"|"calls-globalconference"|"calls-inbound"|"calls-inbound-local"|"calls-inbound-mobile"|"calls-inbound-tollfree"|"calls-outbound"|"calls-pay-verb-transactions"|"calls-recordings"|"calls-sip"|"calls-sip-inbound"|"calls-sip-outbound"|"calls-transfers"|"carrier-lookups"|"conversations"|"conversations-api-requests"|"conversations-conversation-events"|"conversations-endpoint-connectivity"|"conversations-events"|"conversations-participant-events"|"conversations-participants"|"cps"|"flex-usage"|"fraud-lookups"|"group-rooms"|"group-rooms-data-track"|"group-rooms-encrypted-media-recorded"|"group-rooms-media-downloaded"|"group-rooms-media-recorded"|"group-rooms-media-routed"|"group-rooms-media-stored"|"group-rooms-participant-minutes"|"group-rooms-recorded-minutes"|"imp-v1-usage"|"lookups"|"marketplace"|"marketplace-algorithmia-named-entity-recognition"|"marketplace-cadence-transcription"|"marketplace-cadence-translation"|"marketplace-capio-speech-to-text"|"marketplace-convriza-ababa"|"marketplace-deepgram-phrase-detector"|"marketplace-digital-segment-business-info"|"marketplace-facebook-offline-conversions"|"marketplace-google-speech-to-text"|"marketplace-ibm-watson-message-insights"|"marketplace-ibm-watson-message-sentiment"|"marketplace-ibm-watson-recording-analysis"|"marketplace-ibm-watson-tone-analyzer"|"marketplace-icehook-systems-scout"|"marketplace-infogroup-dataaxle-bizinfo"|"marketplace-keen-io-contact-center-analytics"|"marketplace-marchex-cleancall"|"marketplace-marchex-sentiment-analysis-for-sms"|"marketplace-marketplace-nextcaller-social-id"|"marketplace-mobile-commons-opt-out-classifier"|"marketplace-nexiwave-voicemail-to-text"|"marketplace-nextcaller-advanced-caller-identification"|"marketplace-nomorobo-spam-score"|"marketplace-payfone-tcpa-compliance"|"marketplace-remeeting-automatic-speech-recognition"|"marketplace-tcpa-defense-solutions-blacklist-feed"|"marketplace-telo-opencnam"|"marketplace-truecnam-true-spam"|"marketplace-twilio-caller-name-lookup-us"|"marketplace-twilio-carrier-information-lookup"|"marketplace-voicebase-pci"|"marketplace-voicebase-transcription"|"marketplace-voicebase-transcription-custom-vocabulary"|"marketplace-whitepages-pro-caller-identification"|"marketplace-whitepages-pro-phone-intelligence"|"marketplace-whitepages-pro-phone-reputation"|"marketplace-wolfarm-spoken-results"|"marketplace-wolfram-short-answer"|"marketplace-ytica-contact-center-reporting-analytics"|"mediastorage"|"mms"|"mms-inbound"|"mms-inbound-longcode"|"mms-inbound-shortcode"|"mms-messages-carrierfees"|"mms-outbound"|"mms-outbound-longcode"|"mms-outbound-shortcode"|"monitor-reads"|"monitor-storage"|"monitor-writes"|"notify"|"notify-actions-attempts"|"notify-channels"|"number-format-lookups"|"pchat"|"pchat-users"|"peer-to-peer-rooms-participant-minutes"|"pfax"|"pfax-minutes"|"pfax-minutes-inbound"|"pfax-minutes-outbound"|"pfax-pages"|"phonenumbers"|"phonenumbers-cps"|"phonenumbers-emergency"|"phonenumbers-local"|"phonenumbers-mobile"|"phonenumbers-setups"|"phonenumbers-tollfree"|"premiumsupport"|"proxy"|"proxy-active-sessions"|"pstnconnectivity"|"pv"|"pv-composition-media-downloaded"|"pv-composition-media-encrypted"|"pv-composition-media-stored"|"pv-composition-minutes"|"pv-recording-compositions"|"pv-room-participants"|"pv-room-participants-au1"|"pv-room-participants-br1"|"pv-room-participants-ie1"|"pv-room-participants-jp1"|"pv-room-participants-sg1"|"pv-room-participants-us1"|"pv-room-participants-us2"|"pv-rooms"|"pv-sip-endpoint-registrations"|"recordings"|"recordingstorage"|"rooms-group-bandwidth"|"rooms-group-minutes"|"rooms-peer-to-peer-minutes"|"shortcodes"|"shortcodes-customerowned"|"shortcodes-mms-enablement"|"shortcodes-mps"|"shortcodes-random"|"shortcodes-uk"|"shortcodes-vanity"|"small-group-rooms"|"small-group-rooms-data-track"|"small-group-rooms-participant-minutes"|"sms"|"sms-inbound"|"sms-inbound-longcode"|"sms-inbound-shortcode"|"sms-messages-carrierfees"|"sms-messages-features"|"sms-messages-features-senderid"|"sms-outbound"|"sms-outbound-content-inspection"|"sms-outbound-longcode"|"sms-outbound-shortcode"|"speech-recognition"|"studio-engagements"|"sync"|"sync-actions"|"sync-endpoint-hours"|"sync-endpoint-hours-above-daily-cap"|"taskrouter-tasks"|"totalprice"|"transcriptions"|"trunking-cps"|"trunking-emergency-calls"|"trunking-origination"|"trunking-origination-local"|"trunking-origination-mobile"|"trunking-origination-tollfree"|"trunking-recordings"|"trunking-secure"|"trunking-termination"|"tts-google"|"turnmegabytes"|"turnmegabytes-australia"|"turnmegabytes-brasil"|"turnmegabytes-germany"|"turnmegabytes-india"|"turnmegabytes-ireland"|"turnmegabytes-japan"|"turnmegabytes-singapore"|"turnmegabytes-useast"|"turnmegabytes-uswest"|"twilio-interconnect"|"verify-push"|"verify-totp"|"verify-whatsapp-conversations-business-initiated"|"video-recordings"|"virtual-agent"|"voice-insights"|"voice-insights-client-insights-on-demand-minute"|"voice-insights-ptsn-insights-on-demand-minute"|"voice-insights-sip-interface-insights-on-demand-minute"|"voice-insights-sip-trunking-insights-on-demand-minute"|"voice-intelligence"|"voice-intelligence-transcription"|"voice-intelligence-operators"|"wireless"|"wireless-orders"|"wireless-orders-artwork"|"wireless-orders-bulk"|"wireless-orders-esim"|"wireless-orders-starter"|"wireless-usage"|"wireless-usage-commands"|"wireless-usage-commands-africa"|"wireless-usage-commands-asia"|"wireless-usage-commands-centralandsouthamerica"|"wireless-usage-commands-europe"|"wireless-usage-commands-home"|"wireless-usage-commands-northamerica"|"wireless-usage-commands-oceania"|"wireless-usage-commands-roaming"|"wireless-usage-data"|"wireless-usage-data-africa"|"wireless-usage-data-asia"|"wireless-usage-data-centralandsouthamerica"|"wireless-usage-data-custom-additionalmb"|"wireless-usage-data-custom-first5mb"|"wireless-usage-data-domestic-roaming"|"wireless-usage-data-europe"|"wireless-usage-data-individual-additionalgb"|"wireless-usage-data-individual-firstgb"|"wireless-usage-data-international-roaming-canada"|"wireless-usage-data-international-roaming-india"|"wireless-usage-data-international-roaming-mexico"|"wireless-usage-data-northamerica"|"wireless-usage-data-oceania"|"wireless-usage-data-pooled"|"wireless-usage-data-pooled-downlink"|"wireless-usage-data-pooled-uplink"|"wireless-usage-mrc"|"wireless-usage-mrc-custom"|"wireless-usage-mrc-individual"|"wireless-usage-mrc-pooled"|"wireless-usage-mrc-suspended"|"wireless-usage-sms"|"wireless-usage-voice"; + +public type CreateQueueRequest record { + # A descriptive string that you created to describe this resource. It can be up to 64 characters long. + string FriendlyName; + # The maximum number of calls allowed to be in the queue. The default is 1000. The maximum is 5000. + int MaxSize?; +}; + +public type Available_phone_number_voip record { + # A formatted version of the phone number. + string? friendly_name?; + # The 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. + string? phone_number?; + # The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) of this phone number. Available for only phone numbers from the US and Canada. + string? lata?; + # The locality or city of this phone number's location. + string? locality?; + # The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) of this phone number. Available for only phone numbers from the US and Canada. + string? rate_center?; + # The latitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? latitude?; + # The longitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? longitude?; + # The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada. + string? region?; + # The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada. + string? postal_code?; + # The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of this phone number. + string? iso_country?; + # The type of [Address](https://www.twilio.com/docs/usage/api/address) resource the phone number requires. Can be: `none`, `any`, `local`, or `foreign`. `none` means no address is required. `any` means an address is required, but it can be anywhere in the world. `local` means an address in the phone number's country is required. `foreign` means an address outside of the phone number's country is required. + string? address_requirements?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are: `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Available_phone_number_local_capabilities? capabilities?; +}; + +public type ListKeyResponse record { + Key[] keys?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Connect_app_enum_permission "get-all"|"post-all"; + +public type Usage_record_all_time_enum_category "a2p-registration-fees"|"agent-conference"|"amazon-polly"|"answering-machine-detection"|"authy-authentications"|"authy-calls-outbound"|"authy-monthly-fees"|"authy-phone-intelligence"|"authy-phone-verifications"|"authy-sms-outbound"|"call-progess-events"|"calleridlookups"|"calls"|"calls-client"|"calls-globalconference"|"calls-inbound"|"calls-inbound-local"|"calls-inbound-mobile"|"calls-inbound-tollfree"|"calls-outbound"|"calls-pay-verb-transactions"|"calls-recordings"|"calls-sip"|"calls-sip-inbound"|"calls-sip-outbound"|"calls-transfers"|"carrier-lookups"|"conversations"|"conversations-api-requests"|"conversations-conversation-events"|"conversations-endpoint-connectivity"|"conversations-events"|"conversations-participant-events"|"conversations-participants"|"cps"|"flex-usage"|"fraud-lookups"|"group-rooms"|"group-rooms-data-track"|"group-rooms-encrypted-media-recorded"|"group-rooms-media-downloaded"|"group-rooms-media-recorded"|"group-rooms-media-routed"|"group-rooms-media-stored"|"group-rooms-participant-minutes"|"group-rooms-recorded-minutes"|"imp-v1-usage"|"lookups"|"marketplace"|"marketplace-algorithmia-named-entity-recognition"|"marketplace-cadence-transcription"|"marketplace-cadence-translation"|"marketplace-capio-speech-to-text"|"marketplace-convriza-ababa"|"marketplace-deepgram-phrase-detector"|"marketplace-digital-segment-business-info"|"marketplace-facebook-offline-conversions"|"marketplace-google-speech-to-text"|"marketplace-ibm-watson-message-insights"|"marketplace-ibm-watson-message-sentiment"|"marketplace-ibm-watson-recording-analysis"|"marketplace-ibm-watson-tone-analyzer"|"marketplace-icehook-systems-scout"|"marketplace-infogroup-dataaxle-bizinfo"|"marketplace-keen-io-contact-center-analytics"|"marketplace-marchex-cleancall"|"marketplace-marchex-sentiment-analysis-for-sms"|"marketplace-marketplace-nextcaller-social-id"|"marketplace-mobile-commons-opt-out-classifier"|"marketplace-nexiwave-voicemail-to-text"|"marketplace-nextcaller-advanced-caller-identification"|"marketplace-nomorobo-spam-score"|"marketplace-payfone-tcpa-compliance"|"marketplace-remeeting-automatic-speech-recognition"|"marketplace-tcpa-defense-solutions-blacklist-feed"|"marketplace-telo-opencnam"|"marketplace-truecnam-true-spam"|"marketplace-twilio-caller-name-lookup-us"|"marketplace-twilio-carrier-information-lookup"|"marketplace-voicebase-pci"|"marketplace-voicebase-transcription"|"marketplace-voicebase-transcription-custom-vocabulary"|"marketplace-whitepages-pro-caller-identification"|"marketplace-whitepages-pro-phone-intelligence"|"marketplace-whitepages-pro-phone-reputation"|"marketplace-wolfarm-spoken-results"|"marketplace-wolfram-short-answer"|"marketplace-ytica-contact-center-reporting-analytics"|"mediastorage"|"mms"|"mms-inbound"|"mms-inbound-longcode"|"mms-inbound-shortcode"|"mms-messages-carrierfees"|"mms-outbound"|"mms-outbound-longcode"|"mms-outbound-shortcode"|"monitor-reads"|"monitor-storage"|"monitor-writes"|"notify"|"notify-actions-attempts"|"notify-channels"|"number-format-lookups"|"pchat"|"pchat-users"|"peer-to-peer-rooms-participant-minutes"|"pfax"|"pfax-minutes"|"pfax-minutes-inbound"|"pfax-minutes-outbound"|"pfax-pages"|"phonenumbers"|"phonenumbers-cps"|"phonenumbers-emergency"|"phonenumbers-local"|"phonenumbers-mobile"|"phonenumbers-setups"|"phonenumbers-tollfree"|"premiumsupport"|"proxy"|"proxy-active-sessions"|"pstnconnectivity"|"pv"|"pv-composition-media-downloaded"|"pv-composition-media-encrypted"|"pv-composition-media-stored"|"pv-composition-minutes"|"pv-recording-compositions"|"pv-room-participants"|"pv-room-participants-au1"|"pv-room-participants-br1"|"pv-room-participants-ie1"|"pv-room-participants-jp1"|"pv-room-participants-sg1"|"pv-room-participants-us1"|"pv-room-participants-us2"|"pv-rooms"|"pv-sip-endpoint-registrations"|"recordings"|"recordingstorage"|"rooms-group-bandwidth"|"rooms-group-minutes"|"rooms-peer-to-peer-minutes"|"shortcodes"|"shortcodes-customerowned"|"shortcodes-mms-enablement"|"shortcodes-mps"|"shortcodes-random"|"shortcodes-uk"|"shortcodes-vanity"|"small-group-rooms"|"small-group-rooms-data-track"|"small-group-rooms-participant-minutes"|"sms"|"sms-inbound"|"sms-inbound-longcode"|"sms-inbound-shortcode"|"sms-messages-carrierfees"|"sms-messages-features"|"sms-messages-features-senderid"|"sms-outbound"|"sms-outbound-content-inspection"|"sms-outbound-longcode"|"sms-outbound-shortcode"|"speech-recognition"|"studio-engagements"|"sync"|"sync-actions"|"sync-endpoint-hours"|"sync-endpoint-hours-above-daily-cap"|"taskrouter-tasks"|"totalprice"|"transcriptions"|"trunking-cps"|"trunking-emergency-calls"|"trunking-origination"|"trunking-origination-local"|"trunking-origination-mobile"|"trunking-origination-tollfree"|"trunking-recordings"|"trunking-secure"|"trunking-termination"|"tts-google"|"turnmegabytes"|"turnmegabytes-australia"|"turnmegabytes-brasil"|"turnmegabytes-germany"|"turnmegabytes-india"|"turnmegabytes-ireland"|"turnmegabytes-japan"|"turnmegabytes-singapore"|"turnmegabytes-useast"|"turnmegabytes-uswest"|"twilio-interconnect"|"verify-push"|"verify-totp"|"verify-whatsapp-conversations-business-initiated"|"video-recordings"|"virtual-agent"|"voice-insights"|"voice-insights-client-insights-on-demand-minute"|"voice-insights-ptsn-insights-on-demand-minute"|"voice-insights-sip-interface-insights-on-demand-minute"|"voice-insights-sip-trunking-insights-on-demand-minute"|"voice-intelligence"|"voice-intelligence-transcription"|"voice-intelligence-operators"|"wireless"|"wireless-orders"|"wireless-orders-artwork"|"wireless-orders-bulk"|"wireless-orders-esim"|"wireless-orders-starter"|"wireless-usage"|"wireless-usage-commands"|"wireless-usage-commands-africa"|"wireless-usage-commands-asia"|"wireless-usage-commands-centralandsouthamerica"|"wireless-usage-commands-europe"|"wireless-usage-commands-home"|"wireless-usage-commands-northamerica"|"wireless-usage-commands-oceania"|"wireless-usage-commands-roaming"|"wireless-usage-data"|"wireless-usage-data-africa"|"wireless-usage-data-asia"|"wireless-usage-data-centralandsouthamerica"|"wireless-usage-data-custom-additionalmb"|"wireless-usage-data-custom-first5mb"|"wireless-usage-data-domestic-roaming"|"wireless-usage-data-europe"|"wireless-usage-data-individual-additionalgb"|"wireless-usage-data-individual-firstgb"|"wireless-usage-data-international-roaming-canada"|"wireless-usage-data-international-roaming-india"|"wireless-usage-data-international-roaming-mexico"|"wireless-usage-data-northamerica"|"wireless-usage-data-oceania"|"wireless-usage-data-pooled"|"wireless-usage-data-pooled-downlink"|"wireless-usage-data-pooled-uplink"|"wireless-usage-mrc"|"wireless-usage-mrc-custom"|"wireless-usage-mrc-individual"|"wireless-usage-mrc-pooled"|"wireless-usage-mrc-suspended"|"wireless-usage-sms"|"wireless-usage-voice"; + +public type CallCall_feedback record { + # The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + string? account_sid?; + # The date that this resource was created, given in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_created?; + # The date that this resource was last updated, given in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_updated?; + # A list of issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`. + Call_feedback_enum_issues[]? issues?; + # `1` to `5` quality score where `1` represents imperfect experience and `5` represents a perfect call. + int? quality_score?; + # A 34 character string that uniquely identifies this resource. + string? sid?; +}; + +public type CallUser_defined_message record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created User Defined Message. + string? account_sid?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the User Defined Message is associated with. + string? call_sid?; + # The SID that uniquely identifies this User Defined Message. + string? sid?; + # The date that this User Defined Message was created, given in RFC 2822 format. + string? date_created?; +}; + +public type Message_enum_traffic_type "free"; + +public type Usage_record_yesterday_enum_category "a2p-registration-fees"|"agent-conference"|"amazon-polly"|"answering-machine-detection"|"authy-authentications"|"authy-calls-outbound"|"authy-monthly-fees"|"authy-phone-intelligence"|"authy-phone-verifications"|"authy-sms-outbound"|"call-progess-events"|"calleridlookups"|"calls"|"calls-client"|"calls-globalconference"|"calls-inbound"|"calls-inbound-local"|"calls-inbound-mobile"|"calls-inbound-tollfree"|"calls-outbound"|"calls-pay-verb-transactions"|"calls-recordings"|"calls-sip"|"calls-sip-inbound"|"calls-sip-outbound"|"calls-transfers"|"carrier-lookups"|"conversations"|"conversations-api-requests"|"conversations-conversation-events"|"conversations-endpoint-connectivity"|"conversations-events"|"conversations-participant-events"|"conversations-participants"|"cps"|"flex-usage"|"fraud-lookups"|"group-rooms"|"group-rooms-data-track"|"group-rooms-encrypted-media-recorded"|"group-rooms-media-downloaded"|"group-rooms-media-recorded"|"group-rooms-media-routed"|"group-rooms-media-stored"|"group-rooms-participant-minutes"|"group-rooms-recorded-minutes"|"imp-v1-usage"|"lookups"|"marketplace"|"marketplace-algorithmia-named-entity-recognition"|"marketplace-cadence-transcription"|"marketplace-cadence-translation"|"marketplace-capio-speech-to-text"|"marketplace-convriza-ababa"|"marketplace-deepgram-phrase-detector"|"marketplace-digital-segment-business-info"|"marketplace-facebook-offline-conversions"|"marketplace-google-speech-to-text"|"marketplace-ibm-watson-message-insights"|"marketplace-ibm-watson-message-sentiment"|"marketplace-ibm-watson-recording-analysis"|"marketplace-ibm-watson-tone-analyzer"|"marketplace-icehook-systems-scout"|"marketplace-infogroup-dataaxle-bizinfo"|"marketplace-keen-io-contact-center-analytics"|"marketplace-marchex-cleancall"|"marketplace-marchex-sentiment-analysis-for-sms"|"marketplace-marketplace-nextcaller-social-id"|"marketplace-mobile-commons-opt-out-classifier"|"marketplace-nexiwave-voicemail-to-text"|"marketplace-nextcaller-advanced-caller-identification"|"marketplace-nomorobo-spam-score"|"marketplace-payfone-tcpa-compliance"|"marketplace-remeeting-automatic-speech-recognition"|"marketplace-tcpa-defense-solutions-blacklist-feed"|"marketplace-telo-opencnam"|"marketplace-truecnam-true-spam"|"marketplace-twilio-caller-name-lookup-us"|"marketplace-twilio-carrier-information-lookup"|"marketplace-voicebase-pci"|"marketplace-voicebase-transcription"|"marketplace-voicebase-transcription-custom-vocabulary"|"marketplace-whitepages-pro-caller-identification"|"marketplace-whitepages-pro-phone-intelligence"|"marketplace-whitepages-pro-phone-reputation"|"marketplace-wolfarm-spoken-results"|"marketplace-wolfram-short-answer"|"marketplace-ytica-contact-center-reporting-analytics"|"mediastorage"|"mms"|"mms-inbound"|"mms-inbound-longcode"|"mms-inbound-shortcode"|"mms-messages-carrierfees"|"mms-outbound"|"mms-outbound-longcode"|"mms-outbound-shortcode"|"monitor-reads"|"monitor-storage"|"monitor-writes"|"notify"|"notify-actions-attempts"|"notify-channels"|"number-format-lookups"|"pchat"|"pchat-users"|"peer-to-peer-rooms-participant-minutes"|"pfax"|"pfax-minutes"|"pfax-minutes-inbound"|"pfax-minutes-outbound"|"pfax-pages"|"phonenumbers"|"phonenumbers-cps"|"phonenumbers-emergency"|"phonenumbers-local"|"phonenumbers-mobile"|"phonenumbers-setups"|"phonenumbers-tollfree"|"premiumsupport"|"proxy"|"proxy-active-sessions"|"pstnconnectivity"|"pv"|"pv-composition-media-downloaded"|"pv-composition-media-encrypted"|"pv-composition-media-stored"|"pv-composition-minutes"|"pv-recording-compositions"|"pv-room-participants"|"pv-room-participants-au1"|"pv-room-participants-br1"|"pv-room-participants-ie1"|"pv-room-participants-jp1"|"pv-room-participants-sg1"|"pv-room-participants-us1"|"pv-room-participants-us2"|"pv-rooms"|"pv-sip-endpoint-registrations"|"recordings"|"recordingstorage"|"rooms-group-bandwidth"|"rooms-group-minutes"|"rooms-peer-to-peer-minutes"|"shortcodes"|"shortcodes-customerowned"|"shortcodes-mms-enablement"|"shortcodes-mps"|"shortcodes-random"|"shortcodes-uk"|"shortcodes-vanity"|"small-group-rooms"|"small-group-rooms-data-track"|"small-group-rooms-participant-minutes"|"sms"|"sms-inbound"|"sms-inbound-longcode"|"sms-inbound-shortcode"|"sms-messages-carrierfees"|"sms-messages-features"|"sms-messages-features-senderid"|"sms-outbound"|"sms-outbound-content-inspection"|"sms-outbound-longcode"|"sms-outbound-shortcode"|"speech-recognition"|"studio-engagements"|"sync"|"sync-actions"|"sync-endpoint-hours"|"sync-endpoint-hours-above-daily-cap"|"taskrouter-tasks"|"totalprice"|"transcriptions"|"trunking-cps"|"trunking-emergency-calls"|"trunking-origination"|"trunking-origination-local"|"trunking-origination-mobile"|"trunking-origination-tollfree"|"trunking-recordings"|"trunking-secure"|"trunking-termination"|"tts-google"|"turnmegabytes"|"turnmegabytes-australia"|"turnmegabytes-brasil"|"turnmegabytes-germany"|"turnmegabytes-india"|"turnmegabytes-ireland"|"turnmegabytes-japan"|"turnmegabytes-singapore"|"turnmegabytes-useast"|"turnmegabytes-uswest"|"twilio-interconnect"|"verify-push"|"verify-totp"|"verify-whatsapp-conversations-business-initiated"|"video-recordings"|"virtual-agent"|"voice-insights"|"voice-insights-client-insights-on-demand-minute"|"voice-insights-ptsn-insights-on-demand-minute"|"voice-insights-sip-interface-insights-on-demand-minute"|"voice-insights-sip-trunking-insights-on-demand-minute"|"voice-intelligence"|"voice-intelligence-transcription"|"voice-intelligence-operators"|"wireless"|"wireless-orders"|"wireless-orders-artwork"|"wireless-orders-bulk"|"wireless-orders-esim"|"wireless-orders-starter"|"wireless-usage"|"wireless-usage-commands"|"wireless-usage-commands-africa"|"wireless-usage-commands-asia"|"wireless-usage-commands-centralandsouthamerica"|"wireless-usage-commands-europe"|"wireless-usage-commands-home"|"wireless-usage-commands-northamerica"|"wireless-usage-commands-oceania"|"wireless-usage-commands-roaming"|"wireless-usage-data"|"wireless-usage-data-africa"|"wireless-usage-data-asia"|"wireless-usage-data-centralandsouthamerica"|"wireless-usage-data-custom-additionalmb"|"wireless-usage-data-custom-first5mb"|"wireless-usage-data-domestic-roaming"|"wireless-usage-data-europe"|"wireless-usage-data-individual-additionalgb"|"wireless-usage-data-individual-firstgb"|"wireless-usage-data-international-roaming-canada"|"wireless-usage-data-international-roaming-india"|"wireless-usage-data-international-roaming-mexico"|"wireless-usage-data-northamerica"|"wireless-usage-data-oceania"|"wireless-usage-data-pooled"|"wireless-usage-data-pooled-downlink"|"wireless-usage-data-pooled-uplink"|"wireless-usage-mrc"|"wireless-usage-mrc-custom"|"wireless-usage-mrc-individual"|"wireless-usage-mrc-pooled"|"wireless-usage-mrc-suspended"|"wireless-usage-sms"|"wireless-usage-voice"; + +public type ListSipAuthCallsCredentialListMappingResponse record { + SipSip_domainSip_authSip_auth_callsSip_auth_calls_credential_list_mapping[] contents?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CallCall_feedback_summary record { + # The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + string? account_sid?; + # The total number of calls. + int? call_count?; + # The total number of calls with a feedback entry. + int? call_feedback_count?; + # The date that this resource was created, given in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_created?; + # The date that this resource was last updated, given in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_updated?; + # The last date for which feedback entries are included in this Feedback Summary, formatted as `YYYY-MM-DD` and specified in UTC. + string? end_date?; + # Whether the feedback summary includes subaccounts; `true` if it does, otherwise `false`. + boolean? include_subaccounts?; + # A list of issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, or `one-way-audio`. + anydata[]? issues?; + # The average QualityScore of the feedback entries. + decimal? quality_score_average?; + # The median QualityScore of the feedback entries. + decimal? quality_score_median?; + # The standard deviation of the quality scores. + decimal? quality_score_standard_deviation?; + # A 34 character string that uniquely identifies this resource. + string? sid?; + # The first date for which feedback entries are included in this feedback summary, formatted as `YYYY-MM-DD` and specified in UTC. + string? start_date?; + Call_feedback_summary_enum_status status?; +}; + +public type Signing_key record { + string? sid?; + string? friendly_name?; + string? date_created?; + string? date_updated?; +}; + +public type CreateIncomingPhoneNumberLocalRequest record { + # The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234. + string PhoneNumber; + # The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. + string ApiVersion?; + # A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. + string FriendlyName?; + # The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string SmsApplicationSid?; + # The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsFallbackMethod?; + # The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. + string SmsFallbackUrl?; + # The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsMethod?; + # The URL we should call when the new phone number receives an incoming SMS message. + string SmsUrl?; + # The URL we should call using the `status_callback_method` to send status information to your application. + string StatusCallback?; + # The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string VoiceApplicationSid?; + # Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. + boolean VoiceCallerIdLookup?; + # The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceFallbackMethod?; + # The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + string VoiceFallbackUrl?; + # The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceMethod?; + # The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. + string VoiceUrl?; + # The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^RI[0-9a-fA-F]{32}$`} + string IdentitySid?; + # The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AD[0-9a-fA-F]{32}$`} + string AddressSid?; + Incoming_phone_number_local_enum_emergency_status EmergencyStatus?; + # The SID of the emergency address configuration to use for emergency calling from the new phone number. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AD[0-9a-fA-F]{32}$`} + string EmergencyAddressSid?; + # The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^TK[0-9a-fA-F]{32}$`} + string TrunkSid?; + Incoming_phone_number_local_enum_voice_receive_mode VoiceReceiveMode?; + # The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^BU[0-9a-fA-F]{32}$`} + string BundleSid?; +}; + +public type Message_enum_risk_check "enable"|"disable"; + +public type UsageUsage_recordUsage_record_yearly record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage. + string? account_sid?; + # The API version used to create the resource. + string? api_version?; + # Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + string? as_of?; + Usage_record_yearly_enum_category category?; + # The number of usage events, such as the number of calls. + string? count?; + # The units in which `count` is measured, such as `calls` for calls or `messages` for SMS. + string? count_unit?; + # A plain-language description of the usage category. + string? description?; + # The last date for which usage is included in the UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? end_date?; + # The total price of the usage in the currency specified in `price_unit` and associated with the account. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format, such as `usd`, `eur`, and `jpy`. + string? price_unit?; + # The first date for which usage is included in this UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? start_date?; + # A list of related resources identified by their URIs. For more information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + record {}? subresource_uris?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The amount used to bill usage and measured in units described in `usage_unit`. + string? usage?; + # The units in which `usage` is measured, such as `minutes` for calls or `messages` for SMS. + string? usage_unit?; +}; + +public type Available_phone_number_national record { + # A formatted version of the phone number. + string? friendly_name?; + # The 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. + string? phone_number?; + # The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) of this phone number. Available for only phone numbers from the US and Canada. + string? lata?; + # The locality or city of this phone number's location. + string? locality?; + # The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) of this phone number. Available for only phone numbers from the US and Canada. + string? rate_center?; + # The latitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? latitude?; + # The longitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? longitude?; + # The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada. + string? region?; + # The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada. + string? postal_code?; + # The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of this phone number. + string? iso_country?; + # The type of [Address](https://www.twilio.com/docs/usage/api/address) resource the phone number requires. Can be: `none`, `any`, `local`, or `foreign`. `none` means no address is required. `any` means an address is required, but it can be anywhere in the world. `local` means an address in the phone number's country is required. `foreign` means an address outside of the phone number's country is required. + string? address_requirements?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are: `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Available_phone_number_local_capabilities? capabilities?; +}; + +public type CreateIncomingPhoneNumberAssignedAddOnRequest record { + # The SID that identifies the Add-on installation. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^XE[0-9a-fA-F]{32}$`} + string InstalledAddOnSid; +}; + +public type UsageUsage_trigger record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that the trigger monitors. + string? account_sid?; + # The API version used to create the resource. + string? api_version?; + # The HTTP method we use to call `callback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" callback_method?; + # The URL we call using the `callback_method` when the trigger fires. + string? callback_url?; + # The current value of the field the trigger is watching. + string? current_value?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the trigger was last fired specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_fired?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the trigger. + string? friendly_name?; + Usage_trigger_enum_recurring recurring?; + # The unique string that that we created to identify the UsageTrigger resource. + string? sid?; + Usage_trigger_enum_trigger_field trigger_by?; + # The value at which the trigger will fire. Must be a positive, numeric value. + string? trigger_value?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + Usage_trigger_enum_usage_category usage_category?; + # The URI of the [UsageRecord](https://www.twilio.com/docs/usage/api/usage-record) resource this trigger watches, relative to `https://api.twilio.com`. + string? usage_record_uri?; +}; + +public type ListConferenceResponse record { + Conference[] conferences?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type UpdateSipCredentialRequest record { + # The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`) + string Password?; +}; + +public type RecordingRecording_add_on_resultRecording_add_on_result_payload record { + # The unique string that that we created to identify the Recording AddOnResult Payload resource. + string? sid?; + # The SID of the AddOnResult to which the payload belongs. + string? add_on_result_sid?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resource. + string? account_sid?; + # The string provided by the vendor that describes the payload. + string? label?; + # The SID of the Add-on to which the result belongs. + string? add_on_sid?; + # The SID of the Add-on configuration. + string? add_on_configuration_sid?; + # The MIME type of the payload. + string? content_type?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The SID of the recording to which the AddOnResult resource that contains the payload belongs. + string? reference_sid?; + # A list of related resources identified by their relative URIs. + record {}? subresource_uris?; +}; + +public type ListRecordingResponse record { + Recording[] recordings?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CreateTokenRequest record { + # The duration in seconds for which the generated credentials are valid. The default value is 86400 (24 hours). + int Ttl?; +}; + +public type Call_enum_update_status "canceled"|"completed"; + +public type ListUsageTriggerResponse record { + UsageUsage_trigger[] usage_triggers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type UpdateApplicationRequest record { + # A descriptive string that you create to describe the resource. It can be up to 64 characters long. + string FriendlyName?; + # The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is your account's default API version. + string ApiVersion?; + # The URL we should call when the phone number assigned to this application receives a call. + string VoiceUrl?; + # The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceMethod?; + # The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + string VoiceFallbackUrl?; + # The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceFallbackMethod?; + # The URL we should call using the `status_callback_method` to send status information to your application. + string StatusCallback?; + # The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`. + boolean VoiceCallerIdLookup?; + # The URL we should call when the phone number receives an incoming SMS message. + string SmsUrl?; + # The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsMethod?; + # The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`. + string SmsFallbackUrl?; + # The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsFallbackMethod?; + # Same as message_status_callback: The URL we should call using a POST method to send status information about SMS messages sent by the application. Deprecated, included for backwards compatibility. + string SmsStatusCallback?; + # The URL we should call using a POST method to send message status information to your application. + string MessageStatusCallback?; + # Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`. + boolean PublicApplicationConnectEnabled?; +}; + +public type SipSip_domainSip_credential_list_mapping record { + # The unique id of the Account that is responsible for this resource. + string? account_sid?; + # The date that this resource was created, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_created?; + # The date that this resource was last updated, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_updated?; + # The unique string that is created to identify the SipDomain resource. + string? domain_sid?; + # A human readable descriptive text for this resource, up to 64 characters long. + string? friendly_name?; + # A 34 character string that uniquely identifies this resource. + string? sid?; + # The URI for this resource, relative to `https://api.twilio.com` + string? uri?; +}; + +public type ListSipCredentialListResponse record { + SipSip_credential_list[] credential_lists?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Sip record { +}; + +public type ListIncomingPhoneNumberMobileResponse record { + Incoming_phone_numberIncoming_phone_number_mobile[] incoming_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CreateNewKeyRequest record { + # A descriptive string that you create to describe the resource. It can be up to 64 characters long. + string FriendlyName?; +}; + +public type SipSip_domainSip_authSip_auth_callsSip_auth_calls_ip_access_control_list_mapping record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IpAccessControlListMapping resource. + string? account_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The unique string that that we created to identify the IpAccessControlListMapping resource. + string? sid?; +}; + +public type Call_feedback_summary_enum_status "queued"|"in-progress"|"completed"|"failed"; + +public type Recording_transcription_enum_status "in-progress"|"completed"|"failed"; + +public type ListUsageRecordDailyResponse record { + UsageUsage_recordUsage_record_daily[] usage_records?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListIncomingPhoneNumberAssignedAddOnResponse record { + Incoming_phone_numberIncoming_phone_number_assigned_add_on[] assigned_add_ons?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListSipCredentialResponse record { + SipSip_credential_listSip_credential[] credentials?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type SipSip_domainSip_auth record { +}; + +public type ListCallEventResponse record { + CallCall_event[] events?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CreateAddressRequest record { + # The name to associate with the new address. + string CustomerName; + # The number and street address of the new address. + string Street; + # The city of the new address. + string City; + # The state or region of the new address. + string Region; + # The postal code of the new address. + string PostalCode; + # The ISO country code of the new address. + string IsoCountry; + # A descriptive string that you create to describe the new address. It can be up to 64 characters long. + string FriendlyName?; + # Whether to enable emergency calling on the new address. Can be: `true` or `false`. + boolean EmergencyEnabled?; + # Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide. + boolean AutoCorrectAddress?; + # The additional number and street address of the address. + string StreetSecondary?; +}; + +public type CreateCallRecordingRequest record { + # The recording status events on which we should call the `recording_status_callback` URL. Can be: `in-progress`, `completed` and `absent` and the default is `completed`. Separate multiple event values with a space. + string[] RecordingStatusCallbackEvent?; + # The URL we should call using the `recording_status_callback_method` on each recording event specified in `recording_status_callback_event`. For more information, see [RecordingStatusCallback parameters](https://www.twilio.com/docs/voice/api/recording#recordingstatuscallback). + string RecordingStatusCallback?; + # The HTTP method we should use to call `recording_status_callback`. Can be: `GET` or `POST` and the default is `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" RecordingStatusCallbackMethod?; + # Whether to trim any leading and trailing silence in the recording. Can be: `trim-silence` or `do-not-trim` and the default is `do-not-trim`. `trim-silence` trims the silence from the beginning and end of the recording and `do-not-trim` does not. + string Trim?; + # The number of channels used in the recording. Can be: `mono` or `dual` and the default is `mono`. `mono` records all parties of the call into one channel. `dual` records each party of a 2-party call into separate channels. + string RecordingChannels?; + # The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio. + string RecordingTrack?; +}; + +public type Incoming_phone_numberIncoming_phone_number_assigned_add_onIncoming_phone_number_assigned_add_on_extension record { + # The unique string that that we created to identify the resource. + string? sid?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource. + string? account_sid?; + # The SID of the Phone Number to which the Add-on is assigned. + string? resource_sid?; + # The SID that uniquely identifies the assigned Add-on installation. + string? assigned_add_on_sid?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # A string that you assigned to describe the Product this Extension is used within. + string? product_name?; + # An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. + string? unique_name?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # Whether the Extension will be invoked. + boolean? enabled?; +}; + +public type Incoming_phone_number_toll_free_enum_emergency_status "Active"|"Inactive"; + +public type ListMemberResponse record { + QueueMember[] queue_members?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +# The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. +public type Incoming_phone_number_capabilities record { + boolean mms?; + boolean sms?; + boolean voice?; + boolean fax?; +}; + +public type ConferenceConference_recording record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resource. + string? account_sid?; + # The API version used to create the recording. + string? api_version?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Conference Recording resource is associated with. + string? call_sid?; + # The Conference SID that identifies the conference associated with the recording. + string? conference_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The start time of the recording in GMT and in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? start_time?; + # The length of the recording in seconds. + string? duration?; + # The unique string that that we created to identify the Conference Recording resource. + string? sid?; + # The one-time cost of creating the recording in the `price_unit` currency. + string? price?; + # The currency used in the `price` property. Example: `USD`. + string? price_unit?; + Conference_recording_enum_status status?; + # The number of channels in the final recording file. Can be: `1`, or `2`. Separating a two leg call into two separate channels of the recording file is supported in [Dial](https://www.twilio.com/docs/voice/twiml/dial#attributes-record) and [Outbound Rest API](https://www.twilio.com/docs/voice/make-calls) record options. + int? channels?; + Conference_recording_enum_source 'source?; + # The error code that describes why the recording is `absent`. The error code is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). This value is null if the recording `status` is not `absent`. + int? error_code?; + # How to decrypt the recording if it was encrypted using [Call Recording Encryption](https://www.twilio.com/docs/voice/tutorials/voice-recording-encryption) feature. + anydata? encryption_details?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type UpdateCallRequest record { + # The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). + string Url?; + # The HTTP method we should use when calling the `url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" Method?; + Call_enum_update_status Status?; + # The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored. + string FallbackUrl?; + # The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" FallbackMethod?; + # The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted). + string StatusCallback?; + # The HTTP method we should use when requesting the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # TwiML instructions for the call Twilio will use without fetching Twiml from url. Twiml and url parameters are mutually exclusive + string Twiml?; + # The maximum duration of the call in seconds. Constraints depend on account and configuration. + int TimeLimit?; +}; + +public type Usage_record_today_enum_category "a2p-registration-fees"|"agent-conference"|"amazon-polly"|"answering-machine-detection"|"authy-authentications"|"authy-calls-outbound"|"authy-monthly-fees"|"authy-phone-intelligence"|"authy-phone-verifications"|"authy-sms-outbound"|"call-progess-events"|"calleridlookups"|"calls"|"calls-client"|"calls-globalconference"|"calls-inbound"|"calls-inbound-local"|"calls-inbound-mobile"|"calls-inbound-tollfree"|"calls-outbound"|"calls-pay-verb-transactions"|"calls-recordings"|"calls-sip"|"calls-sip-inbound"|"calls-sip-outbound"|"calls-transfers"|"carrier-lookups"|"conversations"|"conversations-api-requests"|"conversations-conversation-events"|"conversations-endpoint-connectivity"|"conversations-events"|"conversations-participant-events"|"conversations-participants"|"cps"|"flex-usage"|"fraud-lookups"|"group-rooms"|"group-rooms-data-track"|"group-rooms-encrypted-media-recorded"|"group-rooms-media-downloaded"|"group-rooms-media-recorded"|"group-rooms-media-routed"|"group-rooms-media-stored"|"group-rooms-participant-minutes"|"group-rooms-recorded-minutes"|"imp-v1-usage"|"lookups"|"marketplace"|"marketplace-algorithmia-named-entity-recognition"|"marketplace-cadence-transcription"|"marketplace-cadence-translation"|"marketplace-capio-speech-to-text"|"marketplace-convriza-ababa"|"marketplace-deepgram-phrase-detector"|"marketplace-digital-segment-business-info"|"marketplace-facebook-offline-conversions"|"marketplace-google-speech-to-text"|"marketplace-ibm-watson-message-insights"|"marketplace-ibm-watson-message-sentiment"|"marketplace-ibm-watson-recording-analysis"|"marketplace-ibm-watson-tone-analyzer"|"marketplace-icehook-systems-scout"|"marketplace-infogroup-dataaxle-bizinfo"|"marketplace-keen-io-contact-center-analytics"|"marketplace-marchex-cleancall"|"marketplace-marchex-sentiment-analysis-for-sms"|"marketplace-marketplace-nextcaller-social-id"|"marketplace-mobile-commons-opt-out-classifier"|"marketplace-nexiwave-voicemail-to-text"|"marketplace-nextcaller-advanced-caller-identification"|"marketplace-nomorobo-spam-score"|"marketplace-payfone-tcpa-compliance"|"marketplace-remeeting-automatic-speech-recognition"|"marketplace-tcpa-defense-solutions-blacklist-feed"|"marketplace-telo-opencnam"|"marketplace-truecnam-true-spam"|"marketplace-twilio-caller-name-lookup-us"|"marketplace-twilio-carrier-information-lookup"|"marketplace-voicebase-pci"|"marketplace-voicebase-transcription"|"marketplace-voicebase-transcription-custom-vocabulary"|"marketplace-whitepages-pro-caller-identification"|"marketplace-whitepages-pro-phone-intelligence"|"marketplace-whitepages-pro-phone-reputation"|"marketplace-wolfarm-spoken-results"|"marketplace-wolfram-short-answer"|"marketplace-ytica-contact-center-reporting-analytics"|"mediastorage"|"mms"|"mms-inbound"|"mms-inbound-longcode"|"mms-inbound-shortcode"|"mms-messages-carrierfees"|"mms-outbound"|"mms-outbound-longcode"|"mms-outbound-shortcode"|"monitor-reads"|"monitor-storage"|"monitor-writes"|"notify"|"notify-actions-attempts"|"notify-channels"|"number-format-lookups"|"pchat"|"pchat-users"|"peer-to-peer-rooms-participant-minutes"|"pfax"|"pfax-minutes"|"pfax-minutes-inbound"|"pfax-minutes-outbound"|"pfax-pages"|"phonenumbers"|"phonenumbers-cps"|"phonenumbers-emergency"|"phonenumbers-local"|"phonenumbers-mobile"|"phonenumbers-setups"|"phonenumbers-tollfree"|"premiumsupport"|"proxy"|"proxy-active-sessions"|"pstnconnectivity"|"pv"|"pv-composition-media-downloaded"|"pv-composition-media-encrypted"|"pv-composition-media-stored"|"pv-composition-minutes"|"pv-recording-compositions"|"pv-room-participants"|"pv-room-participants-au1"|"pv-room-participants-br1"|"pv-room-participants-ie1"|"pv-room-participants-jp1"|"pv-room-participants-sg1"|"pv-room-participants-us1"|"pv-room-participants-us2"|"pv-rooms"|"pv-sip-endpoint-registrations"|"recordings"|"recordingstorage"|"rooms-group-bandwidth"|"rooms-group-minutes"|"rooms-peer-to-peer-minutes"|"shortcodes"|"shortcodes-customerowned"|"shortcodes-mms-enablement"|"shortcodes-mps"|"shortcodes-random"|"shortcodes-uk"|"shortcodes-vanity"|"small-group-rooms"|"small-group-rooms-data-track"|"small-group-rooms-participant-minutes"|"sms"|"sms-inbound"|"sms-inbound-longcode"|"sms-inbound-shortcode"|"sms-messages-carrierfees"|"sms-messages-features"|"sms-messages-features-senderid"|"sms-outbound"|"sms-outbound-content-inspection"|"sms-outbound-longcode"|"sms-outbound-shortcode"|"speech-recognition"|"studio-engagements"|"sync"|"sync-actions"|"sync-endpoint-hours"|"sync-endpoint-hours-above-daily-cap"|"taskrouter-tasks"|"totalprice"|"transcriptions"|"trunking-cps"|"trunking-emergency-calls"|"trunking-origination"|"trunking-origination-local"|"trunking-origination-mobile"|"trunking-origination-tollfree"|"trunking-recordings"|"trunking-secure"|"trunking-termination"|"tts-google"|"turnmegabytes"|"turnmegabytes-australia"|"turnmegabytes-brasil"|"turnmegabytes-germany"|"turnmegabytes-india"|"turnmegabytes-ireland"|"turnmegabytes-japan"|"turnmegabytes-singapore"|"turnmegabytes-useast"|"turnmegabytes-uswest"|"twilio-interconnect"|"verify-push"|"verify-totp"|"verify-whatsapp-conversations-business-initiated"|"video-recordings"|"virtual-agent"|"voice-insights"|"voice-insights-client-insights-on-demand-minute"|"voice-insights-ptsn-insights-on-demand-minute"|"voice-insights-sip-interface-insights-on-demand-minute"|"voice-insights-sip-trunking-insights-on-demand-minute"|"voice-intelligence"|"voice-intelligence-transcription"|"voice-intelligence-operators"|"wireless"|"wireless-orders"|"wireless-orders-artwork"|"wireless-orders-bulk"|"wireless-orders-esim"|"wireless-orders-starter"|"wireless-usage"|"wireless-usage-commands"|"wireless-usage-commands-africa"|"wireless-usage-commands-asia"|"wireless-usage-commands-centralandsouthamerica"|"wireless-usage-commands-europe"|"wireless-usage-commands-home"|"wireless-usage-commands-northamerica"|"wireless-usage-commands-oceania"|"wireless-usage-commands-roaming"|"wireless-usage-data"|"wireless-usage-data-africa"|"wireless-usage-data-asia"|"wireless-usage-data-centralandsouthamerica"|"wireless-usage-data-custom-additionalmb"|"wireless-usage-data-custom-first5mb"|"wireless-usage-data-domestic-roaming"|"wireless-usage-data-europe"|"wireless-usage-data-individual-additionalgb"|"wireless-usage-data-individual-firstgb"|"wireless-usage-data-international-roaming-canada"|"wireless-usage-data-international-roaming-india"|"wireless-usage-data-international-roaming-mexico"|"wireless-usage-data-northamerica"|"wireless-usage-data-oceania"|"wireless-usage-data-pooled"|"wireless-usage-data-pooled-downlink"|"wireless-usage-data-pooled-uplink"|"wireless-usage-mrc"|"wireless-usage-mrc-custom"|"wireless-usage-mrc-individual"|"wireless-usage-mrc-pooled"|"wireless-usage-mrc-suspended"|"wireless-usage-sms"|"wireless-usage-voice"; + +public type UpdateCallRecordingRequest record { + Call_recording_enum_status Status; + # Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`. + string PauseBehavior?; +}; + +public type Authorized_connect_app record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AuthorizedConnectApp resource. + string? account_sid?; + # The company name set for the Connect App. + string? connect_app_company_name?; + # A detailed description of the Connect App. + string? connect_app_description?; + # The name of the Connect App. + string? connect_app_friendly_name?; + # The public URL for the Connect App. + string? connect_app_homepage_url?; + # The SID that we assigned to the Connect App. + string? connect_app_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The set of permissions that you authorized for the Connect App. Can be: `get-all` or `post-all`. + Authorized_connect_app_enum_permission[]? permissions?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type ListNotificationResponse record { + Notification[] notifications?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListMediaResponse record { + MessageMedia[] media_list?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListUsageRecordResponse record { + UsageUsage_record[] usage_records?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Conference_enum_reason_conference_ended "conference-ended-via-api"|"participant-with-end-conference-on-exit-left"|"participant-with-end-conference-on-exit-kicked"|"last-participant-kicked"|"last-participant-left"; + +public type SipSip_ip_access_control_listSip_ip_address record { + # A 34 character string that uniquely identifies this resource. + string? sid?; + # The unique id of the Account that is responsible for this resource. + string? account_sid?; + # A human readable descriptive text for this resource, up to 255 characters long. + string? friendly_name?; + # An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. + string? ip_address?; + # An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used. + int? cidr_prefix_length?; + # The unique id of the IpAccessControlList resource that includes this resource. + string? ip_access_control_list_sid?; + # The date that this resource was created, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_created?; + # The date that this resource was last updated, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_updated?; + # The URI for this resource, relative to `https://api.twilio.com` + string? uri?; +}; + +public type ListIncomingPhoneNumberAssignedAddOnExtensionResponse record { + Incoming_phone_numberIncoming_phone_number_assigned_add_onIncoming_phone_number_assigned_add_on_extension[] extensions?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListSipAuthCallsIpAccessControlListMappingResponse record { + SipSip_domainSip_authSip_auth_callsSip_auth_calls_ip_access_control_list_mapping[] contents?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type UpdatePaymentsRequest record { + # A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions. This should be a unique string value per API call and can be a randomly generated. + string IdempotencyKey; + # Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the [Update](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-update) and [Complete/Cancel](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-cancelcomplete) POST requests. + string StatusCallback; + Payments_enum_capture Capture?; + Payments_enum_status Status?; +}; + +public type CreateAccountRequest record { + # A human readable description of the account to create, defaults to `SubAccount Created at {YYYY-MM-DD HH:MM meridian}` + string FriendlyName?; +}; + +public type CallCall_notification record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call Notification resource. + string? account_sid?; + # The API version used to create the Call Notification resource. + string? api_version?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Call Notification resource is associated with. + string? call_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # A unique error code for the error condition that is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + string? error_code?; + # An integer log level that corresponds to the type of notification: `0` is ERROR, `1` is WARNING. + string? log?; + # The date the notification was actually generated in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. Message buffering can cause this value to differ from `date_created`. + string? message_date?; + # The text of the notification. + string? message_text?; + # The URL for more information about the error condition. This value is a page in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + string? more_info?; + # The HTTP method used to generate the notification. If the notification was generated during a phone call, this is the HTTP Method used to request the resource on your server. If the notification was generated by your use of our REST API, this is the HTTP method used to call the resource on our servers. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" request_method?; + # The URL of the resource that generated the notification. If the notification was generated during a phone call, this is the URL of the resource on your server that caused the notification. If the notification was generated by your use of our REST API, this is the URL of the resource you called. + string? request_url?; + # The unique string that that we created to identify the Call Notification resource. + string? sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type ListSipAuthRegistrationsCredentialListMappingResponse record { + SipSip_domainSip_authSip_auth_registrationsSip_auth_registrations_credential_list_mapping[] contents?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type UpdateSigningKeyRequest record { + # + string FriendlyName?; +}; + +public type Incoming_phone_number_mobile_enum_address_requirement "none"|"any"|"local"|"foreign"; + +public type ListTranscriptionResponse record { + Transcription[] transcriptions?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Message_feedback_enum_outcome "confirmed"|"unconfirmed"; + +public type Call_enum_event "initiated"|"ringing"|"answered"|"completed"; + +public type Incoming_phone_number_mobile_enum_voice_receive_mode "voice"|"fax"; + +public type Usage_trigger_enum_usage_category "a2p-registration-fees"|"agent-conference"|"amazon-polly"|"answering-machine-detection"|"authy-authentications"|"authy-calls-outbound"|"authy-monthly-fees"|"authy-phone-intelligence"|"authy-phone-verifications"|"authy-sms-outbound"|"call-progess-events"|"calleridlookups"|"calls"|"calls-client"|"calls-globalconference"|"calls-inbound"|"calls-inbound-local"|"calls-inbound-mobile"|"calls-inbound-tollfree"|"calls-outbound"|"calls-pay-verb-transactions"|"calls-recordings"|"calls-sip"|"calls-sip-inbound"|"calls-sip-outbound"|"calls-transfers"|"carrier-lookups"|"conversations"|"conversations-api-requests"|"conversations-conversation-events"|"conversations-endpoint-connectivity"|"conversations-events"|"conversations-participant-events"|"conversations-participants"|"cps"|"flex-usage"|"fraud-lookups"|"group-rooms"|"group-rooms-data-track"|"group-rooms-encrypted-media-recorded"|"group-rooms-media-downloaded"|"group-rooms-media-recorded"|"group-rooms-media-routed"|"group-rooms-media-stored"|"group-rooms-participant-minutes"|"group-rooms-recorded-minutes"|"imp-v1-usage"|"lookups"|"marketplace"|"marketplace-algorithmia-named-entity-recognition"|"marketplace-cadence-transcription"|"marketplace-cadence-translation"|"marketplace-capio-speech-to-text"|"marketplace-convriza-ababa"|"marketplace-deepgram-phrase-detector"|"marketplace-digital-segment-business-info"|"marketplace-facebook-offline-conversions"|"marketplace-google-speech-to-text"|"marketplace-ibm-watson-message-insights"|"marketplace-ibm-watson-message-sentiment"|"marketplace-ibm-watson-recording-analysis"|"marketplace-ibm-watson-tone-analyzer"|"marketplace-icehook-systems-scout"|"marketplace-infogroup-dataaxle-bizinfo"|"marketplace-keen-io-contact-center-analytics"|"marketplace-marchex-cleancall"|"marketplace-marchex-sentiment-analysis-for-sms"|"marketplace-marketplace-nextcaller-social-id"|"marketplace-mobile-commons-opt-out-classifier"|"marketplace-nexiwave-voicemail-to-text"|"marketplace-nextcaller-advanced-caller-identification"|"marketplace-nomorobo-spam-score"|"marketplace-payfone-tcpa-compliance"|"marketplace-remeeting-automatic-speech-recognition"|"marketplace-tcpa-defense-solutions-blacklist-feed"|"marketplace-telo-opencnam"|"marketplace-truecnam-true-spam"|"marketplace-twilio-caller-name-lookup-us"|"marketplace-twilio-carrier-information-lookup"|"marketplace-voicebase-pci"|"marketplace-voicebase-transcription"|"marketplace-voicebase-transcription-custom-vocabulary"|"marketplace-whitepages-pro-caller-identification"|"marketplace-whitepages-pro-phone-intelligence"|"marketplace-whitepages-pro-phone-reputation"|"marketplace-wolfarm-spoken-results"|"marketplace-wolfram-short-answer"|"marketplace-ytica-contact-center-reporting-analytics"|"mediastorage"|"mms"|"mms-inbound"|"mms-inbound-longcode"|"mms-inbound-shortcode"|"mms-messages-carrierfees"|"mms-outbound"|"mms-outbound-longcode"|"mms-outbound-shortcode"|"monitor-reads"|"monitor-storage"|"monitor-writes"|"notify"|"notify-actions-attempts"|"notify-channels"|"number-format-lookups"|"pchat"|"pchat-users"|"peer-to-peer-rooms-participant-minutes"|"pfax"|"pfax-minutes"|"pfax-minutes-inbound"|"pfax-minutes-outbound"|"pfax-pages"|"phonenumbers"|"phonenumbers-cps"|"phonenumbers-emergency"|"phonenumbers-local"|"phonenumbers-mobile"|"phonenumbers-setups"|"phonenumbers-tollfree"|"premiumsupport"|"proxy"|"proxy-active-sessions"|"pstnconnectivity"|"pv"|"pv-composition-media-downloaded"|"pv-composition-media-encrypted"|"pv-composition-media-stored"|"pv-composition-minutes"|"pv-recording-compositions"|"pv-room-participants"|"pv-room-participants-au1"|"pv-room-participants-br1"|"pv-room-participants-ie1"|"pv-room-participants-jp1"|"pv-room-participants-sg1"|"pv-room-participants-us1"|"pv-room-participants-us2"|"pv-rooms"|"pv-sip-endpoint-registrations"|"recordings"|"recordingstorage"|"rooms-group-bandwidth"|"rooms-group-minutes"|"rooms-peer-to-peer-minutes"|"shortcodes"|"shortcodes-customerowned"|"shortcodes-mms-enablement"|"shortcodes-mps"|"shortcodes-random"|"shortcodes-uk"|"shortcodes-vanity"|"small-group-rooms"|"small-group-rooms-data-track"|"small-group-rooms-participant-minutes"|"sms"|"sms-inbound"|"sms-inbound-longcode"|"sms-inbound-shortcode"|"sms-messages-carrierfees"|"sms-messages-features"|"sms-messages-features-senderid"|"sms-outbound"|"sms-outbound-content-inspection"|"sms-outbound-longcode"|"sms-outbound-shortcode"|"speech-recognition"|"studio-engagements"|"sync"|"sync-actions"|"sync-endpoint-hours"|"sync-endpoint-hours-above-daily-cap"|"taskrouter-tasks"|"totalprice"|"transcriptions"|"trunking-cps"|"trunking-emergency-calls"|"trunking-origination"|"trunking-origination-local"|"trunking-origination-mobile"|"trunking-origination-tollfree"|"trunking-recordings"|"trunking-secure"|"trunking-termination"|"tts-google"|"turnmegabytes"|"turnmegabytes-australia"|"turnmegabytes-brasil"|"turnmegabytes-germany"|"turnmegabytes-india"|"turnmegabytes-ireland"|"turnmegabytes-japan"|"turnmegabytes-singapore"|"turnmegabytes-useast"|"turnmegabytes-uswest"|"twilio-interconnect"|"verify-push"|"verify-totp"|"verify-whatsapp-conversations-business-initiated"|"video-recordings"|"virtual-agent"|"voice-insights"|"voice-insights-client-insights-on-demand-minute"|"voice-insights-ptsn-insights-on-demand-minute"|"voice-insights-sip-interface-insights-on-demand-minute"|"voice-insights-sip-trunking-insights-on-demand-minute"|"voice-intelligence"|"voice-intelligence-transcription"|"voice-intelligence-operators"|"wireless"|"wireless-orders"|"wireless-orders-artwork"|"wireless-orders-bulk"|"wireless-orders-esim"|"wireless-orders-starter"|"wireless-usage"|"wireless-usage-commands"|"wireless-usage-commands-africa"|"wireless-usage-commands-asia"|"wireless-usage-commands-centralandsouthamerica"|"wireless-usage-commands-europe"|"wireless-usage-commands-home"|"wireless-usage-commands-northamerica"|"wireless-usage-commands-oceania"|"wireless-usage-commands-roaming"|"wireless-usage-data"|"wireless-usage-data-africa"|"wireless-usage-data-asia"|"wireless-usage-data-centralandsouthamerica"|"wireless-usage-data-custom-additionalmb"|"wireless-usage-data-custom-first5mb"|"wireless-usage-data-domestic-roaming"|"wireless-usage-data-europe"|"wireless-usage-data-individual-additionalgb"|"wireless-usage-data-individual-firstgb"|"wireless-usage-data-international-roaming-canada"|"wireless-usage-data-international-roaming-india"|"wireless-usage-data-international-roaming-mexico"|"wireless-usage-data-northamerica"|"wireless-usage-data-oceania"|"wireless-usage-data-pooled"|"wireless-usage-data-pooled-downlink"|"wireless-usage-data-pooled-uplink"|"wireless-usage-mrc"|"wireless-usage-mrc-custom"|"wireless-usage-mrc-individual"|"wireless-usage-mrc-pooled"|"wireless-usage-mrc-suspended"|"wireless-usage-sms"|"wireless-usage-voice"; + +public type ListQueueResponse record { + Queue[] queues?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Account record { + # The authorization token for this account. This token should be kept a secret, so no sharing. + string? auth_token?; + # The date that this account was created, in GMT in RFC 2822 format + string? date_created?; + # The date that this account was last updated, in GMT in RFC 2822 format. + string? date_updated?; + # A human readable description of this account, up to 64 characters long. By default the FriendlyName is your email address. + string? friendly_name?; + # The unique 34 character id that represents the parent of this account. The OwnerAccountSid of a parent account is it's own sid. + string? owner_account_sid?; + # A 34 character string that uniquely identifies this resource. + string? sid?; + Account_enum_status status?; + # A Map of various subresources available for the given Account Instance + record {}? subresource_uris?; + Account_enum_type 'type?; + # The URI for this resource, relative to `https://api.twilio.com` + string? uri?; +}; + +public type Stream_enum_track "inbound_track"|"outbound_track"|"both_tracks"; + +public type Usage_record_this_month_enum_category "a2p-registration-fees"|"agent-conference"|"amazon-polly"|"answering-machine-detection"|"authy-authentications"|"authy-calls-outbound"|"authy-monthly-fees"|"authy-phone-intelligence"|"authy-phone-verifications"|"authy-sms-outbound"|"call-progess-events"|"calleridlookups"|"calls"|"calls-client"|"calls-globalconference"|"calls-inbound"|"calls-inbound-local"|"calls-inbound-mobile"|"calls-inbound-tollfree"|"calls-outbound"|"calls-pay-verb-transactions"|"calls-recordings"|"calls-sip"|"calls-sip-inbound"|"calls-sip-outbound"|"calls-transfers"|"carrier-lookups"|"conversations"|"conversations-api-requests"|"conversations-conversation-events"|"conversations-endpoint-connectivity"|"conversations-events"|"conversations-participant-events"|"conversations-participants"|"cps"|"flex-usage"|"fraud-lookups"|"group-rooms"|"group-rooms-data-track"|"group-rooms-encrypted-media-recorded"|"group-rooms-media-downloaded"|"group-rooms-media-recorded"|"group-rooms-media-routed"|"group-rooms-media-stored"|"group-rooms-participant-minutes"|"group-rooms-recorded-minutes"|"imp-v1-usage"|"lookups"|"marketplace"|"marketplace-algorithmia-named-entity-recognition"|"marketplace-cadence-transcription"|"marketplace-cadence-translation"|"marketplace-capio-speech-to-text"|"marketplace-convriza-ababa"|"marketplace-deepgram-phrase-detector"|"marketplace-digital-segment-business-info"|"marketplace-facebook-offline-conversions"|"marketplace-google-speech-to-text"|"marketplace-ibm-watson-message-insights"|"marketplace-ibm-watson-message-sentiment"|"marketplace-ibm-watson-recording-analysis"|"marketplace-ibm-watson-tone-analyzer"|"marketplace-icehook-systems-scout"|"marketplace-infogroup-dataaxle-bizinfo"|"marketplace-keen-io-contact-center-analytics"|"marketplace-marchex-cleancall"|"marketplace-marchex-sentiment-analysis-for-sms"|"marketplace-marketplace-nextcaller-social-id"|"marketplace-mobile-commons-opt-out-classifier"|"marketplace-nexiwave-voicemail-to-text"|"marketplace-nextcaller-advanced-caller-identification"|"marketplace-nomorobo-spam-score"|"marketplace-payfone-tcpa-compliance"|"marketplace-remeeting-automatic-speech-recognition"|"marketplace-tcpa-defense-solutions-blacklist-feed"|"marketplace-telo-opencnam"|"marketplace-truecnam-true-spam"|"marketplace-twilio-caller-name-lookup-us"|"marketplace-twilio-carrier-information-lookup"|"marketplace-voicebase-pci"|"marketplace-voicebase-transcription"|"marketplace-voicebase-transcription-custom-vocabulary"|"marketplace-whitepages-pro-caller-identification"|"marketplace-whitepages-pro-phone-intelligence"|"marketplace-whitepages-pro-phone-reputation"|"marketplace-wolfarm-spoken-results"|"marketplace-wolfram-short-answer"|"marketplace-ytica-contact-center-reporting-analytics"|"mediastorage"|"mms"|"mms-inbound"|"mms-inbound-longcode"|"mms-inbound-shortcode"|"mms-messages-carrierfees"|"mms-outbound"|"mms-outbound-longcode"|"mms-outbound-shortcode"|"monitor-reads"|"monitor-storage"|"monitor-writes"|"notify"|"notify-actions-attempts"|"notify-channels"|"number-format-lookups"|"pchat"|"pchat-users"|"peer-to-peer-rooms-participant-minutes"|"pfax"|"pfax-minutes"|"pfax-minutes-inbound"|"pfax-minutes-outbound"|"pfax-pages"|"phonenumbers"|"phonenumbers-cps"|"phonenumbers-emergency"|"phonenumbers-local"|"phonenumbers-mobile"|"phonenumbers-setups"|"phonenumbers-tollfree"|"premiumsupport"|"proxy"|"proxy-active-sessions"|"pstnconnectivity"|"pv"|"pv-composition-media-downloaded"|"pv-composition-media-encrypted"|"pv-composition-media-stored"|"pv-composition-minutes"|"pv-recording-compositions"|"pv-room-participants"|"pv-room-participants-au1"|"pv-room-participants-br1"|"pv-room-participants-ie1"|"pv-room-participants-jp1"|"pv-room-participants-sg1"|"pv-room-participants-us1"|"pv-room-participants-us2"|"pv-rooms"|"pv-sip-endpoint-registrations"|"recordings"|"recordingstorage"|"rooms-group-bandwidth"|"rooms-group-minutes"|"rooms-peer-to-peer-minutes"|"shortcodes"|"shortcodes-customerowned"|"shortcodes-mms-enablement"|"shortcodes-mps"|"shortcodes-random"|"shortcodes-uk"|"shortcodes-vanity"|"small-group-rooms"|"small-group-rooms-data-track"|"small-group-rooms-participant-minutes"|"sms"|"sms-inbound"|"sms-inbound-longcode"|"sms-inbound-shortcode"|"sms-messages-carrierfees"|"sms-messages-features"|"sms-messages-features-senderid"|"sms-outbound"|"sms-outbound-content-inspection"|"sms-outbound-longcode"|"sms-outbound-shortcode"|"speech-recognition"|"studio-engagements"|"sync"|"sync-actions"|"sync-endpoint-hours"|"sync-endpoint-hours-above-daily-cap"|"taskrouter-tasks"|"totalprice"|"transcriptions"|"trunking-cps"|"trunking-emergency-calls"|"trunking-origination"|"trunking-origination-local"|"trunking-origination-mobile"|"trunking-origination-tollfree"|"trunking-recordings"|"trunking-secure"|"trunking-termination"|"tts-google"|"turnmegabytes"|"turnmegabytes-australia"|"turnmegabytes-brasil"|"turnmegabytes-germany"|"turnmegabytes-india"|"turnmegabytes-ireland"|"turnmegabytes-japan"|"turnmegabytes-singapore"|"turnmegabytes-useast"|"turnmegabytes-uswest"|"twilio-interconnect"|"verify-push"|"verify-totp"|"verify-whatsapp-conversations-business-initiated"|"video-recordings"|"virtual-agent"|"voice-insights"|"voice-insights-client-insights-on-demand-minute"|"voice-insights-ptsn-insights-on-demand-minute"|"voice-insights-sip-interface-insights-on-demand-minute"|"voice-insights-sip-trunking-insights-on-demand-minute"|"voice-intelligence"|"voice-intelligence-transcription"|"voice-intelligence-operators"|"wireless"|"wireless-orders"|"wireless-orders-artwork"|"wireless-orders-bulk"|"wireless-orders-esim"|"wireless-orders-starter"|"wireless-usage"|"wireless-usage-commands"|"wireless-usage-commands-africa"|"wireless-usage-commands-asia"|"wireless-usage-commands-centralandsouthamerica"|"wireless-usage-commands-europe"|"wireless-usage-commands-home"|"wireless-usage-commands-northamerica"|"wireless-usage-commands-oceania"|"wireless-usage-commands-roaming"|"wireless-usage-data"|"wireless-usage-data-africa"|"wireless-usage-data-asia"|"wireless-usage-data-centralandsouthamerica"|"wireless-usage-data-custom-additionalmb"|"wireless-usage-data-custom-first5mb"|"wireless-usage-data-domestic-roaming"|"wireless-usage-data-europe"|"wireless-usage-data-individual-additionalgb"|"wireless-usage-data-individual-firstgb"|"wireless-usage-data-international-roaming-canada"|"wireless-usage-data-international-roaming-india"|"wireless-usage-data-international-roaming-mexico"|"wireless-usage-data-northamerica"|"wireless-usage-data-oceania"|"wireless-usage-data-pooled"|"wireless-usage-data-pooled-downlink"|"wireless-usage-data-pooled-uplink"|"wireless-usage-mrc"|"wireless-usage-mrc-custom"|"wireless-usage-mrc-individual"|"wireless-usage-mrc-pooled"|"wireless-usage-mrc-suspended"|"wireless-usage-sms"|"wireless-usage-voice"; + +public type Siprec_enum_status "in-progress"|"stopped"; + +public type Address record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource. + string? account_sid?; + # The city in which the address is located. + string? city?; + # The name associated with the address.This property has a maximum length of 16 4-byte characters, or 21 3-byte characters. + string? customer_name?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The ISO country code of the address. + string? iso_country?; + # The postal code of the address. + string? postal_code?; + # The state or region of the address. + string? region?; + # The unique string that that we created to identify the Address resource. + string? sid?; + # The number and street address of the address. + string? street?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # Whether emergency calling has been enabled on this number. + boolean? emergency_enabled?; + # Whether the address has been validated to comply with local regulation. In countries that require valid addresses, an invalid address will not be accepted. `true` indicates the Address has been validated. `false` indicate the country doesn't require validation or the Address is not valid. + boolean? validated?; + # Whether the address has been verified to comply with regulation. In countries that require valid addresses, an invalid address will not be accepted. `true` indicates the Address has been verified. `false` indicate the country doesn't require verified or the Address is not valid. + boolean? verified?; + # The additional number and street address of the address. + string? street_secondary?; +}; + +public type Available_phone_number_shared_cost record { + # A formatted version of the phone number. + string? friendly_name?; + # The 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. + string? phone_number?; + # The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) of this phone number. Available for only phone numbers from the US and Canada. + string? lata?; + # The locality or city of this phone number's location. + string? locality?; + # The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) of this phone number. Available for only phone numbers from the US and Canada. + string? rate_center?; + # The latitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? latitude?; + # The longitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? longitude?; + # The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada. + string? region?; + # The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada. + string? postal_code?; + # The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of this phone number. + string? iso_country?; + # The type of [Address](https://www.twilio.com/docs/usage/api/address) resource the phone number requires. Can be: `none`, `any`, `local`, or `foreign`. `none` means no address is required. `any` means an address is required, but it can be anywhere in the world. `local` means an address in the phone number's country is required. `foreign` means an address outside of the phone number's country is required. + string? address_requirements?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are: `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Available_phone_number_local_capabilities? capabilities?; +}; + +public type Usage_trigger_enum_trigger_field "count"|"usage"|"price"; + +public type RecordingRecording_add_on_result record { + # The unique string that that we created to identify the Recording AddOnResult resource. + string? sid?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult resource. + string? account_sid?; + Recording_add_on_result_enum_status status?; + # The SID of the Add-on to which the result belongs. + string? add_on_sid?; + # The SID of the Add-on configuration. + string? add_on_configuration_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The date and time in GMT that the result was completed specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_completed?; + # The SID of the recording to which the AddOnResult resource belongs. + string? reference_sid?; + # A list of related resources identified by their relative URIs. + record {}? subresource_uris?; +}; + +public type Token record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Token resource. + string? account_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # An array representing the ephemeral credentials and the STUN and TURN server URIs. + Token_ice_servers[]? ice_servers?; + # The temporary password that the username will use when authenticating with Twilio. + string? password?; + # The duration in seconds for which the username and password are valid. + string? ttl?; + # The temporary username that uniquely identifies a Token. + string? username?; +}; + +public type Conference record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Conference resource. + string? account_sid?; + # The date and time in GMT that this resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The API version used to create this conference. + string? api_version?; + # A string that you assigned to describe this conference room. Maxiumum length is 128 characters. + string? friendly_name?; + # A string that represents the Twilio Region where the conference audio was mixed. May be `us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, and `jp1`. Basic conference audio will always be mixed in `us1`. Global Conference audio will be mixed nearest to the majority of participants. + string? region?; + # The unique string that that we created to identify this Conference resource. + string? sid?; + Conference_enum_status status?; + # The URI of this resource, relative to `https://api.twilio.com`. + string? uri?; + # A list of related resources identified by their URIs relative to `https://api.twilio.com`. + record {}? subresource_uris?; + Conference_enum_reason_conference_ended reason_conference_ended?; + # The call SID that caused the conference to end. + string? call_sid_ending_conference?; +}; + +public type Incoming_phone_number_toll_free_enum_emergency_address_status "registered"|"unregistered"|"pending-registration"|"registration-failure"|"pending-unregistration"|"unregistration-failure"; + +public type SipSip_domain record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resource. + string? account_sid?; + # The API version used to process the call. + string? api_version?; + # The types of authentication you have mapped to your domain. Can be: `IP_ACL` and `CREDENTIAL_LIST`. If you have both defined for your domain, both will be returned in a comma delimited string. If `auth_type` is not defined, the domain will not be able to receive any traffic. + string? auth_type?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and "-" and must end with `sip.twilio.com`. + string? domain_name?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The unique string that that we created to identify the SipDomain resource. + string? sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_fallback_method?; + # The URL that we call when an error occurs while retrieving or executing the TwiML requested from `voice_url`. + string? voice_fallback_url?; + # The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_method?; + # The HTTP method we use to call `voice_status_callback_url`. Either `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_status_callback_method?; + # The URL that we call to pass status parameters (such as call ended) to your application. + string? voice_status_callback_url?; + # The URL we call using the `voice_method` when the domain receives a call. + string? voice_url?; + # A list of mapping resources associated with the SIP Domain resource identified by their relative URIs. + record {}? subresource_uris?; + # Whether to allow SIP Endpoints to register with the domain to receive calls. + boolean? sip_registration?; + # Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. + boolean? emergency_calling_enabled?; + # Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. + boolean? secure?; + # The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. + string? byoc_trunk_sid?; + # Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. + string? emergency_caller_sid?; +}; + +public type CreateSipAuthRegistrationsCredentialListMappingRequest record { + # The SID of the CredentialList resource to map to the SIP domain. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^CL[0-9a-fA-F]{32}$`} + string CredentialListSid; +}; + +public type ListParticipantResponse record { + ConferenceParticipant[] participants?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListUsageRecordYearlyResponse record { + UsageUsage_recordUsage_record_yearly[] usage_records?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Account_enum_type "Trial"|"Full"; + +public type Incoming_phone_numberIncoming_phone_number_mobile record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource. + string? account_sid?; + # The SID of the Address resource associated with the phone number. + string? address_sid?; + Incoming_phone_number_mobile_enum_address_requirement address_requirements?; + # The API version used to start a new TwiML session. + string? api_version?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Incoming_phone_number_capabilities? capabilities?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The SID of the Identity resource that we associate with the phone number. Some regions require an Identity to meet local regulations. + string? identity_sid?; + # The 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. + string? phone_number?; + # The phone number's origin. `twilio` identifies Twilio-owned phone numbers and `hosted` identifies hosted phone numbers. + string? origin?; + # The unique string that that we created to identify the resource. + string? sid?; + # The SID of the application that handles SMS messages sent to the phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application. + string? sms_application_sid?; + # The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_fallback_method?; + # The URL that we call when an error occurs while retrieving or executing the TwiML from `sms_url`. + string? sms_fallback_url?; + # The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_method?; + # The URL we call when the phone number receives an incoming SMS message. + string? sms_url?; + # The URL we call using the `status_callback_method` to send status information to your application. + string? status_callback?; + # The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" status_callback_method?; + # The SID of the Trunk that handles calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + string? trunk_sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + Incoming_phone_number_mobile_enum_voice_receive_mode voice_receive_mode?; + # The SID of the application that handles calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + string? voice_application_sid?; + # Whether we look up the caller's caller-ID name from the CNAM database ($0.01 per look up). Can be: `true` or `false`. + boolean? voice_caller_id_lookup?; + # The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_fallback_method?; + # The URL that we call when an error occurs retrieving or executing the TwiML requested by `url`. + string? voice_fallback_url?; + # The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_method?; + # The URL we call when the phone number receives a call. The `voice_url` will not be used if a `voice_application_sid` or a `trunk_sid` is set. + string? voice_url?; + Incoming_phone_number_mobile_enum_emergency_status emergency_status?; + # The SID of the emergency address configuration that we use for emergency calling from this phone number. + string? emergency_address_sid?; + Incoming_phone_number_mobile_enum_emergency_address_status emergency_address_status?; + # The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + string? bundle_sid?; + string? status?; +}; + +public type UsageUsage_recordUsage_record_yesterday record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage. + string? account_sid?; + # The API version used to create the resource. + string? api_version?; + # Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + string? as_of?; + Usage_record_yesterday_enum_category category?; + # The number of usage events, such as the number of calls. + string? count?; + # The units in which `count` is measured, such as `calls` for calls or `messages` for SMS. + string? count_unit?; + # A plain-language description of the usage category. + string? description?; + # The last date for which usage is included in the UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? end_date?; + # The total price of the usage in the currency specified in `price_unit` and associated with the account. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format, such as `usd`, `eur`, and `jpy`. + string? price_unit?; + # The first date for which usage is included in this UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? start_date?; + # A list of related resources identified by their URIs. For more information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + record {}? subresource_uris?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The amount used to bill usage and measured in units described in `usage_unit`. + string? usage?; + # The units in which `usage` is measured, such as `minutes` for calls or `messages` for SMS. + string? usage_unit?; +}; + +public type Dependent_phone_number_enum_address_requirement "none"|"any"|"local"|"foreign"; + +public type CreateCallRequest record { + # The phone number, SIP address, or client identifier to call. + string To; + # The phone number or client identifier to use as the caller id. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `From` must also be a phone number. + string From; + # The HTTP method we should use when calling the `url` parameter's value. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" Method?; + # The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored. + string FallbackUrl?; + # The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" FallbackMethod?; + # The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted). + string StatusCallback?; + # The call progress events that we will send to the `status_callback` URL. Can be: `initiated`, `ringing`, `answered`, and `completed`. If no event is specified, we send the `completed` status. If you want to receive multiple events, specify each one in a separate `status_callback_event` parameter. See the code sample for [monitoring call progress](https://www.twilio.com/docs/voice/api/call-resource?code-sample=code-create-a-call-resource-and-specify-a-statuscallbackevent&code-sdk-version=json). If an `application_sid` is present, this parameter is ignored. + string[] StatusCallbackEvent?; + # The HTTP method we should use when calling the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # A string of keys to dial after connecting to the number, maximum of 32 digits. Valid digits in the string include: any digit (`0`-`9`), '`#`', '`*`' and '`w`', to insert a half second pause. For example, if you connected to a company phone number and wanted to pause for one second, and then dial extension 1234 followed by the pound key, the value of this parameter would be `ww1234#`. Remember to URL-encode this string, since the '`#`' character has special meaning in a URL. If both `SendDigits` and `MachineDetection` parameters are provided, then `MachineDetection` will be ignored. + string SendDigits?; + # The integer number of seconds that we should allow the phone to ring before assuming there is no answer. The default is `60` seconds and the maximum is `600` seconds. For some call flows, we will add a 5-second buffer to the timeout value you provide. For this reason, a timeout value of 10 seconds could result in an actual timeout closer to 15 seconds. You can set this to a short time, such as `15` seconds, to hang up before reaching an answering machine or voicemail. + int Timeout?; + # Whether to record the call. Can be `true` to record the phone call, or `false` to not. The default is `false`. The `recording_url` is sent to the `status_callback` URL. + boolean Record?; + # The number of channels in the final recording. Can be: `mono` or `dual`. The default is `mono`. `mono` records both legs of the call in a single channel of the recording file. `dual` records each leg to a separate channel of the recording file. The first channel of a dual-channel recording contains the parent call and the second channel contains the child call. + string RecordingChannels?; + # The URL that we call when the recording is available to be accessed. + string RecordingStatusCallback?; + # The HTTP method we should use when calling the `recording_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" RecordingStatusCallbackMethod?; + # The username used to authenticate the caller making a SIP call. + string SipAuthUsername?; + # The password required to authenticate the user account specified in `sip_auth_username`. + string SipAuthPassword?; + # Whether to detect if a human, answering machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. Use `Enable` if you would like us to return `AnsweredBy` as soon as the called party is identified. Use `DetectMessageEnd`, if you would like to leave a message on an answering machine. If `send_digits` is provided, this parameter is ignored. For more information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection). + string MachineDetection?; + # The number of seconds that we should attempt to detect an answering machine before timing out and sending a voice request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds. + int MachineDetectionTimeout?; + # The recording status events that will trigger calls to the URL specified in `recording_status_callback`. Can be: `in-progress`, `completed` and `absent`. Defaults to `completed`. Separate multiple values with a space. + string[] RecordingStatusCallbackEvent?; + # Whether to trim any leading and trailing silence from the recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`. + string Trim?; + # The phone number, SIP address, or Client identifier that made this call. Phone numbers are in [E.164 format](https://wwnw.twilio.com/docs/glossary/what-e164) (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. + string CallerId?; + # The number of milliseconds that is used as the measuring stick for the length of the speech activity, where durations lower than this value will be interpreted as a human and longer than this value as a machine. Possible Values: 1000-6000. Default: 2400. + int MachineDetectionSpeechThreshold?; + # The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Possible Values: 500-5000. Default: 1200. + int MachineDetectionSpeechEndThreshold?; + # The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000. + int MachineDetectionSilenceTimeout?; + # Select whether to perform answering machine detection in the background. Default, blocks the execution of the call until Answering Machine Detection is completed. Can be: `true` or `false`. + string AsyncAmd?; + # The URL that we should call using the `async_amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax. + string AsyncAmdStatusCallback?; + # The HTTP method we should use when calling the `async_amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" AsyncAmdStatusCallbackMethod?; + # The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta) + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^BY[0-9a-fA-F]{32}$`} + string Byoc?; + # The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta) + string CallReason?; + # A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call's call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call. + string CallToken?; + # The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio. + string RecordingTrack?; + # The maximum duration of the call in seconds. Constraints depend on account and configuration. + int TimeLimit?; + # The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). + string Url?; + # TwiML instructions for the call Twilio will use without fetching Twiml from url parameter. If both `twiml` and `url` are provided then `twiml` parameter will be ignored. Max 4000 characters. + string Twiml?; + # The SID of the Application resource that will handle the call, if the call will be handled by an application. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string ApplicationSid?; +}; + +public type ListUsageRecordThisMonthResponse record { + UsageUsage_recordUsage_record_this_month[] usage_records?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Connect_app record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resource. + string? account_sid?; + # The URL we redirect the user to after we authenticate the user and obtain authorization to access the Connect App. + string? authorize_redirect_url?; + # The company name set for the Connect App. + string? company_name?; + # The HTTP method we use to call `deauthorize_callback_url`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" deauthorize_callback_method?; + # The URL we call using the `deauthorize_callback_method` to de-authorize the Connect App. + string? deauthorize_callback_url?; + # The description of the Connect App. + string? description?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The public URL where users can obtain more information about this Connect App. + string? homepage_url?; + # The set of permissions that your ConnectApp requests. + Connect_app_enum_permission[]? permissions?; + # The unique string that that we created to identify the ConnectApp resource. + string? sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type ListAvailablePhoneNumberMobileResponse record { + Available_phone_number_mobile[] available_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CreatePaymentsRequest record { + # A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions. This should be a unique string value per API call and can be a randomly generated. + string IdempotencyKey; + # Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the [expected StatusCallback values](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback) + string StatusCallback; + Payments_enum_bank_account_type BankAccountType?; + # A positive decimal value less than 1,000,000 to charge against the credit card or bank account. Default currency can be overwritten with `currency` field. Leave blank or set to 0 to tokenize. + decimal ChargeAmount?; + # The currency of the `charge_amount`, formatted as [ISO 4127](http://www.iso.org/iso/home/standards/currency_codes.htm) format. The default value is `USD` and all values allowed from the Pay Connector are accepted. + string Currency?; + # The description can be used to provide more details regarding the transaction. This information is submitted along with the payment details to the Payment Connector which are then posted on the transactions. + string Description?; + # A list of inputs that should be accepted. Currently only `dtmf` is supported. All digits captured during a pay session are redacted from the logs. + string Input?; + # A positive integer that is used to validate the length of the `PostalCode` inputted by the user. User must enter this many digits. + int MinPostalCodeLength?; + # A single-level JSON object used to pass custom parameters to payment processors. (Required for ACH payments). The information that has to be included here depends on the Connector. [Read more](https://www.twilio.com/console/voice/pay-connectors). + anydata Parameter?; + # This is the unique name corresponding to the Pay Connector installed in the Twilio Add-ons. Learn more about [ Connectors](https://www.twilio.com/console/voice/pay-connectors). The default value is `Default`. + string PaymentConnector?; + Payments_enum_payment_method PaymentMethod?; + # Indicates whether the credit card postal code (zip code) is a required piece of payment information that must be provided by the caller. The default is `true`. + boolean PostalCode?; + # Indicates whether the credit card security code is a required piece of payment information that must be provided by the caller. The default is `true`. + boolean SecurityCode?; + # The number of seconds that should wait for the caller to press a digit between each subsequent digit, after the first one, before moving on to validate the digits captured. The default is `5`, maximum is `600`. + int Timeout?; + Payments_enum_token_type TokenType?; + # Credit card types separated by space that Pay should accept. The default value is `visa mastercard amex` + string ValidCardTypes?; +}; + +public type ListAvailablePhoneNumberTollFreeResponse record { + Available_phone_number_toll_free[] available_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListSipCredentialListMappingResponse record { + SipSip_domainSip_credential_list_mapping[] credential_list_mappings?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Siprec_enum_track "inbound_track"|"outbound_track"|"both_tracks"; + +public type UpdateMessageRequest record { + # The new `body` of the Message resource. To redact the text content of a Message, this parameter's value must be an empty string + string Body?; + Message_enum_update_status Status?; +}; + +public type Incoming_phone_number_enum_emergency_address_status "registered"|"unregistered"|"pending-registration"|"registration-failure"|"pending-unregistration"|"unregistration-failure"; + +public type UpdateOutgoingCallerIdRequest record { + # A descriptive string that you create to describe the resource. It can be up to 64 characters long. + string FriendlyName?; +}; + +public type UpdateIncomingPhoneNumberRequest record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers). + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AC[0-9a-fA-F]{32}$`} + string AccountSid?; + # The API version to use for incoming calls made to the phone number. The default is `2010-04-01`. + string ApiVersion?; + # A descriptive string that you created to describe this phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. + string FriendlyName?; + # The SID of the application that should handle SMS messages sent to the number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string SmsApplicationSid?; + # The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsFallbackMethod?; + # The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. + string SmsFallbackUrl?; + # The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsMethod?; + # The URL we should call when the phone number receives an incoming SMS message. + string SmsUrl?; + # The URL we should call using the `status_callback_method` to send status information to your application. + string StatusCallback?; + # The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # The SID of the application we should use to handle phone calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string VoiceApplicationSid?; + # Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. + boolean VoiceCallerIdLookup?; + # The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceFallbackMethod?; + # The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + string VoiceFallbackUrl?; + # The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceMethod?; + # The URL that we should call to answer a call to the phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. + string VoiceUrl?; + Incoming_phone_number_enum_emergency_status EmergencyStatus?; + # The SID of the emergency address configuration to use for emergency calling from this phone number. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AD[0-9a-fA-F]{32}$`} + string EmergencyAddressSid?; + # The SID of the Trunk we should use to handle phone calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^TK[0-9a-fA-F]{32}$`} + string TrunkSid?; + Incoming_phone_number_enum_voice_receive_mode VoiceReceiveMode?; + # The SID of the Identity resource that we should associate with the phone number. Some regions require an identity to meet local regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^RI[0-9a-fA-F]{32}$`} + string IdentitySid?; + # The SID of the Address resource we should associate with the phone number. Some regions require addresses to meet local regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AD[0-9a-fA-F]{32}$`} + string AddressSid?; + # The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^BU[0-9a-fA-F]{32}$`} + string BundleSid?; +}; + +public type Incoming_phone_numberIncoming_phone_number_toll_free record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource. + string? account_sid?; + # The SID of the Address resource associated with the phone number. + string? address_sid?; + Incoming_phone_number_toll_free_enum_address_requirement address_requirements?; + # The API version used to start a new TwiML session. + string? api_version?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Incoming_phone_number_capabilities? capabilities?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The SID of the Identity resource that we associate with the phone number. Some regions require an Identity to meet local regulations. + string? identity_sid?; + # The 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. + string? phone_number?; + # The phone number's origin. `twilio` identifies Twilio-owned phone numbers and `hosted` identifies hosted phone numbers. + string? origin?; + # The unique string that that we created to identify the resource. + string? sid?; + # The SID of the application that handles SMS messages sent to the phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application. + string? sms_application_sid?; + # The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_fallback_method?; + # The URL that we call when an error occurs while retrieving or executing the TwiML from `sms_url`. + string? sms_fallback_url?; + # The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_method?; + # The URL we call when the phone number receives an incoming SMS message. + string? sms_url?; + # The URL we call using the `status_callback_method` to send status information to your application. + string? status_callback?; + # The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" status_callback_method?; + # The SID of the Trunk that handles calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + string? trunk_sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + Incoming_phone_number_toll_free_enum_voice_receive_mode voice_receive_mode?; + # The SID of the application that handles calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + string? voice_application_sid?; + # Whether we look up the caller's caller-ID name from the CNAM database ($0.01 per look up). Can be: `true` or `false`. + boolean? voice_caller_id_lookup?; + # The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_fallback_method?; + # The URL that we call when an error occurs retrieving or executing the TwiML requested by `url`. + string? voice_fallback_url?; + # The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_method?; + # The URL we call when the phone number receives a call. The `voice_url` will not be used if a `voice_application_sid` or a `trunk_sid` is set. + string? voice_url?; + Incoming_phone_number_toll_free_enum_emergency_status emergency_status?; + # The SID of the emergency address configuration that we use for emergency calling from this phone number. + string? emergency_address_sid?; + Incoming_phone_number_toll_free_enum_emergency_address_status emergency_address_status?; + # The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + string? bundle_sid?; + string? status?; +}; + +public type UpdateAddressRequest record { + # A descriptive string that you create to describe the address. It can be up to 64 characters long. + string FriendlyName?; + # The name to associate with the address. + string CustomerName?; + # The number and street address of the address. + string Street?; + # The city of the address. + string City?; + # The state or region of the address. + string Region?; + # The postal code of the address. + string PostalCode?; + # Whether to enable emergency calling on the address. Can be: `true` or `false`. + boolean EmergencyEnabled?; + # Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide. + boolean AutoCorrectAddress?; + # The additional number and street address of the address. + string StreetSecondary?; +}; + +public type Incoming_phone_number_mobile_enum_emergency_address_status "registered"|"unregistered"|"pending-registration"|"registration-failure"|"pending-unregistration"|"unregistration-failure"; + +public type Usage_record_daily_enum_category "a2p-registration-fees"|"agent-conference"|"amazon-polly"|"answering-machine-detection"|"authy-authentications"|"authy-calls-outbound"|"authy-monthly-fees"|"authy-phone-intelligence"|"authy-phone-verifications"|"authy-sms-outbound"|"call-progess-events"|"calleridlookups"|"calls"|"calls-client"|"calls-globalconference"|"calls-inbound"|"calls-inbound-local"|"calls-inbound-mobile"|"calls-inbound-tollfree"|"calls-outbound"|"calls-pay-verb-transactions"|"calls-recordings"|"calls-sip"|"calls-sip-inbound"|"calls-sip-outbound"|"calls-transfers"|"carrier-lookups"|"conversations"|"conversations-api-requests"|"conversations-conversation-events"|"conversations-endpoint-connectivity"|"conversations-events"|"conversations-participant-events"|"conversations-participants"|"cps"|"flex-usage"|"fraud-lookups"|"group-rooms"|"group-rooms-data-track"|"group-rooms-encrypted-media-recorded"|"group-rooms-media-downloaded"|"group-rooms-media-recorded"|"group-rooms-media-routed"|"group-rooms-media-stored"|"group-rooms-participant-minutes"|"group-rooms-recorded-minutes"|"imp-v1-usage"|"lookups"|"marketplace"|"marketplace-algorithmia-named-entity-recognition"|"marketplace-cadence-transcription"|"marketplace-cadence-translation"|"marketplace-capio-speech-to-text"|"marketplace-convriza-ababa"|"marketplace-deepgram-phrase-detector"|"marketplace-digital-segment-business-info"|"marketplace-facebook-offline-conversions"|"marketplace-google-speech-to-text"|"marketplace-ibm-watson-message-insights"|"marketplace-ibm-watson-message-sentiment"|"marketplace-ibm-watson-recording-analysis"|"marketplace-ibm-watson-tone-analyzer"|"marketplace-icehook-systems-scout"|"marketplace-infogroup-dataaxle-bizinfo"|"marketplace-keen-io-contact-center-analytics"|"marketplace-marchex-cleancall"|"marketplace-marchex-sentiment-analysis-for-sms"|"marketplace-marketplace-nextcaller-social-id"|"marketplace-mobile-commons-opt-out-classifier"|"marketplace-nexiwave-voicemail-to-text"|"marketplace-nextcaller-advanced-caller-identification"|"marketplace-nomorobo-spam-score"|"marketplace-payfone-tcpa-compliance"|"marketplace-remeeting-automatic-speech-recognition"|"marketplace-tcpa-defense-solutions-blacklist-feed"|"marketplace-telo-opencnam"|"marketplace-truecnam-true-spam"|"marketplace-twilio-caller-name-lookup-us"|"marketplace-twilio-carrier-information-lookup"|"marketplace-voicebase-pci"|"marketplace-voicebase-transcription"|"marketplace-voicebase-transcription-custom-vocabulary"|"marketplace-whitepages-pro-caller-identification"|"marketplace-whitepages-pro-phone-intelligence"|"marketplace-whitepages-pro-phone-reputation"|"marketplace-wolfarm-spoken-results"|"marketplace-wolfram-short-answer"|"marketplace-ytica-contact-center-reporting-analytics"|"mediastorage"|"mms"|"mms-inbound"|"mms-inbound-longcode"|"mms-inbound-shortcode"|"mms-messages-carrierfees"|"mms-outbound"|"mms-outbound-longcode"|"mms-outbound-shortcode"|"monitor-reads"|"monitor-storage"|"monitor-writes"|"notify"|"notify-actions-attempts"|"notify-channels"|"number-format-lookups"|"pchat"|"pchat-users"|"peer-to-peer-rooms-participant-minutes"|"pfax"|"pfax-minutes"|"pfax-minutes-inbound"|"pfax-minutes-outbound"|"pfax-pages"|"phonenumbers"|"phonenumbers-cps"|"phonenumbers-emergency"|"phonenumbers-local"|"phonenumbers-mobile"|"phonenumbers-setups"|"phonenumbers-tollfree"|"premiumsupport"|"proxy"|"proxy-active-sessions"|"pstnconnectivity"|"pv"|"pv-composition-media-downloaded"|"pv-composition-media-encrypted"|"pv-composition-media-stored"|"pv-composition-minutes"|"pv-recording-compositions"|"pv-room-participants"|"pv-room-participants-au1"|"pv-room-participants-br1"|"pv-room-participants-ie1"|"pv-room-participants-jp1"|"pv-room-participants-sg1"|"pv-room-participants-us1"|"pv-room-participants-us2"|"pv-rooms"|"pv-sip-endpoint-registrations"|"recordings"|"recordingstorage"|"rooms-group-bandwidth"|"rooms-group-minutes"|"rooms-peer-to-peer-minutes"|"shortcodes"|"shortcodes-customerowned"|"shortcodes-mms-enablement"|"shortcodes-mps"|"shortcodes-random"|"shortcodes-uk"|"shortcodes-vanity"|"small-group-rooms"|"small-group-rooms-data-track"|"small-group-rooms-participant-minutes"|"sms"|"sms-inbound"|"sms-inbound-longcode"|"sms-inbound-shortcode"|"sms-messages-carrierfees"|"sms-messages-features"|"sms-messages-features-senderid"|"sms-outbound"|"sms-outbound-content-inspection"|"sms-outbound-longcode"|"sms-outbound-shortcode"|"speech-recognition"|"studio-engagements"|"sync"|"sync-actions"|"sync-endpoint-hours"|"sync-endpoint-hours-above-daily-cap"|"taskrouter-tasks"|"totalprice"|"transcriptions"|"trunking-cps"|"trunking-emergency-calls"|"trunking-origination"|"trunking-origination-local"|"trunking-origination-mobile"|"trunking-origination-tollfree"|"trunking-recordings"|"trunking-secure"|"trunking-termination"|"tts-google"|"turnmegabytes"|"turnmegabytes-australia"|"turnmegabytes-brasil"|"turnmegabytes-germany"|"turnmegabytes-india"|"turnmegabytes-ireland"|"turnmegabytes-japan"|"turnmegabytes-singapore"|"turnmegabytes-useast"|"turnmegabytes-uswest"|"twilio-interconnect"|"verify-push"|"verify-totp"|"verify-whatsapp-conversations-business-initiated"|"video-recordings"|"virtual-agent"|"voice-insights"|"voice-insights-client-insights-on-demand-minute"|"voice-insights-ptsn-insights-on-demand-minute"|"voice-insights-sip-interface-insights-on-demand-minute"|"voice-insights-sip-trunking-insights-on-demand-minute"|"voice-intelligence"|"voice-intelligence-transcription"|"voice-intelligence-operators"|"wireless"|"wireless-orders"|"wireless-orders-artwork"|"wireless-orders-bulk"|"wireless-orders-esim"|"wireless-orders-starter"|"wireless-usage"|"wireless-usage-commands"|"wireless-usage-commands-africa"|"wireless-usage-commands-asia"|"wireless-usage-commands-centralandsouthamerica"|"wireless-usage-commands-europe"|"wireless-usage-commands-home"|"wireless-usage-commands-northamerica"|"wireless-usage-commands-oceania"|"wireless-usage-commands-roaming"|"wireless-usage-data"|"wireless-usage-data-africa"|"wireless-usage-data-asia"|"wireless-usage-data-centralandsouthamerica"|"wireless-usage-data-custom-additionalmb"|"wireless-usage-data-custom-first5mb"|"wireless-usage-data-domestic-roaming"|"wireless-usage-data-europe"|"wireless-usage-data-individual-additionalgb"|"wireless-usage-data-individual-firstgb"|"wireless-usage-data-international-roaming-canada"|"wireless-usage-data-international-roaming-india"|"wireless-usage-data-international-roaming-mexico"|"wireless-usage-data-northamerica"|"wireless-usage-data-oceania"|"wireless-usage-data-pooled"|"wireless-usage-data-pooled-downlink"|"wireless-usage-data-pooled-uplink"|"wireless-usage-mrc"|"wireless-usage-mrc-custom"|"wireless-usage-mrc-individual"|"wireless-usage-mrc-pooled"|"wireless-usage-mrc-suspended"|"wireless-usage-sms"|"wireless-usage-voice"; + +public type Siprec_enum_update_status "stopped"; + +public type ListDependentPhoneNumberResponse record { + AddressDependent_phone_number[] dependent_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListAvailablePhoneNumberNationalResponse record { + Available_phone_number_national[] available_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Usage_record_yearly_enum_category "a2p-registration-fees"|"agent-conference"|"amazon-polly"|"answering-machine-detection"|"authy-authentications"|"authy-calls-outbound"|"authy-monthly-fees"|"authy-phone-intelligence"|"authy-phone-verifications"|"authy-sms-outbound"|"call-progess-events"|"calleridlookups"|"calls"|"calls-client"|"calls-globalconference"|"calls-inbound"|"calls-inbound-local"|"calls-inbound-mobile"|"calls-inbound-tollfree"|"calls-outbound"|"calls-pay-verb-transactions"|"calls-recordings"|"calls-sip"|"calls-sip-inbound"|"calls-sip-outbound"|"calls-transfers"|"carrier-lookups"|"conversations"|"conversations-api-requests"|"conversations-conversation-events"|"conversations-endpoint-connectivity"|"conversations-events"|"conversations-participant-events"|"conversations-participants"|"cps"|"flex-usage"|"fraud-lookups"|"group-rooms"|"group-rooms-data-track"|"group-rooms-encrypted-media-recorded"|"group-rooms-media-downloaded"|"group-rooms-media-recorded"|"group-rooms-media-routed"|"group-rooms-media-stored"|"group-rooms-participant-minutes"|"group-rooms-recorded-minutes"|"imp-v1-usage"|"lookups"|"marketplace"|"marketplace-algorithmia-named-entity-recognition"|"marketplace-cadence-transcription"|"marketplace-cadence-translation"|"marketplace-capio-speech-to-text"|"marketplace-convriza-ababa"|"marketplace-deepgram-phrase-detector"|"marketplace-digital-segment-business-info"|"marketplace-facebook-offline-conversions"|"marketplace-google-speech-to-text"|"marketplace-ibm-watson-message-insights"|"marketplace-ibm-watson-message-sentiment"|"marketplace-ibm-watson-recording-analysis"|"marketplace-ibm-watson-tone-analyzer"|"marketplace-icehook-systems-scout"|"marketplace-infogroup-dataaxle-bizinfo"|"marketplace-keen-io-contact-center-analytics"|"marketplace-marchex-cleancall"|"marketplace-marchex-sentiment-analysis-for-sms"|"marketplace-marketplace-nextcaller-social-id"|"marketplace-mobile-commons-opt-out-classifier"|"marketplace-nexiwave-voicemail-to-text"|"marketplace-nextcaller-advanced-caller-identification"|"marketplace-nomorobo-spam-score"|"marketplace-payfone-tcpa-compliance"|"marketplace-remeeting-automatic-speech-recognition"|"marketplace-tcpa-defense-solutions-blacklist-feed"|"marketplace-telo-opencnam"|"marketplace-truecnam-true-spam"|"marketplace-twilio-caller-name-lookup-us"|"marketplace-twilio-carrier-information-lookup"|"marketplace-voicebase-pci"|"marketplace-voicebase-transcription"|"marketplace-voicebase-transcription-custom-vocabulary"|"marketplace-whitepages-pro-caller-identification"|"marketplace-whitepages-pro-phone-intelligence"|"marketplace-whitepages-pro-phone-reputation"|"marketplace-wolfarm-spoken-results"|"marketplace-wolfram-short-answer"|"marketplace-ytica-contact-center-reporting-analytics"|"mediastorage"|"mms"|"mms-inbound"|"mms-inbound-longcode"|"mms-inbound-shortcode"|"mms-messages-carrierfees"|"mms-outbound"|"mms-outbound-longcode"|"mms-outbound-shortcode"|"monitor-reads"|"monitor-storage"|"monitor-writes"|"notify"|"notify-actions-attempts"|"notify-channels"|"number-format-lookups"|"pchat"|"pchat-users"|"peer-to-peer-rooms-participant-minutes"|"pfax"|"pfax-minutes"|"pfax-minutes-inbound"|"pfax-minutes-outbound"|"pfax-pages"|"phonenumbers"|"phonenumbers-cps"|"phonenumbers-emergency"|"phonenumbers-local"|"phonenumbers-mobile"|"phonenumbers-setups"|"phonenumbers-tollfree"|"premiumsupport"|"proxy"|"proxy-active-sessions"|"pstnconnectivity"|"pv"|"pv-composition-media-downloaded"|"pv-composition-media-encrypted"|"pv-composition-media-stored"|"pv-composition-minutes"|"pv-recording-compositions"|"pv-room-participants"|"pv-room-participants-au1"|"pv-room-participants-br1"|"pv-room-participants-ie1"|"pv-room-participants-jp1"|"pv-room-participants-sg1"|"pv-room-participants-us1"|"pv-room-participants-us2"|"pv-rooms"|"pv-sip-endpoint-registrations"|"recordings"|"recordingstorage"|"rooms-group-bandwidth"|"rooms-group-minutes"|"rooms-peer-to-peer-minutes"|"shortcodes"|"shortcodes-customerowned"|"shortcodes-mms-enablement"|"shortcodes-mps"|"shortcodes-random"|"shortcodes-uk"|"shortcodes-vanity"|"small-group-rooms"|"small-group-rooms-data-track"|"small-group-rooms-participant-minutes"|"sms"|"sms-inbound"|"sms-inbound-longcode"|"sms-inbound-shortcode"|"sms-messages-carrierfees"|"sms-messages-features"|"sms-messages-features-senderid"|"sms-outbound"|"sms-outbound-content-inspection"|"sms-outbound-longcode"|"sms-outbound-shortcode"|"speech-recognition"|"studio-engagements"|"sync"|"sync-actions"|"sync-endpoint-hours"|"sync-endpoint-hours-above-daily-cap"|"taskrouter-tasks"|"totalprice"|"transcriptions"|"trunking-cps"|"trunking-emergency-calls"|"trunking-origination"|"trunking-origination-local"|"trunking-origination-mobile"|"trunking-origination-tollfree"|"trunking-recordings"|"trunking-secure"|"trunking-termination"|"tts-google"|"turnmegabytes"|"turnmegabytes-australia"|"turnmegabytes-brasil"|"turnmegabytes-germany"|"turnmegabytes-india"|"turnmegabytes-ireland"|"turnmegabytes-japan"|"turnmegabytes-singapore"|"turnmegabytes-useast"|"turnmegabytes-uswest"|"twilio-interconnect"|"verify-push"|"verify-totp"|"verify-whatsapp-conversations-business-initiated"|"video-recordings"|"virtual-agent"|"voice-insights"|"voice-insights-client-insights-on-demand-minute"|"voice-insights-ptsn-insights-on-demand-minute"|"voice-insights-sip-interface-insights-on-demand-minute"|"voice-insights-sip-trunking-insights-on-demand-minute"|"voice-intelligence"|"voice-intelligence-transcription"|"voice-intelligence-operators"|"wireless"|"wireless-orders"|"wireless-orders-artwork"|"wireless-orders-bulk"|"wireless-orders-esim"|"wireless-orders-starter"|"wireless-usage"|"wireless-usage-commands"|"wireless-usage-commands-africa"|"wireless-usage-commands-asia"|"wireless-usage-commands-centralandsouthamerica"|"wireless-usage-commands-europe"|"wireless-usage-commands-home"|"wireless-usage-commands-northamerica"|"wireless-usage-commands-oceania"|"wireless-usage-commands-roaming"|"wireless-usage-data"|"wireless-usage-data-africa"|"wireless-usage-data-asia"|"wireless-usage-data-centralandsouthamerica"|"wireless-usage-data-custom-additionalmb"|"wireless-usage-data-custom-first5mb"|"wireless-usage-data-domestic-roaming"|"wireless-usage-data-europe"|"wireless-usage-data-individual-additionalgb"|"wireless-usage-data-individual-firstgb"|"wireless-usage-data-international-roaming-canada"|"wireless-usage-data-international-roaming-india"|"wireless-usage-data-international-roaming-mexico"|"wireless-usage-data-northamerica"|"wireless-usage-data-oceania"|"wireless-usage-data-pooled"|"wireless-usage-data-pooled-downlink"|"wireless-usage-data-pooled-uplink"|"wireless-usage-mrc"|"wireless-usage-mrc-custom"|"wireless-usage-mrc-individual"|"wireless-usage-mrc-pooled"|"wireless-usage-mrc-suspended"|"wireless-usage-sms"|"wireless-usage-voice"; + +public type ListAvailablePhoneNumberSharedCostResponse record { + Available_phone_number_shared_cost[] available_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type UsageUsage_recordUsage_record_today record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage. + string? account_sid?; + # The API version used to create the resource. + string? api_version?; + # Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + string? as_of?; + Usage_record_today_enum_category category?; + # The number of usage events, such as the number of calls. + string? count?; + # The units in which `count` is measured, such as `calls` for calls or `messages` for SMS. + string? count_unit?; + # A plain-language description of the usage category. + string? description?; + # The last date for which usage is included in the UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? end_date?; + # The total price of the usage in the currency specified in `price_unit` and associated with the account. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format, such as `usd`, `eur`, and `jpy`. + string? price_unit?; + # The first date for which usage is included in this UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? start_date?; + # A list of related resources identified by their URIs. For more information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + record {}? subresource_uris?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The amount used to bill usage and measured in units described in `usage_unit`. + string? usage?; + # The units in which `usage` is measured, such as `minutes` for calls or `messages` for SMS. + string? usage_unit?; +}; + +public type NotificationInstance record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Notification resource. + string? account_sid?; + # The API version used to generate the notification. Can be empty for events that don't have a specific API version, such as incoming phone calls. + string? api_version?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Notification resource is associated with. + string? call_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # A unique error code for the error condition that is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + string? error_code?; + # An integer log level that corresponds to the type of notification: `0` is ERROR, `1` is WARNING. + string? log?; + # The date the notification was actually generated in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. Message buffering can cause this value to differ from `date_created`. + string? message_date?; + # The text of the notification. + string? message_text?; + # The URL for more information about the error condition. This value is a page in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + string? more_info?; + # The HTTP method used to generate the notification. If the notification was generated during a phone call, this is the HTTP Method used to request the resource on your server. If the notification was generated by your use of our REST API, this is the HTTP method used to call the resource on our servers. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" request_method?; + # The URL of the resource that generated the notification. If the notification was generated during a phone call, this is the URL of the resource on your server that caused the notification. If the notification was generated by your use of our REST API, this is the URL of the resource you called. + string? request_url?; + # The HTTP GET or POST variables we sent to your server. However, if the notification was generated by our REST API, this contains the HTTP POST or PUT variables you sent to our API. + string? request_variables?; + # The HTTP body returned by your server. + string? response_body?; + # The HTTP headers returned by your server. + string? response_headers?; + # The unique string that that we created to identify the Notification resource. + string? sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type ListCallNotificationResponse record { + CallCall_notification[] notifications?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Recording_enum_status "in-progress"|"paused"|"stopped"|"processing"|"completed"|"absent"|"deleted"; + +# The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are: `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. +public type Available_phone_number_local_capabilities record { + boolean mms?; + boolean sms?; + boolean voice?; + boolean fax?; +}; + +public type Application record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resource. + string? account_sid?; + # The API version used to start a new TwiML session. + string? api_version?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The URL we call using a POST method to send message status information to your application. + string? message_status_callback?; + # The unique string that that we created to identify the Application resource. + string? sid?; + # The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_fallback_method?; + # The URL that we call when an error occurs while retrieving or executing the TwiML from `sms_url`. + string? sms_fallback_url?; + # The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_method?; + # The URL we call using a POST method to send status information to your application about SMS messages that refer to the application. + string? sms_status_callback?; + # The URL we call when the phone number receives an incoming SMS message. + string? sms_url?; + # The URL we call using the `status_callback_method` to send status information to your application. + string? status_callback?; + # The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" status_callback_method?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # Whether we look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`. + boolean? voice_caller_id_lookup?; + # The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_fallback_method?; + # The URL that we call when an error occurs retrieving or executing the TwiML requested by `url`. + string? voice_fallback_url?; + # The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_method?; + # The URL we call when the phone number assigned to this application receives a call. + string? voice_url?; + # Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`. + boolean? public_application_connect_enabled?; +}; + +public type ListCallResponse record { + Call[] calls?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Transcription record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resource. + string? account_sid?; + # The API version used to create the transcription. + string? api_version?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The duration of the transcribed audio in seconds. + string? duration?; + # The charge for the transcript in the currency associated with the account. This value is populated after the transcript is complete so it may not be available immediately. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format (e.g. `usd`, `eur`, `jpy`). + string? price_unit?; + # The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) from which the transcription was created. + string? recording_sid?; + # The unique string that that we created to identify the Transcription resource. + string? sid?; + Transcription_enum_status status?; + # The text content of the transcription. + string? transcription_text?; + # The transcription type. Can only be: `fast`. + string? 'type?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type Incoming_phone_number_enum_voice_receive_mode "voice"|"fax"; + +public type CallUser_defined_message_subscription record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that subscribed to the User Defined Messages. + string? account_sid?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the User Defined Message Subscription is associated with. This refers to the Call SID that is producing the User Defined Messages. + string? call_sid?; + # The SID that uniquely identifies this User Defined Message Subscription. + string? sid?; + # The date that this User Defined Message Subscription was created, given in RFC 2822 format. + string? date_created?; + # The URI of the User Defined Message Subscription Resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type Payments_enum_token_type "one-time"|"reusable"; + +public type Dependent_phone_number_enum_emergency_status "Active"|"Inactive"; + +public type Incoming_phone_number_local_enum_voice_receive_mode "voice"|"fax"; + +public type CreateMessageFeedbackRequest record { + Message_feedback_enum_outcome Outcome?; +}; + +public type ListOutgoingCallerIdResponse record { + Outgoing_caller_id[] outgoing_caller_ids?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CreateSipCredentialListMappingRequest record { + # A 34 character string that uniquely identifies the CredentialList resource to map to the SIP domain. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^CL[0-9a-fA-F]{32}$`} + string CredentialListSid; +}; + +public type ListSipIpAccessControlListResponse record { + SipSip_ip_access_control_list[] ip_access_control_lists?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Message_enum_status "queued"|"sending"|"sent"|"failed"|"delivered"|"undelivered"|"receiving"|"received"|"accepted"|"scheduled"|"read"|"partially_delivered"|"canceled"; + +public type ListAccountResponse record { + Account[] accounts?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListIncomingPhoneNumberResponse record { + Incoming_phone_number[] incoming_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Available_phone_number_machine_to_machine record { + # A formatted version of the phone number. + string? friendly_name?; + # The 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. + string? phone_number?; + # The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) of this phone number. Available for only phone numbers from the US and Canada. + string? lata?; + # The locality or city of this phone number's location. + string? locality?; + # The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) of this phone number. Available for only phone numbers from the US and Canada. + string? rate_center?; + # The latitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? latitude?; + # The longitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? longitude?; + # The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada. + string? region?; + # The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada. + string? postal_code?; + # The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of this phone number. + string? iso_country?; + # The type of [Address](https://www.twilio.com/docs/usage/api/address) resource the phone number requires. Can be: `none`, `any`, `local`, or `foreign`. `none` means no address is required. `any` means an address is required, but it can be anywhere in the world. `local` means an address in the phone number's country is required. `foreign` means an address outside of the phone number's country is required. + string? address_requirements?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are: `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Available_phone_number_local_capabilities? capabilities?; +}; + +public type Usage record { +}; + +public type SipSip_domainSip_authSip_auth_registrations record { +}; + +public type CreateParticipantRequest record { + # The phone number, Client identifier, or username portion of SIP address that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). Client identifiers are formatted `client:name`. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `from` must also be a phone number. If `to` is sip address, this value of `from` should be a username portion to be used to populate the P-Asserted-Identity header that is passed to the SIP endpoint. + string From; + # The phone number, SIP address, or Client identifier that received this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). SIP addresses are formatted as `sip:name@company.com`. Client identifiers are formatted `client:name`. [Custom parameters](https://www.twilio.com/docs/voice/api/conference-participant-resource#custom-parameters) may also be specified. + string To; + # The URL we should call using the `status_callback_method` to send status information to your application. + string StatusCallback?; + # The HTTP method we should use to call `status_callback`. Can be: `GET` and `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # The conference state changes that should generate a call to `status_callback`. Can be: `initiated`, `ringing`, `answered`, and `completed`. Separate multiple values with a space. The default value is `completed`. + string[] StatusCallbackEvent?; + # A label for this participant. If one is supplied, it may subsequently be used to fetch, update or delete the participant. + string Label?; + # The number of seconds that we should allow the phone to ring before assuming there is no answer. Can be an integer between `5` and `600`, inclusive. The default value is `60`. We always add a 5-second timeout buffer to outgoing calls, so value of 10 would result in an actual timeout that was closer to 15 seconds. + int Timeout?; + # Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`. + boolean Record?; + # Whether the agent is muted in the conference. Can be `true` or `false` and the default is `false`. + boolean Muted?; + # Whether to play a notification beep to the conference when the participant joins. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`. + string Beep?; + # Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference. + boolean StartConferenceOnEnter?; + # Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`. + boolean EndConferenceOnExit?; + # The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). + string WaitUrl?; + # The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" WaitMethod?; + # Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. Can be: `true` or `false` and defaults to `true`. + boolean EarlyMedia?; + # The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`. + int MaxParticipants?; + # Whether to record the conference the participant is joining. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`. + string ConferenceRecord?; + # Whether to trim leading and trailing silence from the conference recording. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`. + string ConferenceTrim?; + # The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored. + string ConferenceStatusCallback?; + # The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" ConferenceStatusCallbackMethod?; + # The conference state changes that should generate a call to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `modify`, `speaker`, and `announcement`. Separate multiple values with a space. Defaults to `start end`. + string[] ConferenceStatusCallbackEvent?; + # The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`. + string RecordingChannels?; + # The URL that we should call using the `recording_status_callback_method` when the recording status changes. + string RecordingStatusCallback?; + # The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" RecordingStatusCallbackMethod?; + # The SIP username used for authentication. + string SipAuthUsername?; + # The SIP password for authentication. + string SipAuthPassword?; + # The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`. + string Region?; + # The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available. + string ConferenceRecordingStatusCallback?; + # The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" ConferenceRecordingStatusCallbackMethod?; + # The recording state changes that should generate a call to `recording_status_callback`. Can be: `started`, `in-progress`, `paused`, `resumed`, `stopped`, `completed`, `failed`, and `absent`. Separate multiple values with a space, ex: `'in-progress completed failed'`. + string[] RecordingStatusCallbackEvent?; + # The conference recording state changes that generate a call to `conference_recording_status_callback`. Can be: `in-progress`, `completed`, `failed`, and `absent`. Separate multiple values with a space, ex: `'in-progress completed failed'` + string[] ConferenceRecordingStatusCallbackEvent?; + # Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined. + boolean Coaching?; + # The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^CA[0-9a-fA-F]{32}$`} + string CallSidToCoach?; + # Jitter buffer size for the connecting participant. Twilio will use this setting to apply Jitter Buffer before participant's audio is mixed into the conference. Can be: `off`, `small`, `medium`, and `large`. Default to `large`. + string JitterBufferSize?; + # The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta) + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^BY[0-9a-fA-F]{32}$`} + string Byoc?; + # The phone number, Client identifier, or username portion of SIP address that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). Client identifiers are formatted `client:name`. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `callerId` must also be a phone number. If `to` is sip address, this value of `callerId` should be a username portion to be used to populate the From header that is passed to the SIP endpoint. + string CallerId?; + # The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta) + string CallReason?; + # The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is sent from Twilio. `both` records the audio that is received and sent by Twilio. + string RecordingTrack?; + # The maximum duration of the call in seconds. Constraints depend on account and configuration. + int TimeLimit?; + # Whether to detect if a human, answering machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. Use `Enable` if you would like us to return `AnsweredBy` as soon as the called party is identified. Use `DetectMessageEnd`, if you would like to leave a message on an answering machine. For more information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection). + string MachineDetection?; + # The number of seconds that we should attempt to detect an answering machine before timing out and sending a voice request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds. + int MachineDetectionTimeout?; + # The number of milliseconds that is used as the measuring stick for the length of the speech activity, where durations lower than this value will be interpreted as a human and longer than this value as a machine. Possible Values: 1000-6000. Default: 2400. + int MachineDetectionSpeechThreshold?; + # The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Possible Values: 500-5000. Default: 1200. + int MachineDetectionSpeechEndThreshold?; + # The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000. + int MachineDetectionSilenceTimeout?; + # The URL that we should call using the `amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax. + string AmdStatusCallback?; + # The HTTP method we should use when calling the `amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" AmdStatusCallbackMethod?; + # Whether to trim any leading and trailing silence from the participant recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`. + string Trim?; + # A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call's call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call. + string CallToken?; +}; + +public type CreateUserDefinedMessageSubscriptionRequest record { + # The URL we should call using the `method` to send user defined events to your application. URLs must contain a valid hostname (underscores are not permitted). + string Callback; + # A unique string value to identify API call. This should be a unique string value per API call and can be a randomly generated. + string IdempotencyKey?; + # The HTTP method Twilio will use when requesting the above `Url`. Either `GET` or `POST`. Default is `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" Method?; +}; + +public type Stream_enum_update_status "stopped"; + +public type CallSiprec record { + # The SID of the Siprec resource. + string? sid?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Siprec resource. + string? account_sid?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Siprec resource is associated with. + string? call_sid?; + # The user-specified name of this Siprec, if one was given when the Siprec was created. This may be used to stop the Siprec. + string? name?; + Siprec_enum_status status?; + # The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type Usage_trigger_enum_recurring "daily"|"monthly"|"yearly"|"alltime"; + +public type CreateApplicationRequest record { + # The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is the account's default API version. + string ApiVersion?; + # The URL we should call when the phone number assigned to this application receives a call. + string VoiceUrl?; + # The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceMethod?; + # The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + string VoiceFallbackUrl?; + # The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceFallbackMethod?; + # The URL we should call using the `status_callback_method` to send status information to your application. + string StatusCallback?; + # The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`. + boolean VoiceCallerIdLookup?; + # The URL we should call when the phone number receives an incoming SMS message. + string SmsUrl?; + # The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsMethod?; + # The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`. + string SmsFallbackUrl?; + # The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsFallbackMethod?; + # The URL we should call using a POST method to send status information about SMS messages sent by the application. + string SmsStatusCallback?; + # The URL we should call using a POST method to send message status information to your application. + string MessageStatusCallback?; + # A descriptive string that you create to describe the new application. It can be up to 64 characters long. + string FriendlyName?; + # Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`. + boolean PublicApplicationConnectEnabled?; +}; + +public type UpdateConnectAppRequest record { + # The URL to redirect the user to after we authenticate the user and obtain authorization to access the Connect App. + string AuthorizeRedirectUrl?; + # The company name to set for the Connect App. + string CompanyName?; + # The HTTP method to use when calling `deauthorize_callback_url`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" DeauthorizeCallbackMethod?; + # The URL to call using the `deauthorize_callback_method` to de-authorize the Connect App. + string DeauthorizeCallbackUrl?; + # A description of the Connect App. + string Description?; + # A descriptive string that you create to describe the resource. It can be up to 64 characters long. + string FriendlyName?; + # A public URL where users can obtain more information about this Connect App. + string HomepageUrl?; + # A comma-separated list of the permissions you will request from the users of this ConnectApp. Can include: `get-all` and `post-all`. + Connect_app_enum_permission[] Permissions?; +}; + +public type Validation_request record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for the Caller ID. + string? account_sid?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Caller ID is associated with. + string? call_sid?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The phone number to verify in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number. + string? phone_number?; + # The 6 digit validation code that someone must enter to validate the Caller ID when `phone_number` is called. + string? validation_code?; +}; + +public type UpdateCallFeedbackRequest record { + # The call quality expressed as an integer from `1` to `5` where `1` represents very poor call quality and `5` represents a perfect call. + int QualityScore?; + # One or more issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`. + Call_feedback_enum_issues[] Issue?; +}; + +public type UpdateSiprecRequest record { + Siprec_enum_update_status Status; +}; + +public type UpdateConferenceRequest record { + Conference_enum_update_status Status?; + # The URL we should call to announce something into the conference. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs. + string AnnounceUrl?; + # The HTTP method used to call `announce_url`. Can be: `GET` or `POST` and the default is `POST` + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" AnnounceMethod?; +}; + +public type CreateSipCredentialRequest record { + # The username that will be passed when authenticating SIP requests. The username should be sent in response to Twilio's challenge of the initial INVITE. It can be up to 32 characters long. + string Username; + # The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`) + string Password; +}; + +public type Recording record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource. + string? account_sid?; + # The API version used during the recording. + string? api_version?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Recording resource is associated with. This will always refer to the parent leg of a two-leg call. + string? call_sid?; + # The Conference SID that identifies the conference associated with the recording, if a conference recording. + string? conference_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The start time of the recording in GMT and in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? start_time?; + # The length of the recording in seconds. + string? duration?; + # The unique string that that we created to identify the Recording resource. + string? sid?; + # The one-time cost of creating the recording in the `price_unit` currency. + string? price?; + # The currency used in the `price` property. Example: `USD`. + string? price_unit?; + Recording_enum_status status?; + # The number of channels in the final recording file. Can be: `1` or `2`. You can split a call with two legs into two separate recording channels if you record using [TwiML Dial](https://www.twilio.com/docs/voice/twiml/dial#record) or the [Outbound Rest API](https://www.twilio.com/docs/voice/make-calls#manage-your-outbound-call). + int? channels?; + Recording_enum_source 'source?; + # The error code that describes why the recording is `absent`. The error code is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). This value is null if the recording `status` is not `absent`. + int? error_code?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # How to decrypt the recording if it was encrypted using [Call Recording Encryption](https://www.twilio.com/docs/voice/tutorials/voice-recording-encryption) feature. + anydata? encryption_details?; + # A list of related resources identified by their relative URIs. + record {}? subresource_uris?; + # The URL of the media file associated with this recording resource. When stored externally, this is the full URL location of the media file. + string? media_url?; +}; + +public type Incoming_phone_numberIncoming_phone_number_assigned_add_on record { + # The unique string that that we created to identify the resource. + string? sid?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource. + string? account_sid?; + # The SID of the Phone Number to which the Add-on is assigned. + string? resource_sid?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # A short description of the functionality that the Add-on provides. + string? description?; + # A JSON string that represents the current configuration of this Add-on installation. + anydata? configuration?; + # An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. + string? unique_name?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # A list of related resources identified by their relative URIs. + record {}? subresource_uris?; +}; + +public type ListRecordingTranscriptionResponse record { + RecordingRecording_transcription[] transcriptions?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Incoming_phone_number record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this IncomingPhoneNumber resource. + string? account_sid?; + # The SID of the Address resource associated with the phone number. + string? address_sid?; + Incoming_phone_number_enum_address_requirement address_requirements?; + # The API version used to start a new TwiML session. + string? api_version?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Incoming_phone_number_capabilities? capabilities?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The SID of the Identity resource that we associate with the phone number. Some regions require an Identity to meet local regulations. + string? identity_sid?; + # The 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. + string? phone_number?; + # The phone number's origin. `twilio` identifies Twilio-owned phone numbers and `hosted` identifies hosted phone numbers. + string? origin?; + # The unique string that that we created to identify this IncomingPhoneNumber resource. + string? sid?; + # The SID of the application that handles SMS messages sent to the phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application. + string? sms_application_sid?; + # The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_fallback_method?; + # The URL that we call when an error occurs while retrieving or executing the TwiML from `sms_url`. + string? sms_fallback_url?; + # The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_method?; + # The URL we call when the phone number receives an incoming SMS message. + string? sms_url?; + # The URL we call using the `status_callback_method` to send status information to your application. + string? status_callback?; + # The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" status_callback_method?; + # The SID of the Trunk that handles calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + string? trunk_sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + Incoming_phone_number_enum_voice_receive_mode voice_receive_mode?; + # The SID of the application that handles calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + string? voice_application_sid?; + # Whether we look up the caller's caller-ID name from the CNAM database ($0.01 per look up). Can be: `true` or `false`. + boolean? voice_caller_id_lookup?; + # The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_fallback_method?; + # The URL that we call when an error occurs retrieving or executing the TwiML requested by `url`. + string? voice_fallback_url?; + # The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_method?; + # The URL we call when the phone number receives a call. The `voice_url` will not be used if a `voice_application_sid` or a `trunk_sid` is set. + string? voice_url?; + Incoming_phone_number_enum_emergency_status emergency_status?; + # The SID of the emergency address configuration that we use for emergency calling from this phone number. + string? emergency_address_sid?; + Incoming_phone_number_enum_emergency_address_status emergency_address_status?; + # The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + string? bundle_sid?; + string? status?; +}; + +public type UsageUsage_recordUsage_record_last_month record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage. + string? account_sid?; + # The API version used to create the resource. + string? api_version?; + # Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + string? as_of?; + Usage_record_last_month_enum_category category?; + # The number of usage events, such as the number of calls. + string? count?; + # The units in which `count` is measured, such as `calls` for calls or `messages` for SMS. + string? count_unit?; + # A plain-language description of the usage category. + string? description?; + # The last date for which usage is included in the UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? end_date?; + # The total price of the usage in the currency specified in `price_unit` and associated with the account. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format, such as `usd`, `eur`, and `jpy`. + string? price_unit?; + # The first date for which usage is included in this UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? start_date?; + # A list of related resources identified by their URIs. For more information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + record {}? subresource_uris?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The amount used to bill usage and measured in units described in `usage_unit`. + string? usage?; + # The units in which `usage` is measured, such as `minutes` for calls or `messages` for SMS. + string? usage_unit?; +}; + +public type Conference_enum_update_status "completed"; + +public type CallCall_notificationInstance record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call Notification resource. + string? account_sid?; + # The API version used to create the Call Notification resource. + string? api_version?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Call Notification resource is associated with. + string? call_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # A unique error code for the error condition that is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + string? error_code?; + # An integer log level that corresponds to the type of notification: `0` is ERROR, `1` is WARNING. + string? log?; + # The date the notification was actually generated in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. Message buffering can cause this value to differ from `date_created`. + string? message_date?; + # The text of the notification. + string? message_text?; + # The URL for more information about the error condition. This value is a page in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + string? more_info?; + # The HTTP method used to generate the notification. If the notification was generated during a phone call, this is the HTTP Method used to request the resource on your server. If the notification was generated by your use of our REST API, this is the HTTP method used to call the resource on our servers. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" request_method?; + # The URL of the resource that generated the notification. If the notification was generated during a phone call, this is the URL of the resource on your server that caused the notification. If the notification was generated by your use of our REST API, this is the URL of the resource you called. + string? request_url?; + # The HTTP GET or POST variables we sent to your server. However, if the notification was generated by our REST API, this contains the HTTP POST or PUT variables you sent to our API. + string? request_variables?; + # The HTTP body returned by your server. + string? response_body?; + # The HTTP headers returned by your server. + string? response_headers?; + # The unique string that that we created to identify the Call Notification resource. + string? sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type ListIncomingPhoneNumberTollFreeResponse record { + Incoming_phone_numberIncoming_phone_number_toll_free[] incoming_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CallPayments record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. + string? account_sid?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Payments resource is associated with. This will refer to the call sid that is producing the payment card (credit/ACH) information thru DTMF. + string? call_sid?; + # The SID of the Payments resource. + string? sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type ListSipIpAccessControlListMappingResponse record { + SipSip_domainSip_ip_access_control_list_mapping[] ip_access_control_list_mappings?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Available_phone_number_toll_free record { + # A formatted version of the phone number. + string? friendly_name?; + # The 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. + string? phone_number?; + # The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) of this phone number. Available for only phone numbers from the US and Canada. + string? lata?; + # The locality or city of this phone number's location. + string? locality?; + # The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) of this phone number. Available for only phone numbers from the US and Canada. + string? rate_center?; + # The latitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? latitude?; + # The longitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? longitude?; + # The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada. + string? region?; + # The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada. + string? postal_code?; + # The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of this phone number. + string? iso_country?; + # The type of [Address](https://www.twilio.com/docs/usage/api/address) resource the phone number requires. Can be: `none`, `any`, `local`, or `foreign`. `none` means no address is required. `any` means an address is required, but it can be anywhere in the world. `local` means an address in the phone number's country is required. `foreign` means an address outside of the phone number's country is required. + string? address_requirements?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are: `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Available_phone_number_local_capabilities? capabilities?; +}; + +public type UsageUsage_recordUsage_record_monthly record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage. + string? account_sid?; + # The API version used to create the resource. + string? api_version?; + # Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + string? as_of?; + Usage_record_monthly_enum_category category?; + # The number of usage events, such as the number of calls. + string? count?; + # The units in which `count` is measured, such as `calls` for calls or `messages` for SMS. + string? count_unit?; + # A plain-language description of the usage category. + string? description?; + # The last date for which usage is included in the UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? end_date?; + # The total price of the usage in the currency specified in `price_unit` and associated with the account. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format, such as `usd`, `eur`, and `jpy`. + string? price_unit?; + # The first date for which usage is included in this UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? start_date?; + # A list of related resources identified by their URIs. For more information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + record {}? subresource_uris?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The amount used to bill usage and measured in units described in `usage_unit`. + string? usage?; + # The units in which `usage` is measured, such as `minutes` for calls or `messages` for SMS. + string? usage_unit?; +}; + +public type Incoming_phone_numberIncoming_phone_number_local record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource. + string? account_sid?; + # The SID of the Address resource associated with the phone number. + string? address_sid?; + Incoming_phone_number_local_enum_address_requirement address_requirements?; + # The API version used to start a new TwiML session. + string? api_version?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Incoming_phone_number_capabilities? capabilities?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The SID of the Identity resource that we associate with the phone number. Some regions require an Identity to meet local regulations. + string? identity_sid?; + # The 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. + string? phone_number?; + # The phone number's origin. `twilio` identifies Twilio-owned phone numbers and `hosted` identifies hosted phone numbers. + string? origin?; + # The unique string that that we created to identify the resource. + string? sid?; + # The SID of the application that handles SMS messages sent to the phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application. + string? sms_application_sid?; + # The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_fallback_method?; + # The URL that we call when an error occurs while retrieving or executing the TwiML from `sms_url`. + string? sms_fallback_url?; + # The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_method?; + # The URL we call when the phone number receives an incoming SMS message. + string? sms_url?; + # The URL we call using the `status_callback_method` to send status information to your application. + string? status_callback?; + # The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" status_callback_method?; + # The SID of the Trunk that handles calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + string? trunk_sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + Incoming_phone_number_local_enum_voice_receive_mode voice_receive_mode?; + # The SID of the application that handles calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + string? voice_application_sid?; + # Whether we look up the caller's caller-ID name from the CNAM database ($0.01 per look up). Can be: `true` or `false`. + boolean? voice_caller_id_lookup?; + # The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_fallback_method?; + # The URL that we call when an error occurs retrieving or executing the TwiML requested by `url`. + string? voice_fallback_url?; + # The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_method?; + # The URL we call when this phone number receives a call. The `voice_url` will not be used if a `voice_application_sid` or a `trunk_sid` is set. + string? voice_url?; + Incoming_phone_number_local_enum_emergency_status emergency_status?; + # The SID of the emergency address configuration that we use for emergency calling from this phone number. + string? emergency_address_sid?; + Incoming_phone_number_local_enum_emergency_address_status emergency_address_status?; + # The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + string? bundle_sid?; + string? status?; +}; + +public type Participant_enum_status "queued"|"connecting"|"ringing"|"connected"|"complete"|"failed"; + +public type UpdateStreamRequest record { + Stream_enum_update_status Status; +}; + +public type Conference_recording_enum_status "in-progress"|"paused"|"stopped"|"processing"|"completed"|"absent"; + +public type UpdateSipDomainRequest record { + # A descriptive string that you created to describe the resource. It can be up to 64 characters long. + string FriendlyName?; + # The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceFallbackMethod?; + # The URL that we should call when an error occurs while retrieving or executing the TwiML requested by `voice_url`. + string VoiceFallbackUrl?; + # The HTTP method we should use to call `voice_url` + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceMethod?; + # The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceStatusCallbackMethod?; + # The URL that we should call to pass status parameters (such as call ended) to your application. + string VoiceStatusCallbackUrl?; + # The URL we should call when the domain receives a call. + string VoiceUrl?; + # Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not. + boolean SipRegistration?; + # The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and "-" and must end with `sip.twilio.com`. + string DomainName?; + # Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. + boolean EmergencyCallingEnabled?; + # Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. + boolean Secure?; + # The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^BY[0-9a-fA-F]{32}$`} + string ByocTrunkSid?; + # Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^PN[0-9a-fA-F]{32}$`} + string EmergencyCallerSid?; +}; + +public type UpdateMemberRequest record { + # The absolute URL of the Queue resource. + string Url; + # How to pass the update request data. Can be `GET` or `POST` and the default is `POST`. `POST` sends the data as encoded form data and `GET` sends the data as query parameters. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" Method?; +}; + +public type CreateSipCredentialListRequest record { + # A human readable descriptive text that describes the CredentialList, up to 64 characters long. + string FriendlyName; +}; + +public type CreateSipIpAddressRequest record { + # A human readable descriptive text for this resource, up to 255 characters long. + string FriendlyName; + # An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. + string IpAddress; + # An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used. + int CidrPrefixLength?; +}; + +public type Call_recording_enum_status "in-progress"|"paused"|"stopped"|"processing"|"completed"|"absent"; + +public type ListSipIpAddressResponse record { + SipSip_ip_access_control_listSip_ip_address[] ip_addresses?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Incoming_phone_number_local_enum_emergency_address_status "registered"|"unregistered"|"pending-registration"|"registration-failure"|"pending-unregistration"|"unregistration-failure"; + +public type AddressDependent_phone_number record { + # The unique string that that we created to identify the DependentPhoneNumber resource. + string? sid?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the DependentPhoneNumber resource. + string? account_sid?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The 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. + string? phone_number?; + # The URL we call when the phone number receives a call. The `voice_url` will not be used if a `voice_application_sid` or a `trunk_sid` is set. + string? voice_url?; + # The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_method?; + # The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_fallback_method?; + # The URL that we call when an error occurs retrieving or executing the TwiML requested by `url`. + string? voice_fallback_url?; + # Whether we look up the caller's caller-ID name from the CNAM database. Can be: `true` or `false`. Caller ID lookups can cost $0.01 each. + boolean? voice_caller_id_lookup?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_fallback_method?; + # The URL that we call when an error occurs while retrieving or executing the TwiML from `sms_url`. + string? sms_fallback_url?; + # The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_method?; + # The URL we call when the phone number receives an incoming SMS message. + string? sms_url?; + Dependent_phone_number_enum_address_requirement address_requirements?; + # The set of Boolean properties that indicates whether a phone number can receive calls or messages. Capabilities are `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + anydata? capabilities?; + # The URL we call using the `status_callback_method` to send status information to your application. + string? status_callback?; + # The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" status_callback_method?; + # The API version used to start a new TwiML session. + string? api_version?; + # The SID of the application that handles SMS messages sent to the phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application. + string? sms_application_sid?; + # The SID of the application that handles calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + string? voice_application_sid?; + # The SID of the Trunk that handles calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + string? trunk_sid?; + Dependent_phone_number_enum_emergency_status emergency_status?; + # The SID of the emergency address configuration that we use for emergency calling from the phone number. + string? emergency_address_sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type ListAvailablePhoneNumberLocalResponse record { + Available_phone_number_local[] available_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListUsageRecordYesterdayResponse record { + UsageUsage_recordUsage_record_yesterday[] usage_records?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Incoming_phone_number_enum_address_requirement "none"|"any"|"local"|"foreign"; + +public type Incoming_phone_number_toll_free_enum_voice_receive_mode "voice"|"fax"; + +public type UpdateQueueRequest record { + # A descriptive string that you created to describe this resource. It can be up to 64 characters long. + string FriendlyName?; + # The maximum number of calls allowed to be in the queue. The default is 1000. The maximum is 5000. + int MaxSize?; +}; + +public type CreateNewSigningKeyRequest record { + # A descriptive string that you create to describe the resource. It can be up to 64 characters long. + string FriendlyName?; +}; + +public type UpdateSipIpAccessControlListRequest record { + # A human readable descriptive text, up to 255 characters long. + string FriendlyName; +}; + +public type SipSip_domainSip_ip_access_control_list_mapping record { + # The unique id of the Account that is responsible for this resource. + string? account_sid?; + # The date that this resource was created, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_created?; + # The date that this resource was last updated, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_updated?; + # The unique string that is created to identify the SipDomain resource. + string? domain_sid?; + # A human readable descriptive text for this resource, up to 64 characters long. + string? friendly_name?; + # A 34 character string that uniquely identifies this resource. + string? sid?; + # The URI for this resource, relative to `https://api.twilio.com` + string? uri?; +}; + +public type New_signing_key record { + # The unique string that that we created to identify the NewSigningKey resource. + string? sid?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth `password`). **Note that for security reasons, this field is ONLY returned when the API Key is first created.** + string? secret?; +}; + +public type ListAvailablePhoneNumberCountryResponse record { + Available_phone_number_country[] countries?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListCallRecordingResponse record { + CallCall_recording[] recordings?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type UpdateShortCodeRequest record { + # A descriptive string that you created to describe this resource. It can be up to 64 characters long. By default, the `FriendlyName` is the short code. + string FriendlyName?; + # The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. + string ApiVersion?; + # The URL we should call when receiving an incoming SMS message to this short code. + string SmsUrl?; + # The HTTP method we should use when calling the `sms_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsMethod?; + # The URL that we should call if an error occurs while retrieving or executing the TwiML from `sms_url`. + string SmsFallbackUrl?; + # The HTTP method that we should use to call the `sms_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsFallbackMethod?; +}; + +public type Available_phone_number_country record { + # The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country. + string? country_code?; + # The name of the country. + string? country?; + # The URI of the Country resource, relative to `https://api.twilio.com`. + string? uri?; + # Whether all phone numbers available in the country are new to the Twilio platform. `true` if they are and `false` if all numbers are not in the Twilio Phone Number Beta program. + boolean? beta?; + # A list of related AvailablePhoneNumber resources identified by their URIs relative to `https://api.twilio.com`. + record {}? subresource_uris?; +}; + +public type UpdateConferenceRecordingRequest record { + Conference_recording_enum_status Status; + # Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`. + string PauseBehavior?; +}; + +public type Balance record { + # The unique SID identifier of the Account. + string? account_sid?; + # The balance of the Account, in units specified by the unit parameter. Balance changes may not be reflected immediately. Child accounts do not contain balance information + string? balance?; + # The units of currency for the account balance + string? currency?; +}; + +public type Incoming_phone_number_toll_free_enum_address_requirement "none"|"any"|"local"|"foreign"; + +public type Message_enum_update_status "canceled"; + +public type CreateMessageRequest record { + # The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/messaging/channels), e.g. `whatsapp:+15552229999`. + string To; + # The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messaging_service_sid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource). + string StatusCallback?; + # The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). If this parameter is provided, the `status_callback` parameter of this request is ignored; [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `message_status_callback` URL. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string ApplicationSid?; + # The maximum price in US dollars that you are willing to pay for this Message's delivery. The value can have up to four decimal places. When the `max_price` parameter is provided, the cost of a message is checked before it is sent. If the cost exceeds `max_price`, the message is not sent and the Message `status` is `failed`. + decimal MaxPrice?; + # Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`. + boolean ProvideFeedback?; + # Total number of attempts made (including this request) to send the message regardless of the provider used + int Attempt?; + # The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `14400`. Default value is `14400`. A `validity_period` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html) + int ValidityPeriod?; + # Reserved + boolean ForceDelivery?; + Message_enum_content_retention ContentRetention?; + Message_enum_address_retention AddressRetention?; + # Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`. + boolean SmartEncoded?; + # Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp). + string[] PersistentAction?; + # For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/how-to-configure-link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided. + boolean ShortenUrls?; + Message_enum_schedule_type ScheduleType?; + # The time that Twilio will send the message. Must be in ISO 8601 format. + string SendAt?; + # If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media. + boolean SendAsMms?; + # For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `content_sid` parameter must also be provided. If values are not defined in the `content_variables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used. + string ContentVariables?; + Message_enum_risk_check RiskCheck?; + # The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool. + string From?; + # The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^MG[0-9a-fA-F]{32}$`} + string MessagingServiceSid?; + # The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages). + string Body?; + # The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply. + string[] MediaUrl?; + # For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio's response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources). + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^HX[0-9a-fA-F]{32}$`} + string ContentSid?; +}; + +public type Message_enum_direction "inbound"|"outbound-api"|"outbound-call"|"outbound-reply"; + +public type Incoming_phone_number_enum_emergency_status "Active"|"Inactive"; + +public type Payments_enum_bank_account_type "consumer-checking"|"consumer-savings"|"commercial-checking"; + +public type Message record { + # The text content of the message + string? body?; + # The number of segments that make up the complete message. SMS message bodies that exceed the [character limit](https://www.twilio.com/docs/glossary/what-sms-character-limit) are segmented and charged as multiple messages. Note: For messages sent via a Messaging Service, `num_segments` is initially `0`, since a sender hasn't yet been assigned. + string? num_segments?; + Message_enum_direction direction?; + # The sender's phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). For incoming messages, this is the number or channel address of the sender. For outgoing messages, this value is a Twilio phone number, alphanumeric sender ID, short code, or channel address from which the message is sent. + string? 'from?; + # The recipient's phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format) or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g. `whatsapp:+15552229999`) + string? to?; + # The [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) timestamp (in GMT) of when the Message resource was last updated + string? date_updated?; + # The amount billed for the message in the currency specified by `price_unit`. The `price` is populated after the message has been sent/received, and may not be immediately availalble. View the [Pricing page](https://www.twilio.com/en-us/pricing) for more details. + string? price?; + # The description of the `error_code` if the Message `status` is `failed` or `undelivered`. If no error was encountered, the value is `null`. + string? error_message?; + # The URI of the Message resource, relative to `https://api.twilio.com`. + string? uri?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with the Message resource + string? account_sid?; + # The number of media files associated with the Message resource. + string? num_media?; + Message_enum_status status?; + # The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) associated with the Message resource. The value is `null` if a Messaging Service was not used. + string? messaging_service_sid?; + # The unique, Twilio-provided string that identifies the Message resource. + string? sid?; + # The [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) timestamp (in GMT) of when the Message was sent. For an outgoing message, this is when Twilio sent the message. For an incoming message, this is when Twilio sent the HTTP request to your incoming message webhook URL. + string? date_sent?; + # The [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) timestamp (in GMT) of when the Message resource was created + string? date_created?; + # The [error code](https://www.twilio.com/docs/api/errors) returned if the Message `status` is `failed` or `undelivered`. If no error was encountered, the value is `null`. + int? error_code?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format (e.g. `usd`, `eur`, `jpy`). + string? price_unit?; + # The API version used to process the Message + string? api_version?; + # A list of related resources identified by their URIs relative to `https://api.twilio.com` + record {}? subresource_uris?; +}; + +public type SipSip_domainSip_authSip_auth_registrationsSip_auth_registrations_credential_list_mapping record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resource. + string? account_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The unique string that that we created to identify the CredentialListMapping resource. + string? sid?; +}; + +public type UsageUsage_recordUsage_record_daily record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage. + string? account_sid?; + # The API version used to create the resource. + string? api_version?; + # Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + string? as_of?; + Usage_record_daily_enum_category category?; + # The number of usage events, such as the number of calls. + string? count?; + # The units in which `count` is measured, such as `calls` for calls or `messages` for SMS. + string? count_unit?; + # A plain-language description of the usage category. + string? description?; + # The last date for which usage is included in the UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? end_date?; + # The total price of the usage in the currency specified in `price_unit` and associated with the account. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format, such as `usd`, `eur`, and `jpy`. + string? price_unit?; + # The first date for which usage is included in this UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? start_date?; + # A list of related resources identified by their URIs. For more information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + record {}? subresource_uris?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The amount used to bill usage and measured in units described in `usage_unit`. + string? usage?; + # The units in which `usage` is measured, such as `minutes` for calls or `messages` for SMS. + string? usage_unit?; +}; + +public type ListAuthorizedConnectAppResponse record { + Authorized_connect_app[] authorized_connect_apps?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CallCall_event record { + # Contains a dictionary representing the request of the call. + anydata? request?; + # Contains a dictionary representing the call response, including a list of the call events. + anydata? response?; +}; + +public type Short_code record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this ShortCode resource. + string? account_sid?; + # The API version used to start a new TwiML session when an SMS message is sent to this short code. + string? api_version?; + # The date and time in GMT that this resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # A string that you assigned to describe this resource. By default, the `FriendlyName` is the short code. + string? friendly_name?; + # The short code. e.g., 894546. + string? short_code?; + # The unique string that that we created to identify this ShortCode resource. + string? sid?; + # The HTTP method we use to call the `sms_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_fallback_method?; + # The URL that we call if an error occurs while retrieving or executing the TwiML from `sms_url`. + string? sms_fallback_url?; + # The HTTP method we use to call the `sms_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_method?; + # The URL we call when receiving an incoming SMS message to this short code. + string? sms_url?; + # The URI of this resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type CreateStreamRequest record { + # Relative or absolute url where WebSocket connection will be established. + string Url; + # The user-specified name of this Stream, if one was given when the Stream was created. This may be used to stop the Stream. + string Name?; + Stream_enum_track Track?; + # Absolute URL of the status callback. + string StatusCallback?; + # The http method for the status_callback (one of GET, POST). + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # Parameter name + string Parameter1\.Name?; + # Parameter value + string Parameter1\.Value?; + # Parameter name + string Parameter2\.Name?; + # Parameter value + string Parameter2\.Value?; + # Parameter name + string Parameter3\.Name?; + # Parameter value + string Parameter3\.Value?; + # Parameter name + string Parameter4\.Name?; + # Parameter value + string Parameter4\.Value?; + # Parameter name + string Parameter5\.Name?; + # Parameter value + string Parameter5\.Value?; + # Parameter name + string Parameter6\.Name?; + # Parameter value + string Parameter6\.Value?; + # Parameter name + string Parameter7\.Name?; + # Parameter value + string Parameter7\.Value?; + # Parameter name + string Parameter8\.Name?; + # Parameter value + string Parameter8\.Value?; + # Parameter name + string Parameter9\.Name?; + # Parameter value + string Parameter9\.Value?; + # Parameter name + string Parameter10\.Name?; + # Parameter value + string Parameter10\.Value?; + # Parameter name + string Parameter11\.Name?; + # Parameter value + string Parameter11\.Value?; + # Parameter name + string Parameter12\.Name?; + # Parameter value + string Parameter12\.Value?; + # Parameter name + string Parameter13\.Name?; + # Parameter value + string Parameter13\.Value?; + # Parameter name + string Parameter14\.Name?; + # Parameter value + string Parameter14\.Value?; + # Parameter name + string Parameter15\.Name?; + # Parameter value + string Parameter15\.Value?; + # Parameter name + string Parameter16\.Name?; + # Parameter value + string Parameter16\.Value?; + # Parameter name + string Parameter17\.Name?; + # Parameter value + string Parameter17\.Value?; + # Parameter name + string Parameter18\.Name?; + # Parameter value + string Parameter18\.Value?; + # Parameter name + string Parameter19\.Name?; + # Parameter value + string Parameter19\.Value?; + # Parameter name + string Parameter20\.Name?; + # Parameter value + string Parameter20\.Value?; + # Parameter name + string Parameter21\.Name?; + # Parameter value + string Parameter21\.Value?; + # Parameter name + string Parameter22\.Name?; + # Parameter value + string Parameter22\.Value?; + # Parameter name + string Parameter23\.Name?; + # Parameter value + string Parameter23\.Value?; + # Parameter name + string Parameter24\.Name?; + # Parameter value + string Parameter24\.Value?; + # Parameter name + string Parameter25\.Name?; + # Parameter value + string Parameter25\.Value?; + # Parameter name + string Parameter26\.Name?; + # Parameter value + string Parameter26\.Value?; + # Parameter name + string Parameter27\.Name?; + # Parameter value + string Parameter27\.Value?; + # Parameter name + string Parameter28\.Name?; + # Parameter value + string Parameter28\.Value?; + # Parameter name + string Parameter29\.Name?; + # Parameter value + string Parameter29\.Value?; + # Parameter name + string Parameter30\.Name?; + # Parameter value + string Parameter30\.Value?; + # Parameter name + string Parameter31\.Name?; + # Parameter value + string Parameter31\.Value?; + # Parameter name + string Parameter32\.Name?; + # Parameter value + string Parameter32\.Value?; + # Parameter name + string Parameter33\.Name?; + # Parameter value + string Parameter33\.Value?; + # Parameter name + string Parameter34\.Name?; + # Parameter value + string Parameter34\.Value?; + # Parameter name + string Parameter35\.Name?; + # Parameter value + string Parameter35\.Value?; + # Parameter name + string Parameter36\.Name?; + # Parameter value + string Parameter36\.Value?; + # Parameter name + string Parameter37\.Name?; + # Parameter value + string Parameter37\.Value?; + # Parameter name + string Parameter38\.Name?; + # Parameter value + string Parameter38\.Value?; + # Parameter name + string Parameter39\.Name?; + # Parameter value + string Parameter39\.Value?; + # Parameter name + string Parameter40\.Name?; + # Parameter value + string Parameter40\.Value?; + # Parameter name + string Parameter41\.Name?; + # Parameter value + string Parameter41\.Value?; + # Parameter name + string Parameter42\.Name?; + # Parameter value + string Parameter42\.Value?; + # Parameter name + string Parameter43\.Name?; + # Parameter value + string Parameter43\.Value?; + # Parameter name + string Parameter44\.Name?; + # Parameter value + string Parameter44\.Value?; + # Parameter name + string Parameter45\.Name?; + # Parameter value + string Parameter45\.Value?; + # Parameter name + string Parameter46\.Name?; + # Parameter value + string Parameter46\.Value?; + # Parameter name + string Parameter47\.Name?; + # Parameter value + string Parameter47\.Value?; + # Parameter name + string Parameter48\.Name?; + # Parameter value + string Parameter48\.Value?; + # Parameter name + string Parameter49\.Name?; + # Parameter value + string Parameter49\.Value?; + # Parameter name + string Parameter50\.Name?; + # Parameter value + string Parameter50\.Value?; + # Parameter name + string Parameter51\.Name?; + # Parameter value + string Parameter51\.Value?; + # Parameter name + string Parameter52\.Name?; + # Parameter value + string Parameter52\.Value?; + # Parameter name + string Parameter53\.Name?; + # Parameter value + string Parameter53\.Value?; + # Parameter name + string Parameter54\.Name?; + # Parameter value + string Parameter54\.Value?; + # Parameter name + string Parameter55\.Name?; + # Parameter value + string Parameter55\.Value?; + # Parameter name + string Parameter56\.Name?; + # Parameter value + string Parameter56\.Value?; + # Parameter name + string Parameter57\.Name?; + # Parameter value + string Parameter57\.Value?; + # Parameter name + string Parameter58\.Name?; + # Parameter value + string Parameter58\.Value?; + # Parameter name + string Parameter59\.Name?; + # Parameter value + string Parameter59\.Value?; + # Parameter name + string Parameter60\.Name?; + # Parameter value + string Parameter60\.Value?; + # Parameter name + string Parameter61\.Name?; + # Parameter value + string Parameter61\.Value?; + # Parameter name + string Parameter62\.Name?; + # Parameter value + string Parameter62\.Value?; + # Parameter name + string Parameter63\.Name?; + # Parameter value + string Parameter63\.Value?; + # Parameter name + string Parameter64\.Name?; + # Parameter value + string Parameter64\.Value?; + # Parameter name + string Parameter65\.Name?; + # Parameter value + string Parameter65\.Value?; + # Parameter name + string Parameter66\.Name?; + # Parameter value + string Parameter66\.Value?; + # Parameter name + string Parameter67\.Name?; + # Parameter value + string Parameter67\.Value?; + # Parameter name + string Parameter68\.Name?; + # Parameter value + string Parameter68\.Value?; + # Parameter name + string Parameter69\.Name?; + # Parameter value + string Parameter69\.Value?; + # Parameter name + string Parameter70\.Name?; + # Parameter value + string Parameter70\.Value?; + # Parameter name + string Parameter71\.Name?; + # Parameter value + string Parameter71\.Value?; + # Parameter name + string Parameter72\.Name?; + # Parameter value + string Parameter72\.Value?; + # Parameter name + string Parameter73\.Name?; + # Parameter value + string Parameter73\.Value?; + # Parameter name + string Parameter74\.Name?; + # Parameter value + string Parameter74\.Value?; + # Parameter name + string Parameter75\.Name?; + # Parameter value + string Parameter75\.Value?; + # Parameter name + string Parameter76\.Name?; + # Parameter value + string Parameter76\.Value?; + # Parameter name + string Parameter77\.Name?; + # Parameter value + string Parameter77\.Value?; + # Parameter name + string Parameter78\.Name?; + # Parameter value + string Parameter78\.Value?; + # Parameter name + string Parameter79\.Name?; + # Parameter value + string Parameter79\.Value?; + # Parameter name + string Parameter80\.Name?; + # Parameter value + string Parameter80\.Value?; + # Parameter name + string Parameter81\.Name?; + # Parameter value + string Parameter81\.Value?; + # Parameter name + string Parameter82\.Name?; + # Parameter value + string Parameter82\.Value?; + # Parameter name + string Parameter83\.Name?; + # Parameter value + string Parameter83\.Value?; + # Parameter name + string Parameter84\.Name?; + # Parameter value + string Parameter84\.Value?; + # Parameter name + string Parameter85\.Name?; + # Parameter value + string Parameter85\.Value?; + # Parameter name + string Parameter86\.Name?; + # Parameter value + string Parameter86\.Value?; + # Parameter name + string Parameter87\.Name?; + # Parameter value + string Parameter87\.Value?; + # Parameter name + string Parameter88\.Name?; + # Parameter value + string Parameter88\.Value?; + # Parameter name + string Parameter89\.Name?; + # Parameter value + string Parameter89\.Value?; + # Parameter name + string Parameter90\.Name?; + # Parameter value + string Parameter90\.Value?; + # Parameter name + string Parameter91\.Name?; + # Parameter value + string Parameter91\.Value?; + # Parameter name + string Parameter92\.Name?; + # Parameter value + string Parameter92\.Value?; + # Parameter name + string Parameter93\.Name?; + # Parameter value + string Parameter93\.Value?; + # Parameter name + string Parameter94\.Name?; + # Parameter value + string Parameter94\.Value?; + # Parameter name + string Parameter95\.Name?; + # Parameter value + string Parameter95\.Value?; + # Parameter name + string Parameter96\.Name?; + # Parameter value + string Parameter96\.Value?; + # Parameter name + string Parameter97\.Name?; + # Parameter value + string Parameter97\.Value?; + # Parameter name + string Parameter98\.Name?; + # Parameter value + string Parameter98\.Value?; + # Parameter name + string Parameter99\.Name?; + # Parameter value + string Parameter99\.Value?; +}; + +public type CreateUserDefinedMessageRequest record { + # The User Defined Message in the form of URL-encoded JSON string. + string Content; + # A unique string value to identify API call. This should be a unique string value per API call and can be a randomly generated. + string IdempotencyKey?; +}; + +public type Recording_enum_source "DialVerb"|"Conference"|"OutboundAPI"|"Trunking"|"RecordVerb"|"StartCallRecordingAPI"|"StartConferenceRecordingAPI"; + +public type CreateSipAuthCallsIpAccessControlListMappingRequest record { + # The SID of the IpAccessControlList resource to map to the SIP domain. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AL[0-9a-fA-F]{32}$`} + string IpAccessControlListSid; +}; + +public type Message_enum_schedule_type "fixed"; + +public type Outgoing_caller_id record { + # The unique string that that we created to identify the OutgoingCallerId resource. + string? sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resource. + string? account_sid?; + # The 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. + string? phone_number?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type Message_enum_content_retention "retain"|"discard"; + +public type RecordingRecording_transcription record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resource. + string? account_sid?; + # The API version used to create the transcription. + string? api_version?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The duration of the transcribed audio in seconds. + string? duration?; + # The charge for the transcript in the currency associated with the account. This value is populated after the transcript is complete so it may not be available immediately. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format (e.g. `usd`, `eur`, `jpy`). + string? price_unit?; + # The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) from which the transcription was created. + string? recording_sid?; + # The unique string that that we created to identify the Transcription resource. + string? sid?; + Recording_transcription_enum_status status?; + # The text content of the transcription. + string? transcription_text?; + # The transcription type. + string? 'type?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type ListRecordingAddOnResultResponse record { + RecordingRecording_add_on_result[] add_on_results?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Authorized_connect_app_enum_permission "get-all"|"post-all"; + +public type Call_enum_status "queued"|"ringing"|"in-progress"|"completed"|"busy"|"failed"|"no-answer"|"canceled"; + +public type CreateValidationRequestRequest record { + # The phone number to verify in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number. + string PhoneNumber; + # A descriptive string that you create to describe the new caller ID resource. It can be up to 64 characters long. The default value is a formatted version of the phone number. + string FriendlyName?; + # The number of seconds to delay before initiating the verification call. Can be an integer between `0` and `60`, inclusive. The default is `0`. + int CallDelay?; + # The digits to dial after connecting the verification call. + string Extension?; + # The URL we should call using the `status_callback_method` to send status information about the verification process to your application. + string StatusCallback?; + # The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`, and the default is `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; +}; + +public type ListUsageRecordAllTimeResponse record { + UsageUsage_recordUsage_record_all_time[] usage_records?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type UpdateUsageTriggerRequest record { + # The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" CallbackMethod?; + # The URL we should call using `callback_method` when the trigger fires. + string CallbackUrl?; + # A descriptive string that you create to describe the resource. It can be up to 64 characters long. + string FriendlyName?; +}; + +public type Available_phone_number_mobile record { + # A formatted version of the phone number. + string? friendly_name?; + # The 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. + string? phone_number?; + # The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) of this phone number. Available for only phone numbers from the US and Canada. + string? lata?; + # The locality or city of this phone number's location. + string? locality?; + # The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) of this phone number. Available for only phone numbers from the US and Canada. + string? rate_center?; + # The latitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? latitude?; + # The longitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? longitude?; + # The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada. + string? region?; + # The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada. + string? postal_code?; + # The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of this phone number. + string? iso_country?; + # The type of [Address](https://www.twilio.com/docs/usage/api/address) resource the phone number requires. Can be: `none`, `any`, `local`, or `foreign`. `none` means no address is required. `any` means an address is required, but it can be anywhere in the world. `local` means an address in the phone number's country is required. `foreign` means an address outside of the phone number's country is required. + string? address_requirements?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are: `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Available_phone_number_local_capabilities? capabilities?; +}; + +public type ListSipDomainResponse record { + SipSip_domain[] domains?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CreateCallFeedbackSummaryRequest record { + # Only include feedback given on or after this date. Format is `YYYY-MM-DD` and specified in UTC. + string StartDate; + # Only include feedback given on or before this date. Format is `YYYY-MM-DD` and specified in UTC. + string EndDate; + # Whether to also include Feedback resources from all subaccounts. `true` includes feedback from all subaccounts and `false`, the default, includes feedback from only the specified account. + boolean IncludeSubaccounts?; + # The URL that we will request when the feedback summary is complete. + string StatusCallback?; + # The HTTP method (`GET` or `POST`) we use to make the request to the `StatusCallback` URL. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; +}; + +public type CreateSipDomainRequest record { + # The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and "-" and must end with `sip.twilio.com`. + string DomainName; + # A descriptive string that you created to describe the resource. It can be up to 64 characters long. + string FriendlyName?; + # The URL we should when the domain receives a call. + string VoiceUrl?; + # The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceMethod?; + # The URL that we should call when an error occurs while retrieving or executing the TwiML from `voice_url`. + string VoiceFallbackUrl?; + # The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceFallbackMethod?; + # The URL that we should call to pass status parameters (such as call ended) to your application. + string VoiceStatusCallbackUrl?; + # The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceStatusCallbackMethod?; + # Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not. + boolean SipRegistration?; + # Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. + boolean EmergencyCallingEnabled?; + # Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. + boolean Secure?; + # The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^BY[0-9a-fA-F]{32}$`} + string ByocTrunkSid?; + # Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^PN[0-9a-fA-F]{32}$`} + string EmergencyCallerSid?; +}; + +public type Usage_record_last_month_enum_category "a2p-registration-fees"|"agent-conference"|"amazon-polly"|"answering-machine-detection"|"authy-authentications"|"authy-calls-outbound"|"authy-monthly-fees"|"authy-phone-intelligence"|"authy-phone-verifications"|"authy-sms-outbound"|"call-progess-events"|"calleridlookups"|"calls"|"calls-client"|"calls-globalconference"|"calls-inbound"|"calls-inbound-local"|"calls-inbound-mobile"|"calls-inbound-tollfree"|"calls-outbound"|"calls-pay-verb-transactions"|"calls-recordings"|"calls-sip"|"calls-sip-inbound"|"calls-sip-outbound"|"calls-transfers"|"carrier-lookups"|"conversations"|"conversations-api-requests"|"conversations-conversation-events"|"conversations-endpoint-connectivity"|"conversations-events"|"conversations-participant-events"|"conversations-participants"|"cps"|"flex-usage"|"fraud-lookups"|"group-rooms"|"group-rooms-data-track"|"group-rooms-encrypted-media-recorded"|"group-rooms-media-downloaded"|"group-rooms-media-recorded"|"group-rooms-media-routed"|"group-rooms-media-stored"|"group-rooms-participant-minutes"|"group-rooms-recorded-minutes"|"imp-v1-usage"|"lookups"|"marketplace"|"marketplace-algorithmia-named-entity-recognition"|"marketplace-cadence-transcription"|"marketplace-cadence-translation"|"marketplace-capio-speech-to-text"|"marketplace-convriza-ababa"|"marketplace-deepgram-phrase-detector"|"marketplace-digital-segment-business-info"|"marketplace-facebook-offline-conversions"|"marketplace-google-speech-to-text"|"marketplace-ibm-watson-message-insights"|"marketplace-ibm-watson-message-sentiment"|"marketplace-ibm-watson-recording-analysis"|"marketplace-ibm-watson-tone-analyzer"|"marketplace-icehook-systems-scout"|"marketplace-infogroup-dataaxle-bizinfo"|"marketplace-keen-io-contact-center-analytics"|"marketplace-marchex-cleancall"|"marketplace-marchex-sentiment-analysis-for-sms"|"marketplace-marketplace-nextcaller-social-id"|"marketplace-mobile-commons-opt-out-classifier"|"marketplace-nexiwave-voicemail-to-text"|"marketplace-nextcaller-advanced-caller-identification"|"marketplace-nomorobo-spam-score"|"marketplace-payfone-tcpa-compliance"|"marketplace-remeeting-automatic-speech-recognition"|"marketplace-tcpa-defense-solutions-blacklist-feed"|"marketplace-telo-opencnam"|"marketplace-truecnam-true-spam"|"marketplace-twilio-caller-name-lookup-us"|"marketplace-twilio-carrier-information-lookup"|"marketplace-voicebase-pci"|"marketplace-voicebase-transcription"|"marketplace-voicebase-transcription-custom-vocabulary"|"marketplace-whitepages-pro-caller-identification"|"marketplace-whitepages-pro-phone-intelligence"|"marketplace-whitepages-pro-phone-reputation"|"marketplace-wolfarm-spoken-results"|"marketplace-wolfram-short-answer"|"marketplace-ytica-contact-center-reporting-analytics"|"mediastorage"|"mms"|"mms-inbound"|"mms-inbound-longcode"|"mms-inbound-shortcode"|"mms-messages-carrierfees"|"mms-outbound"|"mms-outbound-longcode"|"mms-outbound-shortcode"|"monitor-reads"|"monitor-storage"|"monitor-writes"|"notify"|"notify-actions-attempts"|"notify-channels"|"number-format-lookups"|"pchat"|"pchat-users"|"peer-to-peer-rooms-participant-minutes"|"pfax"|"pfax-minutes"|"pfax-minutes-inbound"|"pfax-minutes-outbound"|"pfax-pages"|"phonenumbers"|"phonenumbers-cps"|"phonenumbers-emergency"|"phonenumbers-local"|"phonenumbers-mobile"|"phonenumbers-setups"|"phonenumbers-tollfree"|"premiumsupport"|"proxy"|"proxy-active-sessions"|"pstnconnectivity"|"pv"|"pv-composition-media-downloaded"|"pv-composition-media-encrypted"|"pv-composition-media-stored"|"pv-composition-minutes"|"pv-recording-compositions"|"pv-room-participants"|"pv-room-participants-au1"|"pv-room-participants-br1"|"pv-room-participants-ie1"|"pv-room-participants-jp1"|"pv-room-participants-sg1"|"pv-room-participants-us1"|"pv-room-participants-us2"|"pv-rooms"|"pv-sip-endpoint-registrations"|"recordings"|"recordingstorage"|"rooms-group-bandwidth"|"rooms-group-minutes"|"rooms-peer-to-peer-minutes"|"shortcodes"|"shortcodes-customerowned"|"shortcodes-mms-enablement"|"shortcodes-mps"|"shortcodes-random"|"shortcodes-uk"|"shortcodes-vanity"|"small-group-rooms"|"small-group-rooms-data-track"|"small-group-rooms-participant-minutes"|"sms"|"sms-inbound"|"sms-inbound-longcode"|"sms-inbound-shortcode"|"sms-messages-carrierfees"|"sms-messages-features"|"sms-messages-features-senderid"|"sms-outbound"|"sms-outbound-content-inspection"|"sms-outbound-longcode"|"sms-outbound-shortcode"|"speech-recognition"|"studio-engagements"|"sync"|"sync-actions"|"sync-endpoint-hours"|"sync-endpoint-hours-above-daily-cap"|"taskrouter-tasks"|"totalprice"|"transcriptions"|"trunking-cps"|"trunking-emergency-calls"|"trunking-origination"|"trunking-origination-local"|"trunking-origination-mobile"|"trunking-origination-tollfree"|"trunking-recordings"|"trunking-secure"|"trunking-termination"|"tts-google"|"turnmegabytes"|"turnmegabytes-australia"|"turnmegabytes-brasil"|"turnmegabytes-germany"|"turnmegabytes-india"|"turnmegabytes-ireland"|"turnmegabytes-japan"|"turnmegabytes-singapore"|"turnmegabytes-useast"|"turnmegabytes-uswest"|"twilio-interconnect"|"verify-push"|"verify-totp"|"verify-whatsapp-conversations-business-initiated"|"video-recordings"|"virtual-agent"|"voice-insights"|"voice-insights-client-insights-on-demand-minute"|"voice-insights-ptsn-insights-on-demand-minute"|"voice-insights-sip-interface-insights-on-demand-minute"|"voice-insights-sip-trunking-insights-on-demand-minute"|"voice-intelligence"|"voice-intelligence-transcription"|"voice-intelligence-operators"|"wireless"|"wireless-orders"|"wireless-orders-artwork"|"wireless-orders-bulk"|"wireless-orders-esim"|"wireless-orders-starter"|"wireless-usage"|"wireless-usage-commands"|"wireless-usage-commands-africa"|"wireless-usage-commands-asia"|"wireless-usage-commands-centralandsouthamerica"|"wireless-usage-commands-europe"|"wireless-usage-commands-home"|"wireless-usage-commands-northamerica"|"wireless-usage-commands-oceania"|"wireless-usage-commands-roaming"|"wireless-usage-data"|"wireless-usage-data-africa"|"wireless-usage-data-asia"|"wireless-usage-data-centralandsouthamerica"|"wireless-usage-data-custom-additionalmb"|"wireless-usage-data-custom-first5mb"|"wireless-usage-data-domestic-roaming"|"wireless-usage-data-europe"|"wireless-usage-data-individual-additionalgb"|"wireless-usage-data-individual-firstgb"|"wireless-usage-data-international-roaming-canada"|"wireless-usage-data-international-roaming-india"|"wireless-usage-data-international-roaming-mexico"|"wireless-usage-data-northamerica"|"wireless-usage-data-oceania"|"wireless-usage-data-pooled"|"wireless-usage-data-pooled-downlink"|"wireless-usage-data-pooled-uplink"|"wireless-usage-mrc"|"wireless-usage-mrc-custom"|"wireless-usage-mrc-individual"|"wireless-usage-mrc-pooled"|"wireless-usage-mrc-suspended"|"wireless-usage-sms"|"wireless-usage-voice"; diff --git a/ballerina/modules/oas/utils.bal b/ballerina/modules/oas/utils.bal new file mode 100644 index 00000000..c4c6dff2 --- /dev/null +++ b/ballerina/modules/oas/utils.bal @@ -0,0 +1,245 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// AUTO-GENERATED FILE. DO NOT MODIFY. +// This file is auto-generated by the Ballerina OpenAPI tool. + +import ballerina/url; + +type SimpleBasicType string|boolean|int|float|decimal; + +# Represents encoding mechanism details. +type Encoding record { + # Defines how multiple values are delimited + string style = FORM; + # Specifies whether arrays and objects should generate as separate fields + boolean explode = true; + # Specifies the custom content type + string contentType?; + # Specifies the custom headers + map headers?; +}; + +enum EncodingStyle { + DEEPOBJECT, FORM, SPACEDELIMITED, PIPEDELIMITED +} + +final Encoding & readonly defaultEncoding = {}; + +# Generate client request when the media type is given as application/x-www-form-urlencoded. +# +# + encodingMap - Includes the information about the encoding mechanism +# + anyRecord - Record to be serialized +# + return - Serialized request body or query parameter as a string +isolated function createFormURLEncodedRequestBody(record {|anydata...;|} anyRecord, map encodingMap = {}) returns string { + string[] payload = []; + foreach [string, anydata] [key, value] in anyRecord.entries() { + Encoding encodingData = encodingMap.hasKey(key) ? encodingMap.get(key) : defaultEncoding; + if value is SimpleBasicType { + payload.push(key, "=", getEncodedUri(value.toString())); + } else if value is SimpleBasicType[] { + payload.push(getSerializedArray(key, value, encodingData.style, encodingData.explode)); + } else if (value is record {}) { + if encodingData.style == DEEPOBJECT { + payload.push(getDeepObjectStyleRequest(key, value)); + } else { + payload.push(getFormStyleRequest(key, value)); + } + } else if (value is record {}[]) { + payload.push(getSerializedRecordArray(key, value, encodingData.style, encodingData.explode)); + } + payload.push("&"); + } + _ = payload.pop(); + return string:'join("", ...payload); +} + +# Serialize the record according to the deepObject style. +# +# + parent - Parent record name +# + anyRecord - Record to be serialized +# + return - Serialized record as a string +isolated function getDeepObjectStyleRequest(string parent, record {} anyRecord) returns string { + string[] recordArray = []; + foreach [string, anydata] [key, value] in anyRecord.entries() { + if value is SimpleBasicType { + recordArray.push(parent + "[" + key + "]" + "=" + getEncodedUri(value.toString())); + } else if value is SimpleBasicType[] { + recordArray.push(getSerializedArray(parent + "[" + key + "]" + "[]", value, DEEPOBJECT, true)); + } else if value is record {} { + string nextParent = parent + "[" + key + "]"; + recordArray.push(getDeepObjectStyleRequest(nextParent, value)); + } else if value is record {}[] { + string nextParent = parent + "[" + key + "]"; + recordArray.push(getSerializedRecordArray(nextParent, value, DEEPOBJECT)); + } + recordArray.push("&"); + } + _ = recordArray.pop(); + return string:'join("", ...recordArray); +} + +# Serialize the record according to the form style. +# +# + parent - Parent record name +# + anyRecord - Record to be serialized +# + explode - Specifies whether arrays and objects should generate separate parameters +# + return - Serialized record as a string +isolated function getFormStyleRequest(string parent, record {} anyRecord, boolean explode = true) returns string { + string[] recordArray = []; + if explode { + foreach [string, anydata] [key, value] in anyRecord.entries() { + if (value is SimpleBasicType) { + recordArray.push(key, "=", getEncodedUri(value.toString())); + } else if (value is SimpleBasicType[]) { + recordArray.push(getSerializedArray(key, value, explode = explode)); + } else if (value is record {}) { + recordArray.push(getFormStyleRequest(parent, value, explode)); + } + recordArray.push("&"); + } + _ = recordArray.pop(); + } else { + foreach [string, anydata] [key, value] in anyRecord.entries() { + if (value is SimpleBasicType) { + recordArray.push(key, ",", getEncodedUri(value.toString())); + } else if (value is SimpleBasicType[]) { + recordArray.push(getSerializedArray(key, value, explode = false)); + } else if (value is record {}) { + recordArray.push(getFormStyleRequest(parent, value, explode)); + } + recordArray.push(","); + } + _ = recordArray.pop(); + } + return string:'join("", ...recordArray); +} + +# Serialize arrays. +# +# + arrayName - Name of the field with arrays +# + anyArray - Array to be serialized +# + style - Defines how multiple values are delimited +# + explode - Specifies whether arrays and objects should generate separate parameters +# + return - Serialized array as a string +isolated function getSerializedArray(string arrayName, anydata[] anyArray, string style = "form", boolean explode = true) returns string { + string key = arrayName; + string[] arrayValues = []; + if (anyArray.length() > 0) { + if (style == FORM && !explode) { + arrayValues.push(key, "="); + foreach anydata i in anyArray { + arrayValues.push(getEncodedUri(i.toString()), ","); + } + } else if (style == SPACEDELIMITED && !explode) { + arrayValues.push(key, "="); + foreach anydata i in anyArray { + arrayValues.push(getEncodedUri(i.toString()), "%20"); + } + } else if (style == PIPEDELIMITED && !explode) { + arrayValues.push(key, "="); + foreach anydata i in anyArray { + arrayValues.push(getEncodedUri(i.toString()), "|"); + } + } else if (style == DEEPOBJECT) { + foreach anydata i in anyArray { + arrayValues.push(key, "[]", "=", getEncodedUri(i.toString()), "&"); + } + } else { + foreach anydata i in anyArray { + arrayValues.push(key, "=", getEncodedUri(i.toString()), "&"); + } + } + _ = arrayValues.pop(); + } + return string:'join("", ...arrayValues); +} + +# Serialize the array of records according to the form style. +# +# + parent - Parent record name +# + value - Array of records to be serialized +# + style - Defines how multiple values are delimited +# + explode - Specifies whether arrays and objects should generate separate parameters +# + return - Serialized record as a string +isolated function getSerializedRecordArray(string parent, record {}[] value, string style = FORM, boolean explode = true) returns string { + string[] serializedArray = []; + if style == DEEPOBJECT { + int arayIndex = 0; + foreach var recordItem in value { + serializedArray.push(getDeepObjectStyleRequest(parent + "[" + arayIndex.toString() + "]", recordItem), "&"); + arayIndex = arayIndex + 1; + } + } else { + if (!explode) { + serializedArray.push(parent, "="); + } + foreach var recordItem in value { + serializedArray.push(getFormStyleRequest(parent, recordItem, explode), ","); + } + } + _ = serializedArray.pop(); + return string:'join("", ...serializedArray); +} + +# Get Encoded URI for a given value. +# +# + value - Value to be encoded +# + return - Encoded string +isolated function getEncodedUri(anydata value) returns string { + string|error encoded = url:encode(value.toString(), "UTF8"); + if (encoded is string) { + return encoded; + } else { + return value.toString(); + } +} + +# Generate query path with query parameter. +# +# + queryParam - Query parameter map +# + encodingMap - Details on serialization mechanism +# + return - Returns generated Path or error at failure of client initialization +isolated function getPathForQueryParam(map queryParam, map encodingMap = {}) returns string|error { + string[] param = []; + if (queryParam.length() > 0) { + param.push("?"); + foreach var [key, value] in queryParam.entries() { + if value is () { + _ = queryParam.remove(key); + continue; + } + Encoding encodingData = encodingMap.hasKey(key) ? encodingMap.get(key) : defaultEncoding; + if (value is SimpleBasicType) { + param.push(key, "=", getEncodedUri(value.toString())); + } else if (value is SimpleBasicType[]) { + param.push(getSerializedArray(key, value, encodingData.style, encodingData.explode)); + } else if (value is record {}) { + if (encodingData.style == DEEPOBJECT) { + param.push(getDeepObjectStyleRequest(key, value)); + } else { + param.push(getFormStyleRequest(key, value, encodingData.explode)); + } + } else { + param.push(key, "=", value.toString()); + } + param.push("&"); + } + _ = param.pop(); + } + string restOfPath = string:'join("", ...param); + return restOfPath; +} diff --git a/ballerina/resources/get-credentails.png b/ballerina/resources/get-credentails.png new file mode 100644 index 00000000..fa5e0202 Binary files /dev/null and b/ballerina/resources/get-credentails.png differ diff --git a/ballerina/resources/get-phone-number.png b/ballerina/resources/get-phone-number.png new file mode 100644 index 00000000..23db819b Binary files /dev/null and b/ballerina/resources/get-phone-number.png differ diff --git a/ballerina/resources/phone-number-config.png b/ballerina/resources/phone-number-config.png new file mode 100644 index 00000000..b7ec43ab Binary files /dev/null and b/ballerina/resources/phone-number-config.png differ diff --git a/ballerina/resources/search-phone-number.png b/ballerina/resources/search-phone-number.png new file mode 100644 index 00000000..3797c3cb Binary files /dev/null and b/ballerina/resources/search-phone-number.png differ diff --git a/ballerina/tests/README.md b/ballerina/tests/README.md index 29c37279..34ce9e4a 100644 --- a/ballerina/tests/README.md +++ b/ballerina/tests/README.md @@ -1,54 +1,35 @@ -# Ballerina Twilio Endpoint - Tests +## Prerequisites for Running Tests -The Twilio connector allows you to send SMS, voice, OTP, and WhatsApp messages through the Twilio REST API. You can also send user secrets via SMS or voice message, verify OTP, and add and delete users. It handles basic authentication. +To run the tests, you need Twilio account credentials,twilio phone number and test phone number. To get Twilio account credentials and twilio phone number; -WhatsApp messaging requires users to use predefined [message templates](https://www.twilio.com/docs/sms/whatsapp/tutorial/send-whatsapp-notification-messages-templates). Templates are message formats, which can be used over and over again to message users. Use of templates enables to maintain high-quality content as well as to avoid spam messages. However, this requires the WhatsApp message templates to be predefined. +1. Create a [Twilio account](https://www.twilio.com/). -## Compatibility +2. Obtain a [Twilio phone number](https://support.twilio.com/hc/en-us/articles/223136107-How-does-Twilio-s-Free-Trial-work-). -| | Version | -|:------------------------:|:------------------:| -| Ballerina Language | Swan Lake Beta 6 | -| Twilio Basic API | 2010-04-01 | + > **Tip:** If you are using a trial account, you may need to verify your recipients' phone numbers before initiating any communication with them. -## Running tests +3. Obtain a [Twilio Account Auth Token](https://support.twilio.com/hc/en-us/articles/223136027-Auth-Tokens-and-How-to-Change-Them). -All the tests inside this module will make HTTP calls to the Twilio REST API. -In order to run the **basic group** tests, the user will need to have a Twilio account and obtain the tokens from the app. -Then user will need to create a `Config.toml` file at module root and do the following configurations with the obtained tokens. +Now,You can set twilio credentials and phone number either in a `Config.toml` file in the tests directory or as environment variables. -In order to run the **authy group** tests, the user will need to create a Authy application under Twilio account and obtain the _PRODUCTION API KEY_. Then user has to update the `Config.toml` file with the obtained token. +#### Using a Config.toml File -Please note that all the settings under Authy App configuration should be enabled. +Create a `Config.toml` file in the tests directory and add your authentication credentials and phone-number for the authorized user: -###### ballerina.conf - -```ballerina.conf -ACCOUNT_SID="your_account_sid" -AUTH_TOKEN="your_auth_token" -``` - -| Parameter | Description | -| --------------- | -------------------------------------------------------------------------------------------- | -| ACCOUNT_SID | Account SID of your own twilio account | -| AUTH_TOKEN | Auth token of your own twilio account | - -```Config.toml -export SAMPLE_FROM_MOBILE="sender_mobile" -export SAMPLE_TO_MOBILE="receiver_mobile" -export SAMPLE_MESSAGE="sample_message_to_send" -export SAMPLE_USER_EMAIL="user_email" -export SAMPLE_USER_PHONE="receiver_mobile" -export SAMPLE_USER_COUNTRY_CODE="country_code" -export SAMPLE_TWIML_URL="twilio_ml_url" -export SAMPLE_WHATSAPP_SANDBOX="sender_mobile" -export SAMPLE_MESSAGE="sample_message_to_send" +```toml +accountSid="" +authToken="" +toPhoneNumber="" +fromPhoneNumber="" ``` -#### Run all the test cases +#### Using Environment Variables -```sh -bal init -bal test twilio -``` +Alternatively, you can set your authentication credentials as environment variables: +```bash +export ACCOUNT_SID="" +export AUTH_TOKEN="" +export TO_PHONE="" +export TWILIO_PHONE="" +``` \ No newline at end of file diff --git a/ballerina/tests/test.bal b/ballerina/tests/test.bal index 61229018..fa6b6b6b 100644 --- a/ballerina/tests/test.bal +++ b/ballerina/tests/test.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. +// Copyright (c) 2023, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. // // WSO2 Inc. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,113 +13,322 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - -import ballerina/log; -import ballerina/test; +import ballerina/http; import ballerina/os; +import ballerina/test; -// This user-id is initialized after the testAuthyUserAdd() function call and will be used for testAuthyUserDelete() -string testUserId = EMPTY_STRING; +configurable string accountSid = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); +configurable string toPhoneNumber = os:getEnv("TO_PHONE"); +configurable string fromPhoneNumber = os:getEnv("TWILIO_PHONE"); -// This is message SID that provided by twilio. -string messageSid = EMPTY_STRING; +ConnectionConfig config = {auth: {username: accountSid, password: authToken}}; +Client twilio = check new Client(config); -// ACCOUNT_SID, AUTH_TOKEN, AUTHY_API_KEY should be changed with your own account credentials -configurable string twilioAccountSid = os:getEnv("ACCOUNT_SID"); -configurable string twilioAuthToken = os:getEnv("AUTH_TOKEN"); -configurable string fromNumber = os:getEnv("SAMPLE_FROM_MOBILE"); -configurable string toNumber = os:getEnv("SAMPLE_TO_MOBILE"); -configurable string test_message = os:getEnv("SAMPLE_MESSAGE"); -configurable string fromWhatsappNumber = os:getEnv("SAMPLE_WHATSAPP_SANDBOX"); -configurable string twimlUrl = os:getEnv("SAMPLE_TWIML_URL"); -configurable string twilioAPIKey = os:getEnv("twilioAPIKey"); -configurable string twilioAPISecret = os:getEnv("twilioAPISecret"); +string sampleName = "ballerina_test"; +string messageBody = "Hello from Ballerina!"; +string recordingURL = "http://demo.twilio.com/docs/voice.xml"; +string globalCallSid = ""; +string globalAddressSid = ""; +string globalMsgSid = ""; -ConnectionConfig twilioConfig = { - twilioAuth: { - accountSId: twilioAccountSid, - authToken: twilioAuthToken - } +CreateAccountRequest crAccReq = { + FriendlyName: sampleName +}; +UpdateAccountRequest upAccReq = { + FriendlyName: "bellerina_test_master" +}; +CreateAddressRequest crAddReq = { + FriendlyName: sampleName, + City: "city_of_ballerina", + Street: "street_of_ballerina", + CustomerName: "ballerina_tester", + IsoCountry: "LK", + PostalCode: "00000", + Region: "region_of_ballerina" +}; +UpdateAddressRequest upAddReq = { + FriendlyName: "ballerina_test_updated" +}; +CreateCallRequest callReq = { + To: toPhoneNumber, + From: fromPhoneNumber, + Url: recordingURL +}; +CreateMessageRequest msgReq = { + To: toPhoneNumber, + From: fromPhoneNumber, + Body: messageBody }; -// ConnectionConfig twilioConfig = { -// twilioAuth: { -// accountSId: twilioAccountSid, -// apiKey: twilioAPIKey, -// apiSecret: twilioAPISecret -// } -// }; +@test:Config { + groups: ["twilio_server"], + enable: true +} +function testListAccount() returns error? { + ListAccountResponse? response = check twilio->listAccount(); + if (response is ListAccountResponse) { + Account[]? accounts = response.accounts; + if accounts is Account[] { + Account account = accounts[0]; + test:assertEquals(account?.owner_account_sid, accountSid, "ListAccount Failed : SId Missmatch"); + } else { + test:assertFail("ListAccount Failed : Account Dosen't Exists."); + } + } else { + test:assertFail("ListAccount Failed : Wrong Responce Type."); + } +} -Client twilioClient = check new (twilioConfig); +@test:Config { + groups: ["twilio_server"], + enable: true +} +function testFetchAccount() returns error? { + Account? response = check twilio->fetchAccount(accountSid); + if (response is Account) { + test:assertEquals(response?.owner_account_sid, accountSid, "FetchAcoount failed : SID Missmatch"); + } else { + test:assertFail("FetchAccount Failed : Account Dosen't Exists."); + } +} @test:Config { - groups: ["basic", "root"], + groups: ["twilio_server"], enable: true } -function testAccountDetails() returns error? { - log:printInfo("\n ---------------------------------------------------------------------------"); - log:printInfo("twilioClient -> getAccountDetails()"); - Account details = check twilioClient->getAccountDetails(); - log:printInfo("Account Name: " + details.name.toBalString()); +function testUpdateAccount() returns error? { + Account? response = check twilio->updateAccount(accountSid, upAccReq); + if (response is Account) { + test:assertEquals(response?.friendly_name, upAccReq.FriendlyName, "UpdateAcoount failed : Name Missmatch"); + } else { + test:assertFail("UpdateAccount Failed : Account Dosen't Exists."); + } } @test:Config { - groups: ["basic"], - dependsOn: [testAccountDetails], + groups: ["twilio_server"], enable: true } -function testSendSms() returns error? { - log:printInfo("\n ---------------------------------------------------------------------------"); - log:printInfo("twilioClient -> sendSms()"); - string fromMobile = fromNumber; - string toMobile = toNumber; - string message = test_message; - SmsResponse response = check twilioClient->sendSms(fromMobile, toMobile, message); - log:printInfo("SMS_SID: " + response.sid.toBalString() + ", Body: " + response.body.toBalString()); - messageSid = response.sid; +function testCreateAddress() returns error? { + Address? response = check twilio->createAddress(crAddReq); + if (response is Address) { + test:assertEquals(response?.friendly_name, crAddReq.FriendlyName, "CreateAddress failed : Name Missmatch"); + test:assertEquals(response?.street, crAddReq.Street, "CreateAddress failed : Street Missmatch"); + test:assertEquals(response?.city, crAddReq.City, "CreateAddress failed : City Missmatch"); + test:assertEquals(response?.customer_name, crAddReq.CustomerName, "CreateAddress failed : Customer Name Missmatch"); + test:assertEquals(response?.iso_country, crAddReq.IsoCountry, "CreateAddress failed : Country Missmatch"); + test:assertEquals(response?.postal_code, crAddReq.PostalCode, "CreateAddress failed : PostalCode Missmatch"); + test:assertEquals(response?.region, crAddReq.Region, "CreateAddress failed : Region Missmatch"); + string? addressSid = response?.sid; + if addressSid is string { + globalAddressSid = addressSid; + } else { + test:assertFail("CreateAddress Failed : Address SID Dosen't Exists."); + } + } else { + test:assertFail("CreateAddress Failed : Address Dosen't Exists."); + } +} + +@test:Config { + groups: ["twilio_server"], + enable: true, + dependsOn: [testCreateAddress] +} +function testListAddress() returns error? { + ListAddressResponse? response = check twilio->listAddress(); + if (response is ListAddressResponse) { + Address[]? addresses = response.addresses; + if addresses is Address[] { + Address address = addresses[0]; + test:assertEquals(address?.account_sid, accountSid, "ListAddress Failed : SId Missmatch"); + } else { + test:assertFail("ListAddress Failed : Account Dosen't Exists."); + } + } else { + test:assertFail("ListAddress Failed : Wrong Responce Type."); + } +} + +@test:Config { + groups: ["twilio_server"], + enable: true, + dependsOn: [testCreateAddress] +} +function testFetchAddress() returns error? { + Address? response = check twilio->fetchAddress(globalAddressSid); + if (response is Address) { + test:assertEquals(response?.friendly_name, crAddReq.FriendlyName, "FetchAddress failed : Name Missmatch"); + test:assertEquals(response?.street, crAddReq.Street, "FetchAddress failed : Street Missmatch"); + test:assertEquals(response?.city, crAddReq.City, "FetchAddress failed : City Missmatch"); + test:assertEquals(response?.customer_name, crAddReq.CustomerName, "FetchAddress failed : Customer Name Missmatch"); + test:assertEquals(response?.iso_country, crAddReq.IsoCountry, "FetchAddress failed : Country Missmatch"); + test:assertEquals(response?.postal_code, crAddReq.PostalCode, "FetchAddress failed : PostalCode Missmatch"); + test:assertEquals(response?.region, crAddReq.Region, "FetchAddress failed : Region Missmatch"); + } else { + test:assertFail("FetchAddress Failed : Account Dosen't Exists."); + } +} + +@test:Config { + groups: ["twilio_server"], + enable: true, + dependsOn: [testFetchAddress] +} +function testUpdateAddress() returns error? { + Address? response = check twilio->updateAddress(globalAddressSid, upAddReq); + if (response is Address) { + test:assertEquals(response?.friendly_name, upAddReq.FriendlyName, "UpdateAddress failed : Name Missmatch"); + } else { + test:assertFail("UpdateAddress Failed : Address Dosen't Exists."); + } } @test:Config { - groups: ["basic"], - dependsOn: [testAccountDetails, testSendSms], + groups: ["twilio_server"], + enable: true, + dependsOn: [testUpdateAddress] +} +function testDeleteAddress() returns error? { + http:Response? response = check twilio->deleteAddress(globalAddressSid); + if (response is http:Response) { + test:assertEquals(response.statusCode, 204, "Delete Address failed"); + } else { + test:assertFail("Delete Address Failed"); + } +} + +@test:Config { + groups: ["twilio_server"], enable: true } -function testGetMessage() returns error? { - log:printInfo("\n ---------------------------------------------------------------------------"); - log:printInfo("twilioClient -> getMessage()"); - MessageResourceResponse response = check twilioClient->getMessage(messageSid); - log:printInfo("MESSAGE_SID: " + response.sid.toBalString() + ", Body: " + response.body.toBalString()); +function testCreateCall() returns error? { + Call? response = check twilio->createCall(callReq); + if (response is Call) { + test:assertEquals(response?.to, callReq.To, "CreateCall failed : Phone Number Missmatch"); + string? sid = response?.sid; + if sid is string { + globalCallSid = sid; + } else { + test:assertFail("CreateCall Failed : Call SID Dosen't Exists."); + } + } else { + test:assertFail("CreateCall Failed : Call Dosen't Exists."); + } } @test:Config { - groups: ["basic"], - dependsOn: [testAccountDetails], - enable: false + groups: ["twilio_server"], + enable: true, + dependsOn: [testCreateCall] } -function testSendWhatsAppMessage() returns error? { - log:printInfo("\n ---------------------------------------------------------------------------"); - log:printInfo("twilioClient -> sendWhatsAppMessage()"); - string fromMobile = fromWhatsappNumber; - string toMobile = toNumber; - string message = test_message; - WhatsAppResponse response = check twilioClient->sendWhatsAppMessage(fromMobile, toMobile, message); - log:printInfo("WhatsAPP_MSID: " + response.sid.toBalString() + ", Body: " + response.body.toBalString()); +function testListCalls() returns error? { + ListCallResponse? response = check twilio->listCall(); + if (response is ListCallResponse) { + Call[]? calls = response.calls; + if calls is Call[] { + Call call = calls[0]; + test:assertEquals(call?.account_sid, accountSid, "ListCall Failed : SId Missmatch"); + } else { + test:assertFail("ListCall Failed : Calls Dosen't Exists."); + } + } else { + test:assertFail("ListCall Failed : Wrong Responce Type."); + } } @test:Config { - groups: ["basic"], - dependsOn: [testAccountDetails], + groups: ["twilio_server"], + enable: true, + dependsOn: [testCreateCall] +} +function testFetchCall() returns error? { + Call? response = check twilio->fetchCall(globalCallSid); + if (response is Call) { + test:assertEquals(response?.to, callReq.To, "FetchCall failed : To Missmatch"); + test:assertEquals(response?.'from, callReq.From, "FetchCall failed : From Missmatch"); + } else { + test:assertFail("FetchCall Failed : Call Dosen't Exists."); + } +} +@test:Config { + groups: ["twilio_server"], + enable: true, + dependsOn: [testFetchCall,testListCalls] +} +function testDeleteCall() returns error? { + http:Response? response = check twilio->deleteCall(globalCallSid); + if (response is http:Response) { + test:assertEquals(response.statusCode, 409, "Delete Call failed"); + } else { + test:assertFail("Delete Call Failed"); + } +} + +@test:Config { + groups: ["twilio_server"], enable: true } -function testMakeVoiceCall() returns error? { - log:printInfo("\n ---------------------------------------------------------------------------"); - log:printInfo("twilioClient -> makeVoiceCall()"); - string fromMobile = fromNumber; - string toMobile = toNumber; - //Set string Message or Twiml Link - //string twimlURL = twimlUrl; - string message = "This is a test call from eco system team"; - VoiceCallInput voiceInput = { userInput:message, userInputType: MESSAGE_IN_TEXT}; - VoiceCallResponse response = check twilioClient->makeVoiceCall(fromMobile, toMobile, voiceInput); - log:printInfo(response.sid.toBalString()); +function testCreateMessage() returns error? { + Message? response = check twilio->createMessage(msgReq); + if (response is Message) { + test:assertEquals(response?.to, msgReq.To, "CreateMessage failed : Phone Number Missmatch"); + string? sid = response?.sid; + if sid is string { + globalMsgSid = sid; + } else { + test:assertFail("CreateMessage Failed : Call SID Dosen't Exists."); + } + } else { + test:assertFail("CreateMessage Failed : Call Dosen't Exists."); + } +} + +@test:Config { + groups: ["twilio_server"], + enable: true, + dependsOn: [testCreateMessage] +} +function testListMessages() returns error? { + ListMessageResponse? response = check twilio->listMessage(); + if (response is ListMessageResponse) { + Message[]? msgs = response.messages; + if msgs is Message[] { + Message msg = msgs[0]; + test:assertEquals(msg?.account_sid, accountSid, "ListMessage Failed : SId Missmatch"); + } else { + test:assertFail("ListMessage Failed : Messages Dosen't Exists."); + } + } else { + test:assertFail("ListMessage Failed : Wrong Responce Type."); + } +} + +@test:Config { + groups: ["twilio_server"], + enable: true, + dependsOn: [testCreateMessage] +} +function testFetchMessage() returns error? { + Message? response = check twilio->fetchMessage(globalMsgSid); + if (response is Message) { + test:assertEquals(response?.to, msgReq.To, "FetchMessage failed : To Missmatch"); + test:assertEquals(response?.'from, msgReq.From, "FetchMessage failed : From Missmatch"); + } else { + test:assertFail("FetchMessage Failed : Message Dosen't Exists."); + } +} +@test:Config { + groups: ["twilio_server"], + enable: true, + dependsOn: [testFetchMessage,testListMessages] } +function testDeleteMessage() returns error? { + http:Response? response = check twilio->deleteMessage(globalMsgSid); + if (response is http:Response) { + test:assertEquals(response.statusCode, 409, "Delete Message failed"); + } else { + test:assertFail("Delete Message Failed"); + } +} \ No newline at end of file diff --git a/ballerina/types.bal b/ballerina/types.bal index 9dad2b7c..b2b8e4c2 100644 --- a/ballerina/types.bal +++ b/ballerina/types.bal @@ -1,241 +1,4919 @@ -// Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerinax/'client.config; - -# Twilio Connector configurations. +// AUTO-GENERATED FILE. DO NOT MODIFY. +// This file is auto-generated by the Ballerina OpenAPI tool. + +import ballerina/constraint; +import ballerina/http; + +# Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint. @display {label: "Connection Config"} public type ConnectionConfig record {| - *config:ConnectionConfig; - never auth?; - # Twilio authentication configuration - TokenBasedAuthentication|APIKeyBasedAuthentication twilioAuth; + # Configurations related to client authentication + http:CredentialsConfig auth; + # The HTTP version understood by the client + http:HttpVersion httpVersion = http:HTTP_2_0; + # Configurations related to HTTP/1.x protocol + ClientHttp1Settings http1Settings?; + # Configurations related to HTTP/2 protocol + http:ClientHttp2Settings http2Settings?; + # The maximum time to wait (in seconds) for a response before closing the connection + decimal timeout = 60; + # The choice of setting `forwarded`/`x-forwarded` header + string forwarded = "disable"; + # Configurations associated with request pooling + http:PoolConfiguration poolConfig?; + # HTTP caching related configurations + http:CacheConfig cache?; + # Specifies the way of handling compression (`accept-encoding`) header + http:Compression compression = http:COMPRESSION_AUTO; + # Configurations associated with the behaviour of the Circuit Breaker + http:CircuitBreakerConfig circuitBreaker?; + # Configurations associated with retrying + http:RetryConfig retryConfig?; + # Configurations associated with inbound response size limits + http:ResponseLimitConfigs responseLimits?; + # SSL/TLS-related options + http:ClientSecureSocket secureSocket?; + # Proxy server related options + http:ProxyConfig proxy?; + # Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default + boolean validation = true; +|}; + +# Provides settings related to HTTP/1.x protocol. +public type ClientHttp1Settings record {| + # Specifies whether to reuse a connection for multiple requests + http:KeepAlive keepAlive = http:KEEPALIVE_AUTO; + # The chunking behaviour of the request + http:Chunking chunking = http:CHUNKING_AUTO; + # Proxy server related options + ProxyConfig proxy?; |}; -# Twilio Token Based Authentication -# -# + accountSId - Twilio account SID -# + authToken - The authentication token of the account -@display{label: "Auth Token Based Connection Config"} -public type TokenBasedAuthentication record { - string accountSId; - @display{ - label: "", - kind: "password" - } - string authToken; -}; - -# Twilio API Key Based Authentication -# -# + accountSId - Twilio account SID -# + apiKey - Twilio API key SID -# + apiSecret - Twilio API key Secret -@display{label: "API Key Based Connection Config"} -public type APIKeyBasedAuthentication record { - string accountSId; - string apiKey; - @display{ - label: "", - kind: "password" - } - string apiSecret; -}; - -# Represents Twilio account. -# + sid - Unique identifier of the account -# + name - The name of the account -# + status - The status of the account (active, suspended, closed) -# + type - The type of this account (`Trial`, `Full`) -# + createdDate - The date that this account was created -# + updatedDate - The date that this account was last updated +# Proxy server configurations to be used with the HTTP client endpoint. +public type ProxyConfig record {| + # Host name of the proxy server + string host = ""; + # Proxy server port + int port = 0; + # Proxy server username + string userName = ""; + # Proxy server password + @display {label: "", kind: "password"} + string password = ""; +|}; + +public type UpdateParticipantRequest record { + # Whether the participant should be muted. Can be `true` or `false`. `true` will mute the participant, and `false` will un-mute them. Anything value other than `true` or `false` is interpreted as `false`. + boolean Muted?; + # Whether the participant should be on hold. Can be: `true` or `false`. `true` puts the participant on hold, and `false` lets them rejoin the conference. + boolean Hold?; + # The URL we call using the `hold_method` for music that plays when the participant is on hold. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs. + string HoldUrl?; + # The HTTP method we should use to call `hold_url`. Can be: `GET` or `POST` and the default is `GET`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" HoldMethod?; + # The URL we call using the `announce_method` for an announcement to the participant. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs. + string AnnounceUrl?; + # The HTTP method we should use to call `announce_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" AnnounceMethod?; + # The URL we call using the `wait_method` for the music to play while participants are waiting for the conference to start. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). + string WaitUrl?; + # The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" WaitMethod?; + # Whether to play a notification beep to the conference when the participant exits. Can be: `true` or `false`. + boolean BeepOnExit?; + # Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`. + boolean EndConferenceOnExit?; + # Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined. + boolean Coaching?; + # The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^CA[0-9a-fA-F]{32}$`} + string CallSidToCoach?; +}; + +public type ListConferenceRecordingResponse record { + ConferenceConference_recording[] recordings?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Token_ice_servers record { + string credential?; + string username?; + string url?; + string urls?; +}; + +public type Conference_recording_enum_source "DialVerb"|"Conference"|"OutboundAPI"|"Trunking"|"RecordVerb"|"StartCallRecordingAPI"|"StartConferenceRecordingAPI"; + +public type ListApplicationResponse record { + Application[] applications?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListIncomingPhoneNumberLocalResponse record { + Incoming_phone_numberIncoming_phone_number_local[] incoming_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CreateSiprecRequest record { + # The user-specified name of this Siprec, if one was given when the Siprec was created. This may be used to stop the Siprec. + string Name?; + # Unique name used when configuring the connector via Marketplace Add-on. + string ConnectorName?; + Siprec_enum_track Track?; + # Absolute URL of the status callback. + string StatusCallback?; + # The http method for the status_callback (one of GET, POST). + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # Parameter name + string Parameter1\.Name?; + # Parameter value + string Parameter1\.Value?; + # Parameter name + string Parameter2\.Name?; + # Parameter value + string Parameter2\.Value?; + # Parameter name + string Parameter3\.Name?; + # Parameter value + string Parameter3\.Value?; + # Parameter name + string Parameter4\.Name?; + # Parameter value + string Parameter4\.Value?; + # Parameter name + string Parameter5\.Name?; + # Parameter value + string Parameter5\.Value?; + # Parameter name + string Parameter6\.Name?; + # Parameter value + string Parameter6\.Value?; + # Parameter name + string Parameter7\.Name?; + # Parameter value + string Parameter7\.Value?; + # Parameter name + string Parameter8\.Name?; + # Parameter value + string Parameter8\.Value?; + # Parameter name + string Parameter9\.Name?; + # Parameter value + string Parameter9\.Value?; + # Parameter name + string Parameter10\.Name?; + # Parameter value + string Parameter10\.Value?; + # Parameter name + string Parameter11\.Name?; + # Parameter value + string Parameter11\.Value?; + # Parameter name + string Parameter12\.Name?; + # Parameter value + string Parameter12\.Value?; + # Parameter name + string Parameter13\.Name?; + # Parameter value + string Parameter13\.Value?; + # Parameter name + string Parameter14\.Name?; + # Parameter value + string Parameter14\.Value?; + # Parameter name + string Parameter15\.Name?; + # Parameter value + string Parameter15\.Value?; + # Parameter name + string Parameter16\.Name?; + # Parameter value + string Parameter16\.Value?; + # Parameter name + string Parameter17\.Name?; + # Parameter value + string Parameter17\.Value?; + # Parameter name + string Parameter18\.Name?; + # Parameter value + string Parameter18\.Value?; + # Parameter name + string Parameter19\.Name?; + # Parameter value + string Parameter19\.Value?; + # Parameter name + string Parameter20\.Name?; + # Parameter value + string Parameter20\.Value?; + # Parameter name + string Parameter21\.Name?; + # Parameter value + string Parameter21\.Value?; + # Parameter name + string Parameter22\.Name?; + # Parameter value + string Parameter22\.Value?; + # Parameter name + string Parameter23\.Name?; + # Parameter value + string Parameter23\.Value?; + # Parameter name + string Parameter24\.Name?; + # Parameter value + string Parameter24\.Value?; + # Parameter name + string Parameter25\.Name?; + # Parameter value + string Parameter25\.Value?; + # Parameter name + string Parameter26\.Name?; + # Parameter value + string Parameter26\.Value?; + # Parameter name + string Parameter27\.Name?; + # Parameter value + string Parameter27\.Value?; + # Parameter name + string Parameter28\.Name?; + # Parameter value + string Parameter28\.Value?; + # Parameter name + string Parameter29\.Name?; + # Parameter value + string Parameter29\.Value?; + # Parameter name + string Parameter30\.Name?; + # Parameter value + string Parameter30\.Value?; + # Parameter name + string Parameter31\.Name?; + # Parameter value + string Parameter31\.Value?; + # Parameter name + string Parameter32\.Name?; + # Parameter value + string Parameter32\.Value?; + # Parameter name + string Parameter33\.Name?; + # Parameter value + string Parameter33\.Value?; + # Parameter name + string Parameter34\.Name?; + # Parameter value + string Parameter34\.Value?; + # Parameter name + string Parameter35\.Name?; + # Parameter value + string Parameter35\.Value?; + # Parameter name + string Parameter36\.Name?; + # Parameter value + string Parameter36\.Value?; + # Parameter name + string Parameter37\.Name?; + # Parameter value + string Parameter37\.Value?; + # Parameter name + string Parameter38\.Name?; + # Parameter value + string Parameter38\.Value?; + # Parameter name + string Parameter39\.Name?; + # Parameter value + string Parameter39\.Value?; + # Parameter name + string Parameter40\.Name?; + # Parameter value + string Parameter40\.Value?; + # Parameter name + string Parameter41\.Name?; + # Parameter value + string Parameter41\.Value?; + # Parameter name + string Parameter42\.Name?; + # Parameter value + string Parameter42\.Value?; + # Parameter name + string Parameter43\.Name?; + # Parameter value + string Parameter43\.Value?; + # Parameter name + string Parameter44\.Name?; + # Parameter value + string Parameter44\.Value?; + # Parameter name + string Parameter45\.Name?; + # Parameter value + string Parameter45\.Value?; + # Parameter name + string Parameter46\.Name?; + # Parameter value + string Parameter46\.Value?; + # Parameter name + string Parameter47\.Name?; + # Parameter value + string Parameter47\.Value?; + # Parameter name + string Parameter48\.Name?; + # Parameter value + string Parameter48\.Value?; + # Parameter name + string Parameter49\.Name?; + # Parameter value + string Parameter49\.Value?; + # Parameter name + string Parameter50\.Name?; + # Parameter value + string Parameter50\.Value?; + # Parameter name + string Parameter51\.Name?; + # Parameter value + string Parameter51\.Value?; + # Parameter name + string Parameter52\.Name?; + # Parameter value + string Parameter52\.Value?; + # Parameter name + string Parameter53\.Name?; + # Parameter value + string Parameter53\.Value?; + # Parameter name + string Parameter54\.Name?; + # Parameter value + string Parameter54\.Value?; + # Parameter name + string Parameter55\.Name?; + # Parameter value + string Parameter55\.Value?; + # Parameter name + string Parameter56\.Name?; + # Parameter value + string Parameter56\.Value?; + # Parameter name + string Parameter57\.Name?; + # Parameter value + string Parameter57\.Value?; + # Parameter name + string Parameter58\.Name?; + # Parameter value + string Parameter58\.Value?; + # Parameter name + string Parameter59\.Name?; + # Parameter value + string Parameter59\.Value?; + # Parameter name + string Parameter60\.Name?; + # Parameter value + string Parameter60\.Value?; + # Parameter name + string Parameter61\.Name?; + # Parameter value + string Parameter61\.Value?; + # Parameter name + string Parameter62\.Name?; + # Parameter value + string Parameter62\.Value?; + # Parameter name + string Parameter63\.Name?; + # Parameter value + string Parameter63\.Value?; + # Parameter name + string Parameter64\.Name?; + # Parameter value + string Parameter64\.Value?; + # Parameter name + string Parameter65\.Name?; + # Parameter value + string Parameter65\.Value?; + # Parameter name + string Parameter66\.Name?; + # Parameter value + string Parameter66\.Value?; + # Parameter name + string Parameter67\.Name?; + # Parameter value + string Parameter67\.Value?; + # Parameter name + string Parameter68\.Name?; + # Parameter value + string Parameter68\.Value?; + # Parameter name + string Parameter69\.Name?; + # Parameter value + string Parameter69\.Value?; + # Parameter name + string Parameter70\.Name?; + # Parameter value + string Parameter70\.Value?; + # Parameter name + string Parameter71\.Name?; + # Parameter value + string Parameter71\.Value?; + # Parameter name + string Parameter72\.Name?; + # Parameter value + string Parameter72\.Value?; + # Parameter name + string Parameter73\.Name?; + # Parameter value + string Parameter73\.Value?; + # Parameter name + string Parameter74\.Name?; + # Parameter value + string Parameter74\.Value?; + # Parameter name + string Parameter75\.Name?; + # Parameter value + string Parameter75\.Value?; + # Parameter name + string Parameter76\.Name?; + # Parameter value + string Parameter76\.Value?; + # Parameter name + string Parameter77\.Name?; + # Parameter value + string Parameter77\.Value?; + # Parameter name + string Parameter78\.Name?; + # Parameter value + string Parameter78\.Value?; + # Parameter name + string Parameter79\.Name?; + # Parameter value + string Parameter79\.Value?; + # Parameter name + string Parameter80\.Name?; + # Parameter value + string Parameter80\.Value?; + # Parameter name + string Parameter81\.Name?; + # Parameter value + string Parameter81\.Value?; + # Parameter name + string Parameter82\.Name?; + # Parameter value + string Parameter82\.Value?; + # Parameter name + string Parameter83\.Name?; + # Parameter value + string Parameter83\.Value?; + # Parameter name + string Parameter84\.Name?; + # Parameter value + string Parameter84\.Value?; + # Parameter name + string Parameter85\.Name?; + # Parameter value + string Parameter85\.Value?; + # Parameter name + string Parameter86\.Name?; + # Parameter value + string Parameter86\.Value?; + # Parameter name + string Parameter87\.Name?; + # Parameter value + string Parameter87\.Value?; + # Parameter name + string Parameter88\.Name?; + # Parameter value + string Parameter88\.Value?; + # Parameter name + string Parameter89\.Name?; + # Parameter value + string Parameter89\.Value?; + # Parameter name + string Parameter90\.Name?; + # Parameter value + string Parameter90\.Value?; + # Parameter name + string Parameter91\.Name?; + # Parameter value + string Parameter91\.Value?; + # Parameter name + string Parameter92\.Name?; + # Parameter value + string Parameter92\.Value?; + # Parameter name + string Parameter93\.Name?; + # Parameter value + string Parameter93\.Value?; + # Parameter name + string Parameter94\.Name?; + # Parameter value + string Parameter94\.Value?; + # Parameter name + string Parameter95\.Name?; + # Parameter value + string Parameter95\.Value?; + # Parameter name + string Parameter96\.Name?; + # Parameter value + string Parameter96\.Value?; + # Parameter name + string Parameter97\.Name?; + # Parameter value + string Parameter97\.Value?; + # Parameter name + string Parameter98\.Name?; + # Parameter value + string Parameter98\.Value?; + # Parameter name + string Parameter99\.Name?; + # Parameter value + string Parameter99\.Value?; +}; + +public type Usage_record_monthly_enum_category "a2p-registration-fees"|"agent-conference"|"amazon-polly"|"answering-machine-detection"|"authy-authentications"|"authy-calls-outbound"|"authy-monthly-fees"|"authy-phone-intelligence"|"authy-phone-verifications"|"authy-sms-outbound"|"call-progess-events"|"calleridlookups"|"calls"|"calls-client"|"calls-globalconference"|"calls-inbound"|"calls-inbound-local"|"calls-inbound-mobile"|"calls-inbound-tollfree"|"calls-outbound"|"calls-pay-verb-transactions"|"calls-recordings"|"calls-sip"|"calls-sip-inbound"|"calls-sip-outbound"|"calls-transfers"|"carrier-lookups"|"conversations"|"conversations-api-requests"|"conversations-conversation-events"|"conversations-endpoint-connectivity"|"conversations-events"|"conversations-participant-events"|"conversations-participants"|"cps"|"flex-usage"|"fraud-lookups"|"group-rooms"|"group-rooms-data-track"|"group-rooms-encrypted-media-recorded"|"group-rooms-media-downloaded"|"group-rooms-media-recorded"|"group-rooms-media-routed"|"group-rooms-media-stored"|"group-rooms-participant-minutes"|"group-rooms-recorded-minutes"|"imp-v1-usage"|"lookups"|"marketplace"|"marketplace-algorithmia-named-entity-recognition"|"marketplace-cadence-transcription"|"marketplace-cadence-translation"|"marketplace-capio-speech-to-text"|"marketplace-convriza-ababa"|"marketplace-deepgram-phrase-detector"|"marketplace-digital-segment-business-info"|"marketplace-facebook-offline-conversions"|"marketplace-google-speech-to-text"|"marketplace-ibm-watson-message-insights"|"marketplace-ibm-watson-message-sentiment"|"marketplace-ibm-watson-recording-analysis"|"marketplace-ibm-watson-tone-analyzer"|"marketplace-icehook-systems-scout"|"marketplace-infogroup-dataaxle-bizinfo"|"marketplace-keen-io-contact-center-analytics"|"marketplace-marchex-cleancall"|"marketplace-marchex-sentiment-analysis-for-sms"|"marketplace-marketplace-nextcaller-social-id"|"marketplace-mobile-commons-opt-out-classifier"|"marketplace-nexiwave-voicemail-to-text"|"marketplace-nextcaller-advanced-caller-identification"|"marketplace-nomorobo-spam-score"|"marketplace-payfone-tcpa-compliance"|"marketplace-remeeting-automatic-speech-recognition"|"marketplace-tcpa-defense-solutions-blacklist-feed"|"marketplace-telo-opencnam"|"marketplace-truecnam-true-spam"|"marketplace-twilio-caller-name-lookup-us"|"marketplace-twilio-carrier-information-lookup"|"marketplace-voicebase-pci"|"marketplace-voicebase-transcription"|"marketplace-voicebase-transcription-custom-vocabulary"|"marketplace-whitepages-pro-caller-identification"|"marketplace-whitepages-pro-phone-intelligence"|"marketplace-whitepages-pro-phone-reputation"|"marketplace-wolfarm-spoken-results"|"marketplace-wolfram-short-answer"|"marketplace-ytica-contact-center-reporting-analytics"|"mediastorage"|"mms"|"mms-inbound"|"mms-inbound-longcode"|"mms-inbound-shortcode"|"mms-messages-carrierfees"|"mms-outbound"|"mms-outbound-longcode"|"mms-outbound-shortcode"|"monitor-reads"|"monitor-storage"|"monitor-writes"|"notify"|"notify-actions-attempts"|"notify-channels"|"number-format-lookups"|"pchat"|"pchat-users"|"peer-to-peer-rooms-participant-minutes"|"pfax"|"pfax-minutes"|"pfax-minutes-inbound"|"pfax-minutes-outbound"|"pfax-pages"|"phonenumbers"|"phonenumbers-cps"|"phonenumbers-emergency"|"phonenumbers-local"|"phonenumbers-mobile"|"phonenumbers-setups"|"phonenumbers-tollfree"|"premiumsupport"|"proxy"|"proxy-active-sessions"|"pstnconnectivity"|"pv"|"pv-composition-media-downloaded"|"pv-composition-media-encrypted"|"pv-composition-media-stored"|"pv-composition-minutes"|"pv-recording-compositions"|"pv-room-participants"|"pv-room-participants-au1"|"pv-room-participants-br1"|"pv-room-participants-ie1"|"pv-room-participants-jp1"|"pv-room-participants-sg1"|"pv-room-participants-us1"|"pv-room-participants-us2"|"pv-rooms"|"pv-sip-endpoint-registrations"|"recordings"|"recordingstorage"|"rooms-group-bandwidth"|"rooms-group-minutes"|"rooms-peer-to-peer-minutes"|"shortcodes"|"shortcodes-customerowned"|"shortcodes-mms-enablement"|"shortcodes-mps"|"shortcodes-random"|"shortcodes-uk"|"shortcodes-vanity"|"small-group-rooms"|"small-group-rooms-data-track"|"small-group-rooms-participant-minutes"|"sms"|"sms-inbound"|"sms-inbound-longcode"|"sms-inbound-shortcode"|"sms-messages-carrierfees"|"sms-messages-features"|"sms-messages-features-senderid"|"sms-outbound"|"sms-outbound-content-inspection"|"sms-outbound-longcode"|"sms-outbound-shortcode"|"speech-recognition"|"studio-engagements"|"sync"|"sync-actions"|"sync-endpoint-hours"|"sync-endpoint-hours-above-daily-cap"|"taskrouter-tasks"|"totalprice"|"transcriptions"|"trunking-cps"|"trunking-emergency-calls"|"trunking-origination"|"trunking-origination-local"|"trunking-origination-mobile"|"trunking-origination-tollfree"|"trunking-recordings"|"trunking-secure"|"trunking-termination"|"tts-google"|"turnmegabytes"|"turnmegabytes-australia"|"turnmegabytes-brasil"|"turnmegabytes-germany"|"turnmegabytes-india"|"turnmegabytes-ireland"|"turnmegabytes-japan"|"turnmegabytes-singapore"|"turnmegabytes-useast"|"turnmegabytes-uswest"|"twilio-interconnect"|"verify-push"|"verify-totp"|"verify-whatsapp-conversations-business-initiated"|"video-recordings"|"virtual-agent"|"voice-insights"|"voice-insights-client-insights-on-demand-minute"|"voice-insights-ptsn-insights-on-demand-minute"|"voice-insights-sip-interface-insights-on-demand-minute"|"voice-insights-sip-trunking-insights-on-demand-minute"|"voice-intelligence"|"voice-intelligence-transcription"|"voice-intelligence-operators"|"wireless"|"wireless-orders"|"wireless-orders-artwork"|"wireless-orders-bulk"|"wireless-orders-esim"|"wireless-orders-starter"|"wireless-usage"|"wireless-usage-commands"|"wireless-usage-commands-africa"|"wireless-usage-commands-asia"|"wireless-usage-commands-centralandsouthamerica"|"wireless-usage-commands-europe"|"wireless-usage-commands-home"|"wireless-usage-commands-northamerica"|"wireless-usage-commands-oceania"|"wireless-usage-commands-roaming"|"wireless-usage-data"|"wireless-usage-data-africa"|"wireless-usage-data-asia"|"wireless-usage-data-centralandsouthamerica"|"wireless-usage-data-custom-additionalmb"|"wireless-usage-data-custom-first5mb"|"wireless-usage-data-domestic-roaming"|"wireless-usage-data-europe"|"wireless-usage-data-individual-additionalgb"|"wireless-usage-data-individual-firstgb"|"wireless-usage-data-international-roaming-canada"|"wireless-usage-data-international-roaming-india"|"wireless-usage-data-international-roaming-mexico"|"wireless-usage-data-northamerica"|"wireless-usage-data-oceania"|"wireless-usage-data-pooled"|"wireless-usage-data-pooled-downlink"|"wireless-usage-data-pooled-uplink"|"wireless-usage-mrc"|"wireless-usage-mrc-custom"|"wireless-usage-mrc-individual"|"wireless-usage-mrc-pooled"|"wireless-usage-mrc-suspended"|"wireless-usage-sms"|"wireless-usage-voice"; + +public type ListMessageResponse record { + Message[] messages?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Payments_enum_capture "payment-card-number"|"expiration-date"|"security-code"|"postal-code"|"bank-routing-number"|"bank-account-number"; + +public type SipSip_ip_access_control_list record { + # A 34 character string that uniquely identifies this resource. + string? sid?; + # The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) that owns this resource. + string? account_sid?; + # A human readable descriptive text, up to 255 characters long. + string? friendly_name?; + # The date that this resource was created, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_created?; + # The date that this resource was last updated, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_updated?; + # A list of the IpAddress resources associated with this IP access control list resource. + record {}? subresource_uris?; + # The URI for this resource, relative to `https://api.twilio.com` + string? uri?; +}; + +public type CreateIncomingPhoneNumberTollFreeRequest record { + # The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234. + string PhoneNumber; + # The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. + string ApiVersion?; + # A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. + string FriendlyName?; + # The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string SmsApplicationSid?; + # The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsFallbackMethod?; + # The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. + string SmsFallbackUrl?; + # The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsMethod?; + # The URL we should call when the new phone number receives an incoming SMS message. + string SmsUrl?; + # The URL we should call using the `status_callback_method` to send status information to your application. + string StatusCallback?; + # The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string VoiceApplicationSid?; + # Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. + boolean VoiceCallerIdLookup?; + # The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceFallbackMethod?; + # The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + string VoiceFallbackUrl?; + # The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceMethod?; + # The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. + string VoiceUrl?; + # The SID of the Identity resource that we should associate with the new phone number. Some regions require an Identity to meet local regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^RI[0-9a-fA-F]{32}$`} + string IdentitySid?; + # The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AD[0-9a-fA-F]{32}$`} + string AddressSid?; + Incoming_phone_number_toll_free_enum_emergency_status EmergencyStatus?; + # The SID of the emergency address configuration to use for emergency calling from the new phone number. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AD[0-9a-fA-F]{32}$`} + string EmergencyAddressSid?; + # The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^TK[0-9a-fA-F]{32}$`} + string TrunkSid?; + Incoming_phone_number_toll_free_enum_voice_receive_mode VoiceReceiveMode?; + # The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^BU[0-9a-fA-F]{32}$`} + string BundleSid?; +}; + +public type UpdateKeyRequest record { + # A descriptive string that you create to describe the resource. It can be up to 64 characters long. + string FriendlyName?; +}; + +public type ListRecordingAddOnResultPayloadResponse record { + RecordingRecording_add_on_resultRecording_add_on_result_payload[] payloads?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Account_enum_status "active"|"suspended"|"closed"; + +public type ListConnectAppResponse record { + Connect_app[] connect_apps?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Payments_enum_payment_method "credit-card"|"ach-debit"; + +public type UsageUsage_recordUsage_record_this_month record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage. + string? account_sid?; + # The API version used to create the resource. + string? api_version?; + # Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + string? as_of?; + Usage_record_this_month_enum_category category?; + # The number of usage events, such as the number of calls. + string? count?; + # The units in which `count` is measured, such as `calls` for calls or `messages` for SMS. + string? count_unit?; + # A plain-language description of the usage category. + string? description?; + # The last date for which usage is included in the UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? end_date?; + # The total price of the usage in the currency specified in `price_unit` and associated with the account. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format, such as `usd`, `eur`, and `jpy`. + string? price_unit?; + # The first date for which usage is included in this UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? start_date?; + # A list of related resources identified by their URIs. For more information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + record {}? subresource_uris?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The amount used to bill usage and measured in units described in `usage_unit`. + string? usage?; + # The units in which `usage` is measured, such as `minutes` for calls or `messages` for SMS. + string? usage_unit?; +}; + +public type New_key record { + # The unique string that that we created to identify the NewKey resource. You will use this as the basic-auth `user` when authenticating to the API. + string? sid?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The date and time in GMT that the API Key was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the new API Key was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth `password`). **Note that for security reasons, this field is ONLY returned when the API Key is first created.** + string? secret?; +}; + +public type ConferenceParticipant record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resource. + string? account_sid?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Participant resource is associated with. + string? call_sid?; + # The user-specified label of this participant, if one was given when the participant was created. This may be used to fetch, update or delete the participant. + string? label?; + # The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`. + string? call_sid_to_coach?; + # Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined. + boolean? coaching?; + # The SID of the conference the participant is in. + string? conference_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # Whether the conference ends when the participant leaves. Can be: `true` or `false` and the default is `false`. If `true`, the conference ends and all other participants drop out when the participant leaves. + boolean? end_conference_on_exit?; + # Whether the participant is muted. Can be `true` or `false`. + boolean? muted?; + # Whether the participant is on hold. Can be `true` or `false`. + boolean? hold?; + # Whether the conference starts when the participant joins the conference, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference. + boolean? start_conference_on_enter?; + Participant_enum_status status?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type CallStream record { + # The SID of the Stream resource. + string? sid?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Stream resource. + string? account_sid?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Stream resource is associated with. + string? call_sid?; + # The user-specified name of this Stream, if one was given when the Stream was created. This may be used to stop the Stream. + string? name?; + Stream_enum_status status?; + # The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type MessageMedia record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with this Media resource. + string? account_sid?; + # The default [MIME type](https://en.wikipedia.org/wiki/Internet_media_type) of the media, for example `image/jpeg`, `image/png`, or `image/gif`. + string? content_type?; + # The date and time in GMT when this Media resource was created, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT when this Media resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The SID of the Message resource that is associated with this Media resource. + string? parent_sid?; + # The unique string that identifies this Media resource. + string? sid?; + # The URI of this Media resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type CreateSipAuthCallsCredentialListMappingRequest record { + # The SID of the CredentialList resource to map to the SIP domain. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^CL[0-9a-fA-F]{32}$`} + string CredentialListSid; +}; + +public type ListUsageRecordMonthlyResponse record { + UsageUsage_recordUsage_record_monthly[] usage_records?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CreateIncomingPhoneNumberMobileRequest record { + # The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234. + string PhoneNumber; + # The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. + string ApiVersion?; + # A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, the is a formatted version of the phone number. + string FriendlyName?; + # The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those of the application. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string SmsApplicationSid?; + # The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsFallbackMethod?; + # The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. + string SmsFallbackUrl?; + # The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsMethod?; + # The URL we should call when the new phone number receives an incoming SMS message. + string SmsUrl?; + # The URL we should call using the `status_callback_method` to send status information to your application. + string StatusCallback?; + # The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string VoiceApplicationSid?; + # Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. + boolean VoiceCallerIdLookup?; + # The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceFallbackMethod?; + # The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + string VoiceFallbackUrl?; + # The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceMethod?; + # The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. + string VoiceUrl?; + # The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^RI[0-9a-fA-F]{32}$`} + string IdentitySid?; + # The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AD[0-9a-fA-F]{32}$`} + string AddressSid?; + Incoming_phone_number_mobile_enum_emergency_status EmergencyStatus?; + # The SID of the emergency address configuration to use for emergency calling from the new phone number. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AD[0-9a-fA-F]{32}$`} + string EmergencyAddressSid?; + # The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^TK[0-9a-fA-F]{32}$`} + string TrunkSid?; + Incoming_phone_number_mobile_enum_voice_receive_mode VoiceReceiveMode?; + # The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^BU[0-9a-fA-F]{32}$`} + string BundleSid?; +}; + +public type SipSip_domainSip_authSip_auth_calls record { +}; + +public type ListUsageRecordLastMonthResponse record { + UsageUsage_recordUsage_record_last_month[] usage_records?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListSigningKeyResponse record { + Signing_key[] signing_keys?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CreateUsageTriggerRequest record { + # The URL we should call using `callback_method` when the trigger fires. + string CallbackUrl; + # The usage value at which the trigger should fire. For convenience, you can use an offset value such as `+30` to specify a trigger_value that is 30 units more than the current usage value. Be sure to urlencode a `+` as `%2B`. + string TriggerValue; + Usage_trigger_enum_usage_category UsageCategory; + # The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" CallbackMethod?; + # A descriptive string that you create to describe the resource. It can be up to 64 characters long. + string FriendlyName?; + Usage_trigger_enum_recurring Recurring?; + Usage_trigger_enum_trigger_field TriggerBy?; +}; + +public type Incoming_phone_number_local_enum_emergency_status "Active"|"Inactive"; + +public type Call_recording_enum_source "DialVerb"|"Conference"|"OutboundAPI"|"Trunking"|"RecordVerb"|"StartCallRecordingAPI"|"StartConferenceRecordingAPI"; + +public type QueueMember record { + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Member resource is associated with. + string? call_sid?; + # The date that the member was enqueued, given in RFC 2822 format. + string? date_enqueued?; + # This member's current position in the queue. + int? position?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The number of seconds the member has been in the queue. + int? wait_time?; + # The SID of the Queue the member is in. + string? queue_sid?; +}; + +public type SipSip_credential_listSip_credential record { + # A 34 character string that uniquely identifies this resource. + string? sid?; + # The unique id of the Account that is responsible for this resource. + string? account_sid?; + # The unique id that identifies the credential list that includes this credential. + string? credential_list_sid?; + # The username for this credential. + string? username?; + # The date that this resource was created, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_created?; + # The date that this resource was last updated, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_updated?; + # The URI for this resource, relative to `https://api.twilio.com` + string? uri?; +}; + +public type CreateIncomingPhoneNumberRequest record { + # The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. + string ApiVersion?; + # A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the new phone number. + string FriendlyName?; + # The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string SmsApplicationSid?; + # The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsFallbackMethod?; + # The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. + string SmsFallbackUrl?; + # The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsMethod?; + # The URL we should call when the new phone number receives an incoming SMS message. + string SmsUrl?; + # The URL we should call using the `status_callback_method` to send status information to your application. + string StatusCallback?; + # The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string VoiceApplicationSid?; + # Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. + boolean VoiceCallerIdLookup?; + # The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceFallbackMethod?; + # The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + string VoiceFallbackUrl?; + # The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceMethod?; + # The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. + string VoiceUrl?; + Incoming_phone_number_enum_emergency_status EmergencyStatus?; + # The SID of the emergency address configuration to use for emergency calling from the new phone number. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AD[0-9a-fA-F]{32}$`} + string EmergencyAddressSid?; + # The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^TK[0-9a-fA-F]{32}$`} + string TrunkSid?; + # The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^RI[0-9a-fA-F]{32}$`} + string IdentitySid?; + # The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AD[0-9a-fA-F]{32}$`} + string AddressSid?; + Incoming_phone_number_enum_voice_receive_mode VoiceReceiveMode?; + # The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^BU[0-9a-fA-F]{32}$`} + string BundleSid?; + # The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234. + string PhoneNumber?; + # The desired area code for your new incoming phone number. Can be any three-digit, US or Canada area code. We will provision an available phone number within this area code for you. **You must provide an `area_code` or a `phone_number`.** (US and Canada only). + string AreaCode?; +}; + +public type Available_phone_number_local record { + # A formatted version of the phone number. + string? friendly_name?; + # The 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. + string? phone_number?; + # The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) of this phone number. Available for only phone numbers from the US and Canada. + string? lata?; + # The locality or city of this phone number's location. + string? locality?; + # The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) of this phone number. Available for only phone numbers from the US and Canada. + string? rate_center?; + # The latitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? latitude?; + # The longitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? longitude?; + # The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada. + string? region?; + # The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada. + string? postal_code?; + # The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of this phone number. + string? iso_country?; + # The type of [Address](https://www.twilio.com/docs/usage/api/address) resource the phone number requires. Can be: `none`, `any`, `local`, or `foreign`. `none` means no address is required. `any` means an address is required, but it can be anywhere in the world. `local` means an address in the phone number's country is required. `foreign` means an address outside of the phone number's country is required. + string? address_requirements?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are: `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Available_phone_number_local_capabilities? capabilities?; +}; + +public type Conference_enum_status "init"|"in-progress"|"completed"; + +public type Recording_add_on_result_enum_status "canceled"|"completed"|"deleted"|"failed"|"in-progress"|"init"|"processing"|"queued"; + +public type SipSip_credential_list record { + # The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) that owns this resource. + string? account_sid?; + # The date that this resource was created, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_created?; + # The date that this resource was last updated, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_updated?; + # A human readable descriptive text that describes the CredentialList, up to 64 characters long. + string? friendly_name?; + # A 34 character string that uniquely identifies this resource. + string? sid?; + # A list of credentials associated with this credential list. + record {}? subresource_uris?; + # The URI for this resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type ListAvailablePhoneNumberVoipResponse record { + Available_phone_number_voip[] available_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Key record { + # The unique string that that we created to identify the Key resource. + string? sid?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; +}; + +public type ListShortCodeResponse record { + Short_code[] short_codes?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type UpdateAccountRequest record { + # Update the human-readable description of this Account + string FriendlyName?; + Account_enum_status Status?; +}; + +public type CreateSipIpAccessControlListRequest record { + # A human readable descriptive text that describes the IpAccessControlList, up to 255 characters long. + string FriendlyName; +}; + +public type CreateSipIpAccessControlListMappingRequest record { + # The unique id of the IP access control list to map to the SIP domain. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AL[0-9a-fA-F]{32}$`} + string IpAccessControlListSid; +}; + +public type UsageUsage_recordUsage_record_all_time record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage. + string? account_sid?; + # The API version used to create the resource. + string? api_version?; + # Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + string? as_of?; + Usage_record_all_time_enum_category category?; + # The number of usage events, such as the number of calls. + string? count?; + # The units in which `count` is measured, such as `calls` for calls or `messages` for SMS. + string? count_unit?; + # A plain-language description of the usage category. + string? description?; + # The last date for which usage is included in the UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? end_date?; + # The total price of the usage in the currency specified in `price_unit` and associated with the account. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format, such as `usd`, `eur`, and `jpy`. + string? price_unit?; + # The first date for which usage is included in this UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? start_date?; + # A list of related resources identified by their URIs. For more information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + record {}? subresource_uris?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The amount used to bill usage and measured in units described in `usage_unit`. + string? usage?; + # The units in which `usage` is measured, such as `minutes` for calls or `messages` for SMS. + string? usage_unit?; +}; + +public type ListAddressResponse record { + Address[] addresses?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Payments_enum_status "complete"|"cancel"; + +public type Notification record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Notification resource. + string? account_sid?; + # The API version used to generate the notification. Can be empty for events that don't have a specific API version, such as incoming phone calls. + string? api_version?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Notification resource is associated with. + string? call_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # A unique error code for the error condition that is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + string? error_code?; + # An integer log level that corresponds to the type of notification: `0` is ERROR, `1` is WARNING. + string? log?; + # The date the notification was actually generated in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. Message buffering can cause this value to differ from `date_created`. + string? message_date?; + # The text of the notification. + string? message_text?; + # The URL for more information about the error condition. This value is a page in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + string? more_info?; + # The HTTP method used to generate the notification. If the notification was generated during a phone call, this is the HTTP Method used to request the resource on your server. If the notification was generated by your use of our REST API, this is the HTTP method used to call the resource on our servers. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" request_method?; + # The URL of the resource that generated the notification. If the notification was generated during a phone call, this is the URL of the resource on your server that caused the notification. If the notification was generated by your use of our REST API, this is the URL of the resource you called. + string? request_url?; + # The unique string that that we created to identify the Notification resource. + string? sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type CallCall_recording record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource. + string? account_sid?; + # The API version used to make the recording. + string? api_version?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Recording resource is associated with. + string? call_sid?; + # The Conference SID that identifies the conference associated with the recording, if a conference recording. + string? conference_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The start time of the recording in GMT and in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? start_time?; + # The length of the recording in seconds. + string? duration?; + # The unique string that that we created to identify the Recording resource. + string? sid?; + # The one-time cost of creating the recording in the `price_unit` currency. + decimal? price?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # How to decrypt the recording if it was encrypted using [Call Recording Encryption](https://www.twilio.com/docs/voice/tutorials/voice-recording-encryption) feature. + anydata? encryption_details?; + # The currency used in the `price` property. Example: `USD`. + string? price_unit?; + Call_recording_enum_status status?; + # The number of channels in the final recording file. Can be: `1`, or `2`. Separating a two leg call into two separate channels of the recording file is supported in [Dial](https://www.twilio.com/docs/voice/twiml/dial#attributes-record) and [Outbound Rest API](https://www.twilio.com/docs/voice/make-calls) record options. + int? channels?; + Call_recording_enum_source 'source?; + # The error code that describes why the recording is `absent`. The error code is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). This value is null if the recording `status` is not `absent`. + int? error_code?; + # The recorded track. Can be: `inbound`, `outbound`, or `both`. + string? track?; +}; + +public type MessageMessage_feedback record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with this MessageFeedback resource. + string? account_sid?; + # The SID of the Message resource associated with this MessageFeedback resource. + string? message_sid?; + Message_feedback_enum_outcome outcome?; + # The date and time in GMT when this MessageFeedback resource was created, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT when this MessageFeedback resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type UpdateSipIpAddressRequest record { + # An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. + string IpAddress?; + # A human readable descriptive text for this resource, up to 255 characters long. + string FriendlyName?; + # An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used. + int CidrPrefixLength?; +}; + +public type Queue record { + # The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The number of calls currently in the queue. + int? current_size?; + # A string that you assigned to describe this resource. + string? friendly_name?; + # The URI of this resource, relative to `https://api.twilio.com`. + string? uri?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Queue resource. + string? account_sid?; + # The average wait time in seconds of the members in this queue. This is calculated at the time of the request. + int? average_wait_time?; + # The unique string that that we created to identify this Queue resource. + string? sid?; + # The date and time in GMT that this resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The maximum number of calls that can be in the queue. The default is 1000 and the maximum is 5000. + int? max_size?; +}; + +public type Incoming_phone_number_mobile_enum_emergency_status "Active"|"Inactive"; + +public type UpdateSipCredentialListRequest record { + # A human readable descriptive text for a CredentialList, up to 64 characters long. + string FriendlyName; +}; + +public type Call record { + # The unique string that we created to identify this Call resource. + string? sid?; + # The date and time in GMT that this resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The SID that identifies the call that created this leg. + string? parent_call_sid?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Call resource. + string? account_sid?; + # The phone number, SIP address, Client identifier or SIM SID that received this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. Client identifiers are formatted `client:name`. SIM SIDs are formatted as `sim:sid`. + string? to?; + # The phone number, SIP address or Client identifier that received this call. Formatted for display. Non-North American phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +442071838750). + string? to_formatted?; + # The phone number, SIP address, Client identifier or SIM SID that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. Client identifiers are formatted `client:name`. SIM SIDs are formatted as `sim:sid`. + string? 'from?; + # The calling phone number, SIP address, or Client identifier formatted for display. Non-North American phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +442071838750). + string? from_formatted?; + # If the call was inbound, this is the SID of the IncomingPhoneNumber resource that received the call. If the call was outbound, it is the SID of the OutgoingCallerId resource from which the call was placed. + string? phone_number_sid?; + Call_enum_status status?; + # The start time of the call, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. Empty if the call has not yet been dialed. + string? start_time?; + # The time the call ended, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. Empty if the call did not complete successfully. + string? end_time?; + # The length of the call in seconds. This value is empty for busy, failed, unanswered, or ongoing calls. + string? duration?; + # The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available. + string? price?; + # The currency in which `Price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format (e.g., `USD`, `EUR`, `JPY`). Always capitalized for calls. + string? price_unit?; + # A string describing the direction of the call. Can be: `inbound` for inbound calls, `outbound-api` for calls initiated via the REST API or `outbound-dial` for calls initiated by a `` verb. Using [Elastic SIP Trunking](https://www.twilio.com/docs/sip-trunking), the values can be [`trunking-terminating`](https://www.twilio.com/docs/sip-trunking#termination) for outgoing calls from your communications infrastructure to the PSTN or [`trunking-originating`](https://www.twilio.com/docs/sip-trunking#origination) for incoming calls to your communications infrastructure from the PSTN. + string? direction?; + # Either `human` or `machine` if this call was initiated with answering machine detection. Empty otherwise. + string? answered_by?; + # The API version used to create the call. + string? api_version?; + # The forwarding phone number if this call was an incoming call forwarded from another number (depends on carrier supporting forwarding). Otherwise, empty. + string? forwarded_from?; + # The Group SID associated with this call. If no Group is associated with the call, the field is empty. + string? group_sid?; + # The caller's name if this call was an incoming call to a phone number with caller ID Lookup enabled. Otherwise, empty. + string? caller_name?; + # The wait time in milliseconds before the call is placed. + string? queue_time?; + # The unique identifier of the trunk resource that was used for this call. The field is empty if the call was not made using a SIP trunk or if the call is not terminated. + string? trunk_sid?; + # The URI of this resource, relative to `https://api.twilio.com`. + string? uri?; + # A list of subresources available to this call, identified by their URIs relative to `https://api.twilio.com`. + record {}? subresource_uris?; +}; + +public type ListUsageRecordTodayResponse record { + UsageUsage_recordUsage_record_today[] usage_records?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Transcription_enum_status "in-progress"|"completed"|"failed"; + +public type Incoming_phone_number_local_enum_address_requirement "none"|"any"|"local"|"foreign"; + +public type Call_feedback_enum_issues "audio-latency"|"digits-not-captured"|"dropped-call"|"imperfect-audio"|"incorrect-caller-id"|"one-way-audio"|"post-dial-delay"|"unsolicited-call"; + +public type Stream_enum_status "in-progress"|"stopped"; + +public type SipSip_domainSip_authSip_auth_callsSip_auth_calls_credential_list_mapping record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resource. + string? account_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The unique string that that we created to identify the CredentialListMapping resource. + string? sid?; +}; + +public type ListAvailablePhoneNumberMachineToMachineResponse record { + Available_phone_number_machine_to_machine[] available_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Message_enum_address_retention "retain"|"obfuscate"; + +public type UsageUsage_record record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage. + string? account_sid?; + # The API version used to create the resource. + string? api_version?; + # Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + string? as_of?; + Usage_record_enum_category category?; + # The number of usage events, such as the number of calls. + string? count?; + # The units in which `count` is measured, such as `calls` for calls or `messages` for SMS. + string? count_unit?; + # A plain-language description of the usage category. + string? description?; + # The last date for which usage is included in the UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? end_date?; + # The total price of the usage in the currency specified in `price_unit` and associated with the account. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format, such as `usd`, `eur`, and `jpy`. + string? price_unit?; + # The first date for which usage is included in this UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? start_date?; + # A list of related resources identified by their URIs. For more information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + record {}? subresource_uris?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The amount used to bill usage and measured in units described in `usage_unit`. + string? usage?; + # The units in which `usage` is measured, such as `minutes` for calls or `messages` for SMS. + string? usage_unit?; +}; + +public type Usage_record_enum_category "a2p-registration-fees"|"agent-conference"|"amazon-polly"|"answering-machine-detection"|"authy-authentications"|"authy-calls-outbound"|"authy-monthly-fees"|"authy-phone-intelligence"|"authy-phone-verifications"|"authy-sms-outbound"|"call-progess-events"|"calleridlookups"|"calls"|"calls-client"|"calls-globalconference"|"calls-inbound"|"calls-inbound-local"|"calls-inbound-mobile"|"calls-inbound-tollfree"|"calls-outbound"|"calls-pay-verb-transactions"|"calls-recordings"|"calls-sip"|"calls-sip-inbound"|"calls-sip-outbound"|"calls-transfers"|"carrier-lookups"|"conversations"|"conversations-api-requests"|"conversations-conversation-events"|"conversations-endpoint-connectivity"|"conversations-events"|"conversations-participant-events"|"conversations-participants"|"cps"|"flex-usage"|"fraud-lookups"|"group-rooms"|"group-rooms-data-track"|"group-rooms-encrypted-media-recorded"|"group-rooms-media-downloaded"|"group-rooms-media-recorded"|"group-rooms-media-routed"|"group-rooms-media-stored"|"group-rooms-participant-minutes"|"group-rooms-recorded-minutes"|"imp-v1-usage"|"lookups"|"marketplace"|"marketplace-algorithmia-named-entity-recognition"|"marketplace-cadence-transcription"|"marketplace-cadence-translation"|"marketplace-capio-speech-to-text"|"marketplace-convriza-ababa"|"marketplace-deepgram-phrase-detector"|"marketplace-digital-segment-business-info"|"marketplace-facebook-offline-conversions"|"marketplace-google-speech-to-text"|"marketplace-ibm-watson-message-insights"|"marketplace-ibm-watson-message-sentiment"|"marketplace-ibm-watson-recording-analysis"|"marketplace-ibm-watson-tone-analyzer"|"marketplace-icehook-systems-scout"|"marketplace-infogroup-dataaxle-bizinfo"|"marketplace-keen-io-contact-center-analytics"|"marketplace-marchex-cleancall"|"marketplace-marchex-sentiment-analysis-for-sms"|"marketplace-marketplace-nextcaller-social-id"|"marketplace-mobile-commons-opt-out-classifier"|"marketplace-nexiwave-voicemail-to-text"|"marketplace-nextcaller-advanced-caller-identification"|"marketplace-nomorobo-spam-score"|"marketplace-payfone-tcpa-compliance"|"marketplace-remeeting-automatic-speech-recognition"|"marketplace-tcpa-defense-solutions-blacklist-feed"|"marketplace-telo-opencnam"|"marketplace-truecnam-true-spam"|"marketplace-twilio-caller-name-lookup-us"|"marketplace-twilio-carrier-information-lookup"|"marketplace-voicebase-pci"|"marketplace-voicebase-transcription"|"marketplace-voicebase-transcription-custom-vocabulary"|"marketplace-whitepages-pro-caller-identification"|"marketplace-whitepages-pro-phone-intelligence"|"marketplace-whitepages-pro-phone-reputation"|"marketplace-wolfarm-spoken-results"|"marketplace-wolfram-short-answer"|"marketplace-ytica-contact-center-reporting-analytics"|"mediastorage"|"mms"|"mms-inbound"|"mms-inbound-longcode"|"mms-inbound-shortcode"|"mms-messages-carrierfees"|"mms-outbound"|"mms-outbound-longcode"|"mms-outbound-shortcode"|"monitor-reads"|"monitor-storage"|"monitor-writes"|"notify"|"notify-actions-attempts"|"notify-channels"|"number-format-lookups"|"pchat"|"pchat-users"|"peer-to-peer-rooms-participant-minutes"|"pfax"|"pfax-minutes"|"pfax-minutes-inbound"|"pfax-minutes-outbound"|"pfax-pages"|"phonenumbers"|"phonenumbers-cps"|"phonenumbers-emergency"|"phonenumbers-local"|"phonenumbers-mobile"|"phonenumbers-setups"|"phonenumbers-tollfree"|"premiumsupport"|"proxy"|"proxy-active-sessions"|"pstnconnectivity"|"pv"|"pv-composition-media-downloaded"|"pv-composition-media-encrypted"|"pv-composition-media-stored"|"pv-composition-minutes"|"pv-recording-compositions"|"pv-room-participants"|"pv-room-participants-au1"|"pv-room-participants-br1"|"pv-room-participants-ie1"|"pv-room-participants-jp1"|"pv-room-participants-sg1"|"pv-room-participants-us1"|"pv-room-participants-us2"|"pv-rooms"|"pv-sip-endpoint-registrations"|"recordings"|"recordingstorage"|"rooms-group-bandwidth"|"rooms-group-minutes"|"rooms-peer-to-peer-minutes"|"shortcodes"|"shortcodes-customerowned"|"shortcodes-mms-enablement"|"shortcodes-mps"|"shortcodes-random"|"shortcodes-uk"|"shortcodes-vanity"|"small-group-rooms"|"small-group-rooms-data-track"|"small-group-rooms-participant-minutes"|"sms"|"sms-inbound"|"sms-inbound-longcode"|"sms-inbound-shortcode"|"sms-messages-carrierfees"|"sms-messages-features"|"sms-messages-features-senderid"|"sms-outbound"|"sms-outbound-content-inspection"|"sms-outbound-longcode"|"sms-outbound-shortcode"|"speech-recognition"|"studio-engagements"|"sync"|"sync-actions"|"sync-endpoint-hours"|"sync-endpoint-hours-above-daily-cap"|"taskrouter-tasks"|"totalprice"|"transcriptions"|"trunking-cps"|"trunking-emergency-calls"|"trunking-origination"|"trunking-origination-local"|"trunking-origination-mobile"|"trunking-origination-tollfree"|"trunking-recordings"|"trunking-secure"|"trunking-termination"|"tts-google"|"turnmegabytes"|"turnmegabytes-australia"|"turnmegabytes-brasil"|"turnmegabytes-germany"|"turnmegabytes-india"|"turnmegabytes-ireland"|"turnmegabytes-japan"|"turnmegabytes-singapore"|"turnmegabytes-useast"|"turnmegabytes-uswest"|"twilio-interconnect"|"verify-push"|"verify-totp"|"verify-whatsapp-conversations-business-initiated"|"video-recordings"|"virtual-agent"|"voice-insights"|"voice-insights-client-insights-on-demand-minute"|"voice-insights-ptsn-insights-on-demand-minute"|"voice-insights-sip-interface-insights-on-demand-minute"|"voice-insights-sip-trunking-insights-on-demand-minute"|"voice-intelligence"|"voice-intelligence-transcription"|"voice-intelligence-operators"|"wireless"|"wireless-orders"|"wireless-orders-artwork"|"wireless-orders-bulk"|"wireless-orders-esim"|"wireless-orders-starter"|"wireless-usage"|"wireless-usage-commands"|"wireless-usage-commands-africa"|"wireless-usage-commands-asia"|"wireless-usage-commands-centralandsouthamerica"|"wireless-usage-commands-europe"|"wireless-usage-commands-home"|"wireless-usage-commands-northamerica"|"wireless-usage-commands-oceania"|"wireless-usage-commands-roaming"|"wireless-usage-data"|"wireless-usage-data-africa"|"wireless-usage-data-asia"|"wireless-usage-data-centralandsouthamerica"|"wireless-usage-data-custom-additionalmb"|"wireless-usage-data-custom-first5mb"|"wireless-usage-data-domestic-roaming"|"wireless-usage-data-europe"|"wireless-usage-data-individual-additionalgb"|"wireless-usage-data-individual-firstgb"|"wireless-usage-data-international-roaming-canada"|"wireless-usage-data-international-roaming-india"|"wireless-usage-data-international-roaming-mexico"|"wireless-usage-data-northamerica"|"wireless-usage-data-oceania"|"wireless-usage-data-pooled"|"wireless-usage-data-pooled-downlink"|"wireless-usage-data-pooled-uplink"|"wireless-usage-mrc"|"wireless-usage-mrc-custom"|"wireless-usage-mrc-individual"|"wireless-usage-mrc-pooled"|"wireless-usage-mrc-suspended"|"wireless-usage-sms"|"wireless-usage-voice"; + +public type CreateQueueRequest record { + # A descriptive string that you created to describe this resource. It can be up to 64 characters long. + string FriendlyName; + # The maximum number of calls allowed to be in the queue. The default is 1000. The maximum is 5000. + int MaxSize?; +}; + +public type Available_phone_number_voip record { + # A formatted version of the phone number. + string? friendly_name?; + # The 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. + string? phone_number?; + # The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) of this phone number. Available for only phone numbers from the US and Canada. + string? lata?; + # The locality or city of this phone number's location. + string? locality?; + # The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) of this phone number. Available for only phone numbers from the US and Canada. + string? rate_center?; + # The latitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? latitude?; + # The longitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? longitude?; + # The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada. + string? region?; + # The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada. + string? postal_code?; + # The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of this phone number. + string? iso_country?; + # The type of [Address](https://www.twilio.com/docs/usage/api/address) resource the phone number requires. Can be: `none`, `any`, `local`, or `foreign`. `none` means no address is required. `any` means an address is required, but it can be anywhere in the world. `local` means an address in the phone number's country is required. `foreign` means an address outside of the phone number's country is required. + string? address_requirements?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are: `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Available_phone_number_local_capabilities? capabilities?; +}; + +public type ListKeyResponse record { + Key[] keys?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Connect_app_enum_permission "get-all"|"post-all"; + +public type Usage_record_all_time_enum_category "a2p-registration-fees"|"agent-conference"|"amazon-polly"|"answering-machine-detection"|"authy-authentications"|"authy-calls-outbound"|"authy-monthly-fees"|"authy-phone-intelligence"|"authy-phone-verifications"|"authy-sms-outbound"|"call-progess-events"|"calleridlookups"|"calls"|"calls-client"|"calls-globalconference"|"calls-inbound"|"calls-inbound-local"|"calls-inbound-mobile"|"calls-inbound-tollfree"|"calls-outbound"|"calls-pay-verb-transactions"|"calls-recordings"|"calls-sip"|"calls-sip-inbound"|"calls-sip-outbound"|"calls-transfers"|"carrier-lookups"|"conversations"|"conversations-api-requests"|"conversations-conversation-events"|"conversations-endpoint-connectivity"|"conversations-events"|"conversations-participant-events"|"conversations-participants"|"cps"|"flex-usage"|"fraud-lookups"|"group-rooms"|"group-rooms-data-track"|"group-rooms-encrypted-media-recorded"|"group-rooms-media-downloaded"|"group-rooms-media-recorded"|"group-rooms-media-routed"|"group-rooms-media-stored"|"group-rooms-participant-minutes"|"group-rooms-recorded-minutes"|"imp-v1-usage"|"lookups"|"marketplace"|"marketplace-algorithmia-named-entity-recognition"|"marketplace-cadence-transcription"|"marketplace-cadence-translation"|"marketplace-capio-speech-to-text"|"marketplace-convriza-ababa"|"marketplace-deepgram-phrase-detector"|"marketplace-digital-segment-business-info"|"marketplace-facebook-offline-conversions"|"marketplace-google-speech-to-text"|"marketplace-ibm-watson-message-insights"|"marketplace-ibm-watson-message-sentiment"|"marketplace-ibm-watson-recording-analysis"|"marketplace-ibm-watson-tone-analyzer"|"marketplace-icehook-systems-scout"|"marketplace-infogroup-dataaxle-bizinfo"|"marketplace-keen-io-contact-center-analytics"|"marketplace-marchex-cleancall"|"marketplace-marchex-sentiment-analysis-for-sms"|"marketplace-marketplace-nextcaller-social-id"|"marketplace-mobile-commons-opt-out-classifier"|"marketplace-nexiwave-voicemail-to-text"|"marketplace-nextcaller-advanced-caller-identification"|"marketplace-nomorobo-spam-score"|"marketplace-payfone-tcpa-compliance"|"marketplace-remeeting-automatic-speech-recognition"|"marketplace-tcpa-defense-solutions-blacklist-feed"|"marketplace-telo-opencnam"|"marketplace-truecnam-true-spam"|"marketplace-twilio-caller-name-lookup-us"|"marketplace-twilio-carrier-information-lookup"|"marketplace-voicebase-pci"|"marketplace-voicebase-transcription"|"marketplace-voicebase-transcription-custom-vocabulary"|"marketplace-whitepages-pro-caller-identification"|"marketplace-whitepages-pro-phone-intelligence"|"marketplace-whitepages-pro-phone-reputation"|"marketplace-wolfarm-spoken-results"|"marketplace-wolfram-short-answer"|"marketplace-ytica-contact-center-reporting-analytics"|"mediastorage"|"mms"|"mms-inbound"|"mms-inbound-longcode"|"mms-inbound-shortcode"|"mms-messages-carrierfees"|"mms-outbound"|"mms-outbound-longcode"|"mms-outbound-shortcode"|"monitor-reads"|"monitor-storage"|"monitor-writes"|"notify"|"notify-actions-attempts"|"notify-channels"|"number-format-lookups"|"pchat"|"pchat-users"|"peer-to-peer-rooms-participant-minutes"|"pfax"|"pfax-minutes"|"pfax-minutes-inbound"|"pfax-minutes-outbound"|"pfax-pages"|"phonenumbers"|"phonenumbers-cps"|"phonenumbers-emergency"|"phonenumbers-local"|"phonenumbers-mobile"|"phonenumbers-setups"|"phonenumbers-tollfree"|"premiumsupport"|"proxy"|"proxy-active-sessions"|"pstnconnectivity"|"pv"|"pv-composition-media-downloaded"|"pv-composition-media-encrypted"|"pv-composition-media-stored"|"pv-composition-minutes"|"pv-recording-compositions"|"pv-room-participants"|"pv-room-participants-au1"|"pv-room-participants-br1"|"pv-room-participants-ie1"|"pv-room-participants-jp1"|"pv-room-participants-sg1"|"pv-room-participants-us1"|"pv-room-participants-us2"|"pv-rooms"|"pv-sip-endpoint-registrations"|"recordings"|"recordingstorage"|"rooms-group-bandwidth"|"rooms-group-minutes"|"rooms-peer-to-peer-minutes"|"shortcodes"|"shortcodes-customerowned"|"shortcodes-mms-enablement"|"shortcodes-mps"|"shortcodes-random"|"shortcodes-uk"|"shortcodes-vanity"|"small-group-rooms"|"small-group-rooms-data-track"|"small-group-rooms-participant-minutes"|"sms"|"sms-inbound"|"sms-inbound-longcode"|"sms-inbound-shortcode"|"sms-messages-carrierfees"|"sms-messages-features"|"sms-messages-features-senderid"|"sms-outbound"|"sms-outbound-content-inspection"|"sms-outbound-longcode"|"sms-outbound-shortcode"|"speech-recognition"|"studio-engagements"|"sync"|"sync-actions"|"sync-endpoint-hours"|"sync-endpoint-hours-above-daily-cap"|"taskrouter-tasks"|"totalprice"|"transcriptions"|"trunking-cps"|"trunking-emergency-calls"|"trunking-origination"|"trunking-origination-local"|"trunking-origination-mobile"|"trunking-origination-tollfree"|"trunking-recordings"|"trunking-secure"|"trunking-termination"|"tts-google"|"turnmegabytes"|"turnmegabytes-australia"|"turnmegabytes-brasil"|"turnmegabytes-germany"|"turnmegabytes-india"|"turnmegabytes-ireland"|"turnmegabytes-japan"|"turnmegabytes-singapore"|"turnmegabytes-useast"|"turnmegabytes-uswest"|"twilio-interconnect"|"verify-push"|"verify-totp"|"verify-whatsapp-conversations-business-initiated"|"video-recordings"|"virtual-agent"|"voice-insights"|"voice-insights-client-insights-on-demand-minute"|"voice-insights-ptsn-insights-on-demand-minute"|"voice-insights-sip-interface-insights-on-demand-minute"|"voice-insights-sip-trunking-insights-on-demand-minute"|"voice-intelligence"|"voice-intelligence-transcription"|"voice-intelligence-operators"|"wireless"|"wireless-orders"|"wireless-orders-artwork"|"wireless-orders-bulk"|"wireless-orders-esim"|"wireless-orders-starter"|"wireless-usage"|"wireless-usage-commands"|"wireless-usage-commands-africa"|"wireless-usage-commands-asia"|"wireless-usage-commands-centralandsouthamerica"|"wireless-usage-commands-europe"|"wireless-usage-commands-home"|"wireless-usage-commands-northamerica"|"wireless-usage-commands-oceania"|"wireless-usage-commands-roaming"|"wireless-usage-data"|"wireless-usage-data-africa"|"wireless-usage-data-asia"|"wireless-usage-data-centralandsouthamerica"|"wireless-usage-data-custom-additionalmb"|"wireless-usage-data-custom-first5mb"|"wireless-usage-data-domestic-roaming"|"wireless-usage-data-europe"|"wireless-usage-data-individual-additionalgb"|"wireless-usage-data-individual-firstgb"|"wireless-usage-data-international-roaming-canada"|"wireless-usage-data-international-roaming-india"|"wireless-usage-data-international-roaming-mexico"|"wireless-usage-data-northamerica"|"wireless-usage-data-oceania"|"wireless-usage-data-pooled"|"wireless-usage-data-pooled-downlink"|"wireless-usage-data-pooled-uplink"|"wireless-usage-mrc"|"wireless-usage-mrc-custom"|"wireless-usage-mrc-individual"|"wireless-usage-mrc-pooled"|"wireless-usage-mrc-suspended"|"wireless-usage-sms"|"wireless-usage-voice"; + +public type CallCall_feedback record { + # The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + string? account_sid?; + # The date that this resource was created, given in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_created?; + # The date that this resource was last updated, given in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_updated?; + # A list of issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`. + Call_feedback_enum_issues[]? issues?; + # `1` to `5` quality score where `1` represents imperfect experience and `5` represents a perfect call. + int? quality_score?; + # A 34 character string that uniquely identifies this resource. + string? sid?; +}; + +public type CallUser_defined_message record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created User Defined Message. + string? account_sid?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the User Defined Message is associated with. + string? call_sid?; + # The SID that uniquely identifies this User Defined Message. + string? sid?; + # The date that this User Defined Message was created, given in RFC 2822 format. + string? date_created?; +}; + +public type Message_enum_traffic_type "free"; + +public type Usage_record_yesterday_enum_category "a2p-registration-fees"|"agent-conference"|"amazon-polly"|"answering-machine-detection"|"authy-authentications"|"authy-calls-outbound"|"authy-monthly-fees"|"authy-phone-intelligence"|"authy-phone-verifications"|"authy-sms-outbound"|"call-progess-events"|"calleridlookups"|"calls"|"calls-client"|"calls-globalconference"|"calls-inbound"|"calls-inbound-local"|"calls-inbound-mobile"|"calls-inbound-tollfree"|"calls-outbound"|"calls-pay-verb-transactions"|"calls-recordings"|"calls-sip"|"calls-sip-inbound"|"calls-sip-outbound"|"calls-transfers"|"carrier-lookups"|"conversations"|"conversations-api-requests"|"conversations-conversation-events"|"conversations-endpoint-connectivity"|"conversations-events"|"conversations-participant-events"|"conversations-participants"|"cps"|"flex-usage"|"fraud-lookups"|"group-rooms"|"group-rooms-data-track"|"group-rooms-encrypted-media-recorded"|"group-rooms-media-downloaded"|"group-rooms-media-recorded"|"group-rooms-media-routed"|"group-rooms-media-stored"|"group-rooms-participant-minutes"|"group-rooms-recorded-minutes"|"imp-v1-usage"|"lookups"|"marketplace"|"marketplace-algorithmia-named-entity-recognition"|"marketplace-cadence-transcription"|"marketplace-cadence-translation"|"marketplace-capio-speech-to-text"|"marketplace-convriza-ababa"|"marketplace-deepgram-phrase-detector"|"marketplace-digital-segment-business-info"|"marketplace-facebook-offline-conversions"|"marketplace-google-speech-to-text"|"marketplace-ibm-watson-message-insights"|"marketplace-ibm-watson-message-sentiment"|"marketplace-ibm-watson-recording-analysis"|"marketplace-ibm-watson-tone-analyzer"|"marketplace-icehook-systems-scout"|"marketplace-infogroup-dataaxle-bizinfo"|"marketplace-keen-io-contact-center-analytics"|"marketplace-marchex-cleancall"|"marketplace-marchex-sentiment-analysis-for-sms"|"marketplace-marketplace-nextcaller-social-id"|"marketplace-mobile-commons-opt-out-classifier"|"marketplace-nexiwave-voicemail-to-text"|"marketplace-nextcaller-advanced-caller-identification"|"marketplace-nomorobo-spam-score"|"marketplace-payfone-tcpa-compliance"|"marketplace-remeeting-automatic-speech-recognition"|"marketplace-tcpa-defense-solutions-blacklist-feed"|"marketplace-telo-opencnam"|"marketplace-truecnam-true-spam"|"marketplace-twilio-caller-name-lookup-us"|"marketplace-twilio-carrier-information-lookup"|"marketplace-voicebase-pci"|"marketplace-voicebase-transcription"|"marketplace-voicebase-transcription-custom-vocabulary"|"marketplace-whitepages-pro-caller-identification"|"marketplace-whitepages-pro-phone-intelligence"|"marketplace-whitepages-pro-phone-reputation"|"marketplace-wolfarm-spoken-results"|"marketplace-wolfram-short-answer"|"marketplace-ytica-contact-center-reporting-analytics"|"mediastorage"|"mms"|"mms-inbound"|"mms-inbound-longcode"|"mms-inbound-shortcode"|"mms-messages-carrierfees"|"mms-outbound"|"mms-outbound-longcode"|"mms-outbound-shortcode"|"monitor-reads"|"monitor-storage"|"monitor-writes"|"notify"|"notify-actions-attempts"|"notify-channels"|"number-format-lookups"|"pchat"|"pchat-users"|"peer-to-peer-rooms-participant-minutes"|"pfax"|"pfax-minutes"|"pfax-minutes-inbound"|"pfax-minutes-outbound"|"pfax-pages"|"phonenumbers"|"phonenumbers-cps"|"phonenumbers-emergency"|"phonenumbers-local"|"phonenumbers-mobile"|"phonenumbers-setups"|"phonenumbers-tollfree"|"premiumsupport"|"proxy"|"proxy-active-sessions"|"pstnconnectivity"|"pv"|"pv-composition-media-downloaded"|"pv-composition-media-encrypted"|"pv-composition-media-stored"|"pv-composition-minutes"|"pv-recording-compositions"|"pv-room-participants"|"pv-room-participants-au1"|"pv-room-participants-br1"|"pv-room-participants-ie1"|"pv-room-participants-jp1"|"pv-room-participants-sg1"|"pv-room-participants-us1"|"pv-room-participants-us2"|"pv-rooms"|"pv-sip-endpoint-registrations"|"recordings"|"recordingstorage"|"rooms-group-bandwidth"|"rooms-group-minutes"|"rooms-peer-to-peer-minutes"|"shortcodes"|"shortcodes-customerowned"|"shortcodes-mms-enablement"|"shortcodes-mps"|"shortcodes-random"|"shortcodes-uk"|"shortcodes-vanity"|"small-group-rooms"|"small-group-rooms-data-track"|"small-group-rooms-participant-minutes"|"sms"|"sms-inbound"|"sms-inbound-longcode"|"sms-inbound-shortcode"|"sms-messages-carrierfees"|"sms-messages-features"|"sms-messages-features-senderid"|"sms-outbound"|"sms-outbound-content-inspection"|"sms-outbound-longcode"|"sms-outbound-shortcode"|"speech-recognition"|"studio-engagements"|"sync"|"sync-actions"|"sync-endpoint-hours"|"sync-endpoint-hours-above-daily-cap"|"taskrouter-tasks"|"totalprice"|"transcriptions"|"trunking-cps"|"trunking-emergency-calls"|"trunking-origination"|"trunking-origination-local"|"trunking-origination-mobile"|"trunking-origination-tollfree"|"trunking-recordings"|"trunking-secure"|"trunking-termination"|"tts-google"|"turnmegabytes"|"turnmegabytes-australia"|"turnmegabytes-brasil"|"turnmegabytes-germany"|"turnmegabytes-india"|"turnmegabytes-ireland"|"turnmegabytes-japan"|"turnmegabytes-singapore"|"turnmegabytes-useast"|"turnmegabytes-uswest"|"twilio-interconnect"|"verify-push"|"verify-totp"|"verify-whatsapp-conversations-business-initiated"|"video-recordings"|"virtual-agent"|"voice-insights"|"voice-insights-client-insights-on-demand-minute"|"voice-insights-ptsn-insights-on-demand-minute"|"voice-insights-sip-interface-insights-on-demand-minute"|"voice-insights-sip-trunking-insights-on-demand-minute"|"voice-intelligence"|"voice-intelligence-transcription"|"voice-intelligence-operators"|"wireless"|"wireless-orders"|"wireless-orders-artwork"|"wireless-orders-bulk"|"wireless-orders-esim"|"wireless-orders-starter"|"wireless-usage"|"wireless-usage-commands"|"wireless-usage-commands-africa"|"wireless-usage-commands-asia"|"wireless-usage-commands-centralandsouthamerica"|"wireless-usage-commands-europe"|"wireless-usage-commands-home"|"wireless-usage-commands-northamerica"|"wireless-usage-commands-oceania"|"wireless-usage-commands-roaming"|"wireless-usage-data"|"wireless-usage-data-africa"|"wireless-usage-data-asia"|"wireless-usage-data-centralandsouthamerica"|"wireless-usage-data-custom-additionalmb"|"wireless-usage-data-custom-first5mb"|"wireless-usage-data-domestic-roaming"|"wireless-usage-data-europe"|"wireless-usage-data-individual-additionalgb"|"wireless-usage-data-individual-firstgb"|"wireless-usage-data-international-roaming-canada"|"wireless-usage-data-international-roaming-india"|"wireless-usage-data-international-roaming-mexico"|"wireless-usage-data-northamerica"|"wireless-usage-data-oceania"|"wireless-usage-data-pooled"|"wireless-usage-data-pooled-downlink"|"wireless-usage-data-pooled-uplink"|"wireless-usage-mrc"|"wireless-usage-mrc-custom"|"wireless-usage-mrc-individual"|"wireless-usage-mrc-pooled"|"wireless-usage-mrc-suspended"|"wireless-usage-sms"|"wireless-usage-voice"; + +public type ListSipAuthCallsCredentialListMappingResponse record { + SipSip_domainSip_authSip_auth_callsSip_auth_calls_credential_list_mapping[] contents?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CallCall_feedback_summary record { + # The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + string? account_sid?; + # The total number of calls. + int? call_count?; + # The total number of calls with a feedback entry. + int? call_feedback_count?; + # The date that this resource was created, given in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_created?; + # The date that this resource was last updated, given in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_updated?; + # The last date for which feedback entries are included in this Feedback Summary, formatted as `YYYY-MM-DD` and specified in UTC. + string? end_date?; + # Whether the feedback summary includes subaccounts; `true` if it does, otherwise `false`. + boolean? include_subaccounts?; + # A list of issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, or `one-way-audio`. + anydata[]? issues?; + # The average QualityScore of the feedback entries. + decimal? quality_score_average?; + # The median QualityScore of the feedback entries. + decimal? quality_score_median?; + # The standard deviation of the quality scores. + decimal? quality_score_standard_deviation?; + # A 34 character string that uniquely identifies this resource. + string? sid?; + # The first date for which feedback entries are included in this feedback summary, formatted as `YYYY-MM-DD` and specified in UTC. + string? start_date?; + Call_feedback_summary_enum_status status?; +}; + +public type Signing_key record { + string? sid?; + string? friendly_name?; + string? date_created?; + string? date_updated?; +}; + +public type CreateIncomingPhoneNumberLocalRequest record { + # The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234. + string PhoneNumber; + # The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. + string ApiVersion?; + # A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. + string FriendlyName?; + # The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string SmsApplicationSid?; + # The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsFallbackMethod?; + # The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. + string SmsFallbackUrl?; + # The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsMethod?; + # The URL we should call when the new phone number receives an incoming SMS message. + string SmsUrl?; + # The URL we should call using the `status_callback_method` to send status information to your application. + string StatusCallback?; + # The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string VoiceApplicationSid?; + # Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. + boolean VoiceCallerIdLookup?; + # The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceFallbackMethod?; + # The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + string VoiceFallbackUrl?; + # The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceMethod?; + # The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. + string VoiceUrl?; + # The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^RI[0-9a-fA-F]{32}$`} + string IdentitySid?; + # The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AD[0-9a-fA-F]{32}$`} + string AddressSid?; + Incoming_phone_number_local_enum_emergency_status EmergencyStatus?; + # The SID of the emergency address configuration to use for emergency calling from the new phone number. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AD[0-9a-fA-F]{32}$`} + string EmergencyAddressSid?; + # The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^TK[0-9a-fA-F]{32}$`} + string TrunkSid?; + Incoming_phone_number_local_enum_voice_receive_mode VoiceReceiveMode?; + # The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^BU[0-9a-fA-F]{32}$`} + string BundleSid?; +}; + +public type Message_enum_risk_check "enable"|"disable"; + +public type UsageUsage_recordUsage_record_yearly record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage. + string? account_sid?; + # The API version used to create the resource. + string? api_version?; + # Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + string? as_of?; + Usage_record_yearly_enum_category category?; + # The number of usage events, such as the number of calls. + string? count?; + # The units in which `count` is measured, such as `calls` for calls or `messages` for SMS. + string? count_unit?; + # A plain-language description of the usage category. + string? description?; + # The last date for which usage is included in the UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? end_date?; + # The total price of the usage in the currency specified in `price_unit` and associated with the account. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format, such as `usd`, `eur`, and `jpy`. + string? price_unit?; + # The first date for which usage is included in this UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? start_date?; + # A list of related resources identified by their URIs. For more information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + record {}? subresource_uris?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The amount used to bill usage and measured in units described in `usage_unit`. + string? usage?; + # The units in which `usage` is measured, such as `minutes` for calls or `messages` for SMS. + string? usage_unit?; +}; + +public type Available_phone_number_national record { + # A formatted version of the phone number. + string? friendly_name?; + # The 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. + string? phone_number?; + # The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) of this phone number. Available for only phone numbers from the US and Canada. + string? lata?; + # The locality or city of this phone number's location. + string? locality?; + # The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) of this phone number. Available for only phone numbers from the US and Canada. + string? rate_center?; + # The latitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? latitude?; + # The longitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? longitude?; + # The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada. + string? region?; + # The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada. + string? postal_code?; + # The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of this phone number. + string? iso_country?; + # The type of [Address](https://www.twilio.com/docs/usage/api/address) resource the phone number requires. Can be: `none`, `any`, `local`, or `foreign`. `none` means no address is required. `any` means an address is required, but it can be anywhere in the world. `local` means an address in the phone number's country is required. `foreign` means an address outside of the phone number's country is required. + string? address_requirements?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are: `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Available_phone_number_local_capabilities? capabilities?; +}; + +public type CreateIncomingPhoneNumberAssignedAddOnRequest record { + # The SID that identifies the Add-on installation. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^XE[0-9a-fA-F]{32}$`} + string InstalledAddOnSid; +}; + +public type UsageUsage_trigger record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that the trigger monitors. + string? account_sid?; + # The API version used to create the resource. + string? api_version?; + # The HTTP method we use to call `callback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" callback_method?; + # The URL we call using the `callback_method` when the trigger fires. + string? callback_url?; + # The current value of the field the trigger is watching. + string? current_value?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the trigger was last fired specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_fired?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the trigger. + string? friendly_name?; + Usage_trigger_enum_recurring recurring?; + # The unique string that that we created to identify the UsageTrigger resource. + string? sid?; + Usage_trigger_enum_trigger_field trigger_by?; + # The value at which the trigger will fire. Must be a positive, numeric value. + string? trigger_value?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + Usage_trigger_enum_usage_category usage_category?; + # The URI of the [UsageRecord](https://www.twilio.com/docs/usage/api/usage-record) resource this trigger watches, relative to `https://api.twilio.com`. + string? usage_record_uri?; +}; + +public type ListConferenceResponse record { + Conference[] conferences?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type UpdateSipCredentialRequest record { + # The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`) + string Password?; +}; + +public type RecordingRecording_add_on_resultRecording_add_on_result_payload record { + # The unique string that that we created to identify the Recording AddOnResult Payload resource. + string? sid?; + # The SID of the AddOnResult to which the payload belongs. + string? add_on_result_sid?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resource. + string? account_sid?; + # The string provided by the vendor that describes the payload. + string? label?; + # The SID of the Add-on to which the result belongs. + string? add_on_sid?; + # The SID of the Add-on configuration. + string? add_on_configuration_sid?; + # The MIME type of the payload. + string? content_type?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The SID of the recording to which the AddOnResult resource that contains the payload belongs. + string? reference_sid?; + # A list of related resources identified by their relative URIs. + record {}? subresource_uris?; +}; + +public type ListRecordingResponse record { + Recording[] recordings?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CreateTokenRequest record { + # The duration in seconds for which the generated credentials are valid. The default value is 86400 (24 hours). + int Ttl?; +}; + +public type Call_enum_update_status "canceled"|"completed"; + +public type ListUsageTriggerResponse record { + UsageUsage_trigger[] usage_triggers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type UpdateApplicationRequest record { + # A descriptive string that you create to describe the resource. It can be up to 64 characters long. + string FriendlyName?; + # The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is your account's default API version. + string ApiVersion?; + # The URL we should call when the phone number assigned to this application receives a call. + string VoiceUrl?; + # The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceMethod?; + # The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + string VoiceFallbackUrl?; + # The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceFallbackMethod?; + # The URL we should call using the `status_callback_method` to send status information to your application. + string StatusCallback?; + # The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`. + boolean VoiceCallerIdLookup?; + # The URL we should call when the phone number receives an incoming SMS message. + string SmsUrl?; + # The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsMethod?; + # The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`. + string SmsFallbackUrl?; + # The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsFallbackMethod?; + # Same as message_status_callback: The URL we should call using a POST method to send status information about SMS messages sent by the application. Deprecated, included for backwards compatibility. + string SmsStatusCallback?; + # The URL we should call using a POST method to send message status information to your application. + string MessageStatusCallback?; + # Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`. + boolean PublicApplicationConnectEnabled?; +}; + +public type SipSip_domainSip_credential_list_mapping record { + # The unique id of the Account that is responsible for this resource. + string? account_sid?; + # The date that this resource was created, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_created?; + # The date that this resource was last updated, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_updated?; + # The unique string that is created to identify the SipDomain resource. + string? domain_sid?; + # A human readable descriptive text for this resource, up to 64 characters long. + string? friendly_name?; + # A 34 character string that uniquely identifies this resource. + string? sid?; + # The URI for this resource, relative to `https://api.twilio.com` + string? uri?; +}; + +public type ListSipCredentialListResponse record { + SipSip_credential_list[] credential_lists?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Sip record { +}; + +public type ListIncomingPhoneNumberMobileResponse record { + Incoming_phone_numberIncoming_phone_number_mobile[] incoming_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CreateNewKeyRequest record { + # A descriptive string that you create to describe the resource. It can be up to 64 characters long. + string FriendlyName?; +}; + +public type SipSip_domainSip_authSip_auth_callsSip_auth_calls_ip_access_control_list_mapping record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IpAccessControlListMapping resource. + string? account_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The unique string that that we created to identify the IpAccessControlListMapping resource. + string? sid?; +}; + +public type Call_feedback_summary_enum_status "queued"|"in-progress"|"completed"|"failed"; + +public type Recording_transcription_enum_status "in-progress"|"completed"|"failed"; + +public type ListUsageRecordDailyResponse record { + UsageUsage_recordUsage_record_daily[] usage_records?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListIncomingPhoneNumberAssignedAddOnResponse record { + Incoming_phone_numberIncoming_phone_number_assigned_add_on[] assigned_add_ons?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListSipCredentialResponse record { + SipSip_credential_listSip_credential[] credentials?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type SipSip_domainSip_auth record { +}; + +public type ListCallEventResponse record { + CallCall_event[] events?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CreateAddressRequest record { + # The name to associate with the new address. + string CustomerName; + # The number and street address of the new address. + string Street; + # The city of the new address. + string City; + # The state or region of the new address. + string Region; + # The postal code of the new address. + string PostalCode; + # The ISO country code of the new address. + string IsoCountry; + # A descriptive string that you create to describe the new address. It can be up to 64 characters long. + string FriendlyName?; + # Whether to enable emergency calling on the new address. Can be: `true` or `false`. + boolean EmergencyEnabled?; + # Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide. + boolean AutoCorrectAddress?; + # The additional number and street address of the address. + string StreetSecondary?; +}; + +public type CreateCallRecordingRequest record { + # The recording status events on which we should call the `recording_status_callback` URL. Can be: `in-progress`, `completed` and `absent` and the default is `completed`. Separate multiple event values with a space. + string[] RecordingStatusCallbackEvent?; + # The URL we should call using the `recording_status_callback_method` on each recording event specified in `recording_status_callback_event`. For more information, see [RecordingStatusCallback parameters](https://www.twilio.com/docs/voice/api/recording#recordingstatuscallback). + string RecordingStatusCallback?; + # The HTTP method we should use to call `recording_status_callback`. Can be: `GET` or `POST` and the default is `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" RecordingStatusCallbackMethod?; + # Whether to trim any leading and trailing silence in the recording. Can be: `trim-silence` or `do-not-trim` and the default is `do-not-trim`. `trim-silence` trims the silence from the beginning and end of the recording and `do-not-trim` does not. + string Trim?; + # The number of channels used in the recording. Can be: `mono` or `dual` and the default is `mono`. `mono` records all parties of the call into one channel. `dual` records each party of a 2-party call into separate channels. + string RecordingChannels?; + # The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio. + string RecordingTrack?; +}; + +public type Incoming_phone_numberIncoming_phone_number_assigned_add_onIncoming_phone_number_assigned_add_on_extension record { + # The unique string that that we created to identify the resource. + string? sid?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource. + string? account_sid?; + # The SID of the Phone Number to which the Add-on is assigned. + string? resource_sid?; + # The SID that uniquely identifies the assigned Add-on installation. + string? assigned_add_on_sid?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # A string that you assigned to describe the Product this Extension is used within. + string? product_name?; + # An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. + string? unique_name?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # Whether the Extension will be invoked. + boolean? enabled?; +}; + +public type Incoming_phone_number_toll_free_enum_emergency_status "Active"|"Inactive"; + +public type ListMemberResponse record { + QueueMember[] queue_members?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +# The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. +public type Incoming_phone_number_capabilities record { + boolean mms?; + boolean sms?; + boolean voice?; + boolean fax?; +}; + +public type ConferenceConference_recording record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resource. + string? account_sid?; + # The API version used to create the recording. + string? api_version?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Conference Recording resource is associated with. + string? call_sid?; + # The Conference SID that identifies the conference associated with the recording. + string? conference_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The start time of the recording in GMT and in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? start_time?; + # The length of the recording in seconds. + string? duration?; + # The unique string that that we created to identify the Conference Recording resource. + string? sid?; + # The one-time cost of creating the recording in the `price_unit` currency. + string? price?; + # The currency used in the `price` property. Example: `USD`. + string? price_unit?; + Conference_recording_enum_status status?; + # The number of channels in the final recording file. Can be: `1`, or `2`. Separating a two leg call into two separate channels of the recording file is supported in [Dial](https://www.twilio.com/docs/voice/twiml/dial#attributes-record) and [Outbound Rest API](https://www.twilio.com/docs/voice/make-calls) record options. + int? channels?; + Conference_recording_enum_source 'source?; + # The error code that describes why the recording is `absent`. The error code is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). This value is null if the recording `status` is not `absent`. + int? error_code?; + # How to decrypt the recording if it was encrypted using [Call Recording Encryption](https://www.twilio.com/docs/voice/tutorials/voice-recording-encryption) feature. + anydata? encryption_details?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type UpdateCallRequest record { + # The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). + string Url?; + # The HTTP method we should use when calling the `url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" Method?; + Call_enum_update_status Status?; + # The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored. + string FallbackUrl?; + # The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" FallbackMethod?; + # The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted). + string StatusCallback?; + # The HTTP method we should use when requesting the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # TwiML instructions for the call Twilio will use without fetching Twiml from url. Twiml and url parameters are mutually exclusive + string Twiml?; + # The maximum duration of the call in seconds. Constraints depend on account and configuration. + int TimeLimit?; +}; + +public type Usage_record_today_enum_category "a2p-registration-fees"|"agent-conference"|"amazon-polly"|"answering-machine-detection"|"authy-authentications"|"authy-calls-outbound"|"authy-monthly-fees"|"authy-phone-intelligence"|"authy-phone-verifications"|"authy-sms-outbound"|"call-progess-events"|"calleridlookups"|"calls"|"calls-client"|"calls-globalconference"|"calls-inbound"|"calls-inbound-local"|"calls-inbound-mobile"|"calls-inbound-tollfree"|"calls-outbound"|"calls-pay-verb-transactions"|"calls-recordings"|"calls-sip"|"calls-sip-inbound"|"calls-sip-outbound"|"calls-transfers"|"carrier-lookups"|"conversations"|"conversations-api-requests"|"conversations-conversation-events"|"conversations-endpoint-connectivity"|"conversations-events"|"conversations-participant-events"|"conversations-participants"|"cps"|"flex-usage"|"fraud-lookups"|"group-rooms"|"group-rooms-data-track"|"group-rooms-encrypted-media-recorded"|"group-rooms-media-downloaded"|"group-rooms-media-recorded"|"group-rooms-media-routed"|"group-rooms-media-stored"|"group-rooms-participant-minutes"|"group-rooms-recorded-minutes"|"imp-v1-usage"|"lookups"|"marketplace"|"marketplace-algorithmia-named-entity-recognition"|"marketplace-cadence-transcription"|"marketplace-cadence-translation"|"marketplace-capio-speech-to-text"|"marketplace-convriza-ababa"|"marketplace-deepgram-phrase-detector"|"marketplace-digital-segment-business-info"|"marketplace-facebook-offline-conversions"|"marketplace-google-speech-to-text"|"marketplace-ibm-watson-message-insights"|"marketplace-ibm-watson-message-sentiment"|"marketplace-ibm-watson-recording-analysis"|"marketplace-ibm-watson-tone-analyzer"|"marketplace-icehook-systems-scout"|"marketplace-infogroup-dataaxle-bizinfo"|"marketplace-keen-io-contact-center-analytics"|"marketplace-marchex-cleancall"|"marketplace-marchex-sentiment-analysis-for-sms"|"marketplace-marketplace-nextcaller-social-id"|"marketplace-mobile-commons-opt-out-classifier"|"marketplace-nexiwave-voicemail-to-text"|"marketplace-nextcaller-advanced-caller-identification"|"marketplace-nomorobo-spam-score"|"marketplace-payfone-tcpa-compliance"|"marketplace-remeeting-automatic-speech-recognition"|"marketplace-tcpa-defense-solutions-blacklist-feed"|"marketplace-telo-opencnam"|"marketplace-truecnam-true-spam"|"marketplace-twilio-caller-name-lookup-us"|"marketplace-twilio-carrier-information-lookup"|"marketplace-voicebase-pci"|"marketplace-voicebase-transcription"|"marketplace-voicebase-transcription-custom-vocabulary"|"marketplace-whitepages-pro-caller-identification"|"marketplace-whitepages-pro-phone-intelligence"|"marketplace-whitepages-pro-phone-reputation"|"marketplace-wolfarm-spoken-results"|"marketplace-wolfram-short-answer"|"marketplace-ytica-contact-center-reporting-analytics"|"mediastorage"|"mms"|"mms-inbound"|"mms-inbound-longcode"|"mms-inbound-shortcode"|"mms-messages-carrierfees"|"mms-outbound"|"mms-outbound-longcode"|"mms-outbound-shortcode"|"monitor-reads"|"monitor-storage"|"monitor-writes"|"notify"|"notify-actions-attempts"|"notify-channels"|"number-format-lookups"|"pchat"|"pchat-users"|"peer-to-peer-rooms-participant-minutes"|"pfax"|"pfax-minutes"|"pfax-minutes-inbound"|"pfax-minutes-outbound"|"pfax-pages"|"phonenumbers"|"phonenumbers-cps"|"phonenumbers-emergency"|"phonenumbers-local"|"phonenumbers-mobile"|"phonenumbers-setups"|"phonenumbers-tollfree"|"premiumsupport"|"proxy"|"proxy-active-sessions"|"pstnconnectivity"|"pv"|"pv-composition-media-downloaded"|"pv-composition-media-encrypted"|"pv-composition-media-stored"|"pv-composition-minutes"|"pv-recording-compositions"|"pv-room-participants"|"pv-room-participants-au1"|"pv-room-participants-br1"|"pv-room-participants-ie1"|"pv-room-participants-jp1"|"pv-room-participants-sg1"|"pv-room-participants-us1"|"pv-room-participants-us2"|"pv-rooms"|"pv-sip-endpoint-registrations"|"recordings"|"recordingstorage"|"rooms-group-bandwidth"|"rooms-group-minutes"|"rooms-peer-to-peer-minutes"|"shortcodes"|"shortcodes-customerowned"|"shortcodes-mms-enablement"|"shortcodes-mps"|"shortcodes-random"|"shortcodes-uk"|"shortcodes-vanity"|"small-group-rooms"|"small-group-rooms-data-track"|"small-group-rooms-participant-minutes"|"sms"|"sms-inbound"|"sms-inbound-longcode"|"sms-inbound-shortcode"|"sms-messages-carrierfees"|"sms-messages-features"|"sms-messages-features-senderid"|"sms-outbound"|"sms-outbound-content-inspection"|"sms-outbound-longcode"|"sms-outbound-shortcode"|"speech-recognition"|"studio-engagements"|"sync"|"sync-actions"|"sync-endpoint-hours"|"sync-endpoint-hours-above-daily-cap"|"taskrouter-tasks"|"totalprice"|"transcriptions"|"trunking-cps"|"trunking-emergency-calls"|"trunking-origination"|"trunking-origination-local"|"trunking-origination-mobile"|"trunking-origination-tollfree"|"trunking-recordings"|"trunking-secure"|"trunking-termination"|"tts-google"|"turnmegabytes"|"turnmegabytes-australia"|"turnmegabytes-brasil"|"turnmegabytes-germany"|"turnmegabytes-india"|"turnmegabytes-ireland"|"turnmegabytes-japan"|"turnmegabytes-singapore"|"turnmegabytes-useast"|"turnmegabytes-uswest"|"twilio-interconnect"|"verify-push"|"verify-totp"|"verify-whatsapp-conversations-business-initiated"|"video-recordings"|"virtual-agent"|"voice-insights"|"voice-insights-client-insights-on-demand-minute"|"voice-insights-ptsn-insights-on-demand-minute"|"voice-insights-sip-interface-insights-on-demand-minute"|"voice-insights-sip-trunking-insights-on-demand-minute"|"voice-intelligence"|"voice-intelligence-transcription"|"voice-intelligence-operators"|"wireless"|"wireless-orders"|"wireless-orders-artwork"|"wireless-orders-bulk"|"wireless-orders-esim"|"wireless-orders-starter"|"wireless-usage"|"wireless-usage-commands"|"wireless-usage-commands-africa"|"wireless-usage-commands-asia"|"wireless-usage-commands-centralandsouthamerica"|"wireless-usage-commands-europe"|"wireless-usage-commands-home"|"wireless-usage-commands-northamerica"|"wireless-usage-commands-oceania"|"wireless-usage-commands-roaming"|"wireless-usage-data"|"wireless-usage-data-africa"|"wireless-usage-data-asia"|"wireless-usage-data-centralandsouthamerica"|"wireless-usage-data-custom-additionalmb"|"wireless-usage-data-custom-first5mb"|"wireless-usage-data-domestic-roaming"|"wireless-usage-data-europe"|"wireless-usage-data-individual-additionalgb"|"wireless-usage-data-individual-firstgb"|"wireless-usage-data-international-roaming-canada"|"wireless-usage-data-international-roaming-india"|"wireless-usage-data-international-roaming-mexico"|"wireless-usage-data-northamerica"|"wireless-usage-data-oceania"|"wireless-usage-data-pooled"|"wireless-usage-data-pooled-downlink"|"wireless-usage-data-pooled-uplink"|"wireless-usage-mrc"|"wireless-usage-mrc-custom"|"wireless-usage-mrc-individual"|"wireless-usage-mrc-pooled"|"wireless-usage-mrc-suspended"|"wireless-usage-sms"|"wireless-usage-voice"; + +public type UpdateCallRecordingRequest record { + Call_recording_enum_status Status; + # Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`. + string PauseBehavior?; +}; + +public type Authorized_connect_app record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AuthorizedConnectApp resource. + string? account_sid?; + # The company name set for the Connect App. + string? connect_app_company_name?; + # A detailed description of the Connect App. + string? connect_app_description?; + # The name of the Connect App. + string? connect_app_friendly_name?; + # The public URL for the Connect App. + string? connect_app_homepage_url?; + # The SID that we assigned to the Connect App. + string? connect_app_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The set of permissions that you authorized for the Connect App. Can be: `get-all` or `post-all`. + Authorized_connect_app_enum_permission[]? permissions?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type ListNotificationResponse record { + Notification[] notifications?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListMediaResponse record { + MessageMedia[] media_list?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListUsageRecordResponse record { + UsageUsage_record[] usage_records?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Conference_enum_reason_conference_ended "conference-ended-via-api"|"participant-with-end-conference-on-exit-left"|"participant-with-end-conference-on-exit-kicked"|"last-participant-kicked"|"last-participant-left"; + +public type SipSip_ip_access_control_listSip_ip_address record { + # A 34 character string that uniquely identifies this resource. + string? sid?; + # The unique id of the Account that is responsible for this resource. + string? account_sid?; + # A human readable descriptive text for this resource, up to 255 characters long. + string? friendly_name?; + # An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. + string? ip_address?; + # An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used. + int? cidr_prefix_length?; + # The unique id of the IpAccessControlList resource that includes this resource. + string? ip_access_control_list_sid?; + # The date that this resource was created, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_created?; + # The date that this resource was last updated, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_updated?; + # The URI for this resource, relative to `https://api.twilio.com` + string? uri?; +}; + +public type ListIncomingPhoneNumberAssignedAddOnExtensionResponse record { + Incoming_phone_numberIncoming_phone_number_assigned_add_onIncoming_phone_number_assigned_add_on_extension[] extensions?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListSipAuthCallsIpAccessControlListMappingResponse record { + SipSip_domainSip_authSip_auth_callsSip_auth_calls_ip_access_control_list_mapping[] contents?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type UpdatePaymentsRequest record { + # A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions. This should be a unique string value per API call and can be a randomly generated. + string IdempotencyKey; + # Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the [Update](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-update) and [Complete/Cancel](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-cancelcomplete) POST requests. + string StatusCallback; + Payments_enum_capture Capture?; + Payments_enum_status Status?; +}; + +public type CreateAccountRequest record { + # A human readable description of the account to create, defaults to `SubAccount Created at {YYYY-MM-DD HH:MM meridian}` + string FriendlyName?; +}; + +public type CallCall_notification record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call Notification resource. + string? account_sid?; + # The API version used to create the Call Notification resource. + string? api_version?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Call Notification resource is associated with. + string? call_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # A unique error code for the error condition that is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + string? error_code?; + # An integer log level that corresponds to the type of notification: `0` is ERROR, `1` is WARNING. + string? log?; + # The date the notification was actually generated in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. Message buffering can cause this value to differ from `date_created`. + string? message_date?; + # The text of the notification. + string? message_text?; + # The URL for more information about the error condition. This value is a page in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + string? more_info?; + # The HTTP method used to generate the notification. If the notification was generated during a phone call, this is the HTTP Method used to request the resource on your server. If the notification was generated by your use of our REST API, this is the HTTP method used to call the resource on our servers. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" request_method?; + # The URL of the resource that generated the notification. If the notification was generated during a phone call, this is the URL of the resource on your server that caused the notification. If the notification was generated by your use of our REST API, this is the URL of the resource you called. + string? request_url?; + # The unique string that that we created to identify the Call Notification resource. + string? sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type ListSipAuthRegistrationsCredentialListMappingResponse record { + SipSip_domainSip_authSip_auth_registrationsSip_auth_registrations_credential_list_mapping[] contents?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type UpdateSigningKeyRequest record { + # + string FriendlyName?; +}; + +public type Incoming_phone_number_mobile_enum_address_requirement "none"|"any"|"local"|"foreign"; + +public type ListTranscriptionResponse record { + Transcription[] transcriptions?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Message_feedback_enum_outcome "confirmed"|"unconfirmed"; + +public type Call_enum_event "initiated"|"ringing"|"answered"|"completed"; + +public type Incoming_phone_number_mobile_enum_voice_receive_mode "voice"|"fax"; + +public type Usage_trigger_enum_usage_category "a2p-registration-fees"|"agent-conference"|"amazon-polly"|"answering-machine-detection"|"authy-authentications"|"authy-calls-outbound"|"authy-monthly-fees"|"authy-phone-intelligence"|"authy-phone-verifications"|"authy-sms-outbound"|"call-progess-events"|"calleridlookups"|"calls"|"calls-client"|"calls-globalconference"|"calls-inbound"|"calls-inbound-local"|"calls-inbound-mobile"|"calls-inbound-tollfree"|"calls-outbound"|"calls-pay-verb-transactions"|"calls-recordings"|"calls-sip"|"calls-sip-inbound"|"calls-sip-outbound"|"calls-transfers"|"carrier-lookups"|"conversations"|"conversations-api-requests"|"conversations-conversation-events"|"conversations-endpoint-connectivity"|"conversations-events"|"conversations-participant-events"|"conversations-participants"|"cps"|"flex-usage"|"fraud-lookups"|"group-rooms"|"group-rooms-data-track"|"group-rooms-encrypted-media-recorded"|"group-rooms-media-downloaded"|"group-rooms-media-recorded"|"group-rooms-media-routed"|"group-rooms-media-stored"|"group-rooms-participant-minutes"|"group-rooms-recorded-minutes"|"imp-v1-usage"|"lookups"|"marketplace"|"marketplace-algorithmia-named-entity-recognition"|"marketplace-cadence-transcription"|"marketplace-cadence-translation"|"marketplace-capio-speech-to-text"|"marketplace-convriza-ababa"|"marketplace-deepgram-phrase-detector"|"marketplace-digital-segment-business-info"|"marketplace-facebook-offline-conversions"|"marketplace-google-speech-to-text"|"marketplace-ibm-watson-message-insights"|"marketplace-ibm-watson-message-sentiment"|"marketplace-ibm-watson-recording-analysis"|"marketplace-ibm-watson-tone-analyzer"|"marketplace-icehook-systems-scout"|"marketplace-infogroup-dataaxle-bizinfo"|"marketplace-keen-io-contact-center-analytics"|"marketplace-marchex-cleancall"|"marketplace-marchex-sentiment-analysis-for-sms"|"marketplace-marketplace-nextcaller-social-id"|"marketplace-mobile-commons-opt-out-classifier"|"marketplace-nexiwave-voicemail-to-text"|"marketplace-nextcaller-advanced-caller-identification"|"marketplace-nomorobo-spam-score"|"marketplace-payfone-tcpa-compliance"|"marketplace-remeeting-automatic-speech-recognition"|"marketplace-tcpa-defense-solutions-blacklist-feed"|"marketplace-telo-opencnam"|"marketplace-truecnam-true-spam"|"marketplace-twilio-caller-name-lookup-us"|"marketplace-twilio-carrier-information-lookup"|"marketplace-voicebase-pci"|"marketplace-voicebase-transcription"|"marketplace-voicebase-transcription-custom-vocabulary"|"marketplace-whitepages-pro-caller-identification"|"marketplace-whitepages-pro-phone-intelligence"|"marketplace-whitepages-pro-phone-reputation"|"marketplace-wolfarm-spoken-results"|"marketplace-wolfram-short-answer"|"marketplace-ytica-contact-center-reporting-analytics"|"mediastorage"|"mms"|"mms-inbound"|"mms-inbound-longcode"|"mms-inbound-shortcode"|"mms-messages-carrierfees"|"mms-outbound"|"mms-outbound-longcode"|"mms-outbound-shortcode"|"monitor-reads"|"monitor-storage"|"monitor-writes"|"notify"|"notify-actions-attempts"|"notify-channels"|"number-format-lookups"|"pchat"|"pchat-users"|"peer-to-peer-rooms-participant-minutes"|"pfax"|"pfax-minutes"|"pfax-minutes-inbound"|"pfax-minutes-outbound"|"pfax-pages"|"phonenumbers"|"phonenumbers-cps"|"phonenumbers-emergency"|"phonenumbers-local"|"phonenumbers-mobile"|"phonenumbers-setups"|"phonenumbers-tollfree"|"premiumsupport"|"proxy"|"proxy-active-sessions"|"pstnconnectivity"|"pv"|"pv-composition-media-downloaded"|"pv-composition-media-encrypted"|"pv-composition-media-stored"|"pv-composition-minutes"|"pv-recording-compositions"|"pv-room-participants"|"pv-room-participants-au1"|"pv-room-participants-br1"|"pv-room-participants-ie1"|"pv-room-participants-jp1"|"pv-room-participants-sg1"|"pv-room-participants-us1"|"pv-room-participants-us2"|"pv-rooms"|"pv-sip-endpoint-registrations"|"recordings"|"recordingstorage"|"rooms-group-bandwidth"|"rooms-group-minutes"|"rooms-peer-to-peer-minutes"|"shortcodes"|"shortcodes-customerowned"|"shortcodes-mms-enablement"|"shortcodes-mps"|"shortcodes-random"|"shortcodes-uk"|"shortcodes-vanity"|"small-group-rooms"|"small-group-rooms-data-track"|"small-group-rooms-participant-minutes"|"sms"|"sms-inbound"|"sms-inbound-longcode"|"sms-inbound-shortcode"|"sms-messages-carrierfees"|"sms-messages-features"|"sms-messages-features-senderid"|"sms-outbound"|"sms-outbound-content-inspection"|"sms-outbound-longcode"|"sms-outbound-shortcode"|"speech-recognition"|"studio-engagements"|"sync"|"sync-actions"|"sync-endpoint-hours"|"sync-endpoint-hours-above-daily-cap"|"taskrouter-tasks"|"totalprice"|"transcriptions"|"trunking-cps"|"trunking-emergency-calls"|"trunking-origination"|"trunking-origination-local"|"trunking-origination-mobile"|"trunking-origination-tollfree"|"trunking-recordings"|"trunking-secure"|"trunking-termination"|"tts-google"|"turnmegabytes"|"turnmegabytes-australia"|"turnmegabytes-brasil"|"turnmegabytes-germany"|"turnmegabytes-india"|"turnmegabytes-ireland"|"turnmegabytes-japan"|"turnmegabytes-singapore"|"turnmegabytes-useast"|"turnmegabytes-uswest"|"twilio-interconnect"|"verify-push"|"verify-totp"|"verify-whatsapp-conversations-business-initiated"|"video-recordings"|"virtual-agent"|"voice-insights"|"voice-insights-client-insights-on-demand-minute"|"voice-insights-ptsn-insights-on-demand-minute"|"voice-insights-sip-interface-insights-on-demand-minute"|"voice-insights-sip-trunking-insights-on-demand-minute"|"voice-intelligence"|"voice-intelligence-transcription"|"voice-intelligence-operators"|"wireless"|"wireless-orders"|"wireless-orders-artwork"|"wireless-orders-bulk"|"wireless-orders-esim"|"wireless-orders-starter"|"wireless-usage"|"wireless-usage-commands"|"wireless-usage-commands-africa"|"wireless-usage-commands-asia"|"wireless-usage-commands-centralandsouthamerica"|"wireless-usage-commands-europe"|"wireless-usage-commands-home"|"wireless-usage-commands-northamerica"|"wireless-usage-commands-oceania"|"wireless-usage-commands-roaming"|"wireless-usage-data"|"wireless-usage-data-africa"|"wireless-usage-data-asia"|"wireless-usage-data-centralandsouthamerica"|"wireless-usage-data-custom-additionalmb"|"wireless-usage-data-custom-first5mb"|"wireless-usage-data-domestic-roaming"|"wireless-usage-data-europe"|"wireless-usage-data-individual-additionalgb"|"wireless-usage-data-individual-firstgb"|"wireless-usage-data-international-roaming-canada"|"wireless-usage-data-international-roaming-india"|"wireless-usage-data-international-roaming-mexico"|"wireless-usage-data-northamerica"|"wireless-usage-data-oceania"|"wireless-usage-data-pooled"|"wireless-usage-data-pooled-downlink"|"wireless-usage-data-pooled-uplink"|"wireless-usage-mrc"|"wireless-usage-mrc-custom"|"wireless-usage-mrc-individual"|"wireless-usage-mrc-pooled"|"wireless-usage-mrc-suspended"|"wireless-usage-sms"|"wireless-usage-voice"; + +public type ListQueueResponse record { + Queue[] queues?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + public type Account record { - string sid = ""; - string name = ""; - string status = ""; - string 'type = ""; - string createdDate = ""; - string updatedDate = ""; -}; - -# Represents Twilio SMS response. -# + sid - Unique identifier of the account -# + dateCreated - The date and time at which this resource was created -# + dateUpdated - The date and time at which this resource was last updated -# + dateSent - The date and time at which the outgoing message was sent -# + accountSid - The unique identifier of the account, which sent the message -# + toNumber - The phone number to which the message was sent -# + fromNumber - The phone number from which the message was sent -# + body - The text of the message to be sent -# + status - Status of the voice call (queued, failed, sent, delivered, undelivered) -# + direction - The direction of the message (inbound, outbound-api, outbound-call, outbound-reply) -# + apiVersion - The API version, which is used to process the message -# + price - The price amount of the SMS -# + priceUnit - The price currency -# + uri - The URI of the resource relative to https://api.twilio.com -# + numSegments - The number of segments, which make up the complete message -public type SmsResponse record { - string sid = ""; - string dateCreated = ""; - string dateUpdated = ""; - string dateSent = ""; - string accountSid = ""; - string toNumber = ""; - string fromNumber = ""; - string body = ""; - string status = ""; - string direction = ""; - string apiVersion = ""; - string price = ""; - string priceUnit = ""; - string uri = ""; - string numSegments = ""; -}; - -# Represents the Twilio WhatsApp message response. More details of the message format is -# accessible from https://www.twilio.com/docs/sms/api/message-resource#create-a-message-resource -# + sid - Unique identifier of the account -# + dateCreated - The date and time at which this resource was created -# + dateUpdated - The date and time at which this resource was last updated -# + dateSent - The date and time at which the outgoing message was sent -# + accountSid - The unique identifier of the account, which sent the message -# + toNumber - The phone number to which the message was sent -# + fromNumber - The phone number from which the message was sent -# + messageServiceSid - The SID of the Messaging Service, which will be associated with the message -# + body - The text of the message to be sent -# + status - Status of the voice call (queued, failed, sent, delivered, undelivered) -# + numSegments - The number of segments, which make up the complete message -# + numMedia - The number of associated media files -# + direction - The direction of the message (inbound, outbound-api, outbound-call, outbound-reply) -# + apiVersion - The API version used to process the message -# + price - The price of the SMS (This is set to null for WhatsApp messages) -# + priceUnit - The currency of the price (This is set to null for WhatsApp messages) -# + errorCode - The error code returned if the message status is failed or undelivered -# + errorMessage - The description of the error_code if the message status is failed or undelivered -# + uri - The URI of the resource relative to https://api.twilio.com -# + subresourceUris - A list of related resources identified by their URIs relative to https://api.twilio.com -public type WhatsAppResponse record { - string sid = ""; - string dateCreated = ""; - string dateUpdated = ""; - string dateSent = ""; - string accountSid = ""; - string toNumber = ""; - string fromNumber = ""; - string messageServiceSid = ""; - string body = ""; - string status = ""; - string numSegments = ""; - string numMedia = ""; - string direction = ""; - string apiVersion = ""; - string price = ""; - string priceUnit = ""; - string errorCode = ""; - string errorMessage = ""; - string uri = ""; - json subresourceUris = {}; -}; - -# Represents Twilio voice call response. -# + sid - Unique identifier of the account -# + status - Status of the voice call (queued, initiated, ringing, answered, completed) -# + price - The price amount of the call -# + priceUnit - The price currency -public type VoiceCallResponse record { - string sid = ""; - string status = ""; - string price = ""; - string priceUnit = ""; -}; - -# Represents the Twilio error. This will be returned if an error occurred on Twilio operations. -public type TwilioError distinct error; - -# Represents the Twilio module related error. -public type Error TwilioError; - -# Represents the StatusCallback record for registering status change callback URL for Twilio Voice status change events. -# + url - Callback URL where the status changes needs to be delivered. -# + method - HTTP method in which the event payload needs to be delivered -# + events - Interested list of status change events. -public type StatusCallback record { - string url; - string method; - string[] events?; -}; - -# Represents the message resource in the Twilio Rest API. -# + body - The message body -# + numSegments - The number of segments, which make up the complete message -# + direction - The direction of the message (inbound, outbound-api, outbound-call, outbound-reply) -# + fromNumber - The phone number from which the message sent -# + toNumber - The phone number to which the message received -# + dateUpdated - The date and time at which this resource was last updated -# + price - The price amount of the message -# + errorMessage - The description of the error_code if the message status is failed or undelivered -# + uri -The URI of the resource relative to https://api.twilio.com -# + accountSid - The unique identifier of the account, which sent the message -# + numMedia - The number of associated media files -# + status - The status of the message -# + messagingServiceSid - The SID of the Messaging Service used with the message. The value is null if a Messaging Service was not used -# + sid - The unique string that created to identify the message resource -# + dateSent - The date and time in GMT that the resource was sent specified in RFC 2822 format -# + dateCreated - The date and time in GMT that the resource was created specified in RFC 2822 format -# + errorCode - The error code returned if your message status is failed or undelivered -# + priceUnit - The currency in which price is measured, in ISO 4127 format -# + apiVersion - The API version used to process the message -# + subresourceUris - A list of related resources identified by their URIs relative to https://api.twilio.com -public type MessageResourceResponse record { - string body = ""; - string numSegments = ""; - string direction = ""; - string fromNumber = ""; - string toNumber = ""; - string dateUpdated = ""; - string price = ""; - string errorMessage = ""; - string uri = ""; - string accountSid = ""; - string numMedia = ""; - string status = ""; - string messagingServiceSid = ""; - string sid = ""; - string dateSent = ""; - string dateCreated = ""; - string errorCode = ""; - string priceUnit = ""; - string apiVersion = ""; - json subresourceUris = {}; -}; - -# Represents voice call message input options. -# -# + userInput - A Twiml URL or an inline Message that what should be heard when the other party picks up the phone -# + userInputType - Whether the userInput is a URL or inline message -public type VoiceCallInput record { - VoiceCallInputType userInputType; - string userInput; -}; - -# Represents voice call input types. -# -# + TWIML_URL - A URL that returns TwiML Voice instructions -# + MESSAGE_IN_TEXT - A message in plain text format -public enum VoiceCallInputType { - TWIML_URL, - MESSAGE_IN_TEXT -} + # The authorization token for this account. This token should be kept a secret, so no sharing. + string? auth_token?; + # The date that this account was created, in GMT in RFC 2822 format + string? date_created?; + # The date that this account was last updated, in GMT in RFC 2822 format. + string? date_updated?; + # A human readable description of this account, up to 64 characters long. By default the FriendlyName is your email address. + string? friendly_name?; + # The unique 34 character id that represents the parent of this account. The OwnerAccountSid of a parent account is it's own sid. + string? owner_account_sid?; + # A 34 character string that uniquely identifies this resource. + string? sid?; + Account_enum_status status?; + # A Map of various subresources available for the given Account Instance + record {}? subresource_uris?; + Account_enum_type 'type?; + # The URI for this resource, relative to `https://api.twilio.com` + string? uri?; +}; + +public type Stream_enum_track "inbound_track"|"outbound_track"|"both_tracks"; + +public type Usage_record_this_month_enum_category "a2p-registration-fees"|"agent-conference"|"amazon-polly"|"answering-machine-detection"|"authy-authentications"|"authy-calls-outbound"|"authy-monthly-fees"|"authy-phone-intelligence"|"authy-phone-verifications"|"authy-sms-outbound"|"call-progess-events"|"calleridlookups"|"calls"|"calls-client"|"calls-globalconference"|"calls-inbound"|"calls-inbound-local"|"calls-inbound-mobile"|"calls-inbound-tollfree"|"calls-outbound"|"calls-pay-verb-transactions"|"calls-recordings"|"calls-sip"|"calls-sip-inbound"|"calls-sip-outbound"|"calls-transfers"|"carrier-lookups"|"conversations"|"conversations-api-requests"|"conversations-conversation-events"|"conversations-endpoint-connectivity"|"conversations-events"|"conversations-participant-events"|"conversations-participants"|"cps"|"flex-usage"|"fraud-lookups"|"group-rooms"|"group-rooms-data-track"|"group-rooms-encrypted-media-recorded"|"group-rooms-media-downloaded"|"group-rooms-media-recorded"|"group-rooms-media-routed"|"group-rooms-media-stored"|"group-rooms-participant-minutes"|"group-rooms-recorded-minutes"|"imp-v1-usage"|"lookups"|"marketplace"|"marketplace-algorithmia-named-entity-recognition"|"marketplace-cadence-transcription"|"marketplace-cadence-translation"|"marketplace-capio-speech-to-text"|"marketplace-convriza-ababa"|"marketplace-deepgram-phrase-detector"|"marketplace-digital-segment-business-info"|"marketplace-facebook-offline-conversions"|"marketplace-google-speech-to-text"|"marketplace-ibm-watson-message-insights"|"marketplace-ibm-watson-message-sentiment"|"marketplace-ibm-watson-recording-analysis"|"marketplace-ibm-watson-tone-analyzer"|"marketplace-icehook-systems-scout"|"marketplace-infogroup-dataaxle-bizinfo"|"marketplace-keen-io-contact-center-analytics"|"marketplace-marchex-cleancall"|"marketplace-marchex-sentiment-analysis-for-sms"|"marketplace-marketplace-nextcaller-social-id"|"marketplace-mobile-commons-opt-out-classifier"|"marketplace-nexiwave-voicemail-to-text"|"marketplace-nextcaller-advanced-caller-identification"|"marketplace-nomorobo-spam-score"|"marketplace-payfone-tcpa-compliance"|"marketplace-remeeting-automatic-speech-recognition"|"marketplace-tcpa-defense-solutions-blacklist-feed"|"marketplace-telo-opencnam"|"marketplace-truecnam-true-spam"|"marketplace-twilio-caller-name-lookup-us"|"marketplace-twilio-carrier-information-lookup"|"marketplace-voicebase-pci"|"marketplace-voicebase-transcription"|"marketplace-voicebase-transcription-custom-vocabulary"|"marketplace-whitepages-pro-caller-identification"|"marketplace-whitepages-pro-phone-intelligence"|"marketplace-whitepages-pro-phone-reputation"|"marketplace-wolfarm-spoken-results"|"marketplace-wolfram-short-answer"|"marketplace-ytica-contact-center-reporting-analytics"|"mediastorage"|"mms"|"mms-inbound"|"mms-inbound-longcode"|"mms-inbound-shortcode"|"mms-messages-carrierfees"|"mms-outbound"|"mms-outbound-longcode"|"mms-outbound-shortcode"|"monitor-reads"|"monitor-storage"|"monitor-writes"|"notify"|"notify-actions-attempts"|"notify-channels"|"number-format-lookups"|"pchat"|"pchat-users"|"peer-to-peer-rooms-participant-minutes"|"pfax"|"pfax-minutes"|"pfax-minutes-inbound"|"pfax-minutes-outbound"|"pfax-pages"|"phonenumbers"|"phonenumbers-cps"|"phonenumbers-emergency"|"phonenumbers-local"|"phonenumbers-mobile"|"phonenumbers-setups"|"phonenumbers-tollfree"|"premiumsupport"|"proxy"|"proxy-active-sessions"|"pstnconnectivity"|"pv"|"pv-composition-media-downloaded"|"pv-composition-media-encrypted"|"pv-composition-media-stored"|"pv-composition-minutes"|"pv-recording-compositions"|"pv-room-participants"|"pv-room-participants-au1"|"pv-room-participants-br1"|"pv-room-participants-ie1"|"pv-room-participants-jp1"|"pv-room-participants-sg1"|"pv-room-participants-us1"|"pv-room-participants-us2"|"pv-rooms"|"pv-sip-endpoint-registrations"|"recordings"|"recordingstorage"|"rooms-group-bandwidth"|"rooms-group-minutes"|"rooms-peer-to-peer-minutes"|"shortcodes"|"shortcodes-customerowned"|"shortcodes-mms-enablement"|"shortcodes-mps"|"shortcodes-random"|"shortcodes-uk"|"shortcodes-vanity"|"small-group-rooms"|"small-group-rooms-data-track"|"small-group-rooms-participant-minutes"|"sms"|"sms-inbound"|"sms-inbound-longcode"|"sms-inbound-shortcode"|"sms-messages-carrierfees"|"sms-messages-features"|"sms-messages-features-senderid"|"sms-outbound"|"sms-outbound-content-inspection"|"sms-outbound-longcode"|"sms-outbound-shortcode"|"speech-recognition"|"studio-engagements"|"sync"|"sync-actions"|"sync-endpoint-hours"|"sync-endpoint-hours-above-daily-cap"|"taskrouter-tasks"|"totalprice"|"transcriptions"|"trunking-cps"|"trunking-emergency-calls"|"trunking-origination"|"trunking-origination-local"|"trunking-origination-mobile"|"trunking-origination-tollfree"|"trunking-recordings"|"trunking-secure"|"trunking-termination"|"tts-google"|"turnmegabytes"|"turnmegabytes-australia"|"turnmegabytes-brasil"|"turnmegabytes-germany"|"turnmegabytes-india"|"turnmegabytes-ireland"|"turnmegabytes-japan"|"turnmegabytes-singapore"|"turnmegabytes-useast"|"turnmegabytes-uswest"|"twilio-interconnect"|"verify-push"|"verify-totp"|"verify-whatsapp-conversations-business-initiated"|"video-recordings"|"virtual-agent"|"voice-insights"|"voice-insights-client-insights-on-demand-minute"|"voice-insights-ptsn-insights-on-demand-minute"|"voice-insights-sip-interface-insights-on-demand-minute"|"voice-insights-sip-trunking-insights-on-demand-minute"|"voice-intelligence"|"voice-intelligence-transcription"|"voice-intelligence-operators"|"wireless"|"wireless-orders"|"wireless-orders-artwork"|"wireless-orders-bulk"|"wireless-orders-esim"|"wireless-orders-starter"|"wireless-usage"|"wireless-usage-commands"|"wireless-usage-commands-africa"|"wireless-usage-commands-asia"|"wireless-usage-commands-centralandsouthamerica"|"wireless-usage-commands-europe"|"wireless-usage-commands-home"|"wireless-usage-commands-northamerica"|"wireless-usage-commands-oceania"|"wireless-usage-commands-roaming"|"wireless-usage-data"|"wireless-usage-data-africa"|"wireless-usage-data-asia"|"wireless-usage-data-centralandsouthamerica"|"wireless-usage-data-custom-additionalmb"|"wireless-usage-data-custom-first5mb"|"wireless-usage-data-domestic-roaming"|"wireless-usage-data-europe"|"wireless-usage-data-individual-additionalgb"|"wireless-usage-data-individual-firstgb"|"wireless-usage-data-international-roaming-canada"|"wireless-usage-data-international-roaming-india"|"wireless-usage-data-international-roaming-mexico"|"wireless-usage-data-northamerica"|"wireless-usage-data-oceania"|"wireless-usage-data-pooled"|"wireless-usage-data-pooled-downlink"|"wireless-usage-data-pooled-uplink"|"wireless-usage-mrc"|"wireless-usage-mrc-custom"|"wireless-usage-mrc-individual"|"wireless-usage-mrc-pooled"|"wireless-usage-mrc-suspended"|"wireless-usage-sms"|"wireless-usage-voice"; + +public type Siprec_enum_status "in-progress"|"stopped"; + +public type Address record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource. + string? account_sid?; + # The city in which the address is located. + string? city?; + # The name associated with the address.This property has a maximum length of 16 4-byte characters, or 21 3-byte characters. + string? customer_name?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The ISO country code of the address. + string? iso_country?; + # The postal code of the address. + string? postal_code?; + # The state or region of the address. + string? region?; + # The unique string that that we created to identify the Address resource. + string? sid?; + # The number and street address of the address. + string? street?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # Whether emergency calling has been enabled on this number. + boolean? emergency_enabled?; + # Whether the address has been validated to comply with local regulation. In countries that require valid addresses, an invalid address will not be accepted. `true` indicates the Address has been validated. `false` indicate the country doesn't require validation or the Address is not valid. + boolean? validated?; + # Whether the address has been verified to comply with regulation. In countries that require valid addresses, an invalid address will not be accepted. `true` indicates the Address has been verified. `false` indicate the country doesn't require verified or the Address is not valid. + boolean? verified?; + # The additional number and street address of the address. + string? street_secondary?; +}; + +public type Available_phone_number_shared_cost record { + # A formatted version of the phone number. + string? friendly_name?; + # The 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. + string? phone_number?; + # The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) of this phone number. Available for only phone numbers from the US and Canada. + string? lata?; + # The locality or city of this phone number's location. + string? locality?; + # The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) of this phone number. Available for only phone numbers from the US and Canada. + string? rate_center?; + # The latitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? latitude?; + # The longitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? longitude?; + # The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada. + string? region?; + # The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada. + string? postal_code?; + # The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of this phone number. + string? iso_country?; + # The type of [Address](https://www.twilio.com/docs/usage/api/address) resource the phone number requires. Can be: `none`, `any`, `local`, or `foreign`. `none` means no address is required. `any` means an address is required, but it can be anywhere in the world. `local` means an address in the phone number's country is required. `foreign` means an address outside of the phone number's country is required. + string? address_requirements?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are: `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Available_phone_number_local_capabilities? capabilities?; +}; + +public type Usage_trigger_enum_trigger_field "count"|"usage"|"price"; + +public type RecordingRecording_add_on_result record { + # The unique string that that we created to identify the Recording AddOnResult resource. + string? sid?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult resource. + string? account_sid?; + Recording_add_on_result_enum_status status?; + # The SID of the Add-on to which the result belongs. + string? add_on_sid?; + # The SID of the Add-on configuration. + string? add_on_configuration_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The date and time in GMT that the result was completed specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_completed?; + # The SID of the recording to which the AddOnResult resource belongs. + string? reference_sid?; + # A list of related resources identified by their relative URIs. + record {}? subresource_uris?; +}; + +public type Token record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Token resource. + string? account_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # An array representing the ephemeral credentials and the STUN and TURN server URIs. + Token_ice_servers[]? ice_servers?; + # The temporary password that the username will use when authenticating with Twilio. + string? password?; + # The duration in seconds for which the username and password are valid. + string? ttl?; + # The temporary username that uniquely identifies a Token. + string? username?; +}; + +public type Conference record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Conference resource. + string? account_sid?; + # The date and time in GMT that this resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The API version used to create this conference. + string? api_version?; + # A string that you assigned to describe this conference room. Maxiumum length is 128 characters. + string? friendly_name?; + # A string that represents the Twilio Region where the conference audio was mixed. May be `us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, and `jp1`. Basic conference audio will always be mixed in `us1`. Global Conference audio will be mixed nearest to the majority of participants. + string? region?; + # The unique string that that we created to identify this Conference resource. + string? sid?; + Conference_enum_status status?; + # The URI of this resource, relative to `https://api.twilio.com`. + string? uri?; + # A list of related resources identified by their URIs relative to `https://api.twilio.com`. + record {}? subresource_uris?; + Conference_enum_reason_conference_ended reason_conference_ended?; + # The call SID that caused the conference to end. + string? call_sid_ending_conference?; +}; + +public type Incoming_phone_number_toll_free_enum_emergency_address_status "registered"|"unregistered"|"pending-registration"|"registration-failure"|"pending-unregistration"|"unregistration-failure"; + +public type SipSip_domain record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resource. + string? account_sid?; + # The API version used to process the call. + string? api_version?; + # The types of authentication you have mapped to your domain. Can be: `IP_ACL` and `CREDENTIAL_LIST`. If you have both defined for your domain, both will be returned in a comma delimited string. If `auth_type` is not defined, the domain will not be able to receive any traffic. + string? auth_type?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and "-" and must end with `sip.twilio.com`. + string? domain_name?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The unique string that that we created to identify the SipDomain resource. + string? sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_fallback_method?; + # The URL that we call when an error occurs while retrieving or executing the TwiML requested from `voice_url`. + string? voice_fallback_url?; + # The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_method?; + # The HTTP method we use to call `voice_status_callback_url`. Either `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_status_callback_method?; + # The URL that we call to pass status parameters (such as call ended) to your application. + string? voice_status_callback_url?; + # The URL we call using the `voice_method` when the domain receives a call. + string? voice_url?; + # A list of mapping resources associated with the SIP Domain resource identified by their relative URIs. + record {}? subresource_uris?; + # Whether to allow SIP Endpoints to register with the domain to receive calls. + boolean? sip_registration?; + # Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. + boolean? emergency_calling_enabled?; + # Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. + boolean? secure?; + # The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. + string? byoc_trunk_sid?; + # Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. + string? emergency_caller_sid?; +}; + +public type CreateSipAuthRegistrationsCredentialListMappingRequest record { + # The SID of the CredentialList resource to map to the SIP domain. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^CL[0-9a-fA-F]{32}$`} + string CredentialListSid; +}; + +public type ListParticipantResponse record { + ConferenceParticipant[] participants?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListUsageRecordYearlyResponse record { + UsageUsage_recordUsage_record_yearly[] usage_records?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Account_enum_type "Trial"|"Full"; + +public type Incoming_phone_numberIncoming_phone_number_mobile record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource. + string? account_sid?; + # The SID of the Address resource associated with the phone number. + string? address_sid?; + Incoming_phone_number_mobile_enum_address_requirement address_requirements?; + # The API version used to start a new TwiML session. + string? api_version?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Incoming_phone_number_capabilities? capabilities?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The SID of the Identity resource that we associate with the phone number. Some regions require an Identity to meet local regulations. + string? identity_sid?; + # The 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. + string? phone_number?; + # The phone number's origin. `twilio` identifies Twilio-owned phone numbers and `hosted` identifies hosted phone numbers. + string? origin?; + # The unique string that that we created to identify the resource. + string? sid?; + # The SID of the application that handles SMS messages sent to the phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application. + string? sms_application_sid?; + # The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_fallback_method?; + # The URL that we call when an error occurs while retrieving or executing the TwiML from `sms_url`. + string? sms_fallback_url?; + # The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_method?; + # The URL we call when the phone number receives an incoming SMS message. + string? sms_url?; + # The URL we call using the `status_callback_method` to send status information to your application. + string? status_callback?; + # The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" status_callback_method?; + # The SID of the Trunk that handles calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + string? trunk_sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + Incoming_phone_number_mobile_enum_voice_receive_mode voice_receive_mode?; + # The SID of the application that handles calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + string? voice_application_sid?; + # Whether we look up the caller's caller-ID name from the CNAM database ($0.01 per look up). Can be: `true` or `false`. + boolean? voice_caller_id_lookup?; + # The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_fallback_method?; + # The URL that we call when an error occurs retrieving or executing the TwiML requested by `url`. + string? voice_fallback_url?; + # The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_method?; + # The URL we call when the phone number receives a call. The `voice_url` will not be used if a `voice_application_sid` or a `trunk_sid` is set. + string? voice_url?; + Incoming_phone_number_mobile_enum_emergency_status emergency_status?; + # The SID of the emergency address configuration that we use for emergency calling from this phone number. + string? emergency_address_sid?; + Incoming_phone_number_mobile_enum_emergency_address_status emergency_address_status?; + # The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + string? bundle_sid?; + string? status?; +}; + +public type UsageUsage_recordUsage_record_yesterday record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage. + string? account_sid?; + # The API version used to create the resource. + string? api_version?; + # Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + string? as_of?; + Usage_record_yesterday_enum_category category?; + # The number of usage events, such as the number of calls. + string? count?; + # The units in which `count` is measured, such as `calls` for calls or `messages` for SMS. + string? count_unit?; + # A plain-language description of the usage category. + string? description?; + # The last date for which usage is included in the UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? end_date?; + # The total price of the usage in the currency specified in `price_unit` and associated with the account. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format, such as `usd`, `eur`, and `jpy`. + string? price_unit?; + # The first date for which usage is included in this UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? start_date?; + # A list of related resources identified by their URIs. For more information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + record {}? subresource_uris?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The amount used to bill usage and measured in units described in `usage_unit`. + string? usage?; + # The units in which `usage` is measured, such as `minutes` for calls or `messages` for SMS. + string? usage_unit?; +}; + +public type Dependent_phone_number_enum_address_requirement "none"|"any"|"local"|"foreign"; + +public type CreateCallRequest record { + # The phone number, SIP address, or client identifier to call. + string To; + # The phone number or client identifier to use as the caller id. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `From` must also be a phone number. + string From; + # The HTTP method we should use when calling the `url` parameter's value. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" Method?; + # The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored. + string FallbackUrl?; + # The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" FallbackMethod?; + # The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted). + string StatusCallback?; + # The call progress events that we will send to the `status_callback` URL. Can be: `initiated`, `ringing`, `answered`, and `completed`. If no event is specified, we send the `completed` status. If you want to receive multiple events, specify each one in a separate `status_callback_event` parameter. See the code sample for [monitoring call progress](https://www.twilio.com/docs/voice/api/call-resource?code-sample=code-create-a-call-resource-and-specify-a-statuscallbackevent&code-sdk-version=json). If an `application_sid` is present, this parameter is ignored. + string[] StatusCallbackEvent?; + # The HTTP method we should use when calling the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # A string of keys to dial after connecting to the number, maximum of 32 digits. Valid digits in the string include: any digit (`0`-`9`), '`#`', '`*`' and '`w`', to insert a half second pause. For example, if you connected to a company phone number and wanted to pause for one second, and then dial extension 1234 followed by the pound key, the value of this parameter would be `ww1234#`. Remember to URL-encode this string, since the '`#`' character has special meaning in a URL. If both `SendDigits` and `MachineDetection` parameters are provided, then `MachineDetection` will be ignored. + string SendDigits?; + # The integer number of seconds that we should allow the phone to ring before assuming there is no answer. The default is `60` seconds and the maximum is `600` seconds. For some call flows, we will add a 5-second buffer to the timeout value you provide. For this reason, a timeout value of 10 seconds could result in an actual timeout closer to 15 seconds. You can set this to a short time, such as `15` seconds, to hang up before reaching an answering machine or voicemail. + int Timeout?; + # Whether to record the call. Can be `true` to record the phone call, or `false` to not. The default is `false`. The `recording_url` is sent to the `status_callback` URL. + boolean Record?; + # The number of channels in the final recording. Can be: `mono` or `dual`. The default is `mono`. `mono` records both legs of the call in a single channel of the recording file. `dual` records each leg to a separate channel of the recording file. The first channel of a dual-channel recording contains the parent call and the second channel contains the child call. + string RecordingChannels?; + # The URL that we call when the recording is available to be accessed. + string RecordingStatusCallback?; + # The HTTP method we should use when calling the `recording_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" RecordingStatusCallbackMethod?; + # The username used to authenticate the caller making a SIP call. + string SipAuthUsername?; + # The password required to authenticate the user account specified in `sip_auth_username`. + string SipAuthPassword?; + # Whether to detect if a human, answering machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. Use `Enable` if you would like us to return `AnsweredBy` as soon as the called party is identified. Use `DetectMessageEnd`, if you would like to leave a message on an answering machine. If `send_digits` is provided, this parameter is ignored. For more information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection). + string MachineDetection?; + # The number of seconds that we should attempt to detect an answering machine before timing out and sending a voice request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds. + int MachineDetectionTimeout?; + # The recording status events that will trigger calls to the URL specified in `recording_status_callback`. Can be: `in-progress`, `completed` and `absent`. Defaults to `completed`. Separate multiple values with a space. + string[] RecordingStatusCallbackEvent?; + # Whether to trim any leading and trailing silence from the recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`. + string Trim?; + # The phone number, SIP address, or Client identifier that made this call. Phone numbers are in [E.164 format](https://wwnw.twilio.com/docs/glossary/what-e164) (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. + string CallerId?; + # The number of milliseconds that is used as the measuring stick for the length of the speech activity, where durations lower than this value will be interpreted as a human and longer than this value as a machine. Possible Values: 1000-6000. Default: 2400. + int MachineDetectionSpeechThreshold?; + # The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Possible Values: 500-5000. Default: 1200. + int MachineDetectionSpeechEndThreshold?; + # The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000. + int MachineDetectionSilenceTimeout?; + # Select whether to perform answering machine detection in the background. Default, blocks the execution of the call until Answering Machine Detection is completed. Can be: `true` or `false`. + string AsyncAmd?; + # The URL that we should call using the `async_amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax. + string AsyncAmdStatusCallback?; + # The HTTP method we should use when calling the `async_amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" AsyncAmdStatusCallbackMethod?; + # The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta) + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^BY[0-9a-fA-F]{32}$`} + string Byoc?; + # The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta) + string CallReason?; + # A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call's call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call. + string CallToken?; + # The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio. + string RecordingTrack?; + # The maximum duration of the call in seconds. Constraints depend on account and configuration. + int TimeLimit?; + # The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). + string Url?; + # TwiML instructions for the call Twilio will use without fetching Twiml from url parameter. If both `twiml` and `url` are provided then `twiml` parameter will be ignored. Max 4000 characters. + string Twiml?; + # The SID of the Application resource that will handle the call, if the call will be handled by an application. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string ApplicationSid?; +}; + +public type ListUsageRecordThisMonthResponse record { + UsageUsage_recordUsage_record_this_month[] usage_records?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Connect_app record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resource. + string? account_sid?; + # The URL we redirect the user to after we authenticate the user and obtain authorization to access the Connect App. + string? authorize_redirect_url?; + # The company name set for the Connect App. + string? company_name?; + # The HTTP method we use to call `deauthorize_callback_url`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" deauthorize_callback_method?; + # The URL we call using the `deauthorize_callback_method` to de-authorize the Connect App. + string? deauthorize_callback_url?; + # The description of the Connect App. + string? description?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The public URL where users can obtain more information about this Connect App. + string? homepage_url?; + # The set of permissions that your ConnectApp requests. + Connect_app_enum_permission[]? permissions?; + # The unique string that that we created to identify the ConnectApp resource. + string? sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type ListAvailablePhoneNumberMobileResponse record { + Available_phone_number_mobile[] available_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CreatePaymentsRequest record { + # A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions. This should be a unique string value per API call and can be a randomly generated. + string IdempotencyKey; + # Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the [expected StatusCallback values](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback) + string StatusCallback; + Payments_enum_bank_account_type BankAccountType?; + # A positive decimal value less than 1,000,000 to charge against the credit card or bank account. Default currency can be overwritten with `currency` field. Leave blank or set to 0 to tokenize. + decimal ChargeAmount?; + # The currency of the `charge_amount`, formatted as [ISO 4127](http://www.iso.org/iso/home/standards/currency_codes.htm) format. The default value is `USD` and all values allowed from the Pay Connector are accepted. + string Currency?; + # The description can be used to provide more details regarding the transaction. This information is submitted along with the payment details to the Payment Connector which are then posted on the transactions. + string Description?; + # A list of inputs that should be accepted. Currently only `dtmf` is supported. All digits captured during a pay session are redacted from the logs. + string Input?; + # A positive integer that is used to validate the length of the `PostalCode` inputted by the user. User must enter this many digits. + int MinPostalCodeLength?; + # A single-level JSON object used to pass custom parameters to payment processors. (Required for ACH payments). The information that has to be included here depends on the Connector. [Read more](https://www.twilio.com/console/voice/pay-connectors). + anydata Parameter?; + # This is the unique name corresponding to the Pay Connector installed in the Twilio Add-ons. Learn more about [ Connectors](https://www.twilio.com/console/voice/pay-connectors). The default value is `Default`. + string PaymentConnector?; + Payments_enum_payment_method PaymentMethod?; + # Indicates whether the credit card postal code (zip code) is a required piece of payment information that must be provided by the caller. The default is `true`. + boolean PostalCode?; + # Indicates whether the credit card security code is a required piece of payment information that must be provided by the caller. The default is `true`. + boolean SecurityCode?; + # The number of seconds that should wait for the caller to press a digit between each subsequent digit, after the first one, before moving on to validate the digits captured. The default is `5`, maximum is `600`. + int Timeout?; + Payments_enum_token_type TokenType?; + # Credit card types separated by space that Pay should accept. The default value is `visa mastercard amex` + string ValidCardTypes?; +}; + +public type ListAvailablePhoneNumberTollFreeResponse record { + Available_phone_number_toll_free[] available_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListSipCredentialListMappingResponse record { + SipSip_domainSip_credential_list_mapping[] credential_list_mappings?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Siprec_enum_track "inbound_track"|"outbound_track"|"both_tracks"; + +public type UpdateMessageRequest record { + # The new `body` of the Message resource. To redact the text content of a Message, this parameter's value must be an empty string + string Body?; + Message_enum_update_status Status?; +}; + +public type Incoming_phone_number_enum_emergency_address_status "registered"|"unregistered"|"pending-registration"|"registration-failure"|"pending-unregistration"|"unregistration-failure"; + +public type UpdateOutgoingCallerIdRequest record { + # A descriptive string that you create to describe the resource. It can be up to 64 characters long. + string FriendlyName?; +}; + +public type UpdateIncomingPhoneNumberRequest record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers). + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AC[0-9a-fA-F]{32}$`} + string AccountSid?; + # The API version to use for incoming calls made to the phone number. The default is `2010-04-01`. + string ApiVersion?; + # A descriptive string that you created to describe this phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. + string FriendlyName?; + # The SID of the application that should handle SMS messages sent to the number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string SmsApplicationSid?; + # The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsFallbackMethod?; + # The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. + string SmsFallbackUrl?; + # The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsMethod?; + # The URL we should call when the phone number receives an incoming SMS message. + string SmsUrl?; + # The URL we should call using the `status_callback_method` to send status information to your application. + string StatusCallback?; + # The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # The SID of the application we should use to handle phone calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string VoiceApplicationSid?; + # Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. + boolean VoiceCallerIdLookup?; + # The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceFallbackMethod?; + # The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + string VoiceFallbackUrl?; + # The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceMethod?; + # The URL that we should call to answer a call to the phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. + string VoiceUrl?; + Incoming_phone_number_enum_emergency_status EmergencyStatus?; + # The SID of the emergency address configuration to use for emergency calling from this phone number. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AD[0-9a-fA-F]{32}$`} + string EmergencyAddressSid?; + # The SID of the Trunk we should use to handle phone calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^TK[0-9a-fA-F]{32}$`} + string TrunkSid?; + Incoming_phone_number_enum_voice_receive_mode VoiceReceiveMode?; + # The SID of the Identity resource that we should associate with the phone number. Some regions require an identity to meet local regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^RI[0-9a-fA-F]{32}$`} + string IdentitySid?; + # The SID of the Address resource we should associate with the phone number. Some regions require addresses to meet local regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AD[0-9a-fA-F]{32}$`} + string AddressSid?; + # The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^BU[0-9a-fA-F]{32}$`} + string BundleSid?; +}; + +public type Incoming_phone_numberIncoming_phone_number_toll_free record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource. + string? account_sid?; + # The SID of the Address resource associated with the phone number. + string? address_sid?; + Incoming_phone_number_toll_free_enum_address_requirement address_requirements?; + # The API version used to start a new TwiML session. + string? api_version?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Incoming_phone_number_capabilities? capabilities?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The SID of the Identity resource that we associate with the phone number. Some regions require an Identity to meet local regulations. + string? identity_sid?; + # The 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. + string? phone_number?; + # The phone number's origin. `twilio` identifies Twilio-owned phone numbers and `hosted` identifies hosted phone numbers. + string? origin?; + # The unique string that that we created to identify the resource. + string? sid?; + # The SID of the application that handles SMS messages sent to the phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application. + string? sms_application_sid?; + # The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_fallback_method?; + # The URL that we call when an error occurs while retrieving or executing the TwiML from `sms_url`. + string? sms_fallback_url?; + # The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_method?; + # The URL we call when the phone number receives an incoming SMS message. + string? sms_url?; + # The URL we call using the `status_callback_method` to send status information to your application. + string? status_callback?; + # The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" status_callback_method?; + # The SID of the Trunk that handles calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + string? trunk_sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + Incoming_phone_number_toll_free_enum_voice_receive_mode voice_receive_mode?; + # The SID of the application that handles calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + string? voice_application_sid?; + # Whether we look up the caller's caller-ID name from the CNAM database ($0.01 per look up). Can be: `true` or `false`. + boolean? voice_caller_id_lookup?; + # The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_fallback_method?; + # The URL that we call when an error occurs retrieving or executing the TwiML requested by `url`. + string? voice_fallback_url?; + # The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_method?; + # The URL we call when the phone number receives a call. The `voice_url` will not be used if a `voice_application_sid` or a `trunk_sid` is set. + string? voice_url?; + Incoming_phone_number_toll_free_enum_emergency_status emergency_status?; + # The SID of the emergency address configuration that we use for emergency calling from this phone number. + string? emergency_address_sid?; + Incoming_phone_number_toll_free_enum_emergency_address_status emergency_address_status?; + # The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + string? bundle_sid?; + string? status?; +}; + +public type UpdateAddressRequest record { + # A descriptive string that you create to describe the address. It can be up to 64 characters long. + string FriendlyName?; + # The name to associate with the address. + string CustomerName?; + # The number and street address of the address. + string Street?; + # The city of the address. + string City?; + # The state or region of the address. + string Region?; + # The postal code of the address. + string PostalCode?; + # Whether to enable emergency calling on the address. Can be: `true` or `false`. + boolean EmergencyEnabled?; + # Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide. + boolean AutoCorrectAddress?; + # The additional number and street address of the address. + string StreetSecondary?; +}; + +public type Incoming_phone_number_mobile_enum_emergency_address_status "registered"|"unregistered"|"pending-registration"|"registration-failure"|"pending-unregistration"|"unregistration-failure"; + +public type Usage_record_daily_enum_category "a2p-registration-fees"|"agent-conference"|"amazon-polly"|"answering-machine-detection"|"authy-authentications"|"authy-calls-outbound"|"authy-monthly-fees"|"authy-phone-intelligence"|"authy-phone-verifications"|"authy-sms-outbound"|"call-progess-events"|"calleridlookups"|"calls"|"calls-client"|"calls-globalconference"|"calls-inbound"|"calls-inbound-local"|"calls-inbound-mobile"|"calls-inbound-tollfree"|"calls-outbound"|"calls-pay-verb-transactions"|"calls-recordings"|"calls-sip"|"calls-sip-inbound"|"calls-sip-outbound"|"calls-transfers"|"carrier-lookups"|"conversations"|"conversations-api-requests"|"conversations-conversation-events"|"conversations-endpoint-connectivity"|"conversations-events"|"conversations-participant-events"|"conversations-participants"|"cps"|"flex-usage"|"fraud-lookups"|"group-rooms"|"group-rooms-data-track"|"group-rooms-encrypted-media-recorded"|"group-rooms-media-downloaded"|"group-rooms-media-recorded"|"group-rooms-media-routed"|"group-rooms-media-stored"|"group-rooms-participant-minutes"|"group-rooms-recorded-minutes"|"imp-v1-usage"|"lookups"|"marketplace"|"marketplace-algorithmia-named-entity-recognition"|"marketplace-cadence-transcription"|"marketplace-cadence-translation"|"marketplace-capio-speech-to-text"|"marketplace-convriza-ababa"|"marketplace-deepgram-phrase-detector"|"marketplace-digital-segment-business-info"|"marketplace-facebook-offline-conversions"|"marketplace-google-speech-to-text"|"marketplace-ibm-watson-message-insights"|"marketplace-ibm-watson-message-sentiment"|"marketplace-ibm-watson-recording-analysis"|"marketplace-ibm-watson-tone-analyzer"|"marketplace-icehook-systems-scout"|"marketplace-infogroup-dataaxle-bizinfo"|"marketplace-keen-io-contact-center-analytics"|"marketplace-marchex-cleancall"|"marketplace-marchex-sentiment-analysis-for-sms"|"marketplace-marketplace-nextcaller-social-id"|"marketplace-mobile-commons-opt-out-classifier"|"marketplace-nexiwave-voicemail-to-text"|"marketplace-nextcaller-advanced-caller-identification"|"marketplace-nomorobo-spam-score"|"marketplace-payfone-tcpa-compliance"|"marketplace-remeeting-automatic-speech-recognition"|"marketplace-tcpa-defense-solutions-blacklist-feed"|"marketplace-telo-opencnam"|"marketplace-truecnam-true-spam"|"marketplace-twilio-caller-name-lookup-us"|"marketplace-twilio-carrier-information-lookup"|"marketplace-voicebase-pci"|"marketplace-voicebase-transcription"|"marketplace-voicebase-transcription-custom-vocabulary"|"marketplace-whitepages-pro-caller-identification"|"marketplace-whitepages-pro-phone-intelligence"|"marketplace-whitepages-pro-phone-reputation"|"marketplace-wolfarm-spoken-results"|"marketplace-wolfram-short-answer"|"marketplace-ytica-contact-center-reporting-analytics"|"mediastorage"|"mms"|"mms-inbound"|"mms-inbound-longcode"|"mms-inbound-shortcode"|"mms-messages-carrierfees"|"mms-outbound"|"mms-outbound-longcode"|"mms-outbound-shortcode"|"monitor-reads"|"monitor-storage"|"monitor-writes"|"notify"|"notify-actions-attempts"|"notify-channels"|"number-format-lookups"|"pchat"|"pchat-users"|"peer-to-peer-rooms-participant-minutes"|"pfax"|"pfax-minutes"|"pfax-minutes-inbound"|"pfax-minutes-outbound"|"pfax-pages"|"phonenumbers"|"phonenumbers-cps"|"phonenumbers-emergency"|"phonenumbers-local"|"phonenumbers-mobile"|"phonenumbers-setups"|"phonenumbers-tollfree"|"premiumsupport"|"proxy"|"proxy-active-sessions"|"pstnconnectivity"|"pv"|"pv-composition-media-downloaded"|"pv-composition-media-encrypted"|"pv-composition-media-stored"|"pv-composition-minutes"|"pv-recording-compositions"|"pv-room-participants"|"pv-room-participants-au1"|"pv-room-participants-br1"|"pv-room-participants-ie1"|"pv-room-participants-jp1"|"pv-room-participants-sg1"|"pv-room-participants-us1"|"pv-room-participants-us2"|"pv-rooms"|"pv-sip-endpoint-registrations"|"recordings"|"recordingstorage"|"rooms-group-bandwidth"|"rooms-group-minutes"|"rooms-peer-to-peer-minutes"|"shortcodes"|"shortcodes-customerowned"|"shortcodes-mms-enablement"|"shortcodes-mps"|"shortcodes-random"|"shortcodes-uk"|"shortcodes-vanity"|"small-group-rooms"|"small-group-rooms-data-track"|"small-group-rooms-participant-minutes"|"sms"|"sms-inbound"|"sms-inbound-longcode"|"sms-inbound-shortcode"|"sms-messages-carrierfees"|"sms-messages-features"|"sms-messages-features-senderid"|"sms-outbound"|"sms-outbound-content-inspection"|"sms-outbound-longcode"|"sms-outbound-shortcode"|"speech-recognition"|"studio-engagements"|"sync"|"sync-actions"|"sync-endpoint-hours"|"sync-endpoint-hours-above-daily-cap"|"taskrouter-tasks"|"totalprice"|"transcriptions"|"trunking-cps"|"trunking-emergency-calls"|"trunking-origination"|"trunking-origination-local"|"trunking-origination-mobile"|"trunking-origination-tollfree"|"trunking-recordings"|"trunking-secure"|"trunking-termination"|"tts-google"|"turnmegabytes"|"turnmegabytes-australia"|"turnmegabytes-brasil"|"turnmegabytes-germany"|"turnmegabytes-india"|"turnmegabytes-ireland"|"turnmegabytes-japan"|"turnmegabytes-singapore"|"turnmegabytes-useast"|"turnmegabytes-uswest"|"twilio-interconnect"|"verify-push"|"verify-totp"|"verify-whatsapp-conversations-business-initiated"|"video-recordings"|"virtual-agent"|"voice-insights"|"voice-insights-client-insights-on-demand-minute"|"voice-insights-ptsn-insights-on-demand-minute"|"voice-insights-sip-interface-insights-on-demand-minute"|"voice-insights-sip-trunking-insights-on-demand-minute"|"voice-intelligence"|"voice-intelligence-transcription"|"voice-intelligence-operators"|"wireless"|"wireless-orders"|"wireless-orders-artwork"|"wireless-orders-bulk"|"wireless-orders-esim"|"wireless-orders-starter"|"wireless-usage"|"wireless-usage-commands"|"wireless-usage-commands-africa"|"wireless-usage-commands-asia"|"wireless-usage-commands-centralandsouthamerica"|"wireless-usage-commands-europe"|"wireless-usage-commands-home"|"wireless-usage-commands-northamerica"|"wireless-usage-commands-oceania"|"wireless-usage-commands-roaming"|"wireless-usage-data"|"wireless-usage-data-africa"|"wireless-usage-data-asia"|"wireless-usage-data-centralandsouthamerica"|"wireless-usage-data-custom-additionalmb"|"wireless-usage-data-custom-first5mb"|"wireless-usage-data-domestic-roaming"|"wireless-usage-data-europe"|"wireless-usage-data-individual-additionalgb"|"wireless-usage-data-individual-firstgb"|"wireless-usage-data-international-roaming-canada"|"wireless-usage-data-international-roaming-india"|"wireless-usage-data-international-roaming-mexico"|"wireless-usage-data-northamerica"|"wireless-usage-data-oceania"|"wireless-usage-data-pooled"|"wireless-usage-data-pooled-downlink"|"wireless-usage-data-pooled-uplink"|"wireless-usage-mrc"|"wireless-usage-mrc-custom"|"wireless-usage-mrc-individual"|"wireless-usage-mrc-pooled"|"wireless-usage-mrc-suspended"|"wireless-usage-sms"|"wireless-usage-voice"; + +public type Siprec_enum_update_status "stopped"; + +public type ListDependentPhoneNumberResponse record { + AddressDependent_phone_number[] dependent_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListAvailablePhoneNumberNationalResponse record { + Available_phone_number_national[] available_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Usage_record_yearly_enum_category "a2p-registration-fees"|"agent-conference"|"amazon-polly"|"answering-machine-detection"|"authy-authentications"|"authy-calls-outbound"|"authy-monthly-fees"|"authy-phone-intelligence"|"authy-phone-verifications"|"authy-sms-outbound"|"call-progess-events"|"calleridlookups"|"calls"|"calls-client"|"calls-globalconference"|"calls-inbound"|"calls-inbound-local"|"calls-inbound-mobile"|"calls-inbound-tollfree"|"calls-outbound"|"calls-pay-verb-transactions"|"calls-recordings"|"calls-sip"|"calls-sip-inbound"|"calls-sip-outbound"|"calls-transfers"|"carrier-lookups"|"conversations"|"conversations-api-requests"|"conversations-conversation-events"|"conversations-endpoint-connectivity"|"conversations-events"|"conversations-participant-events"|"conversations-participants"|"cps"|"flex-usage"|"fraud-lookups"|"group-rooms"|"group-rooms-data-track"|"group-rooms-encrypted-media-recorded"|"group-rooms-media-downloaded"|"group-rooms-media-recorded"|"group-rooms-media-routed"|"group-rooms-media-stored"|"group-rooms-participant-minutes"|"group-rooms-recorded-minutes"|"imp-v1-usage"|"lookups"|"marketplace"|"marketplace-algorithmia-named-entity-recognition"|"marketplace-cadence-transcription"|"marketplace-cadence-translation"|"marketplace-capio-speech-to-text"|"marketplace-convriza-ababa"|"marketplace-deepgram-phrase-detector"|"marketplace-digital-segment-business-info"|"marketplace-facebook-offline-conversions"|"marketplace-google-speech-to-text"|"marketplace-ibm-watson-message-insights"|"marketplace-ibm-watson-message-sentiment"|"marketplace-ibm-watson-recording-analysis"|"marketplace-ibm-watson-tone-analyzer"|"marketplace-icehook-systems-scout"|"marketplace-infogroup-dataaxle-bizinfo"|"marketplace-keen-io-contact-center-analytics"|"marketplace-marchex-cleancall"|"marketplace-marchex-sentiment-analysis-for-sms"|"marketplace-marketplace-nextcaller-social-id"|"marketplace-mobile-commons-opt-out-classifier"|"marketplace-nexiwave-voicemail-to-text"|"marketplace-nextcaller-advanced-caller-identification"|"marketplace-nomorobo-spam-score"|"marketplace-payfone-tcpa-compliance"|"marketplace-remeeting-automatic-speech-recognition"|"marketplace-tcpa-defense-solutions-blacklist-feed"|"marketplace-telo-opencnam"|"marketplace-truecnam-true-spam"|"marketplace-twilio-caller-name-lookup-us"|"marketplace-twilio-carrier-information-lookup"|"marketplace-voicebase-pci"|"marketplace-voicebase-transcription"|"marketplace-voicebase-transcription-custom-vocabulary"|"marketplace-whitepages-pro-caller-identification"|"marketplace-whitepages-pro-phone-intelligence"|"marketplace-whitepages-pro-phone-reputation"|"marketplace-wolfarm-spoken-results"|"marketplace-wolfram-short-answer"|"marketplace-ytica-contact-center-reporting-analytics"|"mediastorage"|"mms"|"mms-inbound"|"mms-inbound-longcode"|"mms-inbound-shortcode"|"mms-messages-carrierfees"|"mms-outbound"|"mms-outbound-longcode"|"mms-outbound-shortcode"|"monitor-reads"|"monitor-storage"|"monitor-writes"|"notify"|"notify-actions-attempts"|"notify-channels"|"number-format-lookups"|"pchat"|"pchat-users"|"peer-to-peer-rooms-participant-minutes"|"pfax"|"pfax-minutes"|"pfax-minutes-inbound"|"pfax-minutes-outbound"|"pfax-pages"|"phonenumbers"|"phonenumbers-cps"|"phonenumbers-emergency"|"phonenumbers-local"|"phonenumbers-mobile"|"phonenumbers-setups"|"phonenumbers-tollfree"|"premiumsupport"|"proxy"|"proxy-active-sessions"|"pstnconnectivity"|"pv"|"pv-composition-media-downloaded"|"pv-composition-media-encrypted"|"pv-composition-media-stored"|"pv-composition-minutes"|"pv-recording-compositions"|"pv-room-participants"|"pv-room-participants-au1"|"pv-room-participants-br1"|"pv-room-participants-ie1"|"pv-room-participants-jp1"|"pv-room-participants-sg1"|"pv-room-participants-us1"|"pv-room-participants-us2"|"pv-rooms"|"pv-sip-endpoint-registrations"|"recordings"|"recordingstorage"|"rooms-group-bandwidth"|"rooms-group-minutes"|"rooms-peer-to-peer-minutes"|"shortcodes"|"shortcodes-customerowned"|"shortcodes-mms-enablement"|"shortcodes-mps"|"shortcodes-random"|"shortcodes-uk"|"shortcodes-vanity"|"small-group-rooms"|"small-group-rooms-data-track"|"small-group-rooms-participant-minutes"|"sms"|"sms-inbound"|"sms-inbound-longcode"|"sms-inbound-shortcode"|"sms-messages-carrierfees"|"sms-messages-features"|"sms-messages-features-senderid"|"sms-outbound"|"sms-outbound-content-inspection"|"sms-outbound-longcode"|"sms-outbound-shortcode"|"speech-recognition"|"studio-engagements"|"sync"|"sync-actions"|"sync-endpoint-hours"|"sync-endpoint-hours-above-daily-cap"|"taskrouter-tasks"|"totalprice"|"transcriptions"|"trunking-cps"|"trunking-emergency-calls"|"trunking-origination"|"trunking-origination-local"|"trunking-origination-mobile"|"trunking-origination-tollfree"|"trunking-recordings"|"trunking-secure"|"trunking-termination"|"tts-google"|"turnmegabytes"|"turnmegabytes-australia"|"turnmegabytes-brasil"|"turnmegabytes-germany"|"turnmegabytes-india"|"turnmegabytes-ireland"|"turnmegabytes-japan"|"turnmegabytes-singapore"|"turnmegabytes-useast"|"turnmegabytes-uswest"|"twilio-interconnect"|"verify-push"|"verify-totp"|"verify-whatsapp-conversations-business-initiated"|"video-recordings"|"virtual-agent"|"voice-insights"|"voice-insights-client-insights-on-demand-minute"|"voice-insights-ptsn-insights-on-demand-minute"|"voice-insights-sip-interface-insights-on-demand-minute"|"voice-insights-sip-trunking-insights-on-demand-minute"|"voice-intelligence"|"voice-intelligence-transcription"|"voice-intelligence-operators"|"wireless"|"wireless-orders"|"wireless-orders-artwork"|"wireless-orders-bulk"|"wireless-orders-esim"|"wireless-orders-starter"|"wireless-usage"|"wireless-usage-commands"|"wireless-usage-commands-africa"|"wireless-usage-commands-asia"|"wireless-usage-commands-centralandsouthamerica"|"wireless-usage-commands-europe"|"wireless-usage-commands-home"|"wireless-usage-commands-northamerica"|"wireless-usage-commands-oceania"|"wireless-usage-commands-roaming"|"wireless-usage-data"|"wireless-usage-data-africa"|"wireless-usage-data-asia"|"wireless-usage-data-centralandsouthamerica"|"wireless-usage-data-custom-additionalmb"|"wireless-usage-data-custom-first5mb"|"wireless-usage-data-domestic-roaming"|"wireless-usage-data-europe"|"wireless-usage-data-individual-additionalgb"|"wireless-usage-data-individual-firstgb"|"wireless-usage-data-international-roaming-canada"|"wireless-usage-data-international-roaming-india"|"wireless-usage-data-international-roaming-mexico"|"wireless-usage-data-northamerica"|"wireless-usage-data-oceania"|"wireless-usage-data-pooled"|"wireless-usage-data-pooled-downlink"|"wireless-usage-data-pooled-uplink"|"wireless-usage-mrc"|"wireless-usage-mrc-custom"|"wireless-usage-mrc-individual"|"wireless-usage-mrc-pooled"|"wireless-usage-mrc-suspended"|"wireless-usage-sms"|"wireless-usage-voice"; + +public type ListAvailablePhoneNumberSharedCostResponse record { + Available_phone_number_shared_cost[] available_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type UsageUsage_recordUsage_record_today record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage. + string? account_sid?; + # The API version used to create the resource. + string? api_version?; + # Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + string? as_of?; + Usage_record_today_enum_category category?; + # The number of usage events, such as the number of calls. + string? count?; + # The units in which `count` is measured, such as `calls` for calls or `messages` for SMS. + string? count_unit?; + # A plain-language description of the usage category. + string? description?; + # The last date for which usage is included in the UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? end_date?; + # The total price of the usage in the currency specified in `price_unit` and associated with the account. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format, such as `usd`, `eur`, and `jpy`. + string? price_unit?; + # The first date for which usage is included in this UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? start_date?; + # A list of related resources identified by their URIs. For more information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + record {}? subresource_uris?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The amount used to bill usage and measured in units described in `usage_unit`. + string? usage?; + # The units in which `usage` is measured, such as `minutes` for calls or `messages` for SMS. + string? usage_unit?; +}; + +public type NotificationInstance record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Notification resource. + string? account_sid?; + # The API version used to generate the notification. Can be empty for events that don't have a specific API version, such as incoming phone calls. + string? api_version?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Notification resource is associated with. + string? call_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # A unique error code for the error condition that is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + string? error_code?; + # An integer log level that corresponds to the type of notification: `0` is ERROR, `1` is WARNING. + string? log?; + # The date the notification was actually generated in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. Message buffering can cause this value to differ from `date_created`. + string? message_date?; + # The text of the notification. + string? message_text?; + # The URL for more information about the error condition. This value is a page in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + string? more_info?; + # The HTTP method used to generate the notification. If the notification was generated during a phone call, this is the HTTP Method used to request the resource on your server. If the notification was generated by your use of our REST API, this is the HTTP method used to call the resource on our servers. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" request_method?; + # The URL of the resource that generated the notification. If the notification was generated during a phone call, this is the URL of the resource on your server that caused the notification. If the notification was generated by your use of our REST API, this is the URL of the resource you called. + string? request_url?; + # The HTTP GET or POST variables we sent to your server. However, if the notification was generated by our REST API, this contains the HTTP POST or PUT variables you sent to our API. + string? request_variables?; + # The HTTP body returned by your server. + string? response_body?; + # The HTTP headers returned by your server. + string? response_headers?; + # The unique string that that we created to identify the Notification resource. + string? sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type ListCallNotificationResponse record { + CallCall_notification[] notifications?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Recording_enum_status "in-progress"|"paused"|"stopped"|"processing"|"completed"|"absent"|"deleted"; + +# The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are: `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. +public type Available_phone_number_local_capabilities record { + boolean mms?; + boolean sms?; + boolean voice?; + boolean fax?; +}; + +public type Application record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resource. + string? account_sid?; + # The API version used to start a new TwiML session. + string? api_version?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The URL we call using a POST method to send message status information to your application. + string? message_status_callback?; + # The unique string that that we created to identify the Application resource. + string? sid?; + # The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_fallback_method?; + # The URL that we call when an error occurs while retrieving or executing the TwiML from `sms_url`. + string? sms_fallback_url?; + # The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_method?; + # The URL we call using a POST method to send status information to your application about SMS messages that refer to the application. + string? sms_status_callback?; + # The URL we call when the phone number receives an incoming SMS message. + string? sms_url?; + # The URL we call using the `status_callback_method` to send status information to your application. + string? status_callback?; + # The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" status_callback_method?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # Whether we look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`. + boolean? voice_caller_id_lookup?; + # The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_fallback_method?; + # The URL that we call when an error occurs retrieving or executing the TwiML requested by `url`. + string? voice_fallback_url?; + # The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_method?; + # The URL we call when the phone number assigned to this application receives a call. + string? voice_url?; + # Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`. + boolean? public_application_connect_enabled?; +}; + +public type ListCallResponse record { + Call[] calls?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Transcription record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resource. + string? account_sid?; + # The API version used to create the transcription. + string? api_version?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The duration of the transcribed audio in seconds. + string? duration?; + # The charge for the transcript in the currency associated with the account. This value is populated after the transcript is complete so it may not be available immediately. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format (e.g. `usd`, `eur`, `jpy`). + string? price_unit?; + # The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) from which the transcription was created. + string? recording_sid?; + # The unique string that that we created to identify the Transcription resource. + string? sid?; + Transcription_enum_status status?; + # The text content of the transcription. + string? transcription_text?; + # The transcription type. Can only be: `fast`. + string? 'type?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type Incoming_phone_number_enum_voice_receive_mode "voice"|"fax"; + +public type CallUser_defined_message_subscription record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that subscribed to the User Defined Messages. + string? account_sid?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the User Defined Message Subscription is associated with. This refers to the Call SID that is producing the User Defined Messages. + string? call_sid?; + # The SID that uniquely identifies this User Defined Message Subscription. + string? sid?; + # The date that this User Defined Message Subscription was created, given in RFC 2822 format. + string? date_created?; + # The URI of the User Defined Message Subscription Resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type Payments_enum_token_type "one-time"|"reusable"; + +public type Dependent_phone_number_enum_emergency_status "Active"|"Inactive"; + +public type Incoming_phone_number_local_enum_voice_receive_mode "voice"|"fax"; + +public type CreateMessageFeedbackRequest record { + Message_feedback_enum_outcome Outcome?; +}; + +public type ListOutgoingCallerIdResponse record { + Outgoing_caller_id[] outgoing_caller_ids?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CreateSipCredentialListMappingRequest record { + # A 34 character string that uniquely identifies the CredentialList resource to map to the SIP domain. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^CL[0-9a-fA-F]{32}$`} + string CredentialListSid; +}; + +public type ListSipIpAccessControlListResponse record { + SipSip_ip_access_control_list[] ip_access_control_lists?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Message_enum_status "queued"|"sending"|"sent"|"failed"|"delivered"|"undelivered"|"receiving"|"received"|"accepted"|"scheduled"|"read"|"partially_delivered"|"canceled"; + +public type ListAccountResponse record { + Account[] accounts?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListIncomingPhoneNumberResponse record { + Incoming_phone_number[] incoming_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Available_phone_number_machine_to_machine record { + # A formatted version of the phone number. + string? friendly_name?; + # The 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. + string? phone_number?; + # The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) of this phone number. Available for only phone numbers from the US and Canada. + string? lata?; + # The locality or city of this phone number's location. + string? locality?; + # The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) of this phone number. Available for only phone numbers from the US and Canada. + string? rate_center?; + # The latitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? latitude?; + # The longitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? longitude?; + # The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada. + string? region?; + # The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada. + string? postal_code?; + # The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of this phone number. + string? iso_country?; + # The type of [Address](https://www.twilio.com/docs/usage/api/address) resource the phone number requires. Can be: `none`, `any`, `local`, or `foreign`. `none` means no address is required. `any` means an address is required, but it can be anywhere in the world. `local` means an address in the phone number's country is required. `foreign` means an address outside of the phone number's country is required. + string? address_requirements?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are: `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Available_phone_number_local_capabilities? capabilities?; +}; + +public type Usage record { +}; + +public type SipSip_domainSip_authSip_auth_registrations record { +}; + +public type CreateParticipantRequest record { + # The phone number, Client identifier, or username portion of SIP address that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). Client identifiers are formatted `client:name`. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `from` must also be a phone number. If `to` is sip address, this value of `from` should be a username portion to be used to populate the P-Asserted-Identity header that is passed to the SIP endpoint. + string From; + # The phone number, SIP address, or Client identifier that received this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). SIP addresses are formatted as `sip:name@company.com`. Client identifiers are formatted `client:name`. [Custom parameters](https://www.twilio.com/docs/voice/api/conference-participant-resource#custom-parameters) may also be specified. + string To; + # The URL we should call using the `status_callback_method` to send status information to your application. + string StatusCallback?; + # The HTTP method we should use to call `status_callback`. Can be: `GET` and `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # The conference state changes that should generate a call to `status_callback`. Can be: `initiated`, `ringing`, `answered`, and `completed`. Separate multiple values with a space. The default value is `completed`. + string[] StatusCallbackEvent?; + # A label for this participant. If one is supplied, it may subsequently be used to fetch, update or delete the participant. + string Label?; + # The number of seconds that we should allow the phone to ring before assuming there is no answer. Can be an integer between `5` and `600`, inclusive. The default value is `60`. We always add a 5-second timeout buffer to outgoing calls, so value of 10 would result in an actual timeout that was closer to 15 seconds. + int Timeout?; + # Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`. + boolean Record?; + # Whether the agent is muted in the conference. Can be `true` or `false` and the default is `false`. + boolean Muted?; + # Whether to play a notification beep to the conference when the participant joins. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`. + string Beep?; + # Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference. + boolean StartConferenceOnEnter?; + # Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`. + boolean EndConferenceOnExit?; + # The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). + string WaitUrl?; + # The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" WaitMethod?; + # Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. Can be: `true` or `false` and defaults to `true`. + boolean EarlyMedia?; + # The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`. + int MaxParticipants?; + # Whether to record the conference the participant is joining. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`. + string ConferenceRecord?; + # Whether to trim leading and trailing silence from the conference recording. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`. + string ConferenceTrim?; + # The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored. + string ConferenceStatusCallback?; + # The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" ConferenceStatusCallbackMethod?; + # The conference state changes that should generate a call to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `modify`, `speaker`, and `announcement`. Separate multiple values with a space. Defaults to `start end`. + string[] ConferenceStatusCallbackEvent?; + # The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`. + string RecordingChannels?; + # The URL that we should call using the `recording_status_callback_method` when the recording status changes. + string RecordingStatusCallback?; + # The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" RecordingStatusCallbackMethod?; + # The SIP username used for authentication. + string SipAuthUsername?; + # The SIP password for authentication. + string SipAuthPassword?; + # The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`. + string Region?; + # The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available. + string ConferenceRecordingStatusCallback?; + # The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" ConferenceRecordingStatusCallbackMethod?; + # The recording state changes that should generate a call to `recording_status_callback`. Can be: `started`, `in-progress`, `paused`, `resumed`, `stopped`, `completed`, `failed`, and `absent`. Separate multiple values with a space, ex: `'in-progress completed failed'`. + string[] RecordingStatusCallbackEvent?; + # The conference recording state changes that generate a call to `conference_recording_status_callback`. Can be: `in-progress`, `completed`, `failed`, and `absent`. Separate multiple values with a space, ex: `'in-progress completed failed'` + string[] ConferenceRecordingStatusCallbackEvent?; + # Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined. + boolean Coaching?; + # The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^CA[0-9a-fA-F]{32}$`} + string CallSidToCoach?; + # Jitter buffer size for the connecting participant. Twilio will use this setting to apply Jitter Buffer before participant's audio is mixed into the conference. Can be: `off`, `small`, `medium`, and `large`. Default to `large`. + string JitterBufferSize?; + # The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta) + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^BY[0-9a-fA-F]{32}$`} + string Byoc?; + # The phone number, Client identifier, or username portion of SIP address that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). Client identifiers are formatted `client:name`. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `callerId` must also be a phone number. If `to` is sip address, this value of `callerId` should be a username portion to be used to populate the From header that is passed to the SIP endpoint. + string CallerId?; + # The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta) + string CallReason?; + # The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is sent from Twilio. `both` records the audio that is received and sent by Twilio. + string RecordingTrack?; + # The maximum duration of the call in seconds. Constraints depend on account and configuration. + int TimeLimit?; + # Whether to detect if a human, answering machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. Use `Enable` if you would like us to return `AnsweredBy` as soon as the called party is identified. Use `DetectMessageEnd`, if you would like to leave a message on an answering machine. For more information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection). + string MachineDetection?; + # The number of seconds that we should attempt to detect an answering machine before timing out and sending a voice request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds. + int MachineDetectionTimeout?; + # The number of milliseconds that is used as the measuring stick for the length of the speech activity, where durations lower than this value will be interpreted as a human and longer than this value as a machine. Possible Values: 1000-6000. Default: 2400. + int MachineDetectionSpeechThreshold?; + # The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Possible Values: 500-5000. Default: 1200. + int MachineDetectionSpeechEndThreshold?; + # The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000. + int MachineDetectionSilenceTimeout?; + # The URL that we should call using the `amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax. + string AmdStatusCallback?; + # The HTTP method we should use when calling the `amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" AmdStatusCallbackMethod?; + # Whether to trim any leading and trailing silence from the participant recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`. + string Trim?; + # A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call's call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call. + string CallToken?; +}; + +public type CreateUserDefinedMessageSubscriptionRequest record { + # The URL we should call using the `method` to send user defined events to your application. URLs must contain a valid hostname (underscores are not permitted). + string Callback; + # A unique string value to identify API call. This should be a unique string value per API call and can be a randomly generated. + string IdempotencyKey?; + # The HTTP method Twilio will use when requesting the above `Url`. Either `GET` or `POST`. Default is `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" Method?; +}; + +public type Stream_enum_update_status "stopped"; + +public type CallSiprec record { + # The SID of the Siprec resource. + string? sid?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Siprec resource. + string? account_sid?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Siprec resource is associated with. + string? call_sid?; + # The user-specified name of this Siprec, if one was given when the Siprec was created. This may be used to stop the Siprec. + string? name?; + Siprec_enum_status status?; + # The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type Usage_trigger_enum_recurring "daily"|"monthly"|"yearly"|"alltime"; + +public type CreateApplicationRequest record { + # The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is the account's default API version. + string ApiVersion?; + # The URL we should call when the phone number assigned to this application receives a call. + string VoiceUrl?; + # The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceMethod?; + # The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + string VoiceFallbackUrl?; + # The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceFallbackMethod?; + # The URL we should call using the `status_callback_method` to send status information to your application. + string StatusCallback?; + # The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`. + boolean VoiceCallerIdLookup?; + # The URL we should call when the phone number receives an incoming SMS message. + string SmsUrl?; + # The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsMethod?; + # The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`. + string SmsFallbackUrl?; + # The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsFallbackMethod?; + # The URL we should call using a POST method to send status information about SMS messages sent by the application. + string SmsStatusCallback?; + # The URL we should call using a POST method to send message status information to your application. + string MessageStatusCallback?; + # A descriptive string that you create to describe the new application. It can be up to 64 characters long. + string FriendlyName?; + # Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`. + boolean PublicApplicationConnectEnabled?; +}; + +public type UpdateConnectAppRequest record { + # The URL to redirect the user to after we authenticate the user and obtain authorization to access the Connect App. + string AuthorizeRedirectUrl?; + # The company name to set for the Connect App. + string CompanyName?; + # The HTTP method to use when calling `deauthorize_callback_url`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" DeauthorizeCallbackMethod?; + # The URL to call using the `deauthorize_callback_method` to de-authorize the Connect App. + string DeauthorizeCallbackUrl?; + # A description of the Connect App. + string Description?; + # A descriptive string that you create to describe the resource. It can be up to 64 characters long. + string FriendlyName?; + # A public URL where users can obtain more information about this Connect App. + string HomepageUrl?; + # A comma-separated list of the permissions you will request from the users of this ConnectApp. Can include: `get-all` and `post-all`. + Connect_app_enum_permission[] Permissions?; +}; + +public type Validation_request record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for the Caller ID. + string? account_sid?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Caller ID is associated with. + string? call_sid?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The phone number to verify in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number. + string? phone_number?; + # The 6 digit validation code that someone must enter to validate the Caller ID when `phone_number` is called. + string? validation_code?; +}; + +public type UpdateCallFeedbackRequest record { + # The call quality expressed as an integer from `1` to `5` where `1` represents very poor call quality and `5` represents a perfect call. + int QualityScore?; + # One or more issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`. + Call_feedback_enum_issues[] Issue?; +}; + +public type UpdateSiprecRequest record { + Siprec_enum_update_status Status; +}; + +public type UpdateConferenceRequest record { + Conference_enum_update_status Status?; + # The URL we should call to announce something into the conference. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs. + string AnnounceUrl?; + # The HTTP method used to call `announce_url`. Can be: `GET` or `POST` and the default is `POST` + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" AnnounceMethod?; +}; + +public type CreateSipCredentialRequest record { + # The username that will be passed when authenticating SIP requests. The username should be sent in response to Twilio's challenge of the initial INVITE. It can be up to 32 characters long. + string Username; + # The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`) + string Password; +}; + +public type Recording record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource. + string? account_sid?; + # The API version used during the recording. + string? api_version?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Recording resource is associated with. This will always refer to the parent leg of a two-leg call. + string? call_sid?; + # The Conference SID that identifies the conference associated with the recording, if a conference recording. + string? conference_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The start time of the recording in GMT and in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? start_time?; + # The length of the recording in seconds. + string? duration?; + # The unique string that that we created to identify the Recording resource. + string? sid?; + # The one-time cost of creating the recording in the `price_unit` currency. + string? price?; + # The currency used in the `price` property. Example: `USD`. + string? price_unit?; + Recording_enum_status status?; + # The number of channels in the final recording file. Can be: `1` or `2`. You can split a call with two legs into two separate recording channels if you record using [TwiML Dial](https://www.twilio.com/docs/voice/twiml/dial#record) or the [Outbound Rest API](https://www.twilio.com/docs/voice/make-calls#manage-your-outbound-call). + int? channels?; + Recording_enum_source 'source?; + # The error code that describes why the recording is `absent`. The error code is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). This value is null if the recording `status` is not `absent`. + int? error_code?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # How to decrypt the recording if it was encrypted using [Call Recording Encryption](https://www.twilio.com/docs/voice/tutorials/voice-recording-encryption) feature. + anydata? encryption_details?; + # A list of related resources identified by their relative URIs. + record {}? subresource_uris?; + # The URL of the media file associated with this recording resource. When stored externally, this is the full URL location of the media file. + string? media_url?; +}; + +public type Incoming_phone_numberIncoming_phone_number_assigned_add_on record { + # The unique string that that we created to identify the resource. + string? sid?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource. + string? account_sid?; + # The SID of the Phone Number to which the Add-on is assigned. + string? resource_sid?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # A short description of the functionality that the Add-on provides. + string? description?; + # A JSON string that represents the current configuration of this Add-on installation. + anydata? configuration?; + # An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. + string? unique_name?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # A list of related resources identified by their relative URIs. + record {}? subresource_uris?; +}; + +public type ListRecordingTranscriptionResponse record { + RecordingRecording_transcription[] transcriptions?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Incoming_phone_number record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this IncomingPhoneNumber resource. + string? account_sid?; + # The SID of the Address resource associated with the phone number. + string? address_sid?; + Incoming_phone_number_enum_address_requirement address_requirements?; + # The API version used to start a new TwiML session. + string? api_version?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Incoming_phone_number_capabilities? capabilities?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The SID of the Identity resource that we associate with the phone number. Some regions require an Identity to meet local regulations. + string? identity_sid?; + # The 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. + string? phone_number?; + # The phone number's origin. `twilio` identifies Twilio-owned phone numbers and `hosted` identifies hosted phone numbers. + string? origin?; + # The unique string that that we created to identify this IncomingPhoneNumber resource. + string? sid?; + # The SID of the application that handles SMS messages sent to the phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application. + string? sms_application_sid?; + # The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_fallback_method?; + # The URL that we call when an error occurs while retrieving or executing the TwiML from `sms_url`. + string? sms_fallback_url?; + # The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_method?; + # The URL we call when the phone number receives an incoming SMS message. + string? sms_url?; + # The URL we call using the `status_callback_method` to send status information to your application. + string? status_callback?; + # The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" status_callback_method?; + # The SID of the Trunk that handles calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + string? trunk_sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + Incoming_phone_number_enum_voice_receive_mode voice_receive_mode?; + # The SID of the application that handles calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + string? voice_application_sid?; + # Whether we look up the caller's caller-ID name from the CNAM database ($0.01 per look up). Can be: `true` or `false`. + boolean? voice_caller_id_lookup?; + # The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_fallback_method?; + # The URL that we call when an error occurs retrieving or executing the TwiML requested by `url`. + string? voice_fallback_url?; + # The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_method?; + # The URL we call when the phone number receives a call. The `voice_url` will not be used if a `voice_application_sid` or a `trunk_sid` is set. + string? voice_url?; + Incoming_phone_number_enum_emergency_status emergency_status?; + # The SID of the emergency address configuration that we use for emergency calling from this phone number. + string? emergency_address_sid?; + Incoming_phone_number_enum_emergency_address_status emergency_address_status?; + # The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + string? bundle_sid?; + string? status?; +}; + +public type UsageUsage_recordUsage_record_last_month record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage. + string? account_sid?; + # The API version used to create the resource. + string? api_version?; + # Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + string? as_of?; + Usage_record_last_month_enum_category category?; + # The number of usage events, such as the number of calls. + string? count?; + # The units in which `count` is measured, such as `calls` for calls or `messages` for SMS. + string? count_unit?; + # A plain-language description of the usage category. + string? description?; + # The last date for which usage is included in the UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? end_date?; + # The total price of the usage in the currency specified in `price_unit` and associated with the account. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format, such as `usd`, `eur`, and `jpy`. + string? price_unit?; + # The first date for which usage is included in this UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? start_date?; + # A list of related resources identified by their URIs. For more information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + record {}? subresource_uris?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The amount used to bill usage and measured in units described in `usage_unit`. + string? usage?; + # The units in which `usage` is measured, such as `minutes` for calls or `messages` for SMS. + string? usage_unit?; +}; + +public type Conference_enum_update_status "completed"; + +public type CallCall_notificationInstance record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call Notification resource. + string? account_sid?; + # The API version used to create the Call Notification resource. + string? api_version?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Call Notification resource is associated with. + string? call_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # A unique error code for the error condition that is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + string? error_code?; + # An integer log level that corresponds to the type of notification: `0` is ERROR, `1` is WARNING. + string? log?; + # The date the notification was actually generated in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. Message buffering can cause this value to differ from `date_created`. + string? message_date?; + # The text of the notification. + string? message_text?; + # The URL for more information about the error condition. This value is a page in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + string? more_info?; + # The HTTP method used to generate the notification. If the notification was generated during a phone call, this is the HTTP Method used to request the resource on your server. If the notification was generated by your use of our REST API, this is the HTTP method used to call the resource on our servers. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" request_method?; + # The URL of the resource that generated the notification. If the notification was generated during a phone call, this is the URL of the resource on your server that caused the notification. If the notification was generated by your use of our REST API, this is the URL of the resource you called. + string? request_url?; + # The HTTP GET or POST variables we sent to your server. However, if the notification was generated by our REST API, this contains the HTTP POST or PUT variables you sent to our API. + string? request_variables?; + # The HTTP body returned by your server. + string? response_body?; + # The HTTP headers returned by your server. + string? response_headers?; + # The unique string that that we created to identify the Call Notification resource. + string? sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type ListIncomingPhoneNumberTollFreeResponse record { + Incoming_phone_numberIncoming_phone_number_toll_free[] incoming_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CallPayments record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. + string? account_sid?; + # The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Payments resource is associated with. This will refer to the call sid that is producing the payment card (credit/ACH) information thru DTMF. + string? call_sid?; + # The SID of the Payments resource. + string? sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type ListSipIpAccessControlListMappingResponse record { + SipSip_domainSip_ip_access_control_list_mapping[] ip_access_control_list_mappings?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Available_phone_number_toll_free record { + # A formatted version of the phone number. + string? friendly_name?; + # The 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. + string? phone_number?; + # The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) of this phone number. Available for only phone numbers from the US and Canada. + string? lata?; + # The locality or city of this phone number's location. + string? locality?; + # The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) of this phone number. Available for only phone numbers from the US and Canada. + string? rate_center?; + # The latitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? latitude?; + # The longitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? longitude?; + # The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada. + string? region?; + # The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada. + string? postal_code?; + # The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of this phone number. + string? iso_country?; + # The type of [Address](https://www.twilio.com/docs/usage/api/address) resource the phone number requires. Can be: `none`, `any`, `local`, or `foreign`. `none` means no address is required. `any` means an address is required, but it can be anywhere in the world. `local` means an address in the phone number's country is required. `foreign` means an address outside of the phone number's country is required. + string? address_requirements?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are: `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Available_phone_number_local_capabilities? capabilities?; +}; + +public type UsageUsage_recordUsage_record_monthly record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage. + string? account_sid?; + # The API version used to create the resource. + string? api_version?; + # Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + string? as_of?; + Usage_record_monthly_enum_category category?; + # The number of usage events, such as the number of calls. + string? count?; + # The units in which `count` is measured, such as `calls` for calls or `messages` for SMS. + string? count_unit?; + # A plain-language description of the usage category. + string? description?; + # The last date for which usage is included in the UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? end_date?; + # The total price of the usage in the currency specified in `price_unit` and associated with the account. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format, such as `usd`, `eur`, and `jpy`. + string? price_unit?; + # The first date for which usage is included in this UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? start_date?; + # A list of related resources identified by their URIs. For more information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + record {}? subresource_uris?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The amount used to bill usage and measured in units described in `usage_unit`. + string? usage?; + # The units in which `usage` is measured, such as `minutes` for calls or `messages` for SMS. + string? usage_unit?; +}; + +public type Incoming_phone_numberIncoming_phone_number_local record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource. + string? account_sid?; + # The SID of the Address resource associated with the phone number. + string? address_sid?; + Incoming_phone_number_local_enum_address_requirement address_requirements?; + # The API version used to start a new TwiML session. + string? api_version?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Incoming_phone_number_capabilities? capabilities?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The SID of the Identity resource that we associate with the phone number. Some regions require an Identity to meet local regulations. + string? identity_sid?; + # The 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. + string? phone_number?; + # The phone number's origin. `twilio` identifies Twilio-owned phone numbers and `hosted` identifies hosted phone numbers. + string? origin?; + # The unique string that that we created to identify the resource. + string? sid?; + # The SID of the application that handles SMS messages sent to the phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application. + string? sms_application_sid?; + # The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_fallback_method?; + # The URL that we call when an error occurs while retrieving or executing the TwiML from `sms_url`. + string? sms_fallback_url?; + # The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_method?; + # The URL we call when the phone number receives an incoming SMS message. + string? sms_url?; + # The URL we call using the `status_callback_method` to send status information to your application. + string? status_callback?; + # The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" status_callback_method?; + # The SID of the Trunk that handles calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + string? trunk_sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + Incoming_phone_number_local_enum_voice_receive_mode voice_receive_mode?; + # The SID of the application that handles calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + string? voice_application_sid?; + # Whether we look up the caller's caller-ID name from the CNAM database ($0.01 per look up). Can be: `true` or `false`. + boolean? voice_caller_id_lookup?; + # The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_fallback_method?; + # The URL that we call when an error occurs retrieving or executing the TwiML requested by `url`. + string? voice_fallback_url?; + # The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_method?; + # The URL we call when this phone number receives a call. The `voice_url` will not be used if a `voice_application_sid` or a `trunk_sid` is set. + string? voice_url?; + Incoming_phone_number_local_enum_emergency_status emergency_status?; + # The SID of the emergency address configuration that we use for emergency calling from this phone number. + string? emergency_address_sid?; + Incoming_phone_number_local_enum_emergency_address_status emergency_address_status?; + # The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + string? bundle_sid?; + string? status?; +}; + +public type Participant_enum_status "queued"|"connecting"|"ringing"|"connected"|"complete"|"failed"; + +public type UpdateStreamRequest record { + Stream_enum_update_status Status; +}; + +public type Conference_recording_enum_status "in-progress"|"paused"|"stopped"|"processing"|"completed"|"absent"; + +public type UpdateSipDomainRequest record { + # A descriptive string that you created to describe the resource. It can be up to 64 characters long. + string FriendlyName?; + # The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceFallbackMethod?; + # The URL that we should call when an error occurs while retrieving or executing the TwiML requested by `voice_url`. + string VoiceFallbackUrl?; + # The HTTP method we should use to call `voice_url` + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceMethod?; + # The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceStatusCallbackMethod?; + # The URL that we should call to pass status parameters (such as call ended) to your application. + string VoiceStatusCallbackUrl?; + # The URL we should call when the domain receives a call. + string VoiceUrl?; + # Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not. + boolean SipRegistration?; + # The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and "-" and must end with `sip.twilio.com`. + string DomainName?; + # Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. + boolean EmergencyCallingEnabled?; + # Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. + boolean Secure?; + # The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^BY[0-9a-fA-F]{32}$`} + string ByocTrunkSid?; + # Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^PN[0-9a-fA-F]{32}$`} + string EmergencyCallerSid?; +}; + +public type UpdateMemberRequest record { + # The absolute URL of the Queue resource. + string Url; + # How to pass the update request data. Can be `GET` or `POST` and the default is `POST`. `POST` sends the data as encoded form data and `GET` sends the data as query parameters. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" Method?; +}; + +public type CreateSipCredentialListRequest record { + # A human readable descriptive text that describes the CredentialList, up to 64 characters long. + string FriendlyName; +}; + +public type CreateSipIpAddressRequest record { + # A human readable descriptive text for this resource, up to 255 characters long. + string FriendlyName; + # An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. + string IpAddress; + # An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used. + int CidrPrefixLength?; +}; + +public type Call_recording_enum_status "in-progress"|"paused"|"stopped"|"processing"|"completed"|"absent"; + +public type ListSipIpAddressResponse record { + SipSip_ip_access_control_listSip_ip_address[] ip_addresses?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Incoming_phone_number_local_enum_emergency_address_status "registered"|"unregistered"|"pending-registration"|"registration-failure"|"pending-unregistration"|"unregistration-failure"; + +public type AddressDependent_phone_number record { + # The unique string that that we created to identify the DependentPhoneNumber resource. + string? sid?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the DependentPhoneNumber resource. + string? account_sid?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The 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. + string? phone_number?; + # The URL we call when the phone number receives a call. The `voice_url` will not be used if a `voice_application_sid` or a `trunk_sid` is set. + string? voice_url?; + # The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_method?; + # The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" voice_fallback_method?; + # The URL that we call when an error occurs retrieving or executing the TwiML requested by `url`. + string? voice_fallback_url?; + # Whether we look up the caller's caller-ID name from the CNAM database. Can be: `true` or `false`. Caller ID lookups can cost $0.01 each. + boolean? voice_caller_id_lookup?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_fallback_method?; + # The URL that we call when an error occurs while retrieving or executing the TwiML from `sms_url`. + string? sms_fallback_url?; + # The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_method?; + # The URL we call when the phone number receives an incoming SMS message. + string? sms_url?; + Dependent_phone_number_enum_address_requirement address_requirements?; + # The set of Boolean properties that indicates whether a phone number can receive calls or messages. Capabilities are `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + anydata? capabilities?; + # The URL we call using the `status_callback_method` to send status information to your application. + string? status_callback?; + # The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" status_callback_method?; + # The API version used to start a new TwiML session. + string? api_version?; + # The SID of the application that handles SMS messages sent to the phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application. + string? sms_application_sid?; + # The SID of the application that handles calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + string? voice_application_sid?; + # The SID of the Trunk that handles calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + string? trunk_sid?; + Dependent_phone_number_enum_emergency_status emergency_status?; + # The SID of the emergency address configuration that we use for emergency calling from the phone number. + string? emergency_address_sid?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type ListAvailablePhoneNumberLocalResponse record { + Available_phone_number_local[] available_phone_numbers?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListUsageRecordYesterdayResponse record { + UsageUsage_recordUsage_record_yesterday[] usage_records?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Incoming_phone_number_enum_address_requirement "none"|"any"|"local"|"foreign"; + +public type Incoming_phone_number_toll_free_enum_voice_receive_mode "voice"|"fax"; + +public type UpdateQueueRequest record { + # A descriptive string that you created to describe this resource. It can be up to 64 characters long. + string FriendlyName?; + # The maximum number of calls allowed to be in the queue. The default is 1000. The maximum is 5000. + int MaxSize?; +}; + +public type CreateNewSigningKeyRequest record { + # A descriptive string that you create to describe the resource. It can be up to 64 characters long. + string FriendlyName?; +}; + +public type UpdateSipIpAccessControlListRequest record { + # A human readable descriptive text, up to 255 characters long. + string FriendlyName; +}; + +public type SipSip_domainSip_ip_access_control_list_mapping record { + # The unique id of the Account that is responsible for this resource. + string? account_sid?; + # The date that this resource was created, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_created?; + # The date that this resource was last updated, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. + string? date_updated?; + # The unique string that is created to identify the SipDomain resource. + string? domain_sid?; + # A human readable descriptive text for this resource, up to 64 characters long. + string? friendly_name?; + # A 34 character string that uniquely identifies this resource. + string? sid?; + # The URI for this resource, relative to `https://api.twilio.com` + string? uri?; +}; + +public type New_signing_key record { + # The unique string that that we created to identify the NewSigningKey resource. + string? sid?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth `password`). **Note that for security reasons, this field is ONLY returned when the API Key is first created.** + string? secret?; +}; + +public type ListAvailablePhoneNumberCountryResponse record { + Available_phone_number_country[] countries?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type ListCallRecordingResponse record { + CallCall_recording[] recordings?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type UpdateShortCodeRequest record { + # A descriptive string that you created to describe this resource. It can be up to 64 characters long. By default, the `FriendlyName` is the short code. + string FriendlyName?; + # The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. + string ApiVersion?; + # The URL we should call when receiving an incoming SMS message to this short code. + string SmsUrl?; + # The HTTP method we should use when calling the `sms_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsMethod?; + # The URL that we should call if an error occurs while retrieving or executing the TwiML from `sms_url`. + string SmsFallbackUrl?; + # The HTTP method that we should use to call the `sms_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" SmsFallbackMethod?; +}; + +public type Available_phone_number_country record { + # The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country. + string? country_code?; + # The name of the country. + string? country?; + # The URI of the Country resource, relative to `https://api.twilio.com`. + string? uri?; + # Whether all phone numbers available in the country are new to the Twilio platform. `true` if they are and `false` if all numbers are not in the Twilio Phone Number Beta program. + boolean? beta?; + # A list of related AvailablePhoneNumber resources identified by their URIs relative to `https://api.twilio.com`. + record {}? subresource_uris?; +}; + +public type UpdateConferenceRecordingRequest record { + Conference_recording_enum_status Status; + # Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`. + string PauseBehavior?; +}; + +public type Balance record { + # The unique SID identifier of the Account. + string? account_sid?; + # The balance of the Account, in units specified by the unit parameter. Balance changes may not be reflected immediately. Child accounts do not contain balance information + string? balance?; + # The units of currency for the account balance + string? currency?; +}; + +public type Incoming_phone_number_toll_free_enum_address_requirement "none"|"any"|"local"|"foreign"; + +public type Message_enum_update_status "canceled"; + +public type CreateMessageRequest record { + # The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/messaging/channels), e.g. `whatsapp:+15552229999`. + string To; + # The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messaging_service_sid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource). + string StatusCallback?; + # The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). If this parameter is provided, the `status_callback` parameter of this request is ignored; [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `message_status_callback` URL. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AP[0-9a-fA-F]{32}$`} + string ApplicationSid?; + # The maximum price in US dollars that you are willing to pay for this Message's delivery. The value can have up to four decimal places. When the `max_price` parameter is provided, the cost of a message is checked before it is sent. If the cost exceeds `max_price`, the message is not sent and the Message `status` is `failed`. + decimal MaxPrice?; + # Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`. + boolean ProvideFeedback?; + # Total number of attempts made (including this request) to send the message regardless of the provider used + int Attempt?; + # The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `14400`. Default value is `14400`. A `validity_period` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html) + int ValidityPeriod?; + # Reserved + boolean ForceDelivery?; + Message_enum_content_retention ContentRetention?; + Message_enum_address_retention AddressRetention?; + # Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`. + boolean SmartEncoded?; + # Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp). + string[] PersistentAction?; + # For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/how-to-configure-link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided. + boolean ShortenUrls?; + Message_enum_schedule_type ScheduleType?; + # The time that Twilio will send the message. Must be in ISO 8601 format. + string SendAt?; + # If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media. + boolean SendAsMms?; + # For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `content_sid` parameter must also be provided. If values are not defined in the `content_variables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used. + string ContentVariables?; + Message_enum_risk_check RiskCheck?; + # The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool. + string From?; + # The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^MG[0-9a-fA-F]{32}$`} + string MessagingServiceSid?; + # The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages). + string Body?; + # The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply. + string[] MediaUrl?; + # For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio's response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources). + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^HX[0-9a-fA-F]{32}$`} + string ContentSid?; +}; + +public type Message_enum_direction "inbound"|"outbound-api"|"outbound-call"|"outbound-reply"; + +public type Incoming_phone_number_enum_emergency_status "Active"|"Inactive"; + +public type Payments_enum_bank_account_type "consumer-checking"|"consumer-savings"|"commercial-checking"; + +public type Message record { + # The text content of the message + string? body?; + # The number of segments that make up the complete message. SMS message bodies that exceed the [character limit](https://www.twilio.com/docs/glossary/what-sms-character-limit) are segmented and charged as multiple messages. Note: For messages sent via a Messaging Service, `num_segments` is initially `0`, since a sender hasn't yet been assigned. + string? num_segments?; + Message_enum_direction direction?; + # The sender's phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). For incoming messages, this is the number or channel address of the sender. For outgoing messages, this value is a Twilio phone number, alphanumeric sender ID, short code, or channel address from which the message is sent. + string? 'from?; + # The recipient's phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format) or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g. `whatsapp:+15552229999`) + string? to?; + # The [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) timestamp (in GMT) of when the Message resource was last updated + string? date_updated?; + # The amount billed for the message in the currency specified by `price_unit`. The `price` is populated after the message has been sent/received, and may not be immediately availalble. View the [Pricing page](https://www.twilio.com/en-us/pricing) for more details. + string? price?; + # The description of the `error_code` if the Message `status` is `failed` or `undelivered`. If no error was encountered, the value is `null`. + string? error_message?; + # The URI of the Message resource, relative to `https://api.twilio.com`. + string? uri?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with the Message resource + string? account_sid?; + # The number of media files associated with the Message resource. + string? num_media?; + Message_enum_status status?; + # The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) associated with the Message resource. The value is `null` if a Messaging Service was not used. + string? messaging_service_sid?; + # The unique, Twilio-provided string that identifies the Message resource. + string? sid?; + # The [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) timestamp (in GMT) of when the Message was sent. For an outgoing message, this is when Twilio sent the message. For an incoming message, this is when Twilio sent the HTTP request to your incoming message webhook URL. + string? date_sent?; + # The [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) timestamp (in GMT) of when the Message resource was created + string? date_created?; + # The [error code](https://www.twilio.com/docs/api/errors) returned if the Message `status` is `failed` or `undelivered`. If no error was encountered, the value is `null`. + int? error_code?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format (e.g. `usd`, `eur`, `jpy`). + string? price_unit?; + # The API version used to process the Message + string? api_version?; + # A list of related resources identified by their URIs relative to `https://api.twilio.com` + record {}? subresource_uris?; +}; + +public type SipSip_domainSip_authSip_auth_registrationsSip_auth_registrations_credential_list_mapping record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resource. + string? account_sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The unique string that that we created to identify the CredentialListMapping resource. + string? sid?; +}; + +public type UsageUsage_recordUsage_record_daily record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage. + string? account_sid?; + # The API version used to create the resource. + string? api_version?; + # Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + string? as_of?; + Usage_record_daily_enum_category category?; + # The number of usage events, such as the number of calls. + string? count?; + # The units in which `count` is measured, such as `calls` for calls or `messages` for SMS. + string? count_unit?; + # A plain-language description of the usage category. + string? description?; + # The last date for which usage is included in the UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? end_date?; + # The total price of the usage in the currency specified in `price_unit` and associated with the account. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format, such as `usd`, `eur`, and `jpy`. + string? price_unit?; + # The first date for which usage is included in this UsageRecord. The date is specified in GMT and formatted as `YYYY-MM-DD`. + string? start_date?; + # A list of related resources identified by their URIs. For more information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + record {}? subresource_uris?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; + # The amount used to bill usage and measured in units described in `usage_unit`. + string? usage?; + # The units in which `usage` is measured, such as `minutes` for calls or `messages` for SMS. + string? usage_unit?; +}; + +public type ListAuthorizedConnectAppResponse record { + Authorized_connect_app[] authorized_connect_apps?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CallCall_event record { + # Contains a dictionary representing the request of the call. + anydata? request?; + # Contains a dictionary representing the call response, including a list of the call events. + anydata? response?; +}; + +public type Short_code record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this ShortCode resource. + string? account_sid?; + # The API version used to start a new TwiML session when an SMS message is sent to this short code. + string? api_version?; + # The date and time in GMT that this resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # A string that you assigned to describe this resource. By default, the `FriendlyName` is the short code. + string? friendly_name?; + # The short code. e.g., 894546. + string? short_code?; + # The unique string that that we created to identify this ShortCode resource. + string? sid?; + # The HTTP method we use to call the `sms_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_fallback_method?; + # The URL that we call if an error occurs while retrieving or executing the TwiML from `sms_url`. + string? sms_fallback_url?; + # The HTTP method we use to call the `sms_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" sms_method?; + # The URL we call when receiving an incoming SMS message to this short code. + string? sms_url?; + # The URI of this resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type CreateStreamRequest record { + # Relative or absolute url where WebSocket connection will be established. + string Url; + # The user-specified name of this Stream, if one was given when the Stream was created. This may be used to stop the Stream. + string Name?; + Stream_enum_track Track?; + # Absolute URL of the status callback. + string StatusCallback?; + # The http method for the status_callback (one of GET, POST). + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; + # Parameter name + string Parameter1\.Name?; + # Parameter value + string Parameter1\.Value?; + # Parameter name + string Parameter2\.Name?; + # Parameter value + string Parameter2\.Value?; + # Parameter name + string Parameter3\.Name?; + # Parameter value + string Parameter3\.Value?; + # Parameter name + string Parameter4\.Name?; + # Parameter value + string Parameter4\.Value?; + # Parameter name + string Parameter5\.Name?; + # Parameter value + string Parameter5\.Value?; + # Parameter name + string Parameter6\.Name?; + # Parameter value + string Parameter6\.Value?; + # Parameter name + string Parameter7\.Name?; + # Parameter value + string Parameter7\.Value?; + # Parameter name + string Parameter8\.Name?; + # Parameter value + string Parameter8\.Value?; + # Parameter name + string Parameter9\.Name?; + # Parameter value + string Parameter9\.Value?; + # Parameter name + string Parameter10\.Name?; + # Parameter value + string Parameter10\.Value?; + # Parameter name + string Parameter11\.Name?; + # Parameter value + string Parameter11\.Value?; + # Parameter name + string Parameter12\.Name?; + # Parameter value + string Parameter12\.Value?; + # Parameter name + string Parameter13\.Name?; + # Parameter value + string Parameter13\.Value?; + # Parameter name + string Parameter14\.Name?; + # Parameter value + string Parameter14\.Value?; + # Parameter name + string Parameter15\.Name?; + # Parameter value + string Parameter15\.Value?; + # Parameter name + string Parameter16\.Name?; + # Parameter value + string Parameter16\.Value?; + # Parameter name + string Parameter17\.Name?; + # Parameter value + string Parameter17\.Value?; + # Parameter name + string Parameter18\.Name?; + # Parameter value + string Parameter18\.Value?; + # Parameter name + string Parameter19\.Name?; + # Parameter value + string Parameter19\.Value?; + # Parameter name + string Parameter20\.Name?; + # Parameter value + string Parameter20\.Value?; + # Parameter name + string Parameter21\.Name?; + # Parameter value + string Parameter21\.Value?; + # Parameter name + string Parameter22\.Name?; + # Parameter value + string Parameter22\.Value?; + # Parameter name + string Parameter23\.Name?; + # Parameter value + string Parameter23\.Value?; + # Parameter name + string Parameter24\.Name?; + # Parameter value + string Parameter24\.Value?; + # Parameter name + string Parameter25\.Name?; + # Parameter value + string Parameter25\.Value?; + # Parameter name + string Parameter26\.Name?; + # Parameter value + string Parameter26\.Value?; + # Parameter name + string Parameter27\.Name?; + # Parameter value + string Parameter27\.Value?; + # Parameter name + string Parameter28\.Name?; + # Parameter value + string Parameter28\.Value?; + # Parameter name + string Parameter29\.Name?; + # Parameter value + string Parameter29\.Value?; + # Parameter name + string Parameter30\.Name?; + # Parameter value + string Parameter30\.Value?; + # Parameter name + string Parameter31\.Name?; + # Parameter value + string Parameter31\.Value?; + # Parameter name + string Parameter32\.Name?; + # Parameter value + string Parameter32\.Value?; + # Parameter name + string Parameter33\.Name?; + # Parameter value + string Parameter33\.Value?; + # Parameter name + string Parameter34\.Name?; + # Parameter value + string Parameter34\.Value?; + # Parameter name + string Parameter35\.Name?; + # Parameter value + string Parameter35\.Value?; + # Parameter name + string Parameter36\.Name?; + # Parameter value + string Parameter36\.Value?; + # Parameter name + string Parameter37\.Name?; + # Parameter value + string Parameter37\.Value?; + # Parameter name + string Parameter38\.Name?; + # Parameter value + string Parameter38\.Value?; + # Parameter name + string Parameter39\.Name?; + # Parameter value + string Parameter39\.Value?; + # Parameter name + string Parameter40\.Name?; + # Parameter value + string Parameter40\.Value?; + # Parameter name + string Parameter41\.Name?; + # Parameter value + string Parameter41\.Value?; + # Parameter name + string Parameter42\.Name?; + # Parameter value + string Parameter42\.Value?; + # Parameter name + string Parameter43\.Name?; + # Parameter value + string Parameter43\.Value?; + # Parameter name + string Parameter44\.Name?; + # Parameter value + string Parameter44\.Value?; + # Parameter name + string Parameter45\.Name?; + # Parameter value + string Parameter45\.Value?; + # Parameter name + string Parameter46\.Name?; + # Parameter value + string Parameter46\.Value?; + # Parameter name + string Parameter47\.Name?; + # Parameter value + string Parameter47\.Value?; + # Parameter name + string Parameter48\.Name?; + # Parameter value + string Parameter48\.Value?; + # Parameter name + string Parameter49\.Name?; + # Parameter value + string Parameter49\.Value?; + # Parameter name + string Parameter50\.Name?; + # Parameter value + string Parameter50\.Value?; + # Parameter name + string Parameter51\.Name?; + # Parameter value + string Parameter51\.Value?; + # Parameter name + string Parameter52\.Name?; + # Parameter value + string Parameter52\.Value?; + # Parameter name + string Parameter53\.Name?; + # Parameter value + string Parameter53\.Value?; + # Parameter name + string Parameter54\.Name?; + # Parameter value + string Parameter54\.Value?; + # Parameter name + string Parameter55\.Name?; + # Parameter value + string Parameter55\.Value?; + # Parameter name + string Parameter56\.Name?; + # Parameter value + string Parameter56\.Value?; + # Parameter name + string Parameter57\.Name?; + # Parameter value + string Parameter57\.Value?; + # Parameter name + string Parameter58\.Name?; + # Parameter value + string Parameter58\.Value?; + # Parameter name + string Parameter59\.Name?; + # Parameter value + string Parameter59\.Value?; + # Parameter name + string Parameter60\.Name?; + # Parameter value + string Parameter60\.Value?; + # Parameter name + string Parameter61\.Name?; + # Parameter value + string Parameter61\.Value?; + # Parameter name + string Parameter62\.Name?; + # Parameter value + string Parameter62\.Value?; + # Parameter name + string Parameter63\.Name?; + # Parameter value + string Parameter63\.Value?; + # Parameter name + string Parameter64\.Name?; + # Parameter value + string Parameter64\.Value?; + # Parameter name + string Parameter65\.Name?; + # Parameter value + string Parameter65\.Value?; + # Parameter name + string Parameter66\.Name?; + # Parameter value + string Parameter66\.Value?; + # Parameter name + string Parameter67\.Name?; + # Parameter value + string Parameter67\.Value?; + # Parameter name + string Parameter68\.Name?; + # Parameter value + string Parameter68\.Value?; + # Parameter name + string Parameter69\.Name?; + # Parameter value + string Parameter69\.Value?; + # Parameter name + string Parameter70\.Name?; + # Parameter value + string Parameter70\.Value?; + # Parameter name + string Parameter71\.Name?; + # Parameter value + string Parameter71\.Value?; + # Parameter name + string Parameter72\.Name?; + # Parameter value + string Parameter72\.Value?; + # Parameter name + string Parameter73\.Name?; + # Parameter value + string Parameter73\.Value?; + # Parameter name + string Parameter74\.Name?; + # Parameter value + string Parameter74\.Value?; + # Parameter name + string Parameter75\.Name?; + # Parameter value + string Parameter75\.Value?; + # Parameter name + string Parameter76\.Name?; + # Parameter value + string Parameter76\.Value?; + # Parameter name + string Parameter77\.Name?; + # Parameter value + string Parameter77\.Value?; + # Parameter name + string Parameter78\.Name?; + # Parameter value + string Parameter78\.Value?; + # Parameter name + string Parameter79\.Name?; + # Parameter value + string Parameter79\.Value?; + # Parameter name + string Parameter80\.Name?; + # Parameter value + string Parameter80\.Value?; + # Parameter name + string Parameter81\.Name?; + # Parameter value + string Parameter81\.Value?; + # Parameter name + string Parameter82\.Name?; + # Parameter value + string Parameter82\.Value?; + # Parameter name + string Parameter83\.Name?; + # Parameter value + string Parameter83\.Value?; + # Parameter name + string Parameter84\.Name?; + # Parameter value + string Parameter84\.Value?; + # Parameter name + string Parameter85\.Name?; + # Parameter value + string Parameter85\.Value?; + # Parameter name + string Parameter86\.Name?; + # Parameter value + string Parameter86\.Value?; + # Parameter name + string Parameter87\.Name?; + # Parameter value + string Parameter87\.Value?; + # Parameter name + string Parameter88\.Name?; + # Parameter value + string Parameter88\.Value?; + # Parameter name + string Parameter89\.Name?; + # Parameter value + string Parameter89\.Value?; + # Parameter name + string Parameter90\.Name?; + # Parameter value + string Parameter90\.Value?; + # Parameter name + string Parameter91\.Name?; + # Parameter value + string Parameter91\.Value?; + # Parameter name + string Parameter92\.Name?; + # Parameter value + string Parameter92\.Value?; + # Parameter name + string Parameter93\.Name?; + # Parameter value + string Parameter93\.Value?; + # Parameter name + string Parameter94\.Name?; + # Parameter value + string Parameter94\.Value?; + # Parameter name + string Parameter95\.Name?; + # Parameter value + string Parameter95\.Value?; + # Parameter name + string Parameter96\.Name?; + # Parameter value + string Parameter96\.Value?; + # Parameter name + string Parameter97\.Name?; + # Parameter value + string Parameter97\.Value?; + # Parameter name + string Parameter98\.Name?; + # Parameter value + string Parameter98\.Value?; + # Parameter name + string Parameter99\.Name?; + # Parameter value + string Parameter99\.Value?; +}; + +public type CreateUserDefinedMessageRequest record { + # The User Defined Message in the form of URL-encoded JSON string. + string Content; + # A unique string value to identify API call. This should be a unique string value per API call and can be a randomly generated. + string IdempotencyKey?; +}; + +public type Recording_enum_source "DialVerb"|"Conference"|"OutboundAPI"|"Trunking"|"RecordVerb"|"StartCallRecordingAPI"|"StartConferenceRecordingAPI"; + +public type CreateSipAuthCallsIpAccessControlListMappingRequest record { + # The SID of the IpAccessControlList resource to map to the SIP domain. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^AL[0-9a-fA-F]{32}$`} + string IpAccessControlListSid; +}; + +public type Message_enum_schedule_type "fixed"; + +public type Outgoing_caller_id record { + # The unique string that that we created to identify the OutgoingCallerId resource. + string? sid?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The string that you assigned to describe the resource. + string? friendly_name?; + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resource. + string? account_sid?; + # The 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. + string? phone_number?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type Message_enum_content_retention "retain"|"discard"; + +public type RecordingRecording_transcription record { + # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resource. + string? account_sid?; + # The API version used to create the transcription. + string? api_version?; + # The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_created?; + # The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + string? date_updated?; + # The duration of the transcribed audio in seconds. + string? duration?; + # The charge for the transcript in the currency associated with the account. This value is populated after the transcript is complete so it may not be available immediately. + decimal? price?; + # The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format (e.g. `usd`, `eur`, `jpy`). + string? price_unit?; + # The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) from which the transcription was created. + string? recording_sid?; + # The unique string that that we created to identify the Transcription resource. + string? sid?; + Recording_transcription_enum_status status?; + # The text content of the transcription. + string? transcription_text?; + # The transcription type. + string? 'type?; + # The URI of the resource, relative to `https://api.twilio.com`. + string? uri?; +}; + +public type ListRecordingAddOnResultResponse record { + RecordingRecording_add_on_result[] add_on_results?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type Authorized_connect_app_enum_permission "get-all"|"post-all"; + +public type Call_enum_status "queued"|"ringing"|"in-progress"|"completed"|"busy"|"failed"|"no-answer"|"canceled"; + +public type CreateValidationRequestRequest record { + # The phone number to verify in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number. + string PhoneNumber; + # A descriptive string that you create to describe the new caller ID resource. It can be up to 64 characters long. The default value is a formatted version of the phone number. + string FriendlyName?; + # The number of seconds to delay before initiating the verification call. Can be an integer between `0` and `60`, inclusive. The default is `0`. + int CallDelay?; + # The digits to dial after connecting the verification call. + string Extension?; + # The URL we should call using the `status_callback_method` to send status information about the verification process to your application. + string StatusCallback?; + # The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`, and the default is `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; +}; + +public type ListUsageRecordAllTimeResponse record { + UsageUsage_recordUsage_record_all_time[] usage_records?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type UpdateUsageTriggerRequest record { + # The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" CallbackMethod?; + # The URL we should call using `callback_method` when the trigger fires. + string CallbackUrl?; + # A descriptive string that you create to describe the resource. It can be up to 64 characters long. + string FriendlyName?; +}; + +public type Available_phone_number_mobile record { + # A formatted version of the phone number. + string? friendly_name?; + # The 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. + string? phone_number?; + # The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) of this phone number. Available for only phone numbers from the US and Canada. + string? lata?; + # The locality or city of this phone number's location. + string? locality?; + # The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) of this phone number. Available for only phone numbers from the US and Canada. + string? rate_center?; + # The latitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? latitude?; + # The longitude of this phone number's location. Available for only phone numbers from the US and Canada. + decimal? longitude?; + # The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada. + string? region?; + # The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada. + string? postal_code?; + # The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of this phone number. + string? iso_country?; + # The type of [Address](https://www.twilio.com/docs/usage/api/address) resource the phone number requires. Can be: `none`, `any`, `local`, or `foreign`. `none` means no address is required. `any` means an address is required, but it can be anywhere in the world. `local` means an address in the phone number's country is required. `foreign` means an address outside of the phone number's country is required. + string? address_requirements?; + # Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. + boolean? beta?; + # The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are: `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. + Available_phone_number_local_capabilities? capabilities?; +}; + +public type ListSipDomainResponse record { + SipSip_domain[] domains?; + int end?; + string first_page_uri?; + string? next_page_uri?; + int page?; + int page_size?; + string? previous_page_uri?; + int 'start?; + string uri?; +}; + +public type CreateCallFeedbackSummaryRequest record { + # Only include feedback given on or after this date. Format is `YYYY-MM-DD` and specified in UTC. + string StartDate; + # Only include feedback given on or before this date. Format is `YYYY-MM-DD` and specified in UTC. + string EndDate; + # Whether to also include Feedback resources from all subaccounts. `true` includes feedback from all subaccounts and `false`, the default, includes feedback from only the specified account. + boolean IncludeSubaccounts?; + # The URL that we will request when the feedback summary is complete. + string StatusCallback?; + # The HTTP method (`GET` or `POST`) we use to make the request to the `StatusCallback` URL. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" StatusCallbackMethod?; +}; + +public type CreateSipDomainRequest record { + # The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and "-" and must end with `sip.twilio.com`. + string DomainName; + # A descriptive string that you created to describe the resource. It can be up to 64 characters long. + string FriendlyName?; + # The URL we should when the domain receives a call. + string VoiceUrl?; + # The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceMethod?; + # The URL that we should call when an error occurs while retrieving or executing the TwiML from `voice_url`. + string VoiceFallbackUrl?; + # The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceFallbackMethod?; + # The URL that we should call to pass status parameters (such as call ended) to your application. + string VoiceStatusCallbackUrl?; + # The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`. + "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" VoiceStatusCallbackMethod?; + # Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not. + boolean SipRegistration?; + # Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. + boolean EmergencyCallingEnabled?; + # Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. + boolean Secure?; + # The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^BY[0-9a-fA-F]{32}$`} + string ByocTrunkSid?; + # Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. + @constraint:String {maxLength: 34, minLength: 34, pattern: re `^PN[0-9a-fA-F]{32}$`} + string EmergencyCallerSid?; +}; + +public type Usage_record_last_month_enum_category "a2p-registration-fees"|"agent-conference"|"amazon-polly"|"answering-machine-detection"|"authy-authentications"|"authy-calls-outbound"|"authy-monthly-fees"|"authy-phone-intelligence"|"authy-phone-verifications"|"authy-sms-outbound"|"call-progess-events"|"calleridlookups"|"calls"|"calls-client"|"calls-globalconference"|"calls-inbound"|"calls-inbound-local"|"calls-inbound-mobile"|"calls-inbound-tollfree"|"calls-outbound"|"calls-pay-verb-transactions"|"calls-recordings"|"calls-sip"|"calls-sip-inbound"|"calls-sip-outbound"|"calls-transfers"|"carrier-lookups"|"conversations"|"conversations-api-requests"|"conversations-conversation-events"|"conversations-endpoint-connectivity"|"conversations-events"|"conversations-participant-events"|"conversations-participants"|"cps"|"flex-usage"|"fraud-lookups"|"group-rooms"|"group-rooms-data-track"|"group-rooms-encrypted-media-recorded"|"group-rooms-media-downloaded"|"group-rooms-media-recorded"|"group-rooms-media-routed"|"group-rooms-media-stored"|"group-rooms-participant-minutes"|"group-rooms-recorded-minutes"|"imp-v1-usage"|"lookups"|"marketplace"|"marketplace-algorithmia-named-entity-recognition"|"marketplace-cadence-transcription"|"marketplace-cadence-translation"|"marketplace-capio-speech-to-text"|"marketplace-convriza-ababa"|"marketplace-deepgram-phrase-detector"|"marketplace-digital-segment-business-info"|"marketplace-facebook-offline-conversions"|"marketplace-google-speech-to-text"|"marketplace-ibm-watson-message-insights"|"marketplace-ibm-watson-message-sentiment"|"marketplace-ibm-watson-recording-analysis"|"marketplace-ibm-watson-tone-analyzer"|"marketplace-icehook-systems-scout"|"marketplace-infogroup-dataaxle-bizinfo"|"marketplace-keen-io-contact-center-analytics"|"marketplace-marchex-cleancall"|"marketplace-marchex-sentiment-analysis-for-sms"|"marketplace-marketplace-nextcaller-social-id"|"marketplace-mobile-commons-opt-out-classifier"|"marketplace-nexiwave-voicemail-to-text"|"marketplace-nextcaller-advanced-caller-identification"|"marketplace-nomorobo-spam-score"|"marketplace-payfone-tcpa-compliance"|"marketplace-remeeting-automatic-speech-recognition"|"marketplace-tcpa-defense-solutions-blacklist-feed"|"marketplace-telo-opencnam"|"marketplace-truecnam-true-spam"|"marketplace-twilio-caller-name-lookup-us"|"marketplace-twilio-carrier-information-lookup"|"marketplace-voicebase-pci"|"marketplace-voicebase-transcription"|"marketplace-voicebase-transcription-custom-vocabulary"|"marketplace-whitepages-pro-caller-identification"|"marketplace-whitepages-pro-phone-intelligence"|"marketplace-whitepages-pro-phone-reputation"|"marketplace-wolfarm-spoken-results"|"marketplace-wolfram-short-answer"|"marketplace-ytica-contact-center-reporting-analytics"|"mediastorage"|"mms"|"mms-inbound"|"mms-inbound-longcode"|"mms-inbound-shortcode"|"mms-messages-carrierfees"|"mms-outbound"|"mms-outbound-longcode"|"mms-outbound-shortcode"|"monitor-reads"|"monitor-storage"|"monitor-writes"|"notify"|"notify-actions-attempts"|"notify-channels"|"number-format-lookups"|"pchat"|"pchat-users"|"peer-to-peer-rooms-participant-minutes"|"pfax"|"pfax-minutes"|"pfax-minutes-inbound"|"pfax-minutes-outbound"|"pfax-pages"|"phonenumbers"|"phonenumbers-cps"|"phonenumbers-emergency"|"phonenumbers-local"|"phonenumbers-mobile"|"phonenumbers-setups"|"phonenumbers-tollfree"|"premiumsupport"|"proxy"|"proxy-active-sessions"|"pstnconnectivity"|"pv"|"pv-composition-media-downloaded"|"pv-composition-media-encrypted"|"pv-composition-media-stored"|"pv-composition-minutes"|"pv-recording-compositions"|"pv-room-participants"|"pv-room-participants-au1"|"pv-room-participants-br1"|"pv-room-participants-ie1"|"pv-room-participants-jp1"|"pv-room-participants-sg1"|"pv-room-participants-us1"|"pv-room-participants-us2"|"pv-rooms"|"pv-sip-endpoint-registrations"|"recordings"|"recordingstorage"|"rooms-group-bandwidth"|"rooms-group-minutes"|"rooms-peer-to-peer-minutes"|"shortcodes"|"shortcodes-customerowned"|"shortcodes-mms-enablement"|"shortcodes-mps"|"shortcodes-random"|"shortcodes-uk"|"shortcodes-vanity"|"small-group-rooms"|"small-group-rooms-data-track"|"small-group-rooms-participant-minutes"|"sms"|"sms-inbound"|"sms-inbound-longcode"|"sms-inbound-shortcode"|"sms-messages-carrierfees"|"sms-messages-features"|"sms-messages-features-senderid"|"sms-outbound"|"sms-outbound-content-inspection"|"sms-outbound-longcode"|"sms-outbound-shortcode"|"speech-recognition"|"studio-engagements"|"sync"|"sync-actions"|"sync-endpoint-hours"|"sync-endpoint-hours-above-daily-cap"|"taskrouter-tasks"|"totalprice"|"transcriptions"|"trunking-cps"|"trunking-emergency-calls"|"trunking-origination"|"trunking-origination-local"|"trunking-origination-mobile"|"trunking-origination-tollfree"|"trunking-recordings"|"trunking-secure"|"trunking-termination"|"tts-google"|"turnmegabytes"|"turnmegabytes-australia"|"turnmegabytes-brasil"|"turnmegabytes-germany"|"turnmegabytes-india"|"turnmegabytes-ireland"|"turnmegabytes-japan"|"turnmegabytes-singapore"|"turnmegabytes-useast"|"turnmegabytes-uswest"|"twilio-interconnect"|"verify-push"|"verify-totp"|"verify-whatsapp-conversations-business-initiated"|"video-recordings"|"virtual-agent"|"voice-insights"|"voice-insights-client-insights-on-demand-minute"|"voice-insights-ptsn-insights-on-demand-minute"|"voice-insights-sip-interface-insights-on-demand-minute"|"voice-insights-sip-trunking-insights-on-demand-minute"|"voice-intelligence"|"voice-intelligence-transcription"|"voice-intelligence-operators"|"wireless"|"wireless-orders"|"wireless-orders-artwork"|"wireless-orders-bulk"|"wireless-orders-esim"|"wireless-orders-starter"|"wireless-usage"|"wireless-usage-commands"|"wireless-usage-commands-africa"|"wireless-usage-commands-asia"|"wireless-usage-commands-centralandsouthamerica"|"wireless-usage-commands-europe"|"wireless-usage-commands-home"|"wireless-usage-commands-northamerica"|"wireless-usage-commands-oceania"|"wireless-usage-commands-roaming"|"wireless-usage-data"|"wireless-usage-data-africa"|"wireless-usage-data-asia"|"wireless-usage-data-centralandsouthamerica"|"wireless-usage-data-custom-additionalmb"|"wireless-usage-data-custom-first5mb"|"wireless-usage-data-domestic-roaming"|"wireless-usage-data-europe"|"wireless-usage-data-individual-additionalgb"|"wireless-usage-data-individual-firstgb"|"wireless-usage-data-international-roaming-canada"|"wireless-usage-data-international-roaming-india"|"wireless-usage-data-international-roaming-mexico"|"wireless-usage-data-northamerica"|"wireless-usage-data-oceania"|"wireless-usage-data-pooled"|"wireless-usage-data-pooled-downlink"|"wireless-usage-data-pooled-uplink"|"wireless-usage-mrc"|"wireless-usage-mrc-custom"|"wireless-usage-mrc-individual"|"wireless-usage-mrc-pooled"|"wireless-usage-mrc-suspended"|"wireless-usage-sms"|"wireless-usage-voice"; diff --git a/ballerina/utils.bal b/ballerina/utils.bal index 0ca0f1d0..d0d88c1c 100644 --- a/ballerina/utils.bal +++ b/ballerina/utils.bal @@ -1,96 +1,229 @@ -// Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. +// AUTO-GENERATED FILE. DO NOT MODIFY. +// This file is auto-generated by the Ballerina OpenAPI tool. import ballerina/url; -import ballerina/http; -# Check for HTTP response and if response is success parse HTTP response object into `json` and parse error otherwise. -# + httpResponse - HTTP response or HTTP Connector error with network related errors -# + return - `json` payload or `error` if anything wrong happen when HTTP client invocation or parsing response to `json` -isolated function parseResponseToJson(http:Response|http:ClientError httpResponse) returns @tainted json|Error { - if (httpResponse is http:Response) { - var jsonResponse = httpResponse.getJsonPayload(); +type SimpleBasicType string|boolean|int|float|decimal; - if (jsonResponse is json) { - if (httpResponse.statusCode != http:STATUS_OK && httpResponse.statusCode != http:STATUS_CREATED) { - string code = ""; - if (jsonResponse?.error_code is json) { - json|error codeTemp = jsonResponse?.error_code; - if(codeTemp is json) { - code = codeTemp.toString(); - } else{ - code = codeTemp.toString(); - } - } else if (jsonResponse?.'error is json) { - json|error errorTemp = jsonResponse.'error; - if(errorTemp is json) { - code = errorTemp.toString(); - } else{ - code = errorTemp.toString(); - } - } - string message = ""; - json|error messageTemp = jsonResponse.message; - if(messageTemp is json) { - message = messageTemp.toString(); - } else{ - message = messageTemp.toString(); - } - string errorMessage = httpResponse.statusCode.toString() + " " + httpResponse.reasonPhrase; - if (code != "") { - errorMessage += " - " + code; - } - errorMessage += " : " + message; - return prepareError(errorMessage); +# Represents encoding mechanism details. +type Encoding record { + # Defines how multiple values are delimited + string style = FORM; + # Specifies whether arrays and objects should generate as separate fields + boolean explode = true; + # Specifies the custom content type + string contentType?; + # Specifies the custom headers + map headers?; +}; + +enum EncodingStyle { + DEEPOBJECT, FORM, SPACEDELIMITED, PIPEDELIMITED +} + +final Encoding & readonly defaultEncoding = {}; + +# Generate client request when the media type is given as application/x-www-form-urlencoded. +# +# + encodingMap - Includes the information about the encoding mechanism +# + anyRecord - Record to be serialized +# + return - Serialized request body or query parameter as a string +isolated function createFormURLEncodedRequestBody(record {|anydata...;|} anyRecord, map encodingMap = {}) returns string { + string[] payload = []; + foreach [string, anydata] [key, value] in anyRecord.entries() { + Encoding encodingData = encodingMap.hasKey(key) ? encodingMap.get(key) : defaultEncoding; + if value is SimpleBasicType { + payload.push(key, "=", getEncodedUri(value.toString())); + } else if value is SimpleBasicType[] { + payload.push(getSerializedArray(key, value, encodingData.style, encodingData.explode)); + } else if (value is record {}) { + if encodingData.style == DEEPOBJECT { + payload.push(getDeepObjectStyleRequest(key, value)); + } else { + payload.push(getFormStyleRequest(key, value)); } - return jsonResponse; - } else { - return prepareError("Error occurred while accessing the JSON payload of the response"); + } else if (value is record {}[]) { + payload.push(getSerializedRecordArray(key, value, encodingData.style, encodingData.explode)); } - } else { - return prepareError("Error occurred while invoking the REST API"); + payload.push("&"); + } + _ = payload.pop(); + return string:'join("", ...payload); +} + +# Serialize the record according to the deepObject style. +# +# + parent - Parent record name +# + anyRecord - Record to be serialized +# + return - Serialized record as a string +isolated function getDeepObjectStyleRequest(string parent, record {} anyRecord) returns string { + string[] recordArray = []; + foreach [string, anydata] [key, value] in anyRecord.entries() { + if value is SimpleBasicType { + recordArray.push(parent + "[" + key + "]" + "=" + getEncodedUri(value.toString())); + } else if value is SimpleBasicType[] { + recordArray.push(getSerializedArray(parent + "[" + key + "]" + "[]", value, DEEPOBJECT, true)); + } else if value is record {} { + string nextParent = parent + "[" + key + "]"; + recordArray.push(getDeepObjectStyleRequest(nextParent, value)); + } else if value is record {}[] { + string nextParent = parent + "[" + key + "]"; + recordArray.push(getSerializedRecordArray(nextParent, value, DEEPOBJECT)); + } + recordArray.push("&"); } + _ = recordArray.pop(); + return string:'join("", ...recordArray); } -# Create URL encoded request body with given key and value. -# + requestBody - Request body to be appended values -# + key - Key of the form value parameter -# + value - Value of the form value parameter -# + return - Created request body with encoded string or `error` if anything wrong happen when encoding the value -isolated function createUrlEncodedRequestBody(string requestBody, string key, string value) returns string|Error { - var encodedVar = url:encode(value, CHARSET_UTF8); - string encodedString = ""; - string body = ""; - if (encodedVar is string) { - encodedString = encodedVar; +# Serialize the record according to the form style. +# +# + parent - Parent record name +# + anyRecord - Record to be serialized +# + explode - Specifies whether arrays and objects should generate separate parameters +# + return - Serialized record as a string +isolated function getFormStyleRequest(string parent, record {} anyRecord, boolean explode = true) returns string { + string[] recordArray = []; + if explode { + foreach [string, anydata] [key, value] in anyRecord.entries() { + if (value is SimpleBasicType) { + recordArray.push(key, "=", getEncodedUri(value.toString())); + } else if (value is SimpleBasicType[]) { + recordArray.push(getSerializedArray(key, value, explode = explode)); + } else if (value is record {}) { + recordArray.push(getFormStyleRequest(parent, value, explode)); + } + recordArray.push("&"); + } + _ = recordArray.pop(); } else { - return prepareError("Error occurred while encoding the string"); + foreach [string, anydata] [key, value] in anyRecord.entries() { + if (value is SimpleBasicType) { + recordArray.push(key, ",", getEncodedUri(value.toString())); + } else if (value is SimpleBasicType[]) { + recordArray.push(getSerializedArray(key, value, explode = false)); + } else if (value is record {}) { + recordArray.push(getFormStyleRequest(parent, value, explode)); + } + recordArray.push(","); + } + _ = recordArray.pop(); + } + return string:'join("", ...recordArray); +} + +# Serialize arrays. +# +# + arrayName - Name of the field with arrays +# + anyArray - Array to be serialized +# + style - Defines how multiple values are delimited +# + explode - Specifies whether arrays and objects should generate separate parameters +# + return - Serialized array as a string +isolated function getSerializedArray(string arrayName, anydata[] anyArray, string style = "form", boolean explode = true) returns string { + string key = arrayName; + string[] arrayValues = []; + if (anyArray.length() > 0) { + if (style == FORM && !explode) { + arrayValues.push(key, "="); + foreach anydata i in anyArray { + arrayValues.push(getEncodedUri(i.toString()), ","); + } + } else if (style == SPACEDELIMITED && !explode) { + arrayValues.push(key, "="); + foreach anydata i in anyArray { + arrayValues.push(getEncodedUri(i.toString()), "%20"); + } + } else if (style == PIPEDELIMITED && !explode) { + arrayValues.push(key, "="); + foreach anydata i in anyArray { + arrayValues.push(getEncodedUri(i.toString()), "|"); + } + } else if (style == DEEPOBJECT) { + foreach anydata i in anyArray { + arrayValues.push(key, "[]", "=", getEncodedUri(i.toString()), "&"); + } + } else { + foreach anydata i in anyArray { + arrayValues.push(key, "=", getEncodedUri(i.toString()), "&"); + } + } + _ = arrayValues.pop(); } - if (requestBody != "") { - body = requestBody + "&"; + return string:'join("", ...arrayValues); +} + +# Serialize the array of records according to the form style. +# +# + parent - Parent record name +# + value - Array of records to be serialized +# + style - Defines how multiple values are delimited +# + explode - Specifies whether arrays and objects should generate separate parameters +# + return - Serialized record as a string +isolated function getSerializedRecordArray(string parent, record {}[] value, string style = FORM, boolean explode = true) returns string { + string[] serializedArray = []; + if style == DEEPOBJECT { + int arayIndex = 0; + foreach var recordItem in value { + serializedArray.push(getDeepObjectStyleRequest(parent + "[" + arayIndex.toString() + "]", recordItem), "&"); + arayIndex = arayIndex + 1; + } + } else { + if (!explode) { + serializedArray.push(parent, "="); + } + foreach var recordItem in value { + serializedArray.push(getFormStyleRequest(parent, recordItem, explode), ","); + } } - return body + key + "=" + encodedString; + _ = serializedArray.pop(); + return string:'join("", ...serializedArray); } -isolated function prepareError(string message, error? err = ()) returns Error { - Error twilioError; - if (err is error) { - twilioError = error TwilioError(message, err); +# Get Encoded URI for a given value. +# +# + value - Value to be encoded +# + return - Encoded string +isolated function getEncodedUri(anydata value) returns string { + string|error encoded = url:encode(value.toString(), "UTF8"); + if (encoded is string) { + return encoded; } else { - twilioError = error TwilioError(message); + return value.toString(); + } +} + +# Generate query path with query parameter. +# +# + queryParam - Query parameter map +# + encodingMap - Details on serialization mechanism +# + return - Returns generated Path or error at failure of client initialization +isolated function getPathForQueryParam(map queryParam, map encodingMap = {}) returns string|error { + string[] param = []; + if (queryParam.length() > 0) { + param.push("?"); + foreach var [key, value] in queryParam.entries() { + if value is () { + _ = queryParam.remove(key); + continue; + } + Encoding encodingData = encodingMap.hasKey(key) ? encodingMap.get(key) : defaultEncoding; + if (value is SimpleBasicType) { + param.push(key, "=", getEncodedUri(value.toString())); + } else if (value is SimpleBasicType[]) { + param.push(getSerializedArray(key, value, encodingData.style, encodingData.explode)); + } else if (value is record {}) { + if (encodingData.style == DEEPOBJECT) { + param.push(getDeepObjectStyleRequest(key, value)); + } else { + param.push(getFormStyleRequest(key, value, encodingData.explode)); + } + } else { + param.push(key, "=", value.toString()); + } + param.push("&"); + } + _ = param.pop(); } - return twilioError; + string restOfPath = string:'join("", ...param); + return restOfPath; } diff --git a/build-config/resources/Ballerina.toml b/build-config/resources/Ballerina.toml new file mode 100644 index 00000000..f5355539 --- /dev/null +++ b/build-config/resources/Ballerina.toml @@ -0,0 +1,13 @@ +[package] +distribution = "2201.8.0" +org = "ballerinax" +name = "twilio" +version = "@toml.version@" +authors = ["Ballerina"] +repository = "https://github.com/ballerina-platform/module-ballerinax-twilio" +keywords = ["Communication/Call & SMS", "Cost/Paid"] +icon = "icon.png" +license = ["Apache-2.0"] + +[build-options] +observabilityIncluded = true diff --git a/build.gradle b/build.gradle new file mode 100644 index 00000000..e60cb681 --- /dev/null +++ b/build.gradle @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +plugins { + id 'com.github.spotbugs-base' + id 'com.github.johnrengelman.shadow' + id 'de.undercouch.download' + id 'net.researchgate.release' +} + +allprojects { + group = project.group + version = project.version + + apply plugin: 'maven-publish' + + repositories { + mavenLocal() + maven { + url = 'https://maven.wso2.org/nexus/content/repositories/releases/' + } + + maven { + url = 'https://maven.wso2.org/nexus/content/groups/wso2-public/' + } + + maven { + url = 'https://repo.maven.apache.org/maven2' + } + + maven { + url = 'https://maven.pkg.github.com/ballerina-platform/*' + credentials { + username System.getenv("packageUser") + password System.getenv("packagePAT") + } + } + } + + ext { + snapshotVersion = '-SNAPSHOT' + timestampedVersionRegex = '.*-\\d{8}-\\d{6}-\\w.*\$' + } +} + +def moduleVersion = project.version.replace("-SNAPSHOT", "") + +task build { + dependsOn(':twilio-ballerina:build') + dependsOn(':twilio-examples:build') +} + +release { + buildTasks = ['build'] + failOnSnapshotDependencies = true + versionPropertyFile = 'gradle.properties' + tagTemplate = 'v${version}' + git { + requireBranch = "release-${moduleVersion}" + pushToRemote = 'origin' + } +} diff --git a/docs/spec/oas-sanitizations.md b/docs/spec/oas-sanitizations.md new file mode 100644 index 00000000..0dd67399 --- /dev/null +++ b/docs/spec/oas-sanitizations.md @@ -0,0 +1,21 @@ +# Sanitizations for Open API Specification +This connector is generated using Twilio's Basic [API version 2010-04-01](https://github.com/twilio/twilio-oai/blob/main/spec/yaml/twilio_api_v2010.yaml), and the following sanitizations were applied to the specification before client generation. + +1. Removed the `api.v2010.account.` and `api.v2010.` suffixes from the record names to enhance the user-friendliness of the specifications. For instance, `api.v2010.account.address` is now renamed to `address`, resulting in the type name changing from `ApiV2010AccountAddress` to `Address`. + +2. Excluded `available_phone_number_country` from `available_phone_number_country.available_phone_number_toll_free` to prevent an OpenAPI tool reference handling error ([`Ballerina only supports local references.`](https://github.com/ballerina-platform/ballerina-standard-library/issues/4887)). This change also improves the clarity of the record names. + +3. Modified parameter names in response to [this issue](https://github.com/ballerina-platform/ballerina-standard-library/issues/4882). + + - `startTime<` changed to `startedOnOrBefore` + - `startTime>` changed to `startedOnOrAfter` + - `endTime<` changed to `endedOnOrBefore` + - `endTime>` changed to `endedOnOrAfter` + - `messageDate<` changed to `loggedOnOrBefore` + - `messageDate>` changed to `loggedOnOrAfter` + - `dateCreated<` changed to `createdOnOrBefore` + - `dateCreated>` changed to `createdOnOrAfter` + - `dateUpdated<` changed to `updatedOnOrBefore` + - `dateUpdated>` changed to `updatedOnOrAfter` + - `dateSent<` changed to `sentOnOrBefore` + - `dateSent>` changed to `sentOnOrAfter` \ No newline at end of file diff --git a/docs/spec/twilio_api_sanitized.yaml b/docs/spec/twilio_api_sanitized.yaml new file mode 100644 index 00000000..b63f82d3 --- /dev/null +++ b/docs/spec/twilio_api_sanitized.yaml @@ -0,0 +1,29682 @@ +components: + schemas: + account: + type: object + properties: + auth_token: + type: string + nullable: true + description: The authorization token for this account. This token should + be kept a secret, so no sharing. + date_created: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that this account was created, in GMT in RFC 2822 + format + date_updated: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that this account was last updated, in GMT in RFC + 2822 format. + friendly_name: + type: string + nullable: true + description: A human readable description of this account, up to 64 characters + long. By default the FriendlyName is your email address. + owner_account_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + nullable: true + description: The unique 34 character id that represents the parent of this + account. The OwnerAccountSid of a parent account is it's own sid. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + nullable: true + description: A 34 character string that uniquely identifies this resource. + status: + type: string + $ref: '#/components/schemas/account_enum_status' + nullable: true + description: The status of this account. Usually `active`, but can be `suspended` + or `closed`. + subresource_uris: + type: object + format: uri-map + nullable: true + description: A Map of various subresources available for the given Account + Instance + type: + type: string + $ref: '#/components/schemas/account_enum_type' + nullable: true + description: The type of this account. Either `Trial` or `Full` if it's + been upgraded + uri: + type: string + nullable: true + description: The URI for this resource, relative to `https://api.twilio.com` + account_enum_status: + type: string + enum: + - active + - suspended + - closed + account_enum_type: + type: string + enum: + - Trial + - Full + address: + 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 is responsible for the Address resource. + city: + type: string + nullable: true + description: The city in which the address is located. + customer_name: + type: string + nullable: true + description: The name associated with the address.This property has a maximum + length of 16 4-byte characters, or 21 3-byte characters. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + friendly_name: + type: string + nullable: true + description: The string that you assigned to describe the resource. + iso_country: + type: string + format: iso-country-code + nullable: true + description: The ISO country code of the address. + postal_code: + type: string + nullable: true + description: The postal code of the address. + region: + type: string + nullable: true + description: The state or region of the address. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the Address + resource. + street: + type: string + nullable: true + description: The number and street address of the address. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + emergency_enabled: + type: boolean + nullable: true + description: Whether emergency calling has been enabled on this number. + validated: + type: boolean + nullable: true + description: Whether the address has been validated to comply with local + regulation. In countries that require valid addresses, an invalid address + will not be accepted. `true` indicates the Address has been validated. + `false` indicate the country doesn't require validation or the Address + is not valid. + verified: + type: boolean + nullable: true + description: Whether the address has been verified to comply with regulation. + In countries that require valid addresses, an invalid address will not + be accepted. `true` indicates the Address has been verified. `false` indicate + the country doesn't require verified or the Address is not valid. + street_secondary: + type: string + nullable: true + description: The additional number and street address of the address. + application: + 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 Application resource. + api_version: + type: string + nullable: true + description: The API version used to start a new TwiML session. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + friendly_name: + type: string + nullable: true + description: The string that you assigned to describe the resource. + message_status_callback: + type: string + format: uri + nullable: true + description: The URL we call using a POST method to send message status + information to your application. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the Application + resource. + sms_fallback_method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + nullable: true + description: 'The HTTP method we use to call `sms_fallback_url`. Can be: + `GET` or `POST`.' + sms_fallback_url: + type: string + format: uri + nullable: true + description: The URL that we call when an error occurs while retrieving + or executing the TwiML from `sms_url`. + sms_method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + nullable: true + description: 'The HTTP method we use to call `sms_url`. Can be: `GET` or + `POST`.' + sms_status_callback: + type: string + format: uri + nullable: true + description: The URL we call using a POST method to send status information + to your application about SMS messages that refer to the application. + sms_url: + type: string + format: uri + nullable: true + description: The URL we call when the phone number receives an incoming + SMS message. + status_callback: + type: string + format: uri + nullable: true + description: The URL we call using the `status_callback_method` to send + status information to your application. + 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`. Can be: + `GET` or `POST`.' + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + voice_caller_id_lookup: + type: boolean + nullable: true + description: 'Whether we look up the caller''s caller-ID name from the CNAM + database (additional charges apply). Can be: `true` or `false`.' + 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`.' + voice_fallback_url: + type: string + format: uri + nullable: true + description: The URL that we call when an error occurs retrieving or executing + the TwiML requested by `url`. + 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_url: + type: string + format: uri + nullable: true + description: The URL we call when the phone number assigned to this application + receives a call. + public_application_connect_enabled: + type: boolean + nullable: true + description: 'Whether to allow other Twilio accounts to dial this applicaton + using Dial verb. Can be: `true` or `false`.' + authorized_connect_app: + 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 AuthorizedConnectApp resource. + connect_app_company_name: + type: string + nullable: true + description: The company name set for the Connect App. + connect_app_description: + type: string + nullable: true + description: A detailed description of the Connect App. + connect_app_friendly_name: + type: string + nullable: true + description: The name of the Connect App. + connect_app_homepage_url: + type: string + format: uri + nullable: true + description: The public URL for the Connect App. + connect_app_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CN[0-9a-fA-F]{32}$ + nullable: true + description: The SID that we assigned to the Connect App. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + permissions: + type: array + items: + type: string + $ref: '#/components/schemas/authorized_connect_app_enum_permission' + nullable: true + description: 'The set of permissions that you authorized for the Connect + App. Can be: `get-all` or `post-all`.' + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + authorized_connect_app_enum_permission: + type: string + enum: + - get-all + - post-all + available_phone_number_country: + type: object + properties: + country_code: + type: string + format: iso-country-code + nullable: true + description: The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + country code of the country. + country: + type: string + nullable: true + description: The name of the country. + uri: + type: string + format: uri + nullable: true + description: The URI of the Country resource, relative to `https://api.twilio.com`. + beta: + type: boolean + nullable: true + description: Whether all phone numbers available in the country are new + to the Twilio platform. `true` if they are and `false` if all numbers + are not in the Twilio Phone Number Beta program. + subresource_uris: + type: object + format: uri-map + nullable: true + description: A list of related AvailablePhoneNumber resources identified + by their URIs relative to `https://api.twilio.com`. + available_phone_number_local: + type: object + properties: + friendly_name: + type: string + format: phone-number + nullable: true + description: A formatted version of the phone number. + phone_number: + type: string + format: phone-number + nullable: true + description: The 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. + lata: + type: string + nullable: true + description: The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) + of this phone number. Available for only phone numbers from the US and + Canada. + locality: + type: string + nullable: true + description: The locality or city of this phone number's location. + rate_center: + type: string + nullable: true + description: The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) + of this phone number. Available for only phone numbers from the US and + Canada. + latitude: + type: number + nullable: true + description: The latitude of this phone number's location. Available for + only phone numbers from the US and Canada. + longitude: + type: number + nullable: true + description: The longitude of this phone number's location. Available for + only phone numbers from the US and Canada. + region: + type: string + nullable: true + description: The two-letter state or province abbreviation of this phone + number's location. Available for only phone numbers from the US and Canada. + postal_code: + type: string + nullable: true + description: The postal or ZIP code of this phone number's location. Available + for only phone numbers from the US and Canada. + 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) + of this phone number. + address_requirements: + type: string + nullable: true + description: 'The type of [Address](https://www.twilio.com/docs/usage/api/address) + resource the phone number requires. Can be: `none`, `any`, `local`, or + `foreign`. `none` means no address is required. `any` means an address + is required, but it can be anywhere in the world. `local` means an address + in the phone number''s country is required. `foreign` means an address + outside of the phone number''s country is required.' + beta: + type: boolean + nullable: true + description: 'Whether the phone number is new to the Twilio platform. Can + be: `true` or `false`.' + capabilities: + type: object + format: phone-number-capabilities + properties: + mms: + type: boolean + sms: + type: boolean + voice: + type: boolean + fax: + type: boolean + nullable: true + description: 'The set of Boolean properties that indicate whether a phone + number can receive calls or messages. Capabilities are: `Voice`, `SMS`, + and `MMS` and each capability can be: `true` or `false`.' + available_phone_number_machine_to_machine: + type: object + properties: + friendly_name: + type: string + format: phone-number + nullable: true + description: A formatted version of the phone number. + phone_number: + type: string + format: phone-number + nullable: true + description: The 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. + lata: + type: string + nullable: true + description: The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) + of this phone number. Available for only phone numbers from the US and + Canada. + locality: + type: string + nullable: true + description: The locality or city of this phone number's location. + rate_center: + type: string + nullable: true + description: The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) + of this phone number. Available for only phone numbers from the US and + Canada. + latitude: + type: number + nullable: true + description: The latitude of this phone number's location. Available for + only phone numbers from the US and Canada. + longitude: + type: number + nullable: true + description: The longitude of this phone number's location. Available for + only phone numbers from the US and Canada. + region: + type: string + nullable: true + description: The two-letter state or province abbreviation of this phone + number's location. Available for only phone numbers from the US and Canada. + postal_code: + type: string + nullable: true + description: The postal or ZIP code of this phone number's location. Available + for only phone numbers from the US and Canada. + 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) + of this phone number. + address_requirements: + type: string + nullable: true + description: 'The type of [Address](https://www.twilio.com/docs/usage/api/address) + resource the phone number requires. Can be: `none`, `any`, `local`, or + `foreign`. `none` means no address is required. `any` means an address + is required, but it can be anywhere in the world. `local` means an address + in the phone number''s country is required. `foreign` means an address + outside of the phone number''s country is required.' + beta: + type: boolean + nullable: true + description: 'Whether the phone number is new to the Twilio platform. Can + be: `true` or `false`.' + capabilities: + type: object + format: phone-number-capabilities + properties: + mms: + type: boolean + sms: + type: boolean + voice: + type: boolean + fax: + type: boolean + nullable: true + description: 'The set of Boolean properties that indicate whether a phone + number can receive calls or messages. Capabilities are: `Voice`, `SMS`, + and `MMS` and each capability can be: `true` or `false`.' + available_phone_number_mobile: + type: object + properties: + friendly_name: + type: string + format: phone-number + nullable: true + description: A formatted version of the phone number. + phone_number: + type: string + format: phone-number + nullable: true + description: The 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. + lata: + type: string + nullable: true + description: The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) + of this phone number. Available for only phone numbers from the US and + Canada. + locality: + type: string + nullable: true + description: The locality or city of this phone number's location. + rate_center: + type: string + nullable: true + description: The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) + of this phone number. Available for only phone numbers from the US and + Canada. + latitude: + type: number + nullable: true + description: The latitude of this phone number's location. Available for + only phone numbers from the US and Canada. + longitude: + type: number + nullable: true + description: The longitude of this phone number's location. Available for + only phone numbers from the US and Canada. + region: + type: string + nullable: true + description: The two-letter state or province abbreviation of this phone + number's location. Available for only phone numbers from the US and Canada. + postal_code: + type: string + nullable: true + description: The postal or ZIP code of this phone number's location. Available + for only phone numbers from the US and Canada. + 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) + of this phone number. + address_requirements: + type: string + nullable: true + description: 'The type of [Address](https://www.twilio.com/docs/usage/api/address) + resource the phone number requires. Can be: `none`, `any`, `local`, or + `foreign`. `none` means no address is required. `any` means an address + is required, but it can be anywhere in the world. `local` means an address + in the phone number''s country is required. `foreign` means an address + outside of the phone number''s country is required.' + beta: + type: boolean + nullable: true + description: 'Whether the phone number is new to the Twilio platform. Can + be: `true` or `false`.' + capabilities: + type: object + format: phone-number-capabilities + properties: + mms: + type: boolean + sms: + type: boolean + voice: + type: boolean + fax: + type: boolean + nullable: true + description: 'The set of Boolean properties that indicate whether a phone + number can receive calls or messages. Capabilities are: `Voice`, `SMS`, + and `MMS` and each capability can be: `true` or `false`.' + available_phone_number_national: + type: object + properties: + friendly_name: + type: string + format: phone-number + nullable: true + description: A formatted version of the phone number. + phone_number: + type: string + format: phone-number + nullable: true + description: The 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. + lata: + type: string + nullable: true + description: The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) + of this phone number. Available for only phone numbers from the US and + Canada. + locality: + type: string + nullable: true + description: The locality or city of this phone number's location. + rate_center: + type: string + nullable: true + description: The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) + of this phone number. Available for only phone numbers from the US and + Canada. + latitude: + type: number + nullable: true + description: The latitude of this phone number's location. Available for + only phone numbers from the US and Canada. + longitude: + type: number + nullable: true + description: The longitude of this phone number's location. Available for + only phone numbers from the US and Canada. + region: + type: string + nullable: true + description: The two-letter state or province abbreviation of this phone + number's location. Available for only phone numbers from the US and Canada. + postal_code: + type: string + nullable: true + description: The postal or ZIP code of this phone number's location. Available + for only phone numbers from the US and Canada. + 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) + of this phone number. + address_requirements: + type: string + nullable: true + description: 'The type of [Address](https://www.twilio.com/docs/usage/api/address) + resource the phone number requires. Can be: `none`, `any`, `local`, or + `foreign`. `none` means no address is required. `any` means an address + is required, but it can be anywhere in the world. `local` means an address + in the phone number''s country is required. `foreign` means an address + outside of the phone number''s country is required.' + beta: + type: boolean + nullable: true + description: 'Whether the phone number is new to the Twilio platform. Can + be: `true` or `false`.' + capabilities: + type: object + format: phone-number-capabilities + properties: + mms: + type: boolean + sms: + type: boolean + voice: + type: boolean + fax: + type: boolean + nullable: true + description: 'The set of Boolean properties that indicate whether a phone + number can receive calls or messages. Capabilities are: `Voice`, `SMS`, + and `MMS` and each capability can be: `true` or `false`.' + available_phone_number_shared_cost: + type: object + properties: + friendly_name: + type: string + format: phone-number + nullable: true + description: A formatted version of the phone number. + phone_number: + type: string + format: phone-number + nullable: true + description: The 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. + lata: + type: string + nullable: true + description: The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) + of this phone number. Available for only phone numbers from the US and + Canada. + locality: + type: string + nullable: true + description: The locality or city of this phone number's location. + rate_center: + type: string + nullable: true + description: The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) + of this phone number. Available for only phone numbers from the US and + Canada. + latitude: + type: number + nullable: true + description: The latitude of this phone number's location. Available for + only phone numbers from the US and Canada. + longitude: + type: number + nullable: true + description: The longitude of this phone number's location. Available for + only phone numbers from the US and Canada. + region: + type: string + nullable: true + description: The two-letter state or province abbreviation of this phone + number's location. Available for only phone numbers from the US and Canada. + postal_code: + type: string + nullable: true + description: The postal or ZIP code of this phone number's location. Available + for only phone numbers from the US and Canada. + 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) + of this phone number. + address_requirements: + type: string + nullable: true + description: 'The type of [Address](https://www.twilio.com/docs/usage/api/address) + resource the phone number requires. Can be: `none`, `any`, `local`, or + `foreign`. `none` means no address is required. `any` means an address + is required, but it can be anywhere in the world. `local` means an address + in the phone number''s country is required. `foreign` means an address + outside of the phone number''s country is required.' + beta: + type: boolean + nullable: true + description: 'Whether the phone number is new to the Twilio platform. Can + be: `true` or `false`.' + capabilities: + type: object + format: phone-number-capabilities + properties: + mms: + type: boolean + sms: + type: boolean + voice: + type: boolean + fax: + type: boolean + nullable: true + description: 'The set of Boolean properties that indicate whether a phone + number can receive calls or messages. Capabilities are: `Voice`, `SMS`, + and `MMS` and each capability can be: `true` or `false`.' + available_phone_number_toll_free: + type: object + properties: + friendly_name: + type: string + format: phone-number + nullable: true + description: A formatted version of the phone number. + phone_number: + type: string + format: phone-number + nullable: true + description: The 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. + lata: + type: string + nullable: true + description: The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) + of this phone number. Available for only phone numbers from the US and + Canada. + locality: + type: string + nullable: true + description: The locality or city of this phone number's location. + rate_center: + type: string + nullable: true + description: The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) + of this phone number. Available for only phone numbers from the US and + Canada. + latitude: + type: number + nullable: true + description: The latitude of this phone number's location. Available for + only phone numbers from the US and Canada. + longitude: + type: number + nullable: true + description: The longitude of this phone number's location. Available for + only phone numbers from the US and Canada. + region: + type: string + nullable: true + description: The two-letter state or province abbreviation of this phone + number's location. Available for only phone numbers from the US and Canada. + postal_code: + type: string + nullable: true + description: The postal or ZIP code of this phone number's location. Available + for only phone numbers from the US and Canada. + 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) + of this phone number. + address_requirements: + type: string + nullable: true + description: 'The type of [Address](https://www.twilio.com/docs/usage/api/address) + resource the phone number requires. Can be: `none`, `any`, `local`, or + `foreign`. `none` means no address is required. `any` means an address + is required, but it can be anywhere in the world. `local` means an address + in the phone number''s country is required. `foreign` means an address + outside of the phone number''s country is required.' + beta: + type: boolean + nullable: true + description: 'Whether the phone number is new to the Twilio platform. Can + be: `true` or `false`.' + capabilities: + type: object + format: phone-number-capabilities + properties: + mms: + type: boolean + sms: + type: boolean + voice: + type: boolean + fax: + type: boolean + nullable: true + description: 'The set of Boolean properties that indicate whether a phone + number can receive calls or messages. Capabilities are: `Voice`, `SMS`, + and `MMS` and each capability can be: `true` or `false`.' + available_phone_number_voip: + type: object + properties: + friendly_name: + type: string + format: phone-number + nullable: true + description: A formatted version of the phone number. + phone_number: + type: string + format: phone-number + nullable: true + description: The 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. + lata: + type: string + nullable: true + description: The [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) + of this phone number. Available for only phone numbers from the US and + Canada. + locality: + type: string + nullable: true + description: The locality or city of this phone number's location. + rate_center: + type: string + nullable: true + description: The [rate center](https://en.wikipedia.org/wiki/Telephone_exchange) + of this phone number. Available for only phone numbers from the US and + Canada. + latitude: + type: number + nullable: true + description: The latitude of this phone number's location. Available for + only phone numbers from the US and Canada. + longitude: + type: number + nullable: true + description: The longitude of this phone number's location. Available for + only phone numbers from the US and Canada. + region: + type: string + nullable: true + description: The two-letter state or province abbreviation of this phone + number's location. Available for only phone numbers from the US and Canada. + postal_code: + type: string + nullable: true + description: The postal or ZIP code of this phone number's location. Available + for only phone numbers from the US and Canada. + 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) + of this phone number. + address_requirements: + type: string + nullable: true + description: 'The type of [Address](https://www.twilio.com/docs/usage/api/address) + resource the phone number requires. Can be: `none`, `any`, `local`, or + `foreign`. `none` means no address is required. `any` means an address + is required, but it can be anywhere in the world. `local` means an address + in the phone number''s country is required. `foreign` means an address + outside of the phone number''s country is required.' + beta: + type: boolean + nullable: true + description: 'Whether the phone number is new to the Twilio platform. Can + be: `true` or `false`.' + capabilities: + type: object + format: phone-number-capabilities + properties: + mms: + type: boolean + sms: + type: boolean + voice: + type: boolean + fax: + type: boolean + nullable: true + description: 'The set of Boolean properties that indicate whether a phone + number can receive calls or messages. Capabilities are: `Voice`, `SMS`, + and `MMS` and each capability can be: `true` or `false`.' + balance: + type: object + properties: + account_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + nullable: true + description: The unique SID identifier of the Account. + balance: + type: string + nullable: true + description: The balance of the Account, in units specified by the unit + parameter. Balance changes may not be reflected immediately. Child accounts + do not contain balance information + currency: + type: string + nullable: true + description: The units of currency for the account balance + call: + type: object + properties: + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that we created to identify this Call resource. + date_created: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date and time in GMT that this resource was created specified + in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + date_updated: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date and time in GMT that this resource was last updated, + specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + parent_call_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + nullable: true + description: The SID that identifies the call that created this leg. + 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 this Call resource. + to: + type: string + nullable: true + description: The phone number, SIP address, Client identifier or SIM SID + that received this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) + format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. + Client identifiers are formatted `client:name`. SIM SIDs are formatted + as `sim:sid`. + to_formatted: + type: string + nullable: true + description: The phone number, SIP address or Client identifier that received + this call. Formatted for display. Non-North American phone numbers are + in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., + +442071838750). + from: + type: string + nullable: true + description: The phone number, SIP address, Client identifier or SIM SID + that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) + format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. + Client identifiers are formatted `client:name`. SIM SIDs are formatted + as `sim:sid`. + from_formatted: + type: string + nullable: true + description: The calling phone number, SIP address, or Client identifier + formatted for display. Non-North American phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) + format (e.g., +442071838750). + phone_number_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + nullable: true + description: If the call was inbound, this is the SID of the IncomingPhoneNumber + resource that received the call. If the call was outbound, it is the SID + of the OutgoingCallerId resource from which the call was placed. + status: + type: string + $ref: '#/components/schemas/call_enum_status' + nullable: true + description: 'The status of this call. Can be: `queued`, `ringing`, `in-progress`, + `canceled`, `completed`, `failed`, `busy` or `no-answer`. See [Call Status + Values](https://www.twilio.com/docs/voice/api/call-resource#call-status-values) + below for more information.' + start_time: + type: string + format: date-time-rfc-2822 + nullable: true + description: The start time of the call, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. Empty if the call has not yet been dialed. + end_time: + type: string + format: date-time-rfc-2822 + nullable: true + description: The time the call ended, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. Empty if the call did not complete successfully. + duration: + type: string + nullable: true + description: The length of the call in seconds. This value is empty for + busy, failed, unanswered, or ongoing calls. + price: + type: string + nullable: true + description: The charge for this call, in the currency associated with the + account. Populated after the call is completed. May not be immediately + available. + price_unit: + type: string + format: currency + nullable: true + description: The currency in which `Price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) + format (e.g., `USD`, `EUR`, `JPY`). Always capitalized for calls. + direction: + type: string + nullable: true + description: 'A string describing the direction of the call. Can be: `inbound` + for inbound calls, `outbound-api` for calls initiated via the REST API + or `outbound-dial` for calls initiated by a `` verb. Using [Elastic + SIP Trunking](https://www.twilio.com/docs/sip-trunking), the values can + be [`trunking-terminating`](https://www.twilio.com/docs/sip-trunking#termination) + for outgoing calls from your communications infrastructure to the PSTN + or [`trunking-originating`](https://www.twilio.com/docs/sip-trunking#origination) + for incoming calls to your communications infrastructure from the PSTN.' + answered_by: + type: string + nullable: true + description: Either `human` or `machine` if this call was initiated with + answering machine detection. Empty otherwise. + api_version: + type: string + nullable: true + description: The API version used to create the call. + forwarded_from: + type: string + nullable: true + description: The forwarding phone number if this call was an incoming call + forwarded from another number (depends on carrier supporting forwarding). + Otherwise, empty. + group_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^GP[0-9a-fA-F]{32}$ + nullable: true + description: The Group SID associated with this call. If no Group is associated + with the call, the field is empty. + caller_name: + type: string + nullable: true + description: The caller's name if this call was an incoming call to a phone + number with caller ID Lookup enabled. Otherwise, empty. + queue_time: + type: string + nullable: true + description: The wait time in milliseconds before the call is placed. + trunk_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^TK[0-9a-fA-F]{32}$ + nullable: true + description: The unique identifier of the trunk resource that was used for + this call. The field is empty if the call was not made using a SIP trunk + or if the call is not terminated. + uri: + type: string + nullable: true + description: The URI of this resource, relative to `https://api.twilio.com`. + subresource_uris: + type: object + format: uri-map + nullable: true + description: A list of subresources available to this call, identified by + their URIs relative to `https://api.twilio.com`. + call_enum_event: + type: string + enum: + - initiated + - ringing + - answered + - completed + call_enum_status: + type: string + enum: + - queued + - ringing + - in-progress + - completed + - busy + - failed + - no-answer + - canceled + call_enum_update_status: + type: string + enum: + - canceled + - completed + call.call_event: + type: object + properties: + request: + nullable: true + description: Contains a dictionary representing the request of the call. + response: + nullable: true + description: Contains a dictionary representing the call response, including + a list of the call events. + call.call_feedback: + type: object + properties: + account_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + nullable: true + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + date_created: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that this resource was created, given in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. + date_updated: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that this resource was last updated, given in [RFC + 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. + issues: + type: array + items: + type: string + $ref: '#/components/schemas/call_feedback_enum_issues' + nullable: true + description: 'A list of issues experienced during the call. The issues can + be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, + `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`.' + quality_score: + type: integer + nullable: true + description: '`1` to `5` quality score where `1` represents imperfect experience + and `5` represents a perfect call.' + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + nullable: true + description: A 34 character string that uniquely identifies this resource. + call_feedback_enum_issues: + type: string + enum: + - audio-latency + - digits-not-captured + - dropped-call + - imperfect-audio + - incorrect-caller-id + - one-way-audio + - post-dial-delay + - unsolicited-call + call.call_feedback_summary: + type: object + properties: + account_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + nullable: true + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + call_count: + type: integer + nullable: true + description: The total number of calls. + call_feedback_count: + type: integer + nullable: true + description: The total number of calls with a feedback entry. + date_created: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that this resource was created, given in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. + date_updated: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that this resource was last updated, given in [RFC + 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. + end_date: + type: string + format: date + nullable: true + description: The last date for which feedback entries are included in this + Feedback Summary, formatted as `YYYY-MM-DD` and specified in UTC. + include_subaccounts: + type: boolean + nullable: true + description: Whether the feedback summary includes subaccounts; `true` if + it does, otherwise `false`. + issues: + type: array + items: {} + nullable: true + description: 'A list of issues experienced during the call. The issues can + be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, + `digits-not-captured`, `audio-latency`, or `one-way-audio`.' + quality_score_average: + type: number + nullable: true + description: The average QualityScore of the feedback entries. + quality_score_median: + type: number + nullable: true + description: The median QualityScore of the feedback entries. + quality_score_standard_deviation: + type: number + nullable: true + description: The standard deviation of the quality scores. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^FS[0-9a-fA-F]{32}$ + nullable: true + description: A 34 character string that uniquely identifies this resource. + start_date: + type: string + format: date + nullable: true + description: The first date for which feedback entries are included in this + feedback summary, formatted as `YYYY-MM-DD` and specified in UTC. + status: + type: string + $ref: '#/components/schemas/call_feedback_summary_enum_status' + nullable: true + description: The status of the feedback summary can be `queued`, `in-progress`, + `completed`, or `failed`. + call_feedback_summary_enum_status: + type: string + enum: + - queued + - in-progress + - completed + - failed + call.call_notification: + 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 Call Notification resource. + api_version: + type: string + nullable: true + description: The API version used to create the Call Notification resource. + call_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the Call Notification resource is associated with. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + error_code: + type: string + nullable: true + description: A unique error code for the error condition that is described + in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + log: + type: string + nullable: true + description: 'An integer log level that corresponds to the type of notification: + `0` is ERROR, `1` is WARNING.' + message_date: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date the notification was actually generated in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) + format. Message buffering can cause this value to differ from `date_created`. + message_text: + type: string + nullable: true + description: The text of the notification. + more_info: + type: string + format: uri + nullable: true + description: The URL for more information about the error condition. This + value is a page in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + request_method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + nullable: true + description: The HTTP method used to generate the notification. If the notification + was generated during a phone call, this is the HTTP Method used to request + the resource on your server. If the notification was generated by your + use of our REST API, this is the HTTP method used to call the resource + on our servers. + request_url: + type: string + format: uri + nullable: true + description: The URL of the resource that generated the notification. If + the notification was generated during a phone call, this is the URL of + the resource on your server that caused the notification. If the notification + was generated by your use of our REST API, this is the URL of the resource + you called. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^NO[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the Call + Notification resource. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + call.call_notification-instance: + 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 Call Notification resource. + api_version: + type: string + nullable: true + description: The API version used to create the Call Notification resource. + call_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the Call Notification resource is associated with. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + error_code: + type: string + nullable: true + description: A unique error code for the error condition that is described + in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + log: + type: string + nullable: true + description: 'An integer log level that corresponds to the type of notification: + `0` is ERROR, `1` is WARNING.' + message_date: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date the notification was actually generated in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) + format. Message buffering can cause this value to differ from `date_created`. + message_text: + type: string + nullable: true + description: The text of the notification. + more_info: + type: string + format: uri + nullable: true + description: The URL for more information about the error condition. This + value is a page in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + request_method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + nullable: true + description: The HTTP method used to generate the notification. If the notification + was generated during a phone call, this is the HTTP Method used to request + the resource on your server. If the notification was generated by your + use of our REST API, this is the HTTP method used to call the resource + on our servers. + request_url: + type: string + format: uri + nullable: true + description: The URL of the resource that generated the notification. If + the notification was generated during a phone call, this is the URL of + the resource on your server that caused the notification. If the notification + was generated by your use of our REST API, this is the URL of the resource + you called. + request_variables: + type: string + nullable: true + description: The HTTP GET or POST variables we sent to your server. However, + if the notification was generated by our REST API, this contains the HTTP + POST or PUT variables you sent to our API. + response_body: + type: string + nullable: true + description: The HTTP body returned by your server. + response_headers: + type: string + nullable: true + description: The HTTP headers returned by your server. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^NO[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the Call + Notification resource. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + call.call_recording: + 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 Recording resource. + api_version: + type: string + nullable: true + description: The API version used to make the recording. + call_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the Recording resource is associated with. + conference_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CF[0-9a-fA-F]{32}$ + nullable: true + description: The Conference SID that identifies the conference associated + with the recording, if a conference recording. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + start_time: + type: string + format: date-time-rfc-2822 + nullable: true + description: The start time of the recording in GMT and in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. + duration: + type: string + nullable: true + description: The length of the recording in seconds. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the Recording + resource. + price: + type: number + nullable: true + description: The one-time cost of creating the recording in the `price_unit` + currency. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + encryption_details: + nullable: true + description: How to decrypt the recording if it was encrypted using [Call + Recording Encryption](https://www.twilio.com/docs/voice/tutorials/voice-recording-encryption) + feature. + price_unit: + type: string + format: currency + nullable: true + description: 'The currency used in the `price` property. Example: `USD`.' + status: + type: string + $ref: '#/components/schemas/call_recording_enum_status' + nullable: true + description: 'The status of the recording. Can be: `processing`, `completed` + and `absent`. For more detailed statuses on in-progress recordings, check + out how to [Update a Recording Resource](https://www.twilio.com/docs/voice/api/recording#update-a-recording-resource).' + channels: + type: integer + nullable: true + description: 'The number of channels in the final recording file. Can be: + `1`, or `2`. Separating a two leg call into two separate channels of the + recording file is supported in [Dial](https://www.twilio.com/docs/voice/twiml/dial#attributes-record) + and [Outbound Rest API](https://www.twilio.com/docs/voice/make-calls) + record options.' + source: + type: string + $ref: '#/components/schemas/call_recording_enum_source' + nullable: true + description: 'How the recording was created. Can be: `DialVerb`, `Conference`, + `OutboundAPI`, `Trunking`, `RecordVerb`, `StartCallRecordingAPI`, and + `StartConferenceRecordingAPI`.' + error_code: + type: integer + nullable: true + description: The error code that describes why the recording is `absent`. + The error code is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + This value is null if the recording `status` is not `absent`. + track: + type: string + nullable: true + description: 'The recorded track. Can be: `inbound`, `outbound`, or `both`.' + call_recording_enum_status: + type: string + enum: + - in-progress + - paused + - stopped + - processing + - completed + - absent + call_recording_enum_source: + type: string + enum: + - DialVerb + - Conference + - OutboundAPI + - Trunking + - RecordVerb + - StartCallRecordingAPI + - StartConferenceRecordingAPI + conference: + 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 this Conference resource. + date_created: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date and time in GMT that this resource was created specified + in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + date_updated: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date and time in GMT that this resource was last updated, + specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + api_version: + type: string + nullable: true + description: The API version used to create this conference. + friendly_name: + type: string + nullable: true + description: A string that you assigned to describe this conference room. + Maxiumum length is 128 characters. + region: + type: string + nullable: true + description: A string that represents the Twilio Region where the conference + audio was mixed. May be `us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, and + `jp1`. Basic conference audio will always be mixed in `us1`. Global Conference + audio will be mixed nearest to the majority of participants. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CF[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify this Conference + resource. + status: + type: string + $ref: '#/components/schemas/conference_enum_status' + nullable: true + description: 'The status of this conference. Can be: `init`, `in-progress`, + or `completed`.' + uri: + type: string + nullable: true + description: The URI of this resource, relative to `https://api.twilio.com`. + subresource_uris: + type: object + format: uri-map + nullable: true + description: A list of related resources identified by their URIs relative + to `https://api.twilio.com`. + reason_conference_ended: + type: string + $ref: '#/components/schemas/conference_enum_reason_conference_ended' + nullable: true + description: 'The reason why a conference ended. When a conference is in + progress, will be `null`. When conference is completed, can be: `conference-ended-via-api`, + `participant-with-end-conference-on-exit-left`, `participant-with-end-conference-on-exit-kicked`, + `last-participant-kicked`, or `last-participant-left`.' + call_sid_ending_conference: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + nullable: true + description: The call SID that caused the conference to end. + conference_enum_status: + type: string + enum: + - init + - in-progress + - completed + conference_enum_update_status: + type: string + enum: + - completed + conference_enum_reason_conference_ended: + type: string + enum: + - conference-ended-via-api + - participant-with-end-conference-on-exit-left + - participant-with-end-conference-on-exit-kicked + - last-participant-kicked + - last-participant-left + conference.conference_recording: + 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 Conference Recording resource. + api_version: + type: string + nullable: true + description: The API version used to create the recording. + call_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the Conference Recording resource is associated with. + conference_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CF[0-9a-fA-F]{32}$ + nullable: true + description: The Conference SID that identifies the conference associated + with the recording. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + start_time: + type: string + format: date-time-rfc-2822 + nullable: true + description: The start time of the recording in GMT and in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. + duration: + type: string + nullable: true + description: The length of the recording in seconds. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the Conference + Recording resource. + price: + type: string + nullable: true + description: The one-time cost of creating the recording in the `price_unit` + currency. + price_unit: + type: string + format: currency + nullable: true + description: 'The currency used in the `price` property. Example: `USD`.' + status: + type: string + $ref: '#/components/schemas/conference_recording_enum_status' + nullable: true + description: 'The status of the recording. Can be: `processing`, `completed` + and `absent`. For more detailed statuses on in-progress recordings, check + out how to [Update a Recording Resource](https://www.twilio.com/docs/voice/api/recording#update-a-recording-resource).' + channels: + type: integer + nullable: true + description: 'The number of channels in the final recording file. Can be: + `1`, or `2`. Separating a two leg call into two separate channels of the + recording file is supported in [Dial](https://www.twilio.com/docs/voice/twiml/dial#attributes-record) + and [Outbound Rest API](https://www.twilio.com/docs/voice/make-calls) + record options.' + source: + type: string + $ref: '#/components/schemas/conference_recording_enum_source' + nullable: true + description: 'How the recording was created. Can be: `DialVerb`, `Conference`, + `OutboundAPI`, `Trunking`, `RecordVerb`, `StartCallRecordingAPI`, `StartConferenceRecordingAPI`.' + error_code: + type: integer + nullable: true + description: The error code that describes why the recording is `absent`. + The error code is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + This value is null if the recording `status` is not `absent`. + encryption_details: + nullable: true + description: How to decrypt the recording if it was encrypted using [Call + Recording Encryption](https://www.twilio.com/docs/voice/tutorials/voice-recording-encryption) + feature. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + conference_recording_enum_status: + type: string + enum: + - in-progress + - paused + - stopped + - processing + - completed + - absent + conference_recording_enum_source: + type: string + enum: + - DialVerb + - Conference + - OutboundAPI + - Trunking + - RecordVerb + - StartCallRecordingAPI + - StartConferenceRecordingAPI + connect_app: + 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 ConnectApp resource. + authorize_redirect_url: + type: string + format: uri + nullable: true + description: The URL we redirect the user to after we authenticate the user + and obtain authorization to access the Connect App. + company_name: + type: string + nullable: true + description: The company name set for the Connect App. + deauthorize_callback_method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + nullable: true + description: The HTTP method we use to call `deauthorize_callback_url`. + deauthorize_callback_url: + type: string + format: uri + nullable: true + description: The URL we call using the `deauthorize_callback_method` to + de-authorize the Connect App. + description: + type: string + nullable: true + description: The description of the Connect App. + friendly_name: + type: string + nullable: true + description: The string that you assigned to describe the resource. + homepage_url: + type: string + format: uri + nullable: true + description: The public URL where users can obtain more information about + this Connect App. + permissions: + type: array + items: + type: string + $ref: '#/components/schemas/connect_app_enum_permission' + nullable: true + description: The set of permissions that your ConnectApp requests. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CN[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the ConnectApp + resource. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + connect_app_enum_permission: + type: string + enum: + - get-all + - post-all + address.dependent_phone_number: + type: object + properties: + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the DependentPhoneNumber + resource. + 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 DependentPhoneNumber resource. + friendly_name: + type: string + format: phone-number + nullable: true + description: The string that you assigned to describe the resource. + phone_number: + type: string + format: phone-number + nullable: true + description: The 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. + voice_url: + type: string + format: uri + nullable: true + description: The URL we call when the phone number receives a call. The + `voice_url` will not be used if a `voice_application_sid` or a `trunk_sid` + is set. + 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_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`.' + voice_fallback_url: + type: string + format: uri + nullable: true + description: The URL that we call when an error occurs retrieving or executing + the TwiML requested by `url`. + voice_caller_id_lookup: + type: boolean + nullable: true + description: 'Whether we look up the caller''s caller-ID name from the CNAM + database. Can be: `true` or `false`. Caller ID lookups can cost $0.01 + each.' + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + sms_fallback_method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + nullable: true + description: 'The HTTP method we use to call `sms_fallback_url`. Can be: + `GET` or `POST`.' + sms_fallback_url: + type: string + format: uri + nullable: true + description: The URL that we call when an error occurs while retrieving + or executing the TwiML from `sms_url`. + sms_method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + nullable: true + description: 'The HTTP method we use to call `sms_url`. Can be: `GET` or + `POST`.' + sms_url: + type: string + format: uri + nullable: true + description: The URL we call when the phone number receives an incoming + SMS message. + address_requirements: + type: string + $ref: '#/components/schemas/dependent_phone_number_enum_address_requirement' + nullable: true + description: 'Whether the phone number requires an [Address](https://www.twilio.com/docs/usage/api/address) + registered with Twilio. Can be: `none`, `any`, `local`, or `foreign`.' + capabilities: + nullable: true + description: 'The set of Boolean properties that indicates whether a phone + number can receive calls or messages. Capabilities are `Voice`, `SMS`, + and `MMS` and each capability can be: `true` or `false`.' + status_callback: + type: string + format: uri + nullable: true + description: The URL we call using the `status_callback_method` to send + status information to your application. + 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`. Can be: + `GET` or `POST`.' + api_version: + type: string + nullable: true + description: The API version used to start a new TwiML session. + sms_application_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the application that handles SMS messages sent to + the phone number. If an `sms_application_sid` is present, we ignore all + `sms_*_url` values and use those of the application. + voice_application_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the application that handles calls to the phone + number. If a `voice_application_sid` is present, we ignore all of the + voice urls and use those set on the application. Setting a `voice_application_sid` + will automatically delete your `trunk_sid` and vice versa. + trunk_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^TK[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Trunk that handles calls to the phone number. + If a `trunk_sid` is present, we ignore all of the voice urls and voice + applications and use those set on the Trunk. Setting a `trunk_sid` will + automatically delete your `voice_application_sid` and vice versa. + emergency_status: + type: string + $ref: '#/components/schemas/dependent_phone_number_enum_emergency_status' + nullable: true + description: Whether the phone number is enabled for emergency calling. + emergency_address_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the emergency address configuration that we use + for emergency calling from the phone number. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + dependent_phone_number_enum_address_requirement: + type: string + enum: + - none + - any + - local + - foreign + dependent_phone_number_enum_emergency_status: + type: string + enum: + - Active + - Inactive + incoming_phone_number: + 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 this IncomingPhoneNumber resource. + address_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Address resource associated with the phone number. + address_requirements: + type: string + $ref: '#/components/schemas/incoming_phone_number_enum_address_requirement' + nullable: true + description: 'Whether the phone number requires an [Address](https://www.twilio.com/docs/usage/api/address) + registered with Twilio. Can be: `none`, `any`, `local`, or `foreign`.' + api_version: + type: string + nullable: true + description: The API version used to start a new TwiML session. + beta: + type: boolean + nullable: true + description: 'Whether the phone number is new to the Twilio platform. Can + be: `true` or `false`.' + capabilities: + type: object + format: phone-number-capabilities + properties: + mms: + type: boolean + sms: + type: boolean + voice: + type: boolean + fax: + type: boolean + nullable: true + description: 'The set of Boolean properties that indicate whether a phone + number can receive calls or messages. Capabilities are `Voice`, `SMS`, + and `MMS` and each capability can be: `true` or `false`.' + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + friendly_name: + type: string + nullable: true + description: The string that you assigned to describe the resource. + identity_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RI[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Identity resource that we associate with the + phone number. Some regions require an Identity to meet local regulations. + phone_number: + type: string + format: phone-number + nullable: true + description: The 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. + origin: + type: string + nullable: true + description: The phone number's origin. `twilio` identifies Twilio-owned + phone numbers and `hosted` identifies hosted phone numbers. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify this IncomingPhoneNumber + resource. + sms_application_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the application that handles SMS messages sent to + the phone number. If an `sms_application_sid` is present, we ignore all + `sms_*_url` values and use those of the application. + sms_fallback_method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + nullable: true + description: 'The HTTP method we use to call `sms_fallback_url`. Can be: + `GET` or `POST`.' + sms_fallback_url: + type: string + format: uri + nullable: true + description: The URL that we call when an error occurs while retrieving + or executing the TwiML from `sms_url`. + sms_method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + nullable: true + description: 'The HTTP method we use to call `sms_url`. Can be: `GET` or + `POST`.' + sms_url: + type: string + format: uri + nullable: true + description: The URL we call when the phone number receives an incoming + SMS message. + status_callback: + type: string + format: uri + nullable: true + description: The URL we call using the `status_callback_method` to send + status information to your application. + 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`. Can be: + `GET` or `POST`.' + trunk_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^TK[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Trunk that handles calls to the phone number. + If a `trunk_sid` is present, we ignore all of the voice urls and voice + applications and use those set on the Trunk. Setting a `trunk_sid` will + automatically delete your `voice_application_sid` and vice versa. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + voice_receive_mode: + type: string + $ref: '#/components/schemas/incoming_phone_number_enum_voice_receive_mode' + nullable: true + voice_application_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the application that handles calls to the phone + number. If a `voice_application_sid` is present, we ignore all of the + voice urls and use those set on the application. Setting a `voice_application_sid` + will automatically delete your `trunk_sid` and vice versa. + voice_caller_id_lookup: + type: boolean + nullable: true + description: 'Whether we look up the caller''s caller-ID name from the CNAM + database ($0.01 per look up). Can be: `true` or `false`.' + 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`.' + voice_fallback_url: + type: string + format: uri + nullable: true + description: The URL that we call when an error occurs retrieving or executing + the TwiML requested by `url`. + 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_url: + type: string + format: uri + nullable: true + description: The URL we call when the phone number receives a call. The + `voice_url` will not be used if a `voice_application_sid` or a `trunk_sid` + is set. + emergency_status: + type: string + $ref: '#/components/schemas/incoming_phone_number_enum_emergency_status' + nullable: true + description: The parameter displays if emergency calling is enabled for + this number. Active numbers may place emergency calls by dialing valid + emergency numbers for the country. + emergency_address_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the emergency address configuration that we use + for emergency calling from this phone number. + emergency_address_status: + type: string + $ref: '#/components/schemas/incoming_phone_number_enum_emergency_address_status' + nullable: true + description: The status of address registration with emergency services. + A registered emergency address will be used during handling of emergency + calls from this number. + bundle_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^BU[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Bundle resource that you associate with the + phone number. Some regions require a Bundle to meet local Regulations. + status: + type: string + nullable: true + incoming_phone_number_enum_address_requirement: + type: string + enum: + - none + - any + - local + - foreign + incoming_phone_number_enum_emergency_status: + type: string + enum: + - Active + - Inactive + incoming_phone_number_enum_emergency_address_status: + type: string + enum: + - registered + - unregistered + - pending-registration + - registration-failure + - pending-unregistration + - unregistration-failure + incoming_phone_number_enum_voice_receive_mode: + type: string + enum: + - voice + - fax + incoming_phone_number.incoming_phone_number_assigned_add_on: + type: object + properties: + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XE[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the resource. + 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 resource. + resource_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Phone Number to which the Add-on is assigned. + friendly_name: + type: string + nullable: true + description: The string that you assigned to describe the resource. + description: + type: string + nullable: true + description: A short description of the functionality that the Add-on provides. + configuration: + nullable: true + description: A JSON string that represents the current configuration of + this Add-on installation. + unique_name: + type: string + nullable: true + description: An application-defined string that uniquely identifies the + resource. It can be used in place of the resource's `sid` in the URL to + address the resource. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + subresource_uris: + type: object + format: uri-map + nullable: true + description: A list of related resources identified by their relative URIs. + ? incoming_phone_number.incoming_phone_number_assigned_add_on.incoming_phone_number_assigned_add_on_extension + : type: object + properties: + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XF[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the resource. + 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 resource. + resource_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Phone Number to which the Add-on is assigned. + assigned_add_on_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XE[0-9a-fA-F]{32}$ + nullable: true + description: The SID that uniquely identifies the assigned Add-on installation. + friendly_name: + type: string + nullable: true + description: The string that you assigned to describe the resource. + product_name: + type: string + nullable: true + description: A string that you assigned to describe the Product this Extension + is used within. + unique_name: + type: string + nullable: true + description: An application-defined string that uniquely identifies the + resource. It can be used in place of the resource's `sid` in the URL to + address the resource. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + enabled: + type: boolean + nullable: true + description: Whether the Extension will be invoked. + incoming_phone_number.incoming_phone_number_local: + 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 resource. + address_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Address resource associated with the phone number. + address_requirements: + type: string + $ref: '#/components/schemas/incoming_phone_number_local_enum_address_requirement' + nullable: true + description: 'Whether the phone number requires an [Address](https://www.twilio.com/docs/usage/api/address) + registered with Twilio. Can be: `none`, `any`, `local`, or `foreign`.' + api_version: + type: string + nullable: true + description: The API version used to start a new TwiML session. + beta: + type: boolean + nullable: true + description: 'Whether the phone number is new to the Twilio platform. Can + be: `true` or `false`.' + capabilities: + type: object + format: phone-number-capabilities + properties: + mms: + type: boolean + sms: + type: boolean + voice: + type: boolean + fax: + type: boolean + nullable: true + description: 'The set of Boolean properties that indicate whether a phone + number can receive calls or messages. Capabilities are `Voice`, `SMS`, + and `MMS` and each capability can be: `true` or `false`.' + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + friendly_name: + type: string + nullable: true + description: The string that you assigned to describe the resource. + identity_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RI[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Identity resource that we associate with the + phone number. Some regions require an Identity to meet local regulations. + phone_number: + type: string + format: phone-number + nullable: true + description: The 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. + origin: + type: string + nullable: true + description: The phone number's origin. `twilio` identifies Twilio-owned + phone numbers and `hosted` identifies hosted phone numbers. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the resource. + sms_application_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the application that handles SMS messages sent to + the phone number. If an `sms_application_sid` is present, we ignore all + `sms_*_url` values and use those of the application. + sms_fallback_method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + nullable: true + description: 'The HTTP method we use to call `sms_fallback_url`. Can be: + `GET` or `POST`.' + sms_fallback_url: + type: string + format: uri + nullable: true + description: The URL that we call when an error occurs while retrieving + or executing the TwiML from `sms_url`. + sms_method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + nullable: true + description: 'The HTTP method we use to call `sms_url`. Can be: `GET` or + `POST`.' + sms_url: + type: string + format: uri + nullable: true + description: The URL we call when the phone number receives an incoming + SMS message. + status_callback: + type: string + format: uri + nullable: true + description: The URL we call using the `status_callback_method` to send + status information to your application. + 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`. Can be: + `GET` or `POST`.' + trunk_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^TK[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Trunk that handles calls to the phone number. + If a `trunk_sid` is present, we ignore all of the voice urls and voice + applications and use those set on the Trunk. Setting a `trunk_sid` will + automatically delete your `voice_application_sid` and vice versa. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + voice_receive_mode: + type: string + $ref: '#/components/schemas/incoming_phone_number_local_enum_voice_receive_mode' + nullable: true + voice_application_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the application that handles calls to the phone + number. If a `voice_application_sid` is present, we ignore all of the + voice urls and use those set on the application. Setting a `voice_application_sid` + will automatically delete your `trunk_sid` and vice versa. + voice_caller_id_lookup: + type: boolean + nullable: true + description: 'Whether we look up the caller''s caller-ID name from the CNAM + database ($0.01 per look up). Can be: `true` or `false`.' + 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`.' + voice_fallback_url: + type: string + format: uri + nullable: true + description: The URL that we call when an error occurs retrieving or executing + the TwiML requested by `url`. + 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_url: + type: string + format: uri + nullable: true + description: The URL we call when this phone number receives a call. The + `voice_url` will not be used if a `voice_application_sid` or a `trunk_sid` + is set. + emergency_status: + type: string + $ref: '#/components/schemas/incoming_phone_number_local_enum_emergency_status' + nullable: true + description: The parameter displays if emergency calling is enabled for + this number. Active numbers may place emergency calls by dialing valid + emergency numbers for the country. + emergency_address_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the emergency address configuration that we use + for emergency calling from this phone number. + emergency_address_status: + type: string + $ref: '#/components/schemas/incoming_phone_number_local_enum_emergency_address_status' + nullable: true + description: The status of address registration with emergency services. + A registered emergency address will be used during handling of emergency + calls from this number. + bundle_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^BU[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Bundle resource that you associate with the + phone number. Some regions require a Bundle to meet local Regulations. + status: + type: string + nullable: true + incoming_phone_number_local_enum_address_requirement: + type: string + enum: + - none + - any + - local + - foreign + incoming_phone_number_local_enum_emergency_status: + type: string + enum: + - Active + - Inactive + incoming_phone_number_local_enum_emergency_address_status: + type: string + enum: + - registered + - unregistered + - pending-registration + - registration-failure + - pending-unregistration + - unregistration-failure + incoming_phone_number_local_enum_voice_receive_mode: + type: string + enum: + - voice + - fax + incoming_phone_number.incoming_phone_number_mobile: + 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 resource. + address_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Address resource associated with the phone number. + address_requirements: + type: string + $ref: '#/components/schemas/incoming_phone_number_mobile_enum_address_requirement' + nullable: true + description: 'Whether the phone number requires an [Address](https://www.twilio.com/docs/usage/api/address) + registered with Twilio. Can be: `none`, `any`, `local`, or `foreign`.' + api_version: + type: string + nullable: true + description: The API version used to start a new TwiML session. + beta: + type: boolean + nullable: true + description: 'Whether the phone number is new to the Twilio platform. Can + be: `true` or `false`.' + capabilities: + type: object + format: phone-number-capabilities + properties: + mms: + type: boolean + sms: + type: boolean + voice: + type: boolean + fax: + type: boolean + nullable: true + description: 'The set of Boolean properties that indicate whether a phone + number can receive calls or messages. Capabilities are `Voice`, `SMS`, + and `MMS` and each capability can be: `true` or `false`.' + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + friendly_name: + type: string + nullable: true + description: The string that you assigned to describe the resource. + identity_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RI[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Identity resource that we associate with the + phone number. Some regions require an Identity to meet local regulations. + phone_number: + type: string + format: phone-number + nullable: true + description: The 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. + origin: + type: string + nullable: true + description: The phone number's origin. `twilio` identifies Twilio-owned + phone numbers and `hosted` identifies hosted phone numbers. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the resource. + sms_application_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the application that handles SMS messages sent to + the phone number. If an `sms_application_sid` is present, we ignore all + `sms_*_url` values and use those of the application. + sms_fallback_method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + nullable: true + description: 'The HTTP method we use to call `sms_fallback_url`. Can be: + `GET` or `POST`.' + sms_fallback_url: + type: string + format: uri + nullable: true + description: The URL that we call when an error occurs while retrieving + or executing the TwiML from `sms_url`. + sms_method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + nullable: true + description: 'The HTTP method we use to call `sms_url`. Can be: `GET` or + `POST`.' + sms_url: + type: string + format: uri + nullable: true + description: The URL we call when the phone number receives an incoming + SMS message. + status_callback: + type: string + format: uri + nullable: true + description: The URL we call using the `status_callback_method` to send + status information to your application. + 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`. Can be: + `GET` or `POST`.' + trunk_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^TK[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Trunk that handles calls to the phone number. + If a `trunk_sid` is present, we ignore all of the voice urls and voice + applications and use those set on the Trunk. Setting a `trunk_sid` will + automatically delete your `voice_application_sid` and vice versa. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + voice_receive_mode: + type: string + $ref: '#/components/schemas/incoming_phone_number_mobile_enum_voice_receive_mode' + nullable: true + voice_application_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the application that handles calls to the phone + number. If a `voice_application_sid` is present, we ignore all of the + voice urls and use those set on the application. Setting a `voice_application_sid` + will automatically delete your `trunk_sid` and vice versa. + voice_caller_id_lookup: + type: boolean + nullable: true + description: 'Whether we look up the caller''s caller-ID name from the CNAM + database ($0.01 per look up). Can be: `true` or `false`.' + 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`.' + voice_fallback_url: + type: string + format: uri + nullable: true + description: The URL that we call when an error occurs retrieving or executing + the TwiML requested by `url`. + 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_url: + type: string + format: uri + nullable: true + description: The URL we call when the phone number receives a call. The + `voice_url` will not be used if a `voice_application_sid` or a `trunk_sid` + is set. + emergency_status: + type: string + $ref: '#/components/schemas/incoming_phone_number_mobile_enum_emergency_status' + nullable: true + description: The parameter displays if emergency calling is enabled for + this number. Active numbers may place emergency calls by dialing valid + emergency numbers for the country. + emergency_address_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the emergency address configuration that we use + for emergency calling from this phone number. + emergency_address_status: + type: string + $ref: '#/components/schemas/incoming_phone_number_mobile_enum_emergency_address_status' + nullable: true + description: The status of address registration with emergency services. + A registered emergency address will be used during handling of emergency + calls from this number. + bundle_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^BU[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Bundle resource that you associate with the + phone number. Some regions require a Bundle to meet local Regulations. + status: + type: string + nullable: true + incoming_phone_number_mobile_enum_address_requirement: + type: string + enum: + - none + - any + - local + - foreign + incoming_phone_number_mobile_enum_emergency_status: + type: string + enum: + - Active + - Inactive + incoming_phone_number_mobile_enum_emergency_address_status: + type: string + enum: + - registered + - unregistered + - pending-registration + - registration-failure + - pending-unregistration + - unregistration-failure + incoming_phone_number_mobile_enum_voice_receive_mode: + type: string + enum: + - voice + - fax + incoming_phone_number.incoming_phone_number_toll_free: + 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 resource. + address_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Address resource associated with the phone number. + address_requirements: + type: string + $ref: '#/components/schemas/incoming_phone_number_toll_free_enum_address_requirement' + nullable: true + description: 'Whether the phone number requires an [Address](https://www.twilio.com/docs/usage/api/address) + registered with Twilio. Can be: `none`, `any`, `local`, or `foreign`.' + api_version: + type: string + nullable: true + description: The API version used to start a new TwiML session. + beta: + type: boolean + nullable: true + description: 'Whether the phone number is new to the Twilio platform. Can + be: `true` or `false`.' + capabilities: + type: object + format: phone-number-capabilities + properties: + mms: + type: boolean + sms: + type: boolean + voice: + type: boolean + fax: + type: boolean + nullable: true + description: 'The set of Boolean properties that indicate whether a phone + number can receive calls or messages. Capabilities are `Voice`, `SMS`, + and `MMS` and each capability can be: `true` or `false`.' + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + friendly_name: + type: string + nullable: true + description: The string that you assigned to describe the resource. + identity_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RI[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Identity resource that we associate with the + phone number. Some regions require an Identity to meet local regulations. + phone_number: + type: string + format: phone-number + nullable: true + description: The 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. + origin: + type: string + nullable: true + description: The phone number's origin. `twilio` identifies Twilio-owned + phone numbers and `hosted` identifies hosted phone numbers. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the resource. + sms_application_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the application that handles SMS messages sent to + the phone number. If an `sms_application_sid` is present, we ignore all + `sms_*_url` values and use those of the application. + sms_fallback_method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + nullable: true + description: 'The HTTP method we use to call `sms_fallback_url`. Can be: + `GET` or `POST`.' + sms_fallback_url: + type: string + format: uri + nullable: true + description: The URL that we call when an error occurs while retrieving + or executing the TwiML from `sms_url`. + sms_method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + nullable: true + description: 'The HTTP method we use to call `sms_url`. Can be: `GET` or + `POST`.' + sms_url: + type: string + format: uri + nullable: true + description: The URL we call when the phone number receives an incoming + SMS message. + status_callback: + type: string + format: uri + nullable: true + description: The URL we call using the `status_callback_method` to send + status information to your application. + 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`. Can be: + `GET` or `POST`.' + trunk_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^TK[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Trunk that handles calls to the phone number. + If a `trunk_sid` is present, we ignore all of the voice urls and voice + applications and use those set on the Trunk. Setting a `trunk_sid` will + automatically delete your `voice_application_sid` and vice versa. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + voice_receive_mode: + type: string + $ref: '#/components/schemas/incoming_phone_number_toll_free_enum_voice_receive_mode' + nullable: true + voice_application_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the application that handles calls to the phone + number. If a `voice_application_sid` is present, we ignore all of the + voice urls and use those set on the application. Setting a `voice_application_sid` + will automatically delete your `trunk_sid` and vice versa. + voice_caller_id_lookup: + type: boolean + nullable: true + description: 'Whether we look up the caller''s caller-ID name from the CNAM + database ($0.01 per look up). Can be: `true` or `false`.' + 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`.' + voice_fallback_url: + type: string + format: uri + nullable: true + description: The URL that we call when an error occurs retrieving or executing + the TwiML requested by `url`. + 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_url: + type: string + format: uri + nullable: true + description: The URL we call when the phone number receives a call. The + `voice_url` will not be used if a `voice_application_sid` or a `trunk_sid` + is set. + emergency_status: + type: string + $ref: '#/components/schemas/incoming_phone_number_toll_free_enum_emergency_status' + nullable: true + description: The parameter displays if emergency calling is enabled for + this number. Active numbers may place emergency calls by dialing valid + emergency numbers for the country. + emergency_address_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the emergency address configuration that we use + for emergency calling from this phone number. + emergency_address_status: + type: string + $ref: '#/components/schemas/incoming_phone_number_toll_free_enum_emergency_address_status' + nullable: true + description: The status of address registration with emergency services. + A registered emergency address will be used during handling of emergency + calls from this number. + bundle_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^BU[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Bundle resource that you associate with the + phone number. Some regions require a Bundle to meet local Regulations. + status: + type: string + nullable: true + incoming_phone_number_toll_free_enum_address_requirement: + type: string + enum: + - none + - any + - local + - foreign + incoming_phone_number_toll_free_enum_emergency_status: + type: string + enum: + - Active + - Inactive + incoming_phone_number_toll_free_enum_emergency_address_status: + type: string + enum: + - registered + - unregistered + - pending-registration + - registration-failure + - pending-unregistration + - unregistration-failure + incoming_phone_number_toll_free_enum_voice_receive_mode: + type: string + enum: + - voice + - fax + key: + type: object + properties: + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SK[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the Key + resource. + friendly_name: + type: string + nullable: true + description: The string that you assigned to describe the resource. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + message.media: + 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) + associated with this Media resource. + content_type: + type: string + nullable: true + description: The default [MIME type](https://en.wikipedia.org/wiki/Internet_media_type) + of the media, for example `image/jpeg`, `image/png`, or `image/gif`. + date_created: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date and time in GMT when this Media resource was created, + specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + date_updated: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date and time in GMT when this Media resource was last + updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) + format. + parent_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^(SM|MM)[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Message resource that is associated with this + Media resource. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^ME[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that identifies this Media resource. + uri: + type: string + nullable: true + description: The URI of this Media resource, relative to `https://api.twilio.com`. + queue.member: + type: object + properties: + call_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the Member resource is associated with. + date_enqueued: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that the member was enqueued, given in RFC 2822 format. + position: + type: integer + nullable: true + description: This member's current position in the queue. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + wait_time: + type: integer + nullable: true + description: The number of seconds the member has been in the queue. + queue_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^QU[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Queue the member is in. + message: + type: object + properties: + body: + type: string + nullable: true + description: The text content of the message + num_segments: + type: string + nullable: true + description: 'The number of segments that make up the complete message. + SMS message bodies that exceed the [character limit](https://www.twilio.com/docs/glossary/what-sms-character-limit) + are segmented and charged as multiple messages. Note: For messages sent + via a Messaging Service, `num_segments` is initially `0`, since a sender + hasn''t yet been assigned.' + direction: + type: string + $ref: '#/components/schemas/message_enum_direction' + nullable: true + description: 'The direction of the message. Can be: `inbound` for incoming + messages, `outbound-api` for messages created by the REST API, `outbound-call` + for messages created during a call, or `outbound-reply` for messages created + in response to an incoming message.' + from: + type: string + format: phone-number + nullable: true + description: The sender's phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) + format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), + [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), + [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel + address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). + For incoming messages, this is the number or channel address of the sender. + For outgoing messages, this value is a Twilio phone number, alphanumeric + sender ID, short code, or channel address from which the message is sent. + to: + type: string + nullable: true + description: The recipient's phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) + format) or [channel address](https://www.twilio.com/docs/messaging/channels) + (e.g. `whatsapp:+15552229999`) + date_updated: + type: string + format: date-time-rfc-2822 + nullable: true + description: The [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) + timestamp (in GMT) of when the Message resource was last updated + price: + type: string + nullable: true + description: The amount billed for the message in the currency specified + by `price_unit`. The `price` is populated after the message has been sent/received, + and may not be immediately availalble. View the [Pricing page](https://www.twilio.com/en-us/pricing) + for more details. + error_message: + type: string + nullable: true + description: The description of the `error_code` if the Message `status` + is `failed` or `undelivered`. If no error was encountered, the value is + `null`. + uri: + type: string + nullable: true + description: The URI of the Message resource, relative to `https://api.twilio.com`. + 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) + associated with the Message resource + num_media: + type: string + nullable: true + description: The number of media files associated with the Message resource. + status: + type: string + $ref: '#/components/schemas/message_enum_status' + nullable: true + description: 'The status of the Message. Possible values: `accepted`, `scheduled`, + `canceled`, `queued`, `sending`, `sent`, `failed`, `delivered`, `undelivered`, + `receiving`, `received`, or `read` (WhatsApp only). For more information, + See [detailed descriptions](https://www.twilio.com/docs/sms/api/message-resource#message-status-values).' + messaging_service_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^MG[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) + associated with the Message resource. The value is `null` if a Messaging + Service was not used. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^(SM|MM)[0-9a-fA-F]{32}$ + nullable: true + description: The unique, Twilio-provided string that identifies the Message + resource. + date_sent: + type: string + format: date-time-rfc-2822 + nullable: true + description: The [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) + timestamp (in GMT) of when the Message was sent. For an outgoing message, + this is when Twilio sent the message. For an incoming message, this is + when Twilio sent the HTTP request to your incoming message webhook URL. + date_created: + type: string + format: date-time-rfc-2822 + nullable: true + description: The [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) + timestamp (in GMT) of when the Message resource was created + error_code: + type: integer + nullable: true + description: The [error code](https://www.twilio.com/docs/api/errors) returned + if the Message `status` is `failed` or `undelivered`. If no error was + encountered, the value is `null`. + price_unit: + type: string + format: currency + nullable: true + description: The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) + format (e.g. `usd`, `eur`, `jpy`). + api_version: + type: string + nullable: true + description: The API version used to process the Message + subresource_uris: + type: object + format: uri-map + nullable: true + description: A list of related resources identified by their URIs relative + to `https://api.twilio.com` + message_enum_status: + type: string + enum: + - queued + - sending + - sent + - failed + - delivered + - undelivered + - receiving + - received + - accepted + - scheduled + - read + - partially_delivered + - canceled + message_enum_update_status: + type: string + enum: + - canceled + message_enum_direction: + type: string + enum: + - inbound + - outbound-api + - outbound-call + - outbound-reply + message_enum_content_retention: + type: string + enum: + - retain + - discard + message_enum_address_retention: + type: string + enum: + - retain + - obfuscate + message_enum_traffic_type: + type: string + enum: + - free + message_enum_schedule_type: + type: string + enum: + - fixed + message_enum_risk_check: + type: string + enum: + - enable + - disable + message.message_feedback: + 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) + associated with this MessageFeedback resource. + message_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^(SM|MM)[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Message resource associated with this MessageFeedback + resource. + outcome: + type: string + $ref: '#/components/schemas/message_feedback_enum_outcome' + nullable: true + description: 'Reported outcome indicating whether there is confirmation + that the Message recipient performed a tracked user action. Can be: `unconfirmed` + or `confirmed`. For more details see [How to Optimize Message Deliverability + with Message Feedback](https://www.twilio.com/docs/sms/send-message-feedback-to-twilio).' + date_created: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date and time in GMT when this MessageFeedback resource + was created, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) + format. + date_updated: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date and time in GMT when this MessageFeedback resource + was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) + format. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + message_feedback_enum_outcome: + type: string + enum: + - confirmed + - unconfirmed + new_key: + type: object + properties: + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SK[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the NewKey + resource. You will use this as the basic-auth `user` when authenticating + to the API. + friendly_name: + type: string + nullable: true + description: The string that you assigned to describe the resource. + date_created: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date and time in GMT that the API Key was created specified + in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + date_updated: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date and time in GMT that the new API Key was last updated + specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + secret: + type: string + nullable: true + description: The secret your application uses to sign Access Tokens and + to authenticate to the REST API (you will use this as the basic-auth `password`). **Note + that for security reasons, this field is ONLY returned when the API Key + is first created.** + new_signing_key: + type: object + properties: + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SK[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the NewSigningKey + resource. + friendly_name: + type: string + nullable: true + description: The string that you assigned to describe the resource. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + secret: + type: string + nullable: true + description: The secret your application uses to sign Access Tokens and + to authenticate to the REST API (you will use this as the basic-auth `password`). **Note + that for security reasons, this field is ONLY returned when the API Key + is first created.** + notification: + 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 Notification resource. + api_version: + type: string + nullable: true + description: The API version used to generate the notification. Can be empty + for events that don't have a specific API version, such as incoming phone + calls. + call_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the Notification resource is associated with. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + error_code: + type: string + nullable: true + description: A unique error code for the error condition that is described + in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + log: + type: string + nullable: true + description: 'An integer log level that corresponds to the type of notification: + `0` is ERROR, `1` is WARNING.' + message_date: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date the notification was actually generated in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) + format. Message buffering can cause this value to differ from `date_created`. + message_text: + type: string + nullable: true + description: The text of the notification. + more_info: + type: string + format: uri + nullable: true + description: The URL for more information about the error condition. This + value is a page in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + request_method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + nullable: true + description: The HTTP method used to generate the notification. If the notification + was generated during a phone call, this is the HTTP Method used to request + the resource on your server. If the notification was generated by your + use of our REST API, this is the HTTP method used to call the resource + on our servers. + request_url: + type: string + format: uri + nullable: true + description: The URL of the resource that generated the notification. If + the notification was generated during a phone call, this is the URL of + the resource on your server that caused the notification. If the notification + was generated by your use of our REST API, this is the URL of the resource + you called. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^NO[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the Notification + resource. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + notification-instance: + 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 Notification resource. + api_version: + type: string + nullable: true + description: The API version used to generate the notification. Can be empty + for events that don't have a specific API version, such as incoming phone + calls. + call_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the Notification resource is associated with. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + error_code: + type: string + nullable: true + description: A unique error code for the error condition that is described + in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + log: + type: string + nullable: true + description: 'An integer log level that corresponds to the type of notification: + `0` is ERROR, `1` is WARNING.' + message_date: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date the notification was actually generated in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) + format. Message buffering can cause this value to differ from `date_created`. + message_text: + type: string + nullable: true + description: The text of the notification. + more_info: + type: string + format: uri + nullable: true + description: The URL for more information about the error condition. This + value is a page in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + request_method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + nullable: true + description: The HTTP method used to generate the notification. If the notification + was generated during a phone call, this is the HTTP Method used to request + the resource on your server. If the notification was generated by your + use of our REST API, this is the HTTP method used to call the resource + on our servers. + request_url: + type: string + format: uri + nullable: true + description: The URL of the resource that generated the notification. If + the notification was generated during a phone call, this is the URL of + the resource on your server that caused the notification. If the notification + was generated by your use of our REST API, this is the URL of the resource + you called. + request_variables: + type: string + nullable: true + description: The HTTP GET or POST variables we sent to your server. However, + if the notification was generated by our REST API, this contains the HTTP + POST or PUT variables you sent to our API. + response_body: + type: string + nullable: true + description: The HTTP body returned by your server. + response_headers: + type: string + nullable: true + description: The HTTP headers returned by your server. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^NO[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the Notification + resource. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + outgoing_caller_id: + type: object + properties: + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the OutgoingCallerId + resource. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + friendly_name: + type: string + nullable: true + description: The string that you assigned to describe the resource. + 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 OutgoingCallerId resource. + phone_number: + type: string + format: phone-number + nullable: true + description: The 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. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + conference.participant: + 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 Participant resource. + call_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the Participant resource is associated with. + label: + type: string + nullable: true + description: The user-specified label of this participant, if one was given + when the participant was created. This may be used to fetch, update or + delete the participant. + call_sid_to_coach: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the participant who is being `coached`. The participant + being coached is the only participant who can hear the participant who + is `coaching`. + coaching: + type: boolean + nullable: true + description: 'Whether the participant is coaching another call. Can be: + `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` + is defined. If `true`, `call_sid_to_coach` must be defined.' + conference_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CF[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the conference the participant is in. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + end_conference_on_exit: + type: boolean + nullable: true + description: 'Whether the conference ends when the participant leaves. Can + be: `true` or `false` and the default is `false`. If `true`, the conference + ends and all other participants drop out when the participant leaves.' + muted: + type: boolean + nullable: true + description: Whether the participant is muted. Can be `true` or `false`. + hold: + type: boolean + nullable: true + description: Whether the participant is on hold. Can be `true` or `false`. + start_conference_on_enter: + type: boolean + nullable: true + description: 'Whether the conference starts when the participant joins the + conference, if it has not already started. Can be: `true` or `false` and + the default is `true`. If `false` and the conference has not started, + the participant is muted and hears background music until another participant + starts the conference.' + status: + type: string + $ref: '#/components/schemas/participant_enum_status' + nullable: true + description: 'The status of the participant''s call in a session. Can be: + `queued`, `connecting`, `ringing`, `connected`, `complete`, or `failed`.' + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + participant_enum_status: + type: string + enum: + - queued + - connecting + - ringing + - connected + - complete + - failed + call.payments: + 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 Payments resource. + call_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the Payments resource is associated with. This will refer to the call + sid that is producing the payment card (credit/ACH) information thru DTMF. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PK[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Payments resource. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + payments_enum_payment_method: + type: string + enum: + - credit-card + - ach-debit + payments_enum_bank_account_type: + type: string + enum: + - consumer-checking + - consumer-savings + - commercial-checking + payments_enum_token_type: + type: string + enum: + - one-time + - reusable + payments_enum_capture: + type: string + enum: + - payment-card-number + - expiration-date + - security-code + - postal-code + - bank-routing-number + - bank-account-number + payments_enum_status: + type: string + enum: + - complete + - cancel + queue: + type: object + properties: + date_updated: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date and time in GMT that this resource was last updated, + specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + current_size: + type: integer + nullable: true + description: The number of calls currently in the queue. + friendly_name: + type: string + nullable: true + description: A string that you assigned to describe this resource. + uri: + type: string + nullable: true + description: The URI of this resource, relative to `https://api.twilio.com`. + 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 this Queue resource. + average_wait_time: + type: integer + nullable: true + description: ' The average wait time in seconds of the members in this queue. + This is calculated at the time of the request.' + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^QU[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify this Queue + resource. + date_created: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date and time in GMT that this resource was created specified + in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + max_size: + type: integer + nullable: true + description: ' The maximum number of calls that can be in the queue. The + default is 1000 and the maximum is 5000.' + recording: + 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 Recording resource. + api_version: + type: string + nullable: true + description: The API version used during the recording. + call_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the Recording resource is associated with. This will always refer to the + parent leg of a two-leg call. + conference_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CF[0-9a-fA-F]{32}$ + nullable: true + description: The Conference SID that identifies the conference associated + with the recording, if a conference recording. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + start_time: + type: string + format: date-time-rfc-2822 + nullable: true + description: The start time of the recording in GMT and in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. + duration: + type: string + nullable: true + description: The length of the recording in seconds. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the Recording + resource. + price: + type: string + nullable: true + description: The one-time cost of creating the recording in the `price_unit` + currency. + price_unit: + type: string + nullable: true + description: 'The currency used in the `price` property. Example: `USD`.' + status: + type: string + $ref: '#/components/schemas/recording_enum_status' + nullable: true + description: 'The status of the recording. Can be: `processing`, `completed`, + `absent` or `deleted`. For information about more detailed statuses on + in-progress recordings, check out how to [Update a Recording Resource](https://www.twilio.com/docs/voice/api/recording#update-a-recording-resource).' + channels: + type: integer + nullable: true + description: 'The number of channels in the final recording file. Can be: + `1` or `2`. You can split a call with two legs into two separate recording + channels if you record using [TwiML Dial](https://www.twilio.com/docs/voice/twiml/dial#record) + or the [Outbound Rest API](https://www.twilio.com/docs/voice/make-calls#manage-your-outbound-call).' + source: + type: string + $ref: '#/components/schemas/recording_enum_source' + nullable: true + description: 'How the recording was created. Can be: `DialVerb`, `Conference`, + `OutboundAPI`, `Trunking`, `RecordVerb`, `StartCallRecordingAPI`, and + `StartConferenceRecordingAPI`.' + error_code: + type: integer + nullable: true + description: The error code that describes why the recording is `absent`. + The error code is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). + This value is null if the recording `status` is not `absent`. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + encryption_details: + nullable: true + description: How to decrypt the recording if it was encrypted using [Call + Recording Encryption](https://www.twilio.com/docs/voice/tutorials/voice-recording-encryption) + feature. + subresource_uris: + type: object + format: uri-map + nullable: true + description: A list of related resources identified by their relative URIs. + media_url: + type: string + format: uri + nullable: true + description: The URL of the media file associated with this recording resource. + When stored externally, this is the full URL location of the media file. + recording_enum_status: + type: string + enum: + - in-progress + - paused + - stopped + - processing + - completed + - absent + - deleted + recording_enum_source: + type: string + enum: + - DialVerb + - Conference + - OutboundAPI + - Trunking + - RecordVerb + - StartCallRecordingAPI + - StartConferenceRecordingAPI + recording.recording_add_on_result: + type: object + properties: + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XR[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the Recording + AddOnResult resource. + 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 Recording AddOnResult resource. + status: + type: string + $ref: '#/components/schemas/recording_add_on_result_enum_status' + nullable: true + description: 'The status of the result. Can be: `canceled`, `completed`, + `deleted`, `failed`, `in-progress`, `init`, `processing`, `queued`.' + add_on_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XB[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Add-on to which the result belongs. + add_on_configuration_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XE[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Add-on configuration. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + date_completed: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date and time in GMT that the result was completed specified + in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + reference_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the recording to which the AddOnResult resource + belongs. + subresource_uris: + type: object + format: uri-map + nullable: true + description: A list of related resources identified by their relative URIs. + recording_add_on_result_enum_status: + type: string + enum: + - canceled + - completed + - deleted + - failed + - in-progress + - init + - processing + - queued + recording.recording_add_on_result.recording_add_on_result_payload: + type: object + properties: + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XH[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the Recording + AddOnResult Payload resource. + add_on_result_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XR[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the AddOnResult to which the payload belongs. + 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 Recording AddOnResult Payload resource. + label: + type: string + nullable: true + description: The string provided by the vendor that describes the payload. + add_on_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XB[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Add-on to which the result belongs. + add_on_configuration_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XE[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Add-on configuration. + content_type: + type: string + nullable: true + description: The MIME type of the payload. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + reference_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the recording to which the AddOnResult resource + that contains the payload belongs. + subresource_uris: + type: object + format: uri-map + nullable: true + description: A list of related resources identified by their relative URIs. + recording.recording_transcription: + 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 Transcription resource. + api_version: + type: string + nullable: true + description: The API version used to create the transcription. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + duration: + type: string + nullable: true + description: The duration of the transcribed audio in seconds. + price: + type: number + nullable: true + description: The charge for the transcript in the currency associated with + the account. This value is populated after the transcript is complete + so it may not be available immediately. + price_unit: + type: string + format: currency + nullable: true + description: The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) + format (e.g. `usd`, `eur`, `jpy`). + recording_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) + from which the transcription was created. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^TR[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the Transcription + resource. + status: + type: string + $ref: '#/components/schemas/recording_transcription_enum_status' + nullable: true + description: 'The status of the transcription. Can be: `in-progress`, `completed`, + `failed`.' + transcription_text: + type: string + nullable: true + description: The text content of the transcription. + type: + type: string + nullable: true + description: The transcription type. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + recording_transcription_enum_status: + type: string + enum: + - in-progress + - completed + - failed + short_code: + 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 this ShortCode resource. + api_version: + type: string + nullable: true + description: The API version used to start a new TwiML session when an SMS + message is sent to this short code. + date_created: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date and time in GMT that this resource was created specified + in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + date_updated: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date and time in GMT that this resource was last updated, + specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + friendly_name: + type: string + nullable: true + description: A string that you assigned to describe this resource. By default, + the `FriendlyName` is the short code. + short_code: + type: string + nullable: true + description: The short code. e.g., 894546. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SC[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify this ShortCode + resource. + sms_fallback_method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + nullable: true + description: 'The HTTP method we use to call the `sms_fallback_url`. Can + be: `GET` or `POST`.' + sms_fallback_url: + type: string + format: uri + nullable: true + description: The URL that we call if an error occurs while retrieving or + executing the TwiML from `sms_url`. + sms_method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + nullable: true + description: 'The HTTP method we use to call the `sms_url`. Can be: `GET` + or `POST`.' + sms_url: + type: string + format: uri + nullable: true + description: The URL we call when receiving an incoming SMS message to this + short code. + uri: + type: string + nullable: true + description: The URI of this resource, relative to `https://api.twilio.com`. + signing_key: + type: object + properties: + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SK[0-9a-fA-F]{32}$ + nullable: true + friendly_name: + type: string + nullable: true + date_created: + type: string + format: date-time-rfc-2822 + nullable: true + date_updated: + type: string + format: date-time-rfc-2822 + nullable: true + sip: + type: object + properties: {} + sip.sip_domain.sip_auth: + type: object + properties: {} + sip.sip_domain.sip_auth.sip_auth_calls: + type: object + properties: {} + sip.sip_domain.sip_auth.sip_auth_calls.sip_auth_calls_credential_list_mapping: + 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 CredentialListMapping resource. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + friendly_name: + type: string + nullable: true + description: The string that you assigned to describe the resource. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the CredentialListMapping + resource. + sip.sip_domain.sip_auth.sip_auth_calls.sip_auth_calls_ip_access_control_list_mapping: + 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 IpAccessControlListMapping resource. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + friendly_name: + type: string + nullable: true + description: The string that you assigned to describe the resource. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AL[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the IpAccessControlListMapping + resource. + sip.sip_domain.sip_auth.sip_auth_registrations: + type: object + properties: {} + sip.sip_domain.sip_auth.sip_auth_registrations.sip_auth_registrations_credential_list_mapping: + 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 CredentialListMapping resource. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + friendly_name: + type: string + nullable: true + description: The string that you assigned to describe the resource. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the CredentialListMapping + resource. + sip.sip_credential_list.sip_credential: + type: object + properties: + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CR[0-9a-fA-F]{32}$ + nullable: true + description: A 34 character string that uniquely identifies this resource. + account_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + nullable: true + description: The unique id of the Account that is responsible for this resource. + credential_list_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + nullable: true + description: The unique id that identifies the credential list that includes + this credential. + username: + type: string + nullable: true + description: The username for this credential. + date_created: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that this resource was created, given as GMT in [RFC + 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. + date_updated: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that this resource was last updated, given as GMT + in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. + uri: + type: string + nullable: true + description: The URI for this resource, relative to `https://api.twilio.com` + sip.sip_credential_list: + type: object + properties: + account_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + nullable: true + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + that owns this resource. + date_created: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that this resource was created, given as GMT in [RFC + 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. + date_updated: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that this resource was last updated, given as GMT + in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. + friendly_name: + type: string + nullable: true + description: A human readable descriptive text that describes the CredentialList, + up to 64 characters long. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + nullable: true + description: A 34 character string that uniquely identifies this resource. + subresource_uris: + type: object + format: uri-map + nullable: true + description: A list of credentials associated with this credential list. + uri: + type: string + nullable: true + description: The URI for this resource, relative to `https://api.twilio.com`. + sip.sip_domain.sip_credential_list_mapping: + type: object + properties: + account_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + nullable: true + description: The unique id of the Account that is responsible for this resource. + date_created: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that this resource was created, given as GMT in [RFC + 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. + date_updated: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that this resource was last updated, given as GMT + in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. + domain_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that is created to identify the SipDomain + resource. + friendly_name: + type: string + nullable: true + description: A human readable descriptive text for this resource, up to + 64 characters long. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + nullable: true + description: A 34 character string that uniquely identifies this resource. + uri: + type: string + nullable: true + description: The URI for this resource, relative to `https://api.twilio.com` + sip.sip_domain: + 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 SipDomain resource. + api_version: + type: string + nullable: true + description: The API version used to process the call. + auth_type: + type: string + nullable: true + description: 'The types of authentication you have mapped to your domain. + Can be: `IP_ACL` and `CREDENTIAL_LIST`. If you have both defined for your + domain, both will be returned in a comma delimited string. If `auth_type` + is not defined, the domain will not be able to receive any traffic.' + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + domain_name: + type: string + nullable: true + description: The unique address you reserve on Twilio to which you route + your SIP traffic. Domain names can contain letters, digits, and "-" and + must end with `sip.twilio.com`. + friendly_name: + type: string + nullable: true + description: The string that you assigned to describe the resource. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the SipDomain + resource. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + 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`.' + 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`. + 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_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 `voice_status_callback_url`. + Either `GET` or `POST`. + voice_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. + voice_url: + type: string + format: uri + nullable: true + description: The URL we call using the `voice_method` when the domain receives + a call. + subresource_uris: + type: object + format: uri-map + nullable: true + description: A list of mapping resources associated with the SIP Domain + resource identified by their relative URIs. + sip_registration: + type: boolean + nullable: true + description: Whether to allow SIP Endpoints to register with the domain + to receive calls. + emergency_calling_enabled: + type: boolean + nullable: true + description: Whether emergency calling is enabled for the domain. If enabled, + allows emergency calls on the domain from phone numbers with validated + addresses. + secure: + type: boolean + nullable: true + description: Whether secure SIP is enabled for the domain. If enabled, TLS + will be enforced and SRTP will be negotiated on all incoming calls to + this sip domain. + byoc_trunk_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^BY[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the BYOC Trunk(Bring Your Own Carrier) resource + that the Sip Domain will be associated with. + emergency_caller_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + nullable: true + description: Whether an emergency caller sid is configured for the domain. + If present, this phone number will be used as the callback for the emergency + call. + sip.sip_ip_access_control_list: + type: object + properties: + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AL[0-9a-fA-F]{32}$ + nullable: true + description: A 34 character string that uniquely identifies this resource. + account_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + nullable: true + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + that owns this resource. + friendly_name: + type: string + nullable: true + description: A human readable descriptive text, up to 255 characters long. + date_created: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that this resource was created, given as GMT in [RFC + 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. + date_updated: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that this resource was last updated, given as GMT + in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. + subresource_uris: + type: object + format: uri-map + nullable: true + description: A list of the IpAddress resources associated with this IP access + control list resource. + uri: + type: string + nullable: true + description: The URI for this resource, relative to `https://api.twilio.com` + sip.sip_domain.sip_ip_access_control_list_mapping: + type: object + properties: + account_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + nullable: true + description: The unique id of the Account that is responsible for this resource. + date_created: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that this resource was created, given as GMT in [RFC + 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. + date_updated: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that this resource was last updated, given as GMT + in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. + domain_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that is created to identify the SipDomain + resource. + friendly_name: + type: string + nullable: true + description: A human readable descriptive text for this resource, up to + 64 characters long. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AL[0-9a-fA-F]{32}$ + nullable: true + description: A 34 character string that uniquely identifies this resource. + uri: + type: string + nullable: true + description: The URI for this resource, relative to `https://api.twilio.com` + sip.sip_ip_access_control_list.sip_ip_address: + type: object + properties: + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^IP[0-9a-fA-F]{32}$ + nullable: true + description: A 34 character string that uniquely identifies this resource. + account_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + nullable: true + description: The unique id of the Account that is responsible for this resource. + friendly_name: + type: string + nullable: true + description: A human readable descriptive text for this resource, up to + 255 characters long. + ip_address: + type: string + nullable: true + description: An IP address in dotted decimal notation from which you want + to accept traffic. Any SIP requests from this IP address will be allowed + by Twilio. IPv4 only supported today. + cidr_prefix_length: + type: integer + nullable: true + description: An integer representing the length of the CIDR prefix to use + with this IP address when accepting traffic. By default the entire IP + address is used. + ip_access_control_list_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AL[0-9a-fA-F]{32}$ + nullable: true + description: The unique id of the IpAccessControlList resource that includes + this resource. + date_created: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that this resource was created, given as GMT in [RFC + 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. + date_updated: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that this resource was last updated, given as GMT + in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) + format. + uri: + type: string + nullable: true + description: The URI for this resource, relative to `https://api.twilio.com` + call.siprec: + type: object + properties: + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SR[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Siprec resource. + 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 this Siprec resource. + call_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the Siprec resource is associated with. + name: + type: string + nullable: true + description: The user-specified name of this Siprec, if one was given when + the Siprec was created. This may be used to stop the Siprec. + status: + type: string + $ref: '#/components/schemas/siprec_enum_status' + nullable: true + description: The status - one of `stopped`, `in-progress` + date_updated: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date and time in GMT that this resource was last updated, + specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + siprec_enum_track: + type: string + enum: + - inbound_track + - outbound_track + - both_tracks + siprec_enum_status: + type: string + enum: + - in-progress + - stopped + siprec_enum_update_status: + type: string + enum: + - stopped + call.stream: + type: object + properties: + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^MZ[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the Stream resource. + 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 this Stream resource. + call_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the Stream resource is associated with. + name: + type: string + nullable: true + description: The user-specified name of this Stream, if one was given when + the Stream was created. This may be used to stop the Stream. + status: + type: string + $ref: '#/components/schemas/stream_enum_status' + nullable: true + description: The status - one of `stopped`, `in-progress` + date_updated: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date and time in GMT that this resource was last updated, + specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + stream_enum_track: + type: string + enum: + - inbound_track + - outbound_track + - both_tracks + stream_enum_status: + type: string + enum: + - in-progress + - stopped + stream_enum_update_status: + type: string + enum: + - stopped + token: + 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 Token resource. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + ice_servers: + type: array + items: + type: object + format: ice-server + properties: + credential: + type: string + username: + type: string + url: + type: string + urls: + type: string + nullable: true + description: An array representing the ephemeral credentials and the STUN + and TURN server URIs. + password: + type: string + nullable: true + description: The temporary password that the username will use when authenticating + with Twilio. + ttl: + type: string + nullable: true + description: The duration in seconds for which the username and password + are valid. + username: + type: string + nullable: true + description: The temporary username that uniquely identifies a Token. + transcription: + 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 Transcription resource. + api_version: + type: string + nullable: true + description: The API version used to create the transcription. + date_created: + type: string + format: date-time-rfc-2822 + 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-rfc-2822 + 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. + duration: + type: string + nullable: true + description: The duration of the transcribed audio in seconds. + price: + type: number + nullable: true + description: The charge for the transcript in the currency associated with + the account. This value is populated after the transcript is complete + so it may not be available immediately. + price_unit: + type: string + format: currency + nullable: true + description: The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) + format (e.g. `usd`, `eur`, `jpy`). + recording_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) + from which the transcription was created. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^TR[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the Transcription + resource. + status: + type: string + $ref: '#/components/schemas/transcription_enum_status' + nullable: true + description: 'The status of the transcription. Can be: `in-progress`, `completed`, + `failed`.' + transcription_text: + type: string + nullable: true + description: The text content of the transcription. + type: + type: string + nullable: true + description: 'The transcription type. Can only be: `fast`.' + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + transcription_enum_status: + type: string + enum: + - in-progress + - completed + - failed + usage: + type: object + properties: {} + usage.usage_record: + 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 accrued the usage. + api_version: + type: string + nullable: true + description: The API version used to create the resource. + as_of: + type: string + nullable: true + description: Usage records up to date as of this timestamp, formatted as + YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + category: + type: string + $ref: '#/components/schemas/usage_record_enum_category' + nullable: true + description: The category of usage. For more information, see [Usage Categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories). + count: + type: string + nullable: true + description: The number of usage events, such as the number of calls. + count_unit: + type: string + nullable: true + description: The units in which `count` is measured, such as `calls` for + calls or `messages` for SMS. + description: + type: string + nullable: true + description: A plain-language description of the usage category. + end_date: + type: string + format: date + nullable: true + description: The last date for which usage is included in the UsageRecord. + The date is specified in GMT and formatted as `YYYY-MM-DD`. + price: + type: number + nullable: true + description: The total price of the usage in the currency specified in `price_unit` + and associated with the account. + price_unit: + type: string + format: currency + nullable: true + description: The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) + format, such as `usd`, `eur`, and `jpy`. + start_date: + type: string + format: date + nullable: true + description: The first date for which usage is included in this UsageRecord. + The date is specified in GMT and formatted as `YYYY-MM-DD`. + subresource_uris: + type: object + format: uri-map + nullable: true + description: A list of related resources identified by their URIs. For more + information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + usage: + type: string + nullable: true + description: The amount used to bill usage and measured in units described + in `usage_unit`. + usage_unit: + type: string + nullable: true + description: The units in which `usage` is measured, such as `minutes` for + calls or `messages` for SMS. + usage_record_enum_category: + type: string + enum: + - a2p-registration-fees + - agent-conference + - amazon-polly + - answering-machine-detection + - authy-authentications + - authy-calls-outbound + - authy-monthly-fees + - authy-phone-intelligence + - authy-phone-verifications + - authy-sms-outbound + - call-progess-events + - calleridlookups + - calls + - calls-client + - calls-globalconference + - calls-inbound + - calls-inbound-local + - calls-inbound-mobile + - calls-inbound-tollfree + - calls-outbound + - calls-pay-verb-transactions + - calls-recordings + - calls-sip + - calls-sip-inbound + - calls-sip-outbound + - calls-transfers + - carrier-lookups + - conversations + - conversations-api-requests + - conversations-conversation-events + - conversations-endpoint-connectivity + - conversations-events + - conversations-participant-events + - conversations-participants + - cps + - flex-usage + - fraud-lookups + - group-rooms + - group-rooms-data-track + - group-rooms-encrypted-media-recorded + - group-rooms-media-downloaded + - group-rooms-media-recorded + - group-rooms-media-routed + - group-rooms-media-stored + - group-rooms-participant-minutes + - group-rooms-recorded-minutes + - imp-v1-usage + - lookups + - marketplace + - marketplace-algorithmia-named-entity-recognition + - marketplace-cadence-transcription + - marketplace-cadence-translation + - marketplace-capio-speech-to-text + - marketplace-convriza-ababa + - marketplace-deepgram-phrase-detector + - marketplace-digital-segment-business-info + - marketplace-facebook-offline-conversions + - marketplace-google-speech-to-text + - marketplace-ibm-watson-message-insights + - marketplace-ibm-watson-message-sentiment + - marketplace-ibm-watson-recording-analysis + - marketplace-ibm-watson-tone-analyzer + - marketplace-icehook-systems-scout + - marketplace-infogroup-dataaxle-bizinfo + - marketplace-keen-io-contact-center-analytics + - marketplace-marchex-cleancall + - marketplace-marchex-sentiment-analysis-for-sms + - marketplace-marketplace-nextcaller-social-id + - marketplace-mobile-commons-opt-out-classifier + - marketplace-nexiwave-voicemail-to-text + - marketplace-nextcaller-advanced-caller-identification + - marketplace-nomorobo-spam-score + - marketplace-payfone-tcpa-compliance + - marketplace-remeeting-automatic-speech-recognition + - marketplace-tcpa-defense-solutions-blacklist-feed + - marketplace-telo-opencnam + - marketplace-truecnam-true-spam + - marketplace-twilio-caller-name-lookup-us + - marketplace-twilio-carrier-information-lookup + - marketplace-voicebase-pci + - marketplace-voicebase-transcription + - marketplace-voicebase-transcription-custom-vocabulary + - marketplace-whitepages-pro-caller-identification + - marketplace-whitepages-pro-phone-intelligence + - marketplace-whitepages-pro-phone-reputation + - marketplace-wolfarm-spoken-results + - marketplace-wolfram-short-answer + - marketplace-ytica-contact-center-reporting-analytics + - mediastorage + - mms + - mms-inbound + - mms-inbound-longcode + - mms-inbound-shortcode + - mms-messages-carrierfees + - mms-outbound + - mms-outbound-longcode + - mms-outbound-shortcode + - monitor-reads + - monitor-storage + - monitor-writes + - notify + - notify-actions-attempts + - notify-channels + - number-format-lookups + - pchat + - pchat-users + - peer-to-peer-rooms-participant-minutes + - pfax + - pfax-minutes + - pfax-minutes-inbound + - pfax-minutes-outbound + - pfax-pages + - phonenumbers + - phonenumbers-cps + - phonenumbers-emergency + - phonenumbers-local + - phonenumbers-mobile + - phonenumbers-setups + - phonenumbers-tollfree + - premiumsupport + - proxy + - proxy-active-sessions + - pstnconnectivity + - pv + - pv-composition-media-downloaded + - pv-composition-media-encrypted + - pv-composition-media-stored + - pv-composition-minutes + - pv-recording-compositions + - pv-room-participants + - pv-room-participants-au1 + - pv-room-participants-br1 + - pv-room-participants-ie1 + - pv-room-participants-jp1 + - pv-room-participants-sg1 + - pv-room-participants-us1 + - pv-room-participants-us2 + - pv-rooms + - pv-sip-endpoint-registrations + - recordings + - recordingstorage + - rooms-group-bandwidth + - rooms-group-minutes + - rooms-peer-to-peer-minutes + - shortcodes + - shortcodes-customerowned + - shortcodes-mms-enablement + - shortcodes-mps + - shortcodes-random + - shortcodes-uk + - shortcodes-vanity + - small-group-rooms + - small-group-rooms-data-track + - small-group-rooms-participant-minutes + - sms + - sms-inbound + - sms-inbound-longcode + - sms-inbound-shortcode + - sms-messages-carrierfees + - sms-messages-features + - sms-messages-features-senderid + - sms-outbound + - sms-outbound-content-inspection + - sms-outbound-longcode + - sms-outbound-shortcode + - speech-recognition + - studio-engagements + - sync + - sync-actions + - sync-endpoint-hours + - sync-endpoint-hours-above-daily-cap + - taskrouter-tasks + - totalprice + - transcriptions + - trunking-cps + - trunking-emergency-calls + - trunking-origination + - trunking-origination-local + - trunking-origination-mobile + - trunking-origination-tollfree + - trunking-recordings + - trunking-secure + - trunking-termination + - tts-google + - turnmegabytes + - turnmegabytes-australia + - turnmegabytes-brasil + - turnmegabytes-germany + - turnmegabytes-india + - turnmegabytes-ireland + - turnmegabytes-japan + - turnmegabytes-singapore + - turnmegabytes-useast + - turnmegabytes-uswest + - twilio-interconnect + - verify-push + - verify-totp + - verify-whatsapp-conversations-business-initiated + - video-recordings + - virtual-agent + - voice-insights + - voice-insights-client-insights-on-demand-minute + - voice-insights-ptsn-insights-on-demand-minute + - voice-insights-sip-interface-insights-on-demand-minute + - voice-insights-sip-trunking-insights-on-demand-minute + - voice-intelligence + - voice-intelligence-transcription + - voice-intelligence-operators + - wireless + - wireless-orders + - wireless-orders-artwork + - wireless-orders-bulk + - wireless-orders-esim + - wireless-orders-starter + - wireless-usage + - wireless-usage-commands + - wireless-usage-commands-africa + - wireless-usage-commands-asia + - wireless-usage-commands-centralandsouthamerica + - wireless-usage-commands-europe + - wireless-usage-commands-home + - wireless-usage-commands-northamerica + - wireless-usage-commands-oceania + - wireless-usage-commands-roaming + - wireless-usage-data + - wireless-usage-data-africa + - wireless-usage-data-asia + - wireless-usage-data-centralandsouthamerica + - wireless-usage-data-custom-additionalmb + - wireless-usage-data-custom-first5mb + - wireless-usage-data-domestic-roaming + - wireless-usage-data-europe + - wireless-usage-data-individual-additionalgb + - wireless-usage-data-individual-firstgb + - wireless-usage-data-international-roaming-canada + - wireless-usage-data-international-roaming-india + - wireless-usage-data-international-roaming-mexico + - wireless-usage-data-northamerica + - wireless-usage-data-oceania + - wireless-usage-data-pooled + - wireless-usage-data-pooled-downlink + - wireless-usage-data-pooled-uplink + - wireless-usage-mrc + - wireless-usage-mrc-custom + - wireless-usage-mrc-individual + - wireless-usage-mrc-pooled + - wireless-usage-mrc-suspended + - wireless-usage-sms + - wireless-usage-voice + usage.usage_record.usage_record_all_time: + 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 accrued the usage. + api_version: + type: string + nullable: true + description: The API version used to create the resource. + as_of: + type: string + nullable: true + description: Usage records up to date as of this timestamp, formatted as + YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + category: + type: string + $ref: '#/components/schemas/usage_record_all_time_enum_category' + nullable: true + description: The category of usage. For more information, see [Usage Categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories). + count: + type: string + nullable: true + description: The number of usage events, such as the number of calls. + count_unit: + type: string + nullable: true + description: The units in which `count` is measured, such as `calls` for + calls or `messages` for SMS. + description: + type: string + nullable: true + description: A plain-language description of the usage category. + end_date: + type: string + format: date + nullable: true + description: The last date for which usage is included in the UsageRecord. + The date is specified in GMT and formatted as `YYYY-MM-DD`. + price: + type: number + nullable: true + description: The total price of the usage in the currency specified in `price_unit` + and associated with the account. + price_unit: + type: string + format: currency + nullable: true + description: The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) + format, such as `usd`, `eur`, and `jpy`. + start_date: + type: string + format: date + nullable: true + description: The first date for which usage is included in this UsageRecord. + The date is specified in GMT and formatted as `YYYY-MM-DD`. + subresource_uris: + type: object + format: uri-map + nullable: true + description: A list of related resources identified by their URIs. For more + information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + usage: + type: string + nullable: true + description: The amount used to bill usage and measured in units described + in `usage_unit`. + usage_unit: + type: string + nullable: true + description: The units in which `usage` is measured, such as `minutes` for + calls or `messages` for SMS. + usage_record_all_time_enum_category: + type: string + enum: + - a2p-registration-fees + - agent-conference + - amazon-polly + - answering-machine-detection + - authy-authentications + - authy-calls-outbound + - authy-monthly-fees + - authy-phone-intelligence + - authy-phone-verifications + - authy-sms-outbound + - call-progess-events + - calleridlookups + - calls + - calls-client + - calls-globalconference + - calls-inbound + - calls-inbound-local + - calls-inbound-mobile + - calls-inbound-tollfree + - calls-outbound + - calls-pay-verb-transactions + - calls-recordings + - calls-sip + - calls-sip-inbound + - calls-sip-outbound + - calls-transfers + - carrier-lookups + - conversations + - conversations-api-requests + - conversations-conversation-events + - conversations-endpoint-connectivity + - conversations-events + - conversations-participant-events + - conversations-participants + - cps + - flex-usage + - fraud-lookups + - group-rooms + - group-rooms-data-track + - group-rooms-encrypted-media-recorded + - group-rooms-media-downloaded + - group-rooms-media-recorded + - group-rooms-media-routed + - group-rooms-media-stored + - group-rooms-participant-minutes + - group-rooms-recorded-minutes + - imp-v1-usage + - lookups + - marketplace + - marketplace-algorithmia-named-entity-recognition + - marketplace-cadence-transcription + - marketplace-cadence-translation + - marketplace-capio-speech-to-text + - marketplace-convriza-ababa + - marketplace-deepgram-phrase-detector + - marketplace-digital-segment-business-info + - marketplace-facebook-offline-conversions + - marketplace-google-speech-to-text + - marketplace-ibm-watson-message-insights + - marketplace-ibm-watson-message-sentiment + - marketplace-ibm-watson-recording-analysis + - marketplace-ibm-watson-tone-analyzer + - marketplace-icehook-systems-scout + - marketplace-infogroup-dataaxle-bizinfo + - marketplace-keen-io-contact-center-analytics + - marketplace-marchex-cleancall + - marketplace-marchex-sentiment-analysis-for-sms + - marketplace-marketplace-nextcaller-social-id + - marketplace-mobile-commons-opt-out-classifier + - marketplace-nexiwave-voicemail-to-text + - marketplace-nextcaller-advanced-caller-identification + - marketplace-nomorobo-spam-score + - marketplace-payfone-tcpa-compliance + - marketplace-remeeting-automatic-speech-recognition + - marketplace-tcpa-defense-solutions-blacklist-feed + - marketplace-telo-opencnam + - marketplace-truecnam-true-spam + - marketplace-twilio-caller-name-lookup-us + - marketplace-twilio-carrier-information-lookup + - marketplace-voicebase-pci + - marketplace-voicebase-transcription + - marketplace-voicebase-transcription-custom-vocabulary + - marketplace-whitepages-pro-caller-identification + - marketplace-whitepages-pro-phone-intelligence + - marketplace-whitepages-pro-phone-reputation + - marketplace-wolfarm-spoken-results + - marketplace-wolfram-short-answer + - marketplace-ytica-contact-center-reporting-analytics + - mediastorage + - mms + - mms-inbound + - mms-inbound-longcode + - mms-inbound-shortcode + - mms-messages-carrierfees + - mms-outbound + - mms-outbound-longcode + - mms-outbound-shortcode + - monitor-reads + - monitor-storage + - monitor-writes + - notify + - notify-actions-attempts + - notify-channels + - number-format-lookups + - pchat + - pchat-users + - peer-to-peer-rooms-participant-minutes + - pfax + - pfax-minutes + - pfax-minutes-inbound + - pfax-minutes-outbound + - pfax-pages + - phonenumbers + - phonenumbers-cps + - phonenumbers-emergency + - phonenumbers-local + - phonenumbers-mobile + - phonenumbers-setups + - phonenumbers-tollfree + - premiumsupport + - proxy + - proxy-active-sessions + - pstnconnectivity + - pv + - pv-composition-media-downloaded + - pv-composition-media-encrypted + - pv-composition-media-stored + - pv-composition-minutes + - pv-recording-compositions + - pv-room-participants + - pv-room-participants-au1 + - pv-room-participants-br1 + - pv-room-participants-ie1 + - pv-room-participants-jp1 + - pv-room-participants-sg1 + - pv-room-participants-us1 + - pv-room-participants-us2 + - pv-rooms + - pv-sip-endpoint-registrations + - recordings + - recordingstorage + - rooms-group-bandwidth + - rooms-group-minutes + - rooms-peer-to-peer-minutes + - shortcodes + - shortcodes-customerowned + - shortcodes-mms-enablement + - shortcodes-mps + - shortcodes-random + - shortcodes-uk + - shortcodes-vanity + - small-group-rooms + - small-group-rooms-data-track + - small-group-rooms-participant-minutes + - sms + - sms-inbound + - sms-inbound-longcode + - sms-inbound-shortcode + - sms-messages-carrierfees + - sms-messages-features + - sms-messages-features-senderid + - sms-outbound + - sms-outbound-content-inspection + - sms-outbound-longcode + - sms-outbound-shortcode + - speech-recognition + - studio-engagements + - sync + - sync-actions + - sync-endpoint-hours + - sync-endpoint-hours-above-daily-cap + - taskrouter-tasks + - totalprice + - transcriptions + - trunking-cps + - trunking-emergency-calls + - trunking-origination + - trunking-origination-local + - trunking-origination-mobile + - trunking-origination-tollfree + - trunking-recordings + - trunking-secure + - trunking-termination + - tts-google + - turnmegabytes + - turnmegabytes-australia + - turnmegabytes-brasil + - turnmegabytes-germany + - turnmegabytes-india + - turnmegabytes-ireland + - turnmegabytes-japan + - turnmegabytes-singapore + - turnmegabytes-useast + - turnmegabytes-uswest + - twilio-interconnect + - verify-push + - verify-totp + - verify-whatsapp-conversations-business-initiated + - video-recordings + - virtual-agent + - voice-insights + - voice-insights-client-insights-on-demand-minute + - voice-insights-ptsn-insights-on-demand-minute + - voice-insights-sip-interface-insights-on-demand-minute + - voice-insights-sip-trunking-insights-on-demand-minute + - voice-intelligence + - voice-intelligence-transcription + - voice-intelligence-operators + - wireless + - wireless-orders + - wireless-orders-artwork + - wireless-orders-bulk + - wireless-orders-esim + - wireless-orders-starter + - wireless-usage + - wireless-usage-commands + - wireless-usage-commands-africa + - wireless-usage-commands-asia + - wireless-usage-commands-centralandsouthamerica + - wireless-usage-commands-europe + - wireless-usage-commands-home + - wireless-usage-commands-northamerica + - wireless-usage-commands-oceania + - wireless-usage-commands-roaming + - wireless-usage-data + - wireless-usage-data-africa + - wireless-usage-data-asia + - wireless-usage-data-centralandsouthamerica + - wireless-usage-data-custom-additionalmb + - wireless-usage-data-custom-first5mb + - wireless-usage-data-domestic-roaming + - wireless-usage-data-europe + - wireless-usage-data-individual-additionalgb + - wireless-usage-data-individual-firstgb + - wireless-usage-data-international-roaming-canada + - wireless-usage-data-international-roaming-india + - wireless-usage-data-international-roaming-mexico + - wireless-usage-data-northamerica + - wireless-usage-data-oceania + - wireless-usage-data-pooled + - wireless-usage-data-pooled-downlink + - wireless-usage-data-pooled-uplink + - wireless-usage-mrc + - wireless-usage-mrc-custom + - wireless-usage-mrc-individual + - wireless-usage-mrc-pooled + - wireless-usage-mrc-suspended + - wireless-usage-sms + - wireless-usage-voice + usage.usage_record.usage_record_daily: + 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 accrued the usage. + api_version: + type: string + nullable: true + description: The API version used to create the resource. + as_of: + type: string + nullable: true + description: Usage records up to date as of this timestamp, formatted as + YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + category: + type: string + $ref: '#/components/schemas/usage_record_daily_enum_category' + nullable: true + description: The category of usage. For more information, see [Usage Categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories). + count: + type: string + nullable: true + description: The number of usage events, such as the number of calls. + count_unit: + type: string + nullable: true + description: The units in which `count` is measured, such as `calls` for + calls or `messages` for SMS. + description: + type: string + nullable: true + description: A plain-language description of the usage category. + end_date: + type: string + format: date + nullable: true + description: The last date for which usage is included in the UsageRecord. + The date is specified in GMT and formatted as `YYYY-MM-DD`. + price: + type: number + nullable: true + description: The total price of the usage in the currency specified in `price_unit` + and associated with the account. + price_unit: + type: string + format: currency + nullable: true + description: The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) + format, such as `usd`, `eur`, and `jpy`. + start_date: + type: string + format: date + nullable: true + description: The first date for which usage is included in this UsageRecord. + The date is specified in GMT and formatted as `YYYY-MM-DD`. + subresource_uris: + type: object + format: uri-map + nullable: true + description: A list of related resources identified by their URIs. For more + information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + usage: + type: string + nullable: true + description: The amount used to bill usage and measured in units described + in `usage_unit`. + usage_unit: + type: string + nullable: true + description: The units in which `usage` is measured, such as `minutes` for + calls or `messages` for SMS. + usage_record_daily_enum_category: + type: string + enum: + - a2p-registration-fees + - agent-conference + - amazon-polly + - answering-machine-detection + - authy-authentications + - authy-calls-outbound + - authy-monthly-fees + - authy-phone-intelligence + - authy-phone-verifications + - authy-sms-outbound + - call-progess-events + - calleridlookups + - calls + - calls-client + - calls-globalconference + - calls-inbound + - calls-inbound-local + - calls-inbound-mobile + - calls-inbound-tollfree + - calls-outbound + - calls-pay-verb-transactions + - calls-recordings + - calls-sip + - calls-sip-inbound + - calls-sip-outbound + - calls-transfers + - carrier-lookups + - conversations + - conversations-api-requests + - conversations-conversation-events + - conversations-endpoint-connectivity + - conversations-events + - conversations-participant-events + - conversations-participants + - cps + - flex-usage + - fraud-lookups + - group-rooms + - group-rooms-data-track + - group-rooms-encrypted-media-recorded + - group-rooms-media-downloaded + - group-rooms-media-recorded + - group-rooms-media-routed + - group-rooms-media-stored + - group-rooms-participant-minutes + - group-rooms-recorded-minutes + - imp-v1-usage + - lookups + - marketplace + - marketplace-algorithmia-named-entity-recognition + - marketplace-cadence-transcription + - marketplace-cadence-translation + - marketplace-capio-speech-to-text + - marketplace-convriza-ababa + - marketplace-deepgram-phrase-detector + - marketplace-digital-segment-business-info + - marketplace-facebook-offline-conversions + - marketplace-google-speech-to-text + - marketplace-ibm-watson-message-insights + - marketplace-ibm-watson-message-sentiment + - marketplace-ibm-watson-recording-analysis + - marketplace-ibm-watson-tone-analyzer + - marketplace-icehook-systems-scout + - marketplace-infogroup-dataaxle-bizinfo + - marketplace-keen-io-contact-center-analytics + - marketplace-marchex-cleancall + - marketplace-marchex-sentiment-analysis-for-sms + - marketplace-marketplace-nextcaller-social-id + - marketplace-mobile-commons-opt-out-classifier + - marketplace-nexiwave-voicemail-to-text + - marketplace-nextcaller-advanced-caller-identification + - marketplace-nomorobo-spam-score + - marketplace-payfone-tcpa-compliance + - marketplace-remeeting-automatic-speech-recognition + - marketplace-tcpa-defense-solutions-blacklist-feed + - marketplace-telo-opencnam + - marketplace-truecnam-true-spam + - marketplace-twilio-caller-name-lookup-us + - marketplace-twilio-carrier-information-lookup + - marketplace-voicebase-pci + - marketplace-voicebase-transcription + - marketplace-voicebase-transcription-custom-vocabulary + - marketplace-whitepages-pro-caller-identification + - marketplace-whitepages-pro-phone-intelligence + - marketplace-whitepages-pro-phone-reputation + - marketplace-wolfarm-spoken-results + - marketplace-wolfram-short-answer + - marketplace-ytica-contact-center-reporting-analytics + - mediastorage + - mms + - mms-inbound + - mms-inbound-longcode + - mms-inbound-shortcode + - mms-messages-carrierfees + - mms-outbound + - mms-outbound-longcode + - mms-outbound-shortcode + - monitor-reads + - monitor-storage + - monitor-writes + - notify + - notify-actions-attempts + - notify-channels + - number-format-lookups + - pchat + - pchat-users + - peer-to-peer-rooms-participant-minutes + - pfax + - pfax-minutes + - pfax-minutes-inbound + - pfax-minutes-outbound + - pfax-pages + - phonenumbers + - phonenumbers-cps + - phonenumbers-emergency + - phonenumbers-local + - phonenumbers-mobile + - phonenumbers-setups + - phonenumbers-tollfree + - premiumsupport + - proxy + - proxy-active-sessions + - pstnconnectivity + - pv + - pv-composition-media-downloaded + - pv-composition-media-encrypted + - pv-composition-media-stored + - pv-composition-minutes + - pv-recording-compositions + - pv-room-participants + - pv-room-participants-au1 + - pv-room-participants-br1 + - pv-room-participants-ie1 + - pv-room-participants-jp1 + - pv-room-participants-sg1 + - pv-room-participants-us1 + - pv-room-participants-us2 + - pv-rooms + - pv-sip-endpoint-registrations + - recordings + - recordingstorage + - rooms-group-bandwidth + - rooms-group-minutes + - rooms-peer-to-peer-minutes + - shortcodes + - shortcodes-customerowned + - shortcodes-mms-enablement + - shortcodes-mps + - shortcodes-random + - shortcodes-uk + - shortcodes-vanity + - small-group-rooms + - small-group-rooms-data-track + - small-group-rooms-participant-minutes + - sms + - sms-inbound + - sms-inbound-longcode + - sms-inbound-shortcode + - sms-messages-carrierfees + - sms-messages-features + - sms-messages-features-senderid + - sms-outbound + - sms-outbound-content-inspection + - sms-outbound-longcode + - sms-outbound-shortcode + - speech-recognition + - studio-engagements + - sync + - sync-actions + - sync-endpoint-hours + - sync-endpoint-hours-above-daily-cap + - taskrouter-tasks + - totalprice + - transcriptions + - trunking-cps + - trunking-emergency-calls + - trunking-origination + - trunking-origination-local + - trunking-origination-mobile + - trunking-origination-tollfree + - trunking-recordings + - trunking-secure + - trunking-termination + - tts-google + - turnmegabytes + - turnmegabytes-australia + - turnmegabytes-brasil + - turnmegabytes-germany + - turnmegabytes-india + - turnmegabytes-ireland + - turnmegabytes-japan + - turnmegabytes-singapore + - turnmegabytes-useast + - turnmegabytes-uswest + - twilio-interconnect + - verify-push + - verify-totp + - verify-whatsapp-conversations-business-initiated + - video-recordings + - virtual-agent + - voice-insights + - voice-insights-client-insights-on-demand-minute + - voice-insights-ptsn-insights-on-demand-minute + - voice-insights-sip-interface-insights-on-demand-minute + - voice-insights-sip-trunking-insights-on-demand-minute + - voice-intelligence + - voice-intelligence-transcription + - voice-intelligence-operators + - wireless + - wireless-orders + - wireless-orders-artwork + - wireless-orders-bulk + - wireless-orders-esim + - wireless-orders-starter + - wireless-usage + - wireless-usage-commands + - wireless-usage-commands-africa + - wireless-usage-commands-asia + - wireless-usage-commands-centralandsouthamerica + - wireless-usage-commands-europe + - wireless-usage-commands-home + - wireless-usage-commands-northamerica + - wireless-usage-commands-oceania + - wireless-usage-commands-roaming + - wireless-usage-data + - wireless-usage-data-africa + - wireless-usage-data-asia + - wireless-usage-data-centralandsouthamerica + - wireless-usage-data-custom-additionalmb + - wireless-usage-data-custom-first5mb + - wireless-usage-data-domestic-roaming + - wireless-usage-data-europe + - wireless-usage-data-individual-additionalgb + - wireless-usage-data-individual-firstgb + - wireless-usage-data-international-roaming-canada + - wireless-usage-data-international-roaming-india + - wireless-usage-data-international-roaming-mexico + - wireless-usage-data-northamerica + - wireless-usage-data-oceania + - wireless-usage-data-pooled + - wireless-usage-data-pooled-downlink + - wireless-usage-data-pooled-uplink + - wireless-usage-mrc + - wireless-usage-mrc-custom + - wireless-usage-mrc-individual + - wireless-usage-mrc-pooled + - wireless-usage-mrc-suspended + - wireless-usage-sms + - wireless-usage-voice + usage.usage_record.usage_record_last_month: + 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 accrued the usage. + api_version: + type: string + nullable: true + description: The API version used to create the resource. + as_of: + type: string + nullable: true + description: Usage records up to date as of this timestamp, formatted as + YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + category: + type: string + $ref: '#/components/schemas/usage_record_last_month_enum_category' + nullable: true + description: The category of usage. For more information, see [Usage Categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories). + count: + type: string + nullable: true + description: The number of usage events, such as the number of calls. + count_unit: + type: string + nullable: true + description: The units in which `count` is measured, such as `calls` for + calls or `messages` for SMS. + description: + type: string + nullable: true + description: A plain-language description of the usage category. + end_date: + type: string + format: date + nullable: true + description: The last date for which usage is included in the UsageRecord. + The date is specified in GMT and formatted as `YYYY-MM-DD`. + price: + type: number + nullable: true + description: The total price of the usage in the currency specified in `price_unit` + and associated with the account. + price_unit: + type: string + format: currency + nullable: true + description: The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) + format, such as `usd`, `eur`, and `jpy`. + start_date: + type: string + format: date + nullable: true + description: The first date for which usage is included in this UsageRecord. + The date is specified in GMT and formatted as `YYYY-MM-DD`. + subresource_uris: + type: object + format: uri-map + nullable: true + description: A list of related resources identified by their URIs. For more + information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + usage: + type: string + nullable: true + description: The amount used to bill usage and measured in units described + in `usage_unit`. + usage_unit: + type: string + nullable: true + description: The units in which `usage` is measured, such as `minutes` for + calls or `messages` for SMS. + usage_record_last_month_enum_category: + type: string + enum: + - a2p-registration-fees + - agent-conference + - amazon-polly + - answering-machine-detection + - authy-authentications + - authy-calls-outbound + - authy-monthly-fees + - authy-phone-intelligence + - authy-phone-verifications + - authy-sms-outbound + - call-progess-events + - calleridlookups + - calls + - calls-client + - calls-globalconference + - calls-inbound + - calls-inbound-local + - calls-inbound-mobile + - calls-inbound-tollfree + - calls-outbound + - calls-pay-verb-transactions + - calls-recordings + - calls-sip + - calls-sip-inbound + - calls-sip-outbound + - calls-transfers + - carrier-lookups + - conversations + - conversations-api-requests + - conversations-conversation-events + - conversations-endpoint-connectivity + - conversations-events + - conversations-participant-events + - conversations-participants + - cps + - flex-usage + - fraud-lookups + - group-rooms + - group-rooms-data-track + - group-rooms-encrypted-media-recorded + - group-rooms-media-downloaded + - group-rooms-media-recorded + - group-rooms-media-routed + - group-rooms-media-stored + - group-rooms-participant-minutes + - group-rooms-recorded-minutes + - imp-v1-usage + - lookups + - marketplace + - marketplace-algorithmia-named-entity-recognition + - marketplace-cadence-transcription + - marketplace-cadence-translation + - marketplace-capio-speech-to-text + - marketplace-convriza-ababa + - marketplace-deepgram-phrase-detector + - marketplace-digital-segment-business-info + - marketplace-facebook-offline-conversions + - marketplace-google-speech-to-text + - marketplace-ibm-watson-message-insights + - marketplace-ibm-watson-message-sentiment + - marketplace-ibm-watson-recording-analysis + - marketplace-ibm-watson-tone-analyzer + - marketplace-icehook-systems-scout + - marketplace-infogroup-dataaxle-bizinfo + - marketplace-keen-io-contact-center-analytics + - marketplace-marchex-cleancall + - marketplace-marchex-sentiment-analysis-for-sms + - marketplace-marketplace-nextcaller-social-id + - marketplace-mobile-commons-opt-out-classifier + - marketplace-nexiwave-voicemail-to-text + - marketplace-nextcaller-advanced-caller-identification + - marketplace-nomorobo-spam-score + - marketplace-payfone-tcpa-compliance + - marketplace-remeeting-automatic-speech-recognition + - marketplace-tcpa-defense-solutions-blacklist-feed + - marketplace-telo-opencnam + - marketplace-truecnam-true-spam + - marketplace-twilio-caller-name-lookup-us + - marketplace-twilio-carrier-information-lookup + - marketplace-voicebase-pci + - marketplace-voicebase-transcription + - marketplace-voicebase-transcription-custom-vocabulary + - marketplace-whitepages-pro-caller-identification + - marketplace-whitepages-pro-phone-intelligence + - marketplace-whitepages-pro-phone-reputation + - marketplace-wolfarm-spoken-results + - marketplace-wolfram-short-answer + - marketplace-ytica-contact-center-reporting-analytics + - mediastorage + - mms + - mms-inbound + - mms-inbound-longcode + - mms-inbound-shortcode + - mms-messages-carrierfees + - mms-outbound + - mms-outbound-longcode + - mms-outbound-shortcode + - monitor-reads + - monitor-storage + - monitor-writes + - notify + - notify-actions-attempts + - notify-channels + - number-format-lookups + - pchat + - pchat-users + - peer-to-peer-rooms-participant-minutes + - pfax + - pfax-minutes + - pfax-minutes-inbound + - pfax-minutes-outbound + - pfax-pages + - phonenumbers + - phonenumbers-cps + - phonenumbers-emergency + - phonenumbers-local + - phonenumbers-mobile + - phonenumbers-setups + - phonenumbers-tollfree + - premiumsupport + - proxy + - proxy-active-sessions + - pstnconnectivity + - pv + - pv-composition-media-downloaded + - pv-composition-media-encrypted + - pv-composition-media-stored + - pv-composition-minutes + - pv-recording-compositions + - pv-room-participants + - pv-room-participants-au1 + - pv-room-participants-br1 + - pv-room-participants-ie1 + - pv-room-participants-jp1 + - pv-room-participants-sg1 + - pv-room-participants-us1 + - pv-room-participants-us2 + - pv-rooms + - pv-sip-endpoint-registrations + - recordings + - recordingstorage + - rooms-group-bandwidth + - rooms-group-minutes + - rooms-peer-to-peer-minutes + - shortcodes + - shortcodes-customerowned + - shortcodes-mms-enablement + - shortcodes-mps + - shortcodes-random + - shortcodes-uk + - shortcodes-vanity + - small-group-rooms + - small-group-rooms-data-track + - small-group-rooms-participant-minutes + - sms + - sms-inbound + - sms-inbound-longcode + - sms-inbound-shortcode + - sms-messages-carrierfees + - sms-messages-features + - sms-messages-features-senderid + - sms-outbound + - sms-outbound-content-inspection + - sms-outbound-longcode + - sms-outbound-shortcode + - speech-recognition + - studio-engagements + - sync + - sync-actions + - sync-endpoint-hours + - sync-endpoint-hours-above-daily-cap + - taskrouter-tasks + - totalprice + - transcriptions + - trunking-cps + - trunking-emergency-calls + - trunking-origination + - trunking-origination-local + - trunking-origination-mobile + - trunking-origination-tollfree + - trunking-recordings + - trunking-secure + - trunking-termination + - tts-google + - turnmegabytes + - turnmegabytes-australia + - turnmegabytes-brasil + - turnmegabytes-germany + - turnmegabytes-india + - turnmegabytes-ireland + - turnmegabytes-japan + - turnmegabytes-singapore + - turnmegabytes-useast + - turnmegabytes-uswest + - twilio-interconnect + - verify-push + - verify-totp + - verify-whatsapp-conversations-business-initiated + - video-recordings + - virtual-agent + - voice-insights + - voice-insights-client-insights-on-demand-minute + - voice-insights-ptsn-insights-on-demand-minute + - voice-insights-sip-interface-insights-on-demand-minute + - voice-insights-sip-trunking-insights-on-demand-minute + - voice-intelligence + - voice-intelligence-transcription + - voice-intelligence-operators + - wireless + - wireless-orders + - wireless-orders-artwork + - wireless-orders-bulk + - wireless-orders-esim + - wireless-orders-starter + - wireless-usage + - wireless-usage-commands + - wireless-usage-commands-africa + - wireless-usage-commands-asia + - wireless-usage-commands-centralandsouthamerica + - wireless-usage-commands-europe + - wireless-usage-commands-home + - wireless-usage-commands-northamerica + - wireless-usage-commands-oceania + - wireless-usage-commands-roaming + - wireless-usage-data + - wireless-usage-data-africa + - wireless-usage-data-asia + - wireless-usage-data-centralandsouthamerica + - wireless-usage-data-custom-additionalmb + - wireless-usage-data-custom-first5mb + - wireless-usage-data-domestic-roaming + - wireless-usage-data-europe + - wireless-usage-data-individual-additionalgb + - wireless-usage-data-individual-firstgb + - wireless-usage-data-international-roaming-canada + - wireless-usage-data-international-roaming-india + - wireless-usage-data-international-roaming-mexico + - wireless-usage-data-northamerica + - wireless-usage-data-oceania + - wireless-usage-data-pooled + - wireless-usage-data-pooled-downlink + - wireless-usage-data-pooled-uplink + - wireless-usage-mrc + - wireless-usage-mrc-custom + - wireless-usage-mrc-individual + - wireless-usage-mrc-pooled + - wireless-usage-mrc-suspended + - wireless-usage-sms + - wireless-usage-voice + usage.usage_record.usage_record_monthly: + 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 accrued the usage. + api_version: + type: string + nullable: true + description: The API version used to create the resource. + as_of: + type: string + nullable: true + description: Usage records up to date as of this timestamp, formatted as + YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + category: + type: string + $ref: '#/components/schemas/usage_record_monthly_enum_category' + nullable: true + description: The category of usage. For more information, see [Usage Categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories). + count: + type: string + nullable: true + description: The number of usage events, such as the number of calls. + count_unit: + type: string + nullable: true + description: The units in which `count` is measured, such as `calls` for + calls or `messages` for SMS. + description: + type: string + nullable: true + description: A plain-language description of the usage category. + end_date: + type: string + format: date + nullable: true + description: The last date for which usage is included in the UsageRecord. + The date is specified in GMT and formatted as `YYYY-MM-DD`. + price: + type: number + nullable: true + description: The total price of the usage in the currency specified in `price_unit` + and associated with the account. + price_unit: + type: string + format: currency + nullable: true + description: The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) + format, such as `usd`, `eur`, and `jpy`. + start_date: + type: string + format: date + nullable: true + description: The first date for which usage is included in this UsageRecord. + The date is specified in GMT and formatted as `YYYY-MM-DD`. + subresource_uris: + type: object + format: uri-map + nullable: true + description: A list of related resources identified by their URIs. For more + information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + usage: + type: string + nullable: true + description: The amount used to bill usage and measured in units described + in `usage_unit`. + usage_unit: + type: string + nullable: true + description: The units in which `usage` is measured, such as `minutes` for + calls or `messages` for SMS. + usage_record_monthly_enum_category: + type: string + enum: + - a2p-registration-fees + - agent-conference + - amazon-polly + - answering-machine-detection + - authy-authentications + - authy-calls-outbound + - authy-monthly-fees + - authy-phone-intelligence + - authy-phone-verifications + - authy-sms-outbound + - call-progess-events + - calleridlookups + - calls + - calls-client + - calls-globalconference + - calls-inbound + - calls-inbound-local + - calls-inbound-mobile + - calls-inbound-tollfree + - calls-outbound + - calls-pay-verb-transactions + - calls-recordings + - calls-sip + - calls-sip-inbound + - calls-sip-outbound + - calls-transfers + - carrier-lookups + - conversations + - conversations-api-requests + - conversations-conversation-events + - conversations-endpoint-connectivity + - conversations-events + - conversations-participant-events + - conversations-participants + - cps + - flex-usage + - fraud-lookups + - group-rooms + - group-rooms-data-track + - group-rooms-encrypted-media-recorded + - group-rooms-media-downloaded + - group-rooms-media-recorded + - group-rooms-media-routed + - group-rooms-media-stored + - group-rooms-participant-minutes + - group-rooms-recorded-minutes + - imp-v1-usage + - lookups + - marketplace + - marketplace-algorithmia-named-entity-recognition + - marketplace-cadence-transcription + - marketplace-cadence-translation + - marketplace-capio-speech-to-text + - marketplace-convriza-ababa + - marketplace-deepgram-phrase-detector + - marketplace-digital-segment-business-info + - marketplace-facebook-offline-conversions + - marketplace-google-speech-to-text + - marketplace-ibm-watson-message-insights + - marketplace-ibm-watson-message-sentiment + - marketplace-ibm-watson-recording-analysis + - marketplace-ibm-watson-tone-analyzer + - marketplace-icehook-systems-scout + - marketplace-infogroup-dataaxle-bizinfo + - marketplace-keen-io-contact-center-analytics + - marketplace-marchex-cleancall + - marketplace-marchex-sentiment-analysis-for-sms + - marketplace-marketplace-nextcaller-social-id + - marketplace-mobile-commons-opt-out-classifier + - marketplace-nexiwave-voicemail-to-text + - marketplace-nextcaller-advanced-caller-identification + - marketplace-nomorobo-spam-score + - marketplace-payfone-tcpa-compliance + - marketplace-remeeting-automatic-speech-recognition + - marketplace-tcpa-defense-solutions-blacklist-feed + - marketplace-telo-opencnam + - marketplace-truecnam-true-spam + - marketplace-twilio-caller-name-lookup-us + - marketplace-twilio-carrier-information-lookup + - marketplace-voicebase-pci + - marketplace-voicebase-transcription + - marketplace-voicebase-transcription-custom-vocabulary + - marketplace-whitepages-pro-caller-identification + - marketplace-whitepages-pro-phone-intelligence + - marketplace-whitepages-pro-phone-reputation + - marketplace-wolfarm-spoken-results + - marketplace-wolfram-short-answer + - marketplace-ytica-contact-center-reporting-analytics + - mediastorage + - mms + - mms-inbound + - mms-inbound-longcode + - mms-inbound-shortcode + - mms-messages-carrierfees + - mms-outbound + - mms-outbound-longcode + - mms-outbound-shortcode + - monitor-reads + - monitor-storage + - monitor-writes + - notify + - notify-actions-attempts + - notify-channels + - number-format-lookups + - pchat + - pchat-users + - peer-to-peer-rooms-participant-minutes + - pfax + - pfax-minutes + - pfax-minutes-inbound + - pfax-minutes-outbound + - pfax-pages + - phonenumbers + - phonenumbers-cps + - phonenumbers-emergency + - phonenumbers-local + - phonenumbers-mobile + - phonenumbers-setups + - phonenumbers-tollfree + - premiumsupport + - proxy + - proxy-active-sessions + - pstnconnectivity + - pv + - pv-composition-media-downloaded + - pv-composition-media-encrypted + - pv-composition-media-stored + - pv-composition-minutes + - pv-recording-compositions + - pv-room-participants + - pv-room-participants-au1 + - pv-room-participants-br1 + - pv-room-participants-ie1 + - pv-room-participants-jp1 + - pv-room-participants-sg1 + - pv-room-participants-us1 + - pv-room-participants-us2 + - pv-rooms + - pv-sip-endpoint-registrations + - recordings + - recordingstorage + - rooms-group-bandwidth + - rooms-group-minutes + - rooms-peer-to-peer-minutes + - shortcodes + - shortcodes-customerowned + - shortcodes-mms-enablement + - shortcodes-mps + - shortcodes-random + - shortcodes-uk + - shortcodes-vanity + - small-group-rooms + - small-group-rooms-data-track + - small-group-rooms-participant-minutes + - sms + - sms-inbound + - sms-inbound-longcode + - sms-inbound-shortcode + - sms-messages-carrierfees + - sms-messages-features + - sms-messages-features-senderid + - sms-outbound + - sms-outbound-content-inspection + - sms-outbound-longcode + - sms-outbound-shortcode + - speech-recognition + - studio-engagements + - sync + - sync-actions + - sync-endpoint-hours + - sync-endpoint-hours-above-daily-cap + - taskrouter-tasks + - totalprice + - transcriptions + - trunking-cps + - trunking-emergency-calls + - trunking-origination + - trunking-origination-local + - trunking-origination-mobile + - trunking-origination-tollfree + - trunking-recordings + - trunking-secure + - trunking-termination + - tts-google + - turnmegabytes + - turnmegabytes-australia + - turnmegabytes-brasil + - turnmegabytes-germany + - turnmegabytes-india + - turnmegabytes-ireland + - turnmegabytes-japan + - turnmegabytes-singapore + - turnmegabytes-useast + - turnmegabytes-uswest + - twilio-interconnect + - verify-push + - verify-totp + - verify-whatsapp-conversations-business-initiated + - video-recordings + - virtual-agent + - voice-insights + - voice-insights-client-insights-on-demand-minute + - voice-insights-ptsn-insights-on-demand-minute + - voice-insights-sip-interface-insights-on-demand-minute + - voice-insights-sip-trunking-insights-on-demand-minute + - voice-intelligence + - voice-intelligence-transcription + - voice-intelligence-operators + - wireless + - wireless-orders + - wireless-orders-artwork + - wireless-orders-bulk + - wireless-orders-esim + - wireless-orders-starter + - wireless-usage + - wireless-usage-commands + - wireless-usage-commands-africa + - wireless-usage-commands-asia + - wireless-usage-commands-centralandsouthamerica + - wireless-usage-commands-europe + - wireless-usage-commands-home + - wireless-usage-commands-northamerica + - wireless-usage-commands-oceania + - wireless-usage-commands-roaming + - wireless-usage-data + - wireless-usage-data-africa + - wireless-usage-data-asia + - wireless-usage-data-centralandsouthamerica + - wireless-usage-data-custom-additionalmb + - wireless-usage-data-custom-first5mb + - wireless-usage-data-domestic-roaming + - wireless-usage-data-europe + - wireless-usage-data-individual-additionalgb + - wireless-usage-data-individual-firstgb + - wireless-usage-data-international-roaming-canada + - wireless-usage-data-international-roaming-india + - wireless-usage-data-international-roaming-mexico + - wireless-usage-data-northamerica + - wireless-usage-data-oceania + - wireless-usage-data-pooled + - wireless-usage-data-pooled-downlink + - wireless-usage-data-pooled-uplink + - wireless-usage-mrc + - wireless-usage-mrc-custom + - wireless-usage-mrc-individual + - wireless-usage-mrc-pooled + - wireless-usage-mrc-suspended + - wireless-usage-sms + - wireless-usage-voice + usage.usage_record.usage_record_this_month: + 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 accrued the usage. + api_version: + type: string + nullable: true + description: The API version used to create the resource. + as_of: + type: string + nullable: true + description: Usage records up to date as of this timestamp, formatted as + YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + category: + type: string + $ref: '#/components/schemas/usage_record_this_month_enum_category' + nullable: true + description: The category of usage. For more information, see [Usage Categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories). + count: + type: string + nullable: true + description: The number of usage events, such as the number of calls. + count_unit: + type: string + nullable: true + description: The units in which `count` is measured, such as `calls` for + calls or `messages` for SMS. + description: + type: string + nullable: true + description: A plain-language description of the usage category. + end_date: + type: string + format: date + nullable: true + description: The last date for which usage is included in the UsageRecord. + The date is specified in GMT and formatted as `YYYY-MM-DD`. + price: + type: number + nullable: true + description: The total price of the usage in the currency specified in `price_unit` + and associated with the account. + price_unit: + type: string + format: currency + nullable: true + description: The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) + format, such as `usd`, `eur`, and `jpy`. + start_date: + type: string + format: date + nullable: true + description: The first date for which usage is included in this UsageRecord. + The date is specified in GMT and formatted as `YYYY-MM-DD`. + subresource_uris: + type: object + format: uri-map + nullable: true + description: A list of related resources identified by their URIs. For more + information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + usage: + type: string + nullable: true + description: The amount used to bill usage and measured in units described + in `usage_unit`. + usage_unit: + type: string + nullable: true + description: The units in which `usage` is measured, such as `minutes` for + calls or `messages` for SMS. + usage_record_this_month_enum_category: + type: string + enum: + - a2p-registration-fees + - agent-conference + - amazon-polly + - answering-machine-detection + - authy-authentications + - authy-calls-outbound + - authy-monthly-fees + - authy-phone-intelligence + - authy-phone-verifications + - authy-sms-outbound + - call-progess-events + - calleridlookups + - calls + - calls-client + - calls-globalconference + - calls-inbound + - calls-inbound-local + - calls-inbound-mobile + - calls-inbound-tollfree + - calls-outbound + - calls-pay-verb-transactions + - calls-recordings + - calls-sip + - calls-sip-inbound + - calls-sip-outbound + - calls-transfers + - carrier-lookups + - conversations + - conversations-api-requests + - conversations-conversation-events + - conversations-endpoint-connectivity + - conversations-events + - conversations-participant-events + - conversations-participants + - cps + - flex-usage + - fraud-lookups + - group-rooms + - group-rooms-data-track + - group-rooms-encrypted-media-recorded + - group-rooms-media-downloaded + - group-rooms-media-recorded + - group-rooms-media-routed + - group-rooms-media-stored + - group-rooms-participant-minutes + - group-rooms-recorded-minutes + - imp-v1-usage + - lookups + - marketplace + - marketplace-algorithmia-named-entity-recognition + - marketplace-cadence-transcription + - marketplace-cadence-translation + - marketplace-capio-speech-to-text + - marketplace-convriza-ababa + - marketplace-deepgram-phrase-detector + - marketplace-digital-segment-business-info + - marketplace-facebook-offline-conversions + - marketplace-google-speech-to-text + - marketplace-ibm-watson-message-insights + - marketplace-ibm-watson-message-sentiment + - marketplace-ibm-watson-recording-analysis + - marketplace-ibm-watson-tone-analyzer + - marketplace-icehook-systems-scout + - marketplace-infogroup-dataaxle-bizinfo + - marketplace-keen-io-contact-center-analytics + - marketplace-marchex-cleancall + - marketplace-marchex-sentiment-analysis-for-sms + - marketplace-marketplace-nextcaller-social-id + - marketplace-mobile-commons-opt-out-classifier + - marketplace-nexiwave-voicemail-to-text + - marketplace-nextcaller-advanced-caller-identification + - marketplace-nomorobo-spam-score + - marketplace-payfone-tcpa-compliance + - marketplace-remeeting-automatic-speech-recognition + - marketplace-tcpa-defense-solutions-blacklist-feed + - marketplace-telo-opencnam + - marketplace-truecnam-true-spam + - marketplace-twilio-caller-name-lookup-us + - marketplace-twilio-carrier-information-lookup + - marketplace-voicebase-pci + - marketplace-voicebase-transcription + - marketplace-voicebase-transcription-custom-vocabulary + - marketplace-whitepages-pro-caller-identification + - marketplace-whitepages-pro-phone-intelligence + - marketplace-whitepages-pro-phone-reputation + - marketplace-wolfarm-spoken-results + - marketplace-wolfram-short-answer + - marketplace-ytica-contact-center-reporting-analytics + - mediastorage + - mms + - mms-inbound + - mms-inbound-longcode + - mms-inbound-shortcode + - mms-messages-carrierfees + - mms-outbound + - mms-outbound-longcode + - mms-outbound-shortcode + - monitor-reads + - monitor-storage + - monitor-writes + - notify + - notify-actions-attempts + - notify-channels + - number-format-lookups + - pchat + - pchat-users + - peer-to-peer-rooms-participant-minutes + - pfax + - pfax-minutes + - pfax-minutes-inbound + - pfax-minutes-outbound + - pfax-pages + - phonenumbers + - phonenumbers-cps + - phonenumbers-emergency + - phonenumbers-local + - phonenumbers-mobile + - phonenumbers-setups + - phonenumbers-tollfree + - premiumsupport + - proxy + - proxy-active-sessions + - pstnconnectivity + - pv + - pv-composition-media-downloaded + - pv-composition-media-encrypted + - pv-composition-media-stored + - pv-composition-minutes + - pv-recording-compositions + - pv-room-participants + - pv-room-participants-au1 + - pv-room-participants-br1 + - pv-room-participants-ie1 + - pv-room-participants-jp1 + - pv-room-participants-sg1 + - pv-room-participants-us1 + - pv-room-participants-us2 + - pv-rooms + - pv-sip-endpoint-registrations + - recordings + - recordingstorage + - rooms-group-bandwidth + - rooms-group-minutes + - rooms-peer-to-peer-minutes + - shortcodes + - shortcodes-customerowned + - shortcodes-mms-enablement + - shortcodes-mps + - shortcodes-random + - shortcodes-uk + - shortcodes-vanity + - small-group-rooms + - small-group-rooms-data-track + - small-group-rooms-participant-minutes + - sms + - sms-inbound + - sms-inbound-longcode + - sms-inbound-shortcode + - sms-messages-carrierfees + - sms-messages-features + - sms-messages-features-senderid + - sms-outbound + - sms-outbound-content-inspection + - sms-outbound-longcode + - sms-outbound-shortcode + - speech-recognition + - studio-engagements + - sync + - sync-actions + - sync-endpoint-hours + - sync-endpoint-hours-above-daily-cap + - taskrouter-tasks + - totalprice + - transcriptions + - trunking-cps + - trunking-emergency-calls + - trunking-origination + - trunking-origination-local + - trunking-origination-mobile + - trunking-origination-tollfree + - trunking-recordings + - trunking-secure + - trunking-termination + - tts-google + - turnmegabytes + - turnmegabytes-australia + - turnmegabytes-brasil + - turnmegabytes-germany + - turnmegabytes-india + - turnmegabytes-ireland + - turnmegabytes-japan + - turnmegabytes-singapore + - turnmegabytes-useast + - turnmegabytes-uswest + - twilio-interconnect + - verify-push + - verify-totp + - verify-whatsapp-conversations-business-initiated + - video-recordings + - virtual-agent + - voice-insights + - voice-insights-client-insights-on-demand-minute + - voice-insights-ptsn-insights-on-demand-minute + - voice-insights-sip-interface-insights-on-demand-minute + - voice-insights-sip-trunking-insights-on-demand-minute + - voice-intelligence + - voice-intelligence-transcription + - voice-intelligence-operators + - wireless + - wireless-orders + - wireless-orders-artwork + - wireless-orders-bulk + - wireless-orders-esim + - wireless-orders-starter + - wireless-usage + - wireless-usage-commands + - wireless-usage-commands-africa + - wireless-usage-commands-asia + - wireless-usage-commands-centralandsouthamerica + - wireless-usage-commands-europe + - wireless-usage-commands-home + - wireless-usage-commands-northamerica + - wireless-usage-commands-oceania + - wireless-usage-commands-roaming + - wireless-usage-data + - wireless-usage-data-africa + - wireless-usage-data-asia + - wireless-usage-data-centralandsouthamerica + - wireless-usage-data-custom-additionalmb + - wireless-usage-data-custom-first5mb + - wireless-usage-data-domestic-roaming + - wireless-usage-data-europe + - wireless-usage-data-individual-additionalgb + - wireless-usage-data-individual-firstgb + - wireless-usage-data-international-roaming-canada + - wireless-usage-data-international-roaming-india + - wireless-usage-data-international-roaming-mexico + - wireless-usage-data-northamerica + - wireless-usage-data-oceania + - wireless-usage-data-pooled + - wireless-usage-data-pooled-downlink + - wireless-usage-data-pooled-uplink + - wireless-usage-mrc + - wireless-usage-mrc-custom + - wireless-usage-mrc-individual + - wireless-usage-mrc-pooled + - wireless-usage-mrc-suspended + - wireless-usage-sms + - wireless-usage-voice + usage.usage_record.usage_record_today: + 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 accrued the usage. + api_version: + type: string + nullable: true + description: The API version used to create the resource. + as_of: + type: string + nullable: true + description: Usage records up to date as of this timestamp, formatted as + YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + category: + type: string + $ref: '#/components/schemas/usage_record_today_enum_category' + nullable: true + description: The category of usage. For more information, see [Usage Categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories). + count: + type: string + nullable: true + description: The number of usage events, such as the number of calls. + count_unit: + type: string + nullable: true + description: The units in which `count` is measured, such as `calls` for + calls or `messages` for SMS. + description: + type: string + nullable: true + description: A plain-language description of the usage category. + end_date: + type: string + format: date + nullable: true + description: The last date for which usage is included in the UsageRecord. + The date is specified in GMT and formatted as `YYYY-MM-DD`. + price: + type: number + nullable: true + description: The total price of the usage in the currency specified in `price_unit` + and associated with the account. + price_unit: + type: string + format: currency + nullable: true + description: The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) + format, such as `usd`, `eur`, and `jpy`. + start_date: + type: string + format: date + nullable: true + description: The first date for which usage is included in this UsageRecord. + The date is specified in GMT and formatted as `YYYY-MM-DD`. + subresource_uris: + type: object + format: uri-map + nullable: true + description: A list of related resources identified by their URIs. For more + information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + usage: + type: string + nullable: true + description: The amount used to bill usage and measured in units described + in `usage_unit`. + usage_unit: + type: string + nullable: true + description: The units in which `usage` is measured, such as `minutes` for + calls or `messages` for SMS. + usage_record_today_enum_category: + type: string + enum: + - a2p-registration-fees + - agent-conference + - amazon-polly + - answering-machine-detection + - authy-authentications + - authy-calls-outbound + - authy-monthly-fees + - authy-phone-intelligence + - authy-phone-verifications + - authy-sms-outbound + - call-progess-events + - calleridlookups + - calls + - calls-client + - calls-globalconference + - calls-inbound + - calls-inbound-local + - calls-inbound-mobile + - calls-inbound-tollfree + - calls-outbound + - calls-pay-verb-transactions + - calls-recordings + - calls-sip + - calls-sip-inbound + - calls-sip-outbound + - calls-transfers + - carrier-lookups + - conversations + - conversations-api-requests + - conversations-conversation-events + - conversations-endpoint-connectivity + - conversations-events + - conversations-participant-events + - conversations-participants + - cps + - flex-usage + - fraud-lookups + - group-rooms + - group-rooms-data-track + - group-rooms-encrypted-media-recorded + - group-rooms-media-downloaded + - group-rooms-media-recorded + - group-rooms-media-routed + - group-rooms-media-stored + - group-rooms-participant-minutes + - group-rooms-recorded-minutes + - imp-v1-usage + - lookups + - marketplace + - marketplace-algorithmia-named-entity-recognition + - marketplace-cadence-transcription + - marketplace-cadence-translation + - marketplace-capio-speech-to-text + - marketplace-convriza-ababa + - marketplace-deepgram-phrase-detector + - marketplace-digital-segment-business-info + - marketplace-facebook-offline-conversions + - marketplace-google-speech-to-text + - marketplace-ibm-watson-message-insights + - marketplace-ibm-watson-message-sentiment + - marketplace-ibm-watson-recording-analysis + - marketplace-ibm-watson-tone-analyzer + - marketplace-icehook-systems-scout + - marketplace-infogroup-dataaxle-bizinfo + - marketplace-keen-io-contact-center-analytics + - marketplace-marchex-cleancall + - marketplace-marchex-sentiment-analysis-for-sms + - marketplace-marketplace-nextcaller-social-id + - marketplace-mobile-commons-opt-out-classifier + - marketplace-nexiwave-voicemail-to-text + - marketplace-nextcaller-advanced-caller-identification + - marketplace-nomorobo-spam-score + - marketplace-payfone-tcpa-compliance + - marketplace-remeeting-automatic-speech-recognition + - marketplace-tcpa-defense-solutions-blacklist-feed + - marketplace-telo-opencnam + - marketplace-truecnam-true-spam + - marketplace-twilio-caller-name-lookup-us + - marketplace-twilio-carrier-information-lookup + - marketplace-voicebase-pci + - marketplace-voicebase-transcription + - marketplace-voicebase-transcription-custom-vocabulary + - marketplace-whitepages-pro-caller-identification + - marketplace-whitepages-pro-phone-intelligence + - marketplace-whitepages-pro-phone-reputation + - marketplace-wolfarm-spoken-results + - marketplace-wolfram-short-answer + - marketplace-ytica-contact-center-reporting-analytics + - mediastorage + - mms + - mms-inbound + - mms-inbound-longcode + - mms-inbound-shortcode + - mms-messages-carrierfees + - mms-outbound + - mms-outbound-longcode + - mms-outbound-shortcode + - monitor-reads + - monitor-storage + - monitor-writes + - notify + - notify-actions-attempts + - notify-channels + - number-format-lookups + - pchat + - pchat-users + - peer-to-peer-rooms-participant-minutes + - pfax + - pfax-minutes + - pfax-minutes-inbound + - pfax-minutes-outbound + - pfax-pages + - phonenumbers + - phonenumbers-cps + - phonenumbers-emergency + - phonenumbers-local + - phonenumbers-mobile + - phonenumbers-setups + - phonenumbers-tollfree + - premiumsupport + - proxy + - proxy-active-sessions + - pstnconnectivity + - pv + - pv-composition-media-downloaded + - pv-composition-media-encrypted + - pv-composition-media-stored + - pv-composition-minutes + - pv-recording-compositions + - pv-room-participants + - pv-room-participants-au1 + - pv-room-participants-br1 + - pv-room-participants-ie1 + - pv-room-participants-jp1 + - pv-room-participants-sg1 + - pv-room-participants-us1 + - pv-room-participants-us2 + - pv-rooms + - pv-sip-endpoint-registrations + - recordings + - recordingstorage + - rooms-group-bandwidth + - rooms-group-minutes + - rooms-peer-to-peer-minutes + - shortcodes + - shortcodes-customerowned + - shortcodes-mms-enablement + - shortcodes-mps + - shortcodes-random + - shortcodes-uk + - shortcodes-vanity + - small-group-rooms + - small-group-rooms-data-track + - small-group-rooms-participant-minutes + - sms + - sms-inbound + - sms-inbound-longcode + - sms-inbound-shortcode + - sms-messages-carrierfees + - sms-messages-features + - sms-messages-features-senderid + - sms-outbound + - sms-outbound-content-inspection + - sms-outbound-longcode + - sms-outbound-shortcode + - speech-recognition + - studio-engagements + - sync + - sync-actions + - sync-endpoint-hours + - sync-endpoint-hours-above-daily-cap + - taskrouter-tasks + - totalprice + - transcriptions + - trunking-cps + - trunking-emergency-calls + - trunking-origination + - trunking-origination-local + - trunking-origination-mobile + - trunking-origination-tollfree + - trunking-recordings + - trunking-secure + - trunking-termination + - tts-google + - turnmegabytes + - turnmegabytes-australia + - turnmegabytes-brasil + - turnmegabytes-germany + - turnmegabytes-india + - turnmegabytes-ireland + - turnmegabytes-japan + - turnmegabytes-singapore + - turnmegabytes-useast + - turnmegabytes-uswest + - twilio-interconnect + - verify-push + - verify-totp + - verify-whatsapp-conversations-business-initiated + - video-recordings + - virtual-agent + - voice-insights + - voice-insights-client-insights-on-demand-minute + - voice-insights-ptsn-insights-on-demand-minute + - voice-insights-sip-interface-insights-on-demand-minute + - voice-insights-sip-trunking-insights-on-demand-minute + - voice-intelligence + - voice-intelligence-transcription + - voice-intelligence-operators + - wireless + - wireless-orders + - wireless-orders-artwork + - wireless-orders-bulk + - wireless-orders-esim + - wireless-orders-starter + - wireless-usage + - wireless-usage-commands + - wireless-usage-commands-africa + - wireless-usage-commands-asia + - wireless-usage-commands-centralandsouthamerica + - wireless-usage-commands-europe + - wireless-usage-commands-home + - wireless-usage-commands-northamerica + - wireless-usage-commands-oceania + - wireless-usage-commands-roaming + - wireless-usage-data + - wireless-usage-data-africa + - wireless-usage-data-asia + - wireless-usage-data-centralandsouthamerica + - wireless-usage-data-custom-additionalmb + - wireless-usage-data-custom-first5mb + - wireless-usage-data-domestic-roaming + - wireless-usage-data-europe + - wireless-usage-data-individual-additionalgb + - wireless-usage-data-individual-firstgb + - wireless-usage-data-international-roaming-canada + - wireless-usage-data-international-roaming-india + - wireless-usage-data-international-roaming-mexico + - wireless-usage-data-northamerica + - wireless-usage-data-oceania + - wireless-usage-data-pooled + - wireless-usage-data-pooled-downlink + - wireless-usage-data-pooled-uplink + - wireless-usage-mrc + - wireless-usage-mrc-custom + - wireless-usage-mrc-individual + - wireless-usage-mrc-pooled + - wireless-usage-mrc-suspended + - wireless-usage-sms + - wireless-usage-voice + usage.usage_record.usage_record_yearly: + 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 accrued the usage. + api_version: + type: string + nullable: true + description: The API version used to create the resource. + as_of: + type: string + nullable: true + description: Usage records up to date as of this timestamp, formatted as + YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + category: + type: string + $ref: '#/components/schemas/usage_record_yearly_enum_category' + nullable: true + description: The category of usage. For more information, see [Usage Categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories). + count: + type: string + nullable: true + description: The number of usage events, such as the number of calls. + count_unit: + type: string + nullable: true + description: The units in which `count` is measured, such as `calls` for + calls or `messages` for SMS. + description: + type: string + nullable: true + description: A plain-language description of the usage category. + end_date: + type: string + format: date + nullable: true + description: The last date for which usage is included in the UsageRecord. + The date is specified in GMT and formatted as `YYYY-MM-DD`. + price: + type: number + nullable: true + description: The total price of the usage in the currency specified in `price_unit` + and associated with the account. + price_unit: + type: string + format: currency + nullable: true + description: The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) + format, such as `usd`, `eur`, and `jpy`. + start_date: + type: string + format: date + nullable: true + description: The first date for which usage is included in this UsageRecord. + The date is specified in GMT and formatted as `YYYY-MM-DD`. + subresource_uris: + type: object + format: uri-map + nullable: true + description: A list of related resources identified by their URIs. For more + information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + usage: + type: string + nullable: true + description: The amount used to bill usage and measured in units described + in `usage_unit`. + usage_unit: + type: string + nullable: true + description: The units in which `usage` is measured, such as `minutes` for + calls or `messages` for SMS. + usage_record_yearly_enum_category: + type: string + enum: + - a2p-registration-fees + - agent-conference + - amazon-polly + - answering-machine-detection + - authy-authentications + - authy-calls-outbound + - authy-monthly-fees + - authy-phone-intelligence + - authy-phone-verifications + - authy-sms-outbound + - call-progess-events + - calleridlookups + - calls + - calls-client + - calls-globalconference + - calls-inbound + - calls-inbound-local + - calls-inbound-mobile + - calls-inbound-tollfree + - calls-outbound + - calls-pay-verb-transactions + - calls-recordings + - calls-sip + - calls-sip-inbound + - calls-sip-outbound + - calls-transfers + - carrier-lookups + - conversations + - conversations-api-requests + - conversations-conversation-events + - conversations-endpoint-connectivity + - conversations-events + - conversations-participant-events + - conversations-participants + - cps + - flex-usage + - fraud-lookups + - group-rooms + - group-rooms-data-track + - group-rooms-encrypted-media-recorded + - group-rooms-media-downloaded + - group-rooms-media-recorded + - group-rooms-media-routed + - group-rooms-media-stored + - group-rooms-participant-minutes + - group-rooms-recorded-minutes + - imp-v1-usage + - lookups + - marketplace + - marketplace-algorithmia-named-entity-recognition + - marketplace-cadence-transcription + - marketplace-cadence-translation + - marketplace-capio-speech-to-text + - marketplace-convriza-ababa + - marketplace-deepgram-phrase-detector + - marketplace-digital-segment-business-info + - marketplace-facebook-offline-conversions + - marketplace-google-speech-to-text + - marketplace-ibm-watson-message-insights + - marketplace-ibm-watson-message-sentiment + - marketplace-ibm-watson-recording-analysis + - marketplace-ibm-watson-tone-analyzer + - marketplace-icehook-systems-scout + - marketplace-infogroup-dataaxle-bizinfo + - marketplace-keen-io-contact-center-analytics + - marketplace-marchex-cleancall + - marketplace-marchex-sentiment-analysis-for-sms + - marketplace-marketplace-nextcaller-social-id + - marketplace-mobile-commons-opt-out-classifier + - marketplace-nexiwave-voicemail-to-text + - marketplace-nextcaller-advanced-caller-identification + - marketplace-nomorobo-spam-score + - marketplace-payfone-tcpa-compliance + - marketplace-remeeting-automatic-speech-recognition + - marketplace-tcpa-defense-solutions-blacklist-feed + - marketplace-telo-opencnam + - marketplace-truecnam-true-spam + - marketplace-twilio-caller-name-lookup-us + - marketplace-twilio-carrier-information-lookup + - marketplace-voicebase-pci + - marketplace-voicebase-transcription + - marketplace-voicebase-transcription-custom-vocabulary + - marketplace-whitepages-pro-caller-identification + - marketplace-whitepages-pro-phone-intelligence + - marketplace-whitepages-pro-phone-reputation + - marketplace-wolfarm-spoken-results + - marketplace-wolfram-short-answer + - marketplace-ytica-contact-center-reporting-analytics + - mediastorage + - mms + - mms-inbound + - mms-inbound-longcode + - mms-inbound-shortcode + - mms-messages-carrierfees + - mms-outbound + - mms-outbound-longcode + - mms-outbound-shortcode + - monitor-reads + - monitor-storage + - monitor-writes + - notify + - notify-actions-attempts + - notify-channels + - number-format-lookups + - pchat + - pchat-users + - peer-to-peer-rooms-participant-minutes + - pfax + - pfax-minutes + - pfax-minutes-inbound + - pfax-minutes-outbound + - pfax-pages + - phonenumbers + - phonenumbers-cps + - phonenumbers-emergency + - phonenumbers-local + - phonenumbers-mobile + - phonenumbers-setups + - phonenumbers-tollfree + - premiumsupport + - proxy + - proxy-active-sessions + - pstnconnectivity + - pv + - pv-composition-media-downloaded + - pv-composition-media-encrypted + - pv-composition-media-stored + - pv-composition-minutes + - pv-recording-compositions + - pv-room-participants + - pv-room-participants-au1 + - pv-room-participants-br1 + - pv-room-participants-ie1 + - pv-room-participants-jp1 + - pv-room-participants-sg1 + - pv-room-participants-us1 + - pv-room-participants-us2 + - pv-rooms + - pv-sip-endpoint-registrations + - recordings + - recordingstorage + - rooms-group-bandwidth + - rooms-group-minutes + - rooms-peer-to-peer-minutes + - shortcodes + - shortcodes-customerowned + - shortcodes-mms-enablement + - shortcodes-mps + - shortcodes-random + - shortcodes-uk + - shortcodes-vanity + - small-group-rooms + - small-group-rooms-data-track + - small-group-rooms-participant-minutes + - sms + - sms-inbound + - sms-inbound-longcode + - sms-inbound-shortcode + - sms-messages-carrierfees + - sms-messages-features + - sms-messages-features-senderid + - sms-outbound + - sms-outbound-content-inspection + - sms-outbound-longcode + - sms-outbound-shortcode + - speech-recognition + - studio-engagements + - sync + - sync-actions + - sync-endpoint-hours + - sync-endpoint-hours-above-daily-cap + - taskrouter-tasks + - totalprice + - transcriptions + - trunking-cps + - trunking-emergency-calls + - trunking-origination + - trunking-origination-local + - trunking-origination-mobile + - trunking-origination-tollfree + - trunking-recordings + - trunking-secure + - trunking-termination + - tts-google + - turnmegabytes + - turnmegabytes-australia + - turnmegabytes-brasil + - turnmegabytes-germany + - turnmegabytes-india + - turnmegabytes-ireland + - turnmegabytes-japan + - turnmegabytes-singapore + - turnmegabytes-useast + - turnmegabytes-uswest + - twilio-interconnect + - verify-push + - verify-totp + - verify-whatsapp-conversations-business-initiated + - video-recordings + - virtual-agent + - voice-insights + - voice-insights-client-insights-on-demand-minute + - voice-insights-ptsn-insights-on-demand-minute + - voice-insights-sip-interface-insights-on-demand-minute + - voice-insights-sip-trunking-insights-on-demand-minute + - voice-intelligence + - voice-intelligence-transcription + - voice-intelligence-operators + - wireless + - wireless-orders + - wireless-orders-artwork + - wireless-orders-bulk + - wireless-orders-esim + - wireless-orders-starter + - wireless-usage + - wireless-usage-commands + - wireless-usage-commands-africa + - wireless-usage-commands-asia + - wireless-usage-commands-centralandsouthamerica + - wireless-usage-commands-europe + - wireless-usage-commands-home + - wireless-usage-commands-northamerica + - wireless-usage-commands-oceania + - wireless-usage-commands-roaming + - wireless-usage-data + - wireless-usage-data-africa + - wireless-usage-data-asia + - wireless-usage-data-centralandsouthamerica + - wireless-usage-data-custom-additionalmb + - wireless-usage-data-custom-first5mb + - wireless-usage-data-domestic-roaming + - wireless-usage-data-europe + - wireless-usage-data-individual-additionalgb + - wireless-usage-data-individual-firstgb + - wireless-usage-data-international-roaming-canada + - wireless-usage-data-international-roaming-india + - wireless-usage-data-international-roaming-mexico + - wireless-usage-data-northamerica + - wireless-usage-data-oceania + - wireless-usage-data-pooled + - wireless-usage-data-pooled-downlink + - wireless-usage-data-pooled-uplink + - wireless-usage-mrc + - wireless-usage-mrc-custom + - wireless-usage-mrc-individual + - wireless-usage-mrc-pooled + - wireless-usage-mrc-suspended + - wireless-usage-sms + - wireless-usage-voice + usage.usage_record.usage_record_yesterday: + 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 accrued the usage. + api_version: + type: string + nullable: true + description: The API version used to create the resource. + as_of: + type: string + nullable: true + description: Usage records up to date as of this timestamp, formatted as + YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT + category: + type: string + $ref: '#/components/schemas/usage_record_yesterday_enum_category' + nullable: true + description: The category of usage. For more information, see [Usage Categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories). + count: + type: string + nullable: true + description: The number of usage events, such as the number of calls. + count_unit: + type: string + nullable: true + description: The units in which `count` is measured, such as `calls` for + calls or `messages` for SMS. + description: + type: string + nullable: true + description: A plain-language description of the usage category. + end_date: + type: string + format: date + nullable: true + description: The last date for which usage is included in the UsageRecord. + The date is specified in GMT and formatted as `YYYY-MM-DD`. + price: + type: number + nullable: true + description: The total price of the usage in the currency specified in `price_unit` + and associated with the account. + price_unit: + type: string + format: currency + nullable: true + description: The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) + format, such as `usd`, `eur`, and `jpy`. + start_date: + type: string + format: date + nullable: true + description: The first date for which usage is included in this UsageRecord. + The date is specified in GMT and formatted as `YYYY-MM-DD`. + subresource_uris: + type: object + format: uri-map + nullable: true + description: A list of related resources identified by their URIs. For more + information, see [List Subresources](https://www.twilio.com/docs/usage/api/usage-record#list-subresources). + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + usage: + type: string + nullable: true + description: The amount used to bill usage and measured in units described + in `usage_unit`. + usage_unit: + type: string + nullable: true + description: The units in which `usage` is measured, such as `minutes` for + calls or `messages` for SMS. + usage_record_yesterday_enum_category: + type: string + enum: + - a2p-registration-fees + - agent-conference + - amazon-polly + - answering-machine-detection + - authy-authentications + - authy-calls-outbound + - authy-monthly-fees + - authy-phone-intelligence + - authy-phone-verifications + - authy-sms-outbound + - call-progess-events + - calleridlookups + - calls + - calls-client + - calls-globalconference + - calls-inbound + - calls-inbound-local + - calls-inbound-mobile + - calls-inbound-tollfree + - calls-outbound + - calls-pay-verb-transactions + - calls-recordings + - calls-sip + - calls-sip-inbound + - calls-sip-outbound + - calls-transfers + - carrier-lookups + - conversations + - conversations-api-requests + - conversations-conversation-events + - conversations-endpoint-connectivity + - conversations-events + - conversations-participant-events + - conversations-participants + - cps + - flex-usage + - fraud-lookups + - group-rooms + - group-rooms-data-track + - group-rooms-encrypted-media-recorded + - group-rooms-media-downloaded + - group-rooms-media-recorded + - group-rooms-media-routed + - group-rooms-media-stored + - group-rooms-participant-minutes + - group-rooms-recorded-minutes + - imp-v1-usage + - lookups + - marketplace + - marketplace-algorithmia-named-entity-recognition + - marketplace-cadence-transcription + - marketplace-cadence-translation + - marketplace-capio-speech-to-text + - marketplace-convriza-ababa + - marketplace-deepgram-phrase-detector + - marketplace-digital-segment-business-info + - marketplace-facebook-offline-conversions + - marketplace-google-speech-to-text + - marketplace-ibm-watson-message-insights + - marketplace-ibm-watson-message-sentiment + - marketplace-ibm-watson-recording-analysis + - marketplace-ibm-watson-tone-analyzer + - marketplace-icehook-systems-scout + - marketplace-infogroup-dataaxle-bizinfo + - marketplace-keen-io-contact-center-analytics + - marketplace-marchex-cleancall + - marketplace-marchex-sentiment-analysis-for-sms + - marketplace-marketplace-nextcaller-social-id + - marketplace-mobile-commons-opt-out-classifier + - marketplace-nexiwave-voicemail-to-text + - marketplace-nextcaller-advanced-caller-identification + - marketplace-nomorobo-spam-score + - marketplace-payfone-tcpa-compliance + - marketplace-remeeting-automatic-speech-recognition + - marketplace-tcpa-defense-solutions-blacklist-feed + - marketplace-telo-opencnam + - marketplace-truecnam-true-spam + - marketplace-twilio-caller-name-lookup-us + - marketplace-twilio-carrier-information-lookup + - marketplace-voicebase-pci + - marketplace-voicebase-transcription + - marketplace-voicebase-transcription-custom-vocabulary + - marketplace-whitepages-pro-caller-identification + - marketplace-whitepages-pro-phone-intelligence + - marketplace-whitepages-pro-phone-reputation + - marketplace-wolfarm-spoken-results + - marketplace-wolfram-short-answer + - marketplace-ytica-contact-center-reporting-analytics + - mediastorage + - mms + - mms-inbound + - mms-inbound-longcode + - mms-inbound-shortcode + - mms-messages-carrierfees + - mms-outbound + - mms-outbound-longcode + - mms-outbound-shortcode + - monitor-reads + - monitor-storage + - monitor-writes + - notify + - notify-actions-attempts + - notify-channels + - number-format-lookups + - pchat + - pchat-users + - peer-to-peer-rooms-participant-minutes + - pfax + - pfax-minutes + - pfax-minutes-inbound + - pfax-minutes-outbound + - pfax-pages + - phonenumbers + - phonenumbers-cps + - phonenumbers-emergency + - phonenumbers-local + - phonenumbers-mobile + - phonenumbers-setups + - phonenumbers-tollfree + - premiumsupport + - proxy + - proxy-active-sessions + - pstnconnectivity + - pv + - pv-composition-media-downloaded + - pv-composition-media-encrypted + - pv-composition-media-stored + - pv-composition-minutes + - pv-recording-compositions + - pv-room-participants + - pv-room-participants-au1 + - pv-room-participants-br1 + - pv-room-participants-ie1 + - pv-room-participants-jp1 + - pv-room-participants-sg1 + - pv-room-participants-us1 + - pv-room-participants-us2 + - pv-rooms + - pv-sip-endpoint-registrations + - recordings + - recordingstorage + - rooms-group-bandwidth + - rooms-group-minutes + - rooms-peer-to-peer-minutes + - shortcodes + - shortcodes-customerowned + - shortcodes-mms-enablement + - shortcodes-mps + - shortcodes-random + - shortcodes-uk + - shortcodes-vanity + - small-group-rooms + - small-group-rooms-data-track + - small-group-rooms-participant-minutes + - sms + - sms-inbound + - sms-inbound-longcode + - sms-inbound-shortcode + - sms-messages-carrierfees + - sms-messages-features + - sms-messages-features-senderid + - sms-outbound + - sms-outbound-content-inspection + - sms-outbound-longcode + - sms-outbound-shortcode + - speech-recognition + - studio-engagements + - sync + - sync-actions + - sync-endpoint-hours + - sync-endpoint-hours-above-daily-cap + - taskrouter-tasks + - totalprice + - transcriptions + - trunking-cps + - trunking-emergency-calls + - trunking-origination + - trunking-origination-local + - trunking-origination-mobile + - trunking-origination-tollfree + - trunking-recordings + - trunking-secure + - trunking-termination + - tts-google + - turnmegabytes + - turnmegabytes-australia + - turnmegabytes-brasil + - turnmegabytes-germany + - turnmegabytes-india + - turnmegabytes-ireland + - turnmegabytes-japan + - turnmegabytes-singapore + - turnmegabytes-useast + - turnmegabytes-uswest + - twilio-interconnect + - verify-push + - verify-totp + - verify-whatsapp-conversations-business-initiated + - video-recordings + - virtual-agent + - voice-insights + - voice-insights-client-insights-on-demand-minute + - voice-insights-ptsn-insights-on-demand-minute + - voice-insights-sip-interface-insights-on-demand-minute + - voice-insights-sip-trunking-insights-on-demand-minute + - voice-intelligence + - voice-intelligence-transcription + - voice-intelligence-operators + - wireless + - wireless-orders + - wireless-orders-artwork + - wireless-orders-bulk + - wireless-orders-esim + - wireless-orders-starter + - wireless-usage + - wireless-usage-commands + - wireless-usage-commands-africa + - wireless-usage-commands-asia + - wireless-usage-commands-centralandsouthamerica + - wireless-usage-commands-europe + - wireless-usage-commands-home + - wireless-usage-commands-northamerica + - wireless-usage-commands-oceania + - wireless-usage-commands-roaming + - wireless-usage-data + - wireless-usage-data-africa + - wireless-usage-data-asia + - wireless-usage-data-centralandsouthamerica + - wireless-usage-data-custom-additionalmb + - wireless-usage-data-custom-first5mb + - wireless-usage-data-domestic-roaming + - wireless-usage-data-europe + - wireless-usage-data-individual-additionalgb + - wireless-usage-data-individual-firstgb + - wireless-usage-data-international-roaming-canada + - wireless-usage-data-international-roaming-india + - wireless-usage-data-international-roaming-mexico + - wireless-usage-data-northamerica + - wireless-usage-data-oceania + - wireless-usage-data-pooled + - wireless-usage-data-pooled-downlink + - wireless-usage-data-pooled-uplink + - wireless-usage-mrc + - wireless-usage-mrc-custom + - wireless-usage-mrc-individual + - wireless-usage-mrc-pooled + - wireless-usage-mrc-suspended + - wireless-usage-sms + - wireless-usage-voice + usage.usage_trigger: + 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 the trigger monitors. + api_version: + type: string + nullable: true + description: The API version used to create the resource. + callback_method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + nullable: true + description: 'The HTTP method we use to call `callback_url`. Can be: `GET` + or `POST`.' + callback_url: + type: string + format: uri + nullable: true + description: The URL we call using the `callback_method` when the trigger + fires. + current_value: + type: string + nullable: true + description: The current value of the field the trigger is watching. + date_created: + type: string + format: date-time-rfc-2822 + 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_fired: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date and time in GMT that the trigger was last fired specified + in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + date_updated: + type: string + format: date-time-rfc-2822 + 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. + friendly_name: + type: string + nullable: true + description: The string that you assigned to describe the trigger. + recurring: + type: string + $ref: '#/components/schemas/usage_trigger_enum_recurring' + nullable: true + description: 'The frequency of a recurring UsageTrigger. Can be: `daily`, + `monthly`, or `yearly` for recurring triggers or empty for non-recurring + triggers. A trigger will only fire once during each period. Recurring + times are in GMT.' + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^UT[0-9a-fA-F]{32}$ + nullable: true + description: The unique string that that we created to identify the UsageTrigger + resource. + trigger_by: + type: string + $ref: '#/components/schemas/usage_trigger_enum_trigger_field' + nullable: true + description: 'The field in the [UsageRecord](https://www.twilio.com/docs/usage/api/usage-record) + resource that fires the trigger. Can be: `count`, `usage`, or `price`, + as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price).' + trigger_value: + type: string + nullable: true + description: The value at which the trigger will fire. Must be a positive, + numeric value. + uri: + type: string + nullable: true + description: The URI of the resource, relative to `https://api.twilio.com`. + usage_category: + type: string + $ref: '#/components/schemas/usage_trigger_enum_usage_category' + nullable: true + description: The usage category the trigger watches. Must be one of the + supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories). + usage_record_uri: + type: string + nullable: true + description: The URI of the [UsageRecord](https://www.twilio.com/docs/usage/api/usage-record) + resource this trigger watches, relative to `https://api.twilio.com`. + usage_trigger_enum_usage_category: + type: string + enum: + - a2p-registration-fees + - agent-conference + - amazon-polly + - answering-machine-detection + - authy-authentications + - authy-calls-outbound + - authy-monthly-fees + - authy-phone-intelligence + - authy-phone-verifications + - authy-sms-outbound + - call-progess-events + - calleridlookups + - calls + - calls-client + - calls-globalconference + - calls-inbound + - calls-inbound-local + - calls-inbound-mobile + - calls-inbound-tollfree + - calls-outbound + - calls-pay-verb-transactions + - calls-recordings + - calls-sip + - calls-sip-inbound + - calls-sip-outbound + - calls-transfers + - carrier-lookups + - conversations + - conversations-api-requests + - conversations-conversation-events + - conversations-endpoint-connectivity + - conversations-events + - conversations-participant-events + - conversations-participants + - cps + - flex-usage + - fraud-lookups + - group-rooms + - group-rooms-data-track + - group-rooms-encrypted-media-recorded + - group-rooms-media-downloaded + - group-rooms-media-recorded + - group-rooms-media-routed + - group-rooms-media-stored + - group-rooms-participant-minutes + - group-rooms-recorded-minutes + - imp-v1-usage + - lookups + - marketplace + - marketplace-algorithmia-named-entity-recognition + - marketplace-cadence-transcription + - marketplace-cadence-translation + - marketplace-capio-speech-to-text + - marketplace-convriza-ababa + - marketplace-deepgram-phrase-detector + - marketplace-digital-segment-business-info + - marketplace-facebook-offline-conversions + - marketplace-google-speech-to-text + - marketplace-ibm-watson-message-insights + - marketplace-ibm-watson-message-sentiment + - marketplace-ibm-watson-recording-analysis + - marketplace-ibm-watson-tone-analyzer + - marketplace-icehook-systems-scout + - marketplace-infogroup-dataaxle-bizinfo + - marketplace-keen-io-contact-center-analytics + - marketplace-marchex-cleancall + - marketplace-marchex-sentiment-analysis-for-sms + - marketplace-marketplace-nextcaller-social-id + - marketplace-mobile-commons-opt-out-classifier + - marketplace-nexiwave-voicemail-to-text + - marketplace-nextcaller-advanced-caller-identification + - marketplace-nomorobo-spam-score + - marketplace-payfone-tcpa-compliance + - marketplace-remeeting-automatic-speech-recognition + - marketplace-tcpa-defense-solutions-blacklist-feed + - marketplace-telo-opencnam + - marketplace-truecnam-true-spam + - marketplace-twilio-caller-name-lookup-us + - marketplace-twilio-carrier-information-lookup + - marketplace-voicebase-pci + - marketplace-voicebase-transcription + - marketplace-voicebase-transcription-custom-vocabulary + - marketplace-whitepages-pro-caller-identification + - marketplace-whitepages-pro-phone-intelligence + - marketplace-whitepages-pro-phone-reputation + - marketplace-wolfarm-spoken-results + - marketplace-wolfram-short-answer + - marketplace-ytica-contact-center-reporting-analytics + - mediastorage + - mms + - mms-inbound + - mms-inbound-longcode + - mms-inbound-shortcode + - mms-messages-carrierfees + - mms-outbound + - mms-outbound-longcode + - mms-outbound-shortcode + - monitor-reads + - monitor-storage + - monitor-writes + - notify + - notify-actions-attempts + - notify-channels + - number-format-lookups + - pchat + - pchat-users + - peer-to-peer-rooms-participant-minutes + - pfax + - pfax-minutes + - pfax-minutes-inbound + - pfax-minutes-outbound + - pfax-pages + - phonenumbers + - phonenumbers-cps + - phonenumbers-emergency + - phonenumbers-local + - phonenumbers-mobile + - phonenumbers-setups + - phonenumbers-tollfree + - premiumsupport + - proxy + - proxy-active-sessions + - pstnconnectivity + - pv + - pv-composition-media-downloaded + - pv-composition-media-encrypted + - pv-composition-media-stored + - pv-composition-minutes + - pv-recording-compositions + - pv-room-participants + - pv-room-participants-au1 + - pv-room-participants-br1 + - pv-room-participants-ie1 + - pv-room-participants-jp1 + - pv-room-participants-sg1 + - pv-room-participants-us1 + - pv-room-participants-us2 + - pv-rooms + - pv-sip-endpoint-registrations + - recordings + - recordingstorage + - rooms-group-bandwidth + - rooms-group-minutes + - rooms-peer-to-peer-minutes + - shortcodes + - shortcodes-customerowned + - shortcodes-mms-enablement + - shortcodes-mps + - shortcodes-random + - shortcodes-uk + - shortcodes-vanity + - small-group-rooms + - small-group-rooms-data-track + - small-group-rooms-participant-minutes + - sms + - sms-inbound + - sms-inbound-longcode + - sms-inbound-shortcode + - sms-messages-carrierfees + - sms-messages-features + - sms-messages-features-senderid + - sms-outbound + - sms-outbound-content-inspection + - sms-outbound-longcode + - sms-outbound-shortcode + - speech-recognition + - studio-engagements + - sync + - sync-actions + - sync-endpoint-hours + - sync-endpoint-hours-above-daily-cap + - taskrouter-tasks + - totalprice + - transcriptions + - trunking-cps + - trunking-emergency-calls + - trunking-origination + - trunking-origination-local + - trunking-origination-mobile + - trunking-origination-tollfree + - trunking-recordings + - trunking-secure + - trunking-termination + - tts-google + - turnmegabytes + - turnmegabytes-australia + - turnmegabytes-brasil + - turnmegabytes-germany + - turnmegabytes-india + - turnmegabytes-ireland + - turnmegabytes-japan + - turnmegabytes-singapore + - turnmegabytes-useast + - turnmegabytes-uswest + - twilio-interconnect + - verify-push + - verify-totp + - verify-whatsapp-conversations-business-initiated + - video-recordings + - virtual-agent + - voice-insights + - voice-insights-client-insights-on-demand-minute + - voice-insights-ptsn-insights-on-demand-minute + - voice-insights-sip-interface-insights-on-demand-minute + - voice-insights-sip-trunking-insights-on-demand-minute + - voice-intelligence + - voice-intelligence-transcription + - voice-intelligence-operators + - wireless + - wireless-orders + - wireless-orders-artwork + - wireless-orders-bulk + - wireless-orders-esim + - wireless-orders-starter + - wireless-usage + - wireless-usage-commands + - wireless-usage-commands-africa + - wireless-usage-commands-asia + - wireless-usage-commands-centralandsouthamerica + - wireless-usage-commands-europe + - wireless-usage-commands-home + - wireless-usage-commands-northamerica + - wireless-usage-commands-oceania + - wireless-usage-commands-roaming + - wireless-usage-data + - wireless-usage-data-africa + - wireless-usage-data-asia + - wireless-usage-data-centralandsouthamerica + - wireless-usage-data-custom-additionalmb + - wireless-usage-data-custom-first5mb + - wireless-usage-data-domestic-roaming + - wireless-usage-data-europe + - wireless-usage-data-individual-additionalgb + - wireless-usage-data-individual-firstgb + - wireless-usage-data-international-roaming-canada + - wireless-usage-data-international-roaming-india + - wireless-usage-data-international-roaming-mexico + - wireless-usage-data-northamerica + - wireless-usage-data-oceania + - wireless-usage-data-pooled + - wireless-usage-data-pooled-downlink + - wireless-usage-data-pooled-uplink + - wireless-usage-mrc + - wireless-usage-mrc-custom + - wireless-usage-mrc-individual + - wireless-usage-mrc-pooled + - wireless-usage-mrc-suspended + - wireless-usage-sms + - wireless-usage-voice + usage_trigger_enum_recurring: + type: string + enum: + - daily + - monthly + - yearly + - alltime + usage_trigger_enum_trigger_field: + type: string + enum: + - count + - usage + - price + call.user_defined_message: + 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 User Defined Message. + call_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the User Defined Message is associated with. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^KX[0-9a-fA-F]{32}$ + nullable: true + description: The SID that uniquely identifies this User Defined Message. + date_created: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that this User Defined Message was created, given + in RFC 2822 format. + call.user_defined_message_subscription: + 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 subscribed to the User Defined Messages. + call_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the User Defined Message Subscription is associated with. This refers + to the Call SID that is producing the User Defined Messages. + sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^ZY[0-9a-fA-F]{32}$ + nullable: true + description: The SID that uniquely identifies this User Defined Message + Subscription. + date_created: + type: string + format: date-time-rfc-2822 + nullable: true + description: The date that this User Defined Message Subscription was created, + given in RFC 2822 format. + uri: + type: string + nullable: true + description: The URI of the User Defined Message Subscription Resource, + relative to `https://api.twilio.com`. + validation_request: + 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) + responsible for the Caller ID. + call_sid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + nullable: true + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the Caller ID is associated with. + friendly_name: + type: string + nullable: true + description: The string that you assigned to describe the resource. + phone_number: + type: string + format: phone-number + nullable: true + description: The phone number to verify in [E.164](https://www.twilio.com/docs/glossary/what-e164) + format, which consists of a + followed by the country code and subscriber + number. + validation_code: + type: string + nullable: true + description: The 6 digit validation code that someone must enter to validate + the Caller ID when `phone_number` is called. + securitySchemes: + accountSid_authToken: + type: http + scheme: basic +info: + title: Twilio - 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.51.0 +openapi: 3.0.1 +paths: + /2010-04-01/Accounts.json: + servers: + - url: https://api.twilio.com + description: Twilio accounts (aka Project) or subaccounts + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + - status + pathType: list + dependentProperties: + addresses: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Addresses.json + applications: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Applications.json + authorized_connect_apps: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/AuthorizedConnectApps.json + available_phone_numbers: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/AvailablePhoneNumbers.json + balance: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Balance.json + calls: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Calls.json + conferences: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Conferences.json + connect_apps: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/ConnectApps.json + incoming_phone_numbers: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/IncomingPhoneNumbers.json + keys: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Keys.json + messages: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Messages.json + new_keys: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Keys.json + new_signing_keys: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/SigningKeys.json + notifications: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Notifications.json + outgoing_caller_ids: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/OutgoingCallerIds.json + queues: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Queues.json + recordings: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Recordings.json + signing_keys: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/SigningKeys.json + sip: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/SIP.json + sms: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/SMS.json + short_codes: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/SMS/ShortCodes.json + tokens: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Tokens.json + transcriptions: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Transcriptions.json + usage: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Usage.json + validation_requests: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/OutgoingCallerIds.json + post: + description: Create a new Twilio Subaccount from the account making the request + tags: + - Api20100401Account + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/account' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateAccount + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateAccountRequest + properties: + FriendlyName: + type: string + description: A human readable description of the account to create, + defaults to `SubAccount Created at {YYYY-MM-DD HH:MM meridian}` + get: + description: Retrieves a collection of Accounts belonging to the account used + to make the request + tags: + - Api20100401Account + parameters: + - name: FriendlyName + in: query + description: Only return the Account resources with friendly names that exactly + match this name. + schema: + type: string + - name: Status + in: query + description: Only return Account resources with the given status. Can be `closed`, + `suspended` or `active`. + schema: + type: string + $ref: '#/components/schemas/account_enum_status' + - 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: + type: object + title: ListAccountResponse + properties: + accounts: + type: array + items: + $ref: '#/components/schemas/account' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListAccount + x-maturity: + - GA + /2010-04-01/Accounts/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Twilio accounts (aka Project) or subaccounts + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + - status + pathType: instance + dependentProperties: + addresses: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Addresses.json + applications: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Applications.json + authorized_connect_apps: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/AuthorizedConnectApps.json + available_phone_numbers: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/AvailablePhoneNumbers.json + balance: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Balance.json + calls: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Calls.json + conferences: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Conferences.json + connect_apps: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/ConnectApps.json + incoming_phone_numbers: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/IncomingPhoneNumbers.json + keys: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Keys.json + messages: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Messages.json + new_keys: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Keys.json + new_signing_keys: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/SigningKeys.json + notifications: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Notifications.json + outgoing_caller_ids: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/OutgoingCallerIds.json + queues: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Queues.json + recordings: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Recordings.json + signing_keys: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/SigningKeys.json + sip: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/SIP.json + sms: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/SMS.json + short_codes: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/SMS/ShortCodes.json + tokens: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Tokens.json + transcriptions: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Transcriptions.json + usage: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Usage.json + validation_requests: + mapping: + account_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/OutgoingCallerIds.json + get: + description: Fetch the account specified by the provided Account Sid + tags: + - Api20100401Account + parameters: + - name: Sid + in: path + description: The Account Sid that uniquely identifies the account to fetch + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/account' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchAccount + x-maturity: + - GA + post: + description: Modify the properties of a given Account + tags: + - Api20100401Account + parameters: + - name: Sid + in: path + description: The Account Sid that uniquely identifies the account to update + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/account' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateAccount + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateAccountRequest + properties: + FriendlyName: + type: string + description: Update the human-readable description of this Account + Status: + type: string + $ref: '#/components/schemas/account_enum_status' + description: 'Alter the status of this account: use `closed` to + irreversibly close this account, `suspended` to temporarily suspend + it, or `active` to reactivate it.' + /2010-04-01/Accounts/{AccountSid}/Addresses.json: + servers: + - url: https://api.twilio.com + description: An Address instance resource represents your or your customer's physical + location within a country. Around the world, some local authorities require + the name and address of the user to be on file with Twilio to purchase and own + a phone number. + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + - validated + - verified + pathType: list + dependentProperties: + dependent_phone_numbers: + mapping: + account_sid: account_sid + address_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Addresses/{address_sid}/DependentPhoneNumbers.json + parent: /Accounts/{Sid}.json + post: + description: '' + tags: + - Api20100401Address + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will be responsible for the new Address resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/address' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateAddress + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateAddressRequest + properties: + CustomerName: + type: string + description: The name to associate with the new address. + Street: + type: string + description: The number and street address of the new address. + City: + type: string + description: The city of the new address. + Region: + type: string + description: The state or region of the new address. + PostalCode: + type: string + description: The postal code of the new address. + IsoCountry: + type: string + format: iso-country-code + description: The ISO country code of the new address. + FriendlyName: + type: string + description: A descriptive string that you create to describe the + new address. It can be up to 64 characters long. + EmergencyEnabled: + type: boolean + description: 'Whether to enable emergency calling on the new address. + Can be: `true` or `false`.' + AutoCorrectAddress: + type: boolean + description: 'Whether we should automatically correct the address. + Can be: `true` or `false` and the default is `true`. If empty + or `true`, we will correct the address you provide if necessary. + If `false`, we won''t alter the address you provide.' + StreetSecondary: + type: string + description: The additional number and street address of the address. + required: + - CustomerName + - Street + - City + - Region + - PostalCode + - IsoCountry + get: + description: '' + tags: + - Api20100401Address + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that is responsible for the Address resource to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CustomerName + in: query + description: The `customer_name` of the Address resources to read. + schema: + type: string + - name: FriendlyName + in: query + description: The string that identifies the Address resources to read. + schema: + type: string + - name: IsoCountry + in: query + description: The ISO country code of the Address resources to read. + schema: + type: string + format: iso-country-code + - 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: + type: object + title: ListAddressResponse + properties: + addresses: + type: array + items: + $ref: '#/components/schemas/address' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListAddress + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json: + servers: + - url: https://api.twilio.com + description: An Address instance resource represents your or your customer's physical + location within a country. Around the world, some local authorities require + the name and address of the user to be on file with Twilio to purchase and own + a phone number. + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + - validated + - verified + pathType: instance + dependentProperties: + dependent_phone_numbers: + mapping: + account_sid: account_sid + address_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Addresses/{address_sid}/DependentPhoneNumbers.json + parent: /Accounts/{Sid}.json + delete: + description: '' + tags: + - Api20100401Address + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that is responsible for the Address resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Address + resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteAddress + x-maturity: + - GA + get: + description: '' + tags: + - Api20100401Address + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that is responsible for the Address resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Address + resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/address' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchAddress + x-maturity: + - GA + post: + description: '' + tags: + - Api20100401Address + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that is responsible for the Address resource to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Address + resource to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/address' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateAddress + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateAddressRequest + properties: + FriendlyName: + type: string + description: A descriptive string that you create to describe the + address. It can be up to 64 characters long. + CustomerName: + type: string + description: The name to associate with the address. + Street: + type: string + description: The number and street address of the address. + City: + type: string + description: The city of the address. + Region: + type: string + description: The state or region of the address. + PostalCode: + type: string + description: The postal code of the address. + EmergencyEnabled: + type: boolean + description: 'Whether to enable emergency calling on the address. + Can be: `true` or `false`.' + AutoCorrectAddress: + type: boolean + description: 'Whether we should automatically correct the address. + Can be: `true` or `false` and the default is `true`. If empty + or `true`, we will correct the address you provide if necessary. + If `false`, we won''t alter the address you provide.' + StreetSecondary: + type: string + description: The additional number and street address of the address. + /2010-04-01/Accounts/{AccountSid}/Applications.json: + servers: + - url: https://api.twilio.com + description: An Application instance resource represents an application that you + have created with Twilio. An application inside of Twilio is just a set of URLs + and other configuration data that tells Twilio how to behave when one of your + Twilio numbers receives a call or SMS message. + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + - date_created + pathType: list + parent: /Accounts/{Sid}.json + post: + description: Create a new application within your account + tags: + - Api20100401Application + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will create the resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/application' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateApplication + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateApplicationRequest + properties: + ApiVersion: + type: string + description: 'The API version to use to start a new TwiML session. + Can be: `2010-04-01` or `2008-08-01`. The default value is the + account''s default API version.' + VoiceUrl: + type: string + format: uri + description: The URL we should call when the phone number assigned + to this application 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 retrieving + or executing the TwiML requested by `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`.' + StatusCallback: + type: string + format: uri + description: The URL we should call using the `status_callback_method` + to send status information 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`. + Can be: `GET` or `POST`.' + VoiceCallerIdLookup: + type: boolean + description: 'Whether we should look up the caller''s caller-ID + name from the CNAM database (additional charges apply). Can be: + `true` or `false`.' + SmsUrl: + type: string + format: uri + description: The URL we should call when the phone number receives + an incoming SMS message. + SmsMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use to call `sms_url`. Can + be: `GET` or `POST`.' + SmsFallbackUrl: + type: string + format: uri + description: The URL that we should call when an error occurs while + retrieving or executing the TwiML from `sms_url`. + SmsFallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use to call `sms_fallback_url`. + Can be: `GET` or `POST`.' + SmsStatusCallback: + type: string + format: uri + description: The URL we should call using a POST method to send + status information about SMS messages sent by the application. + MessageStatusCallback: + type: string + format: uri + description: The URL we should call using a POST method to send + message status information to your application. + FriendlyName: + type: string + description: A descriptive string that you create to describe the + new application. It can be up to 64 characters long. + PublicApplicationConnectEnabled: + type: boolean + description: 'Whether to allow other Twilio accounts to dial this + applicaton using Dial verb. Can be: `true` or `false`.' + get: + description: Retrieve a list of applications representing an application within + the requesting account + tags: + - Api20100401Application + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Application resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: FriendlyName + in: query + description: The string that identifies the Application resources to read. + schema: + type: string + - 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: + type: object + title: ListApplicationResponse + properties: + applications: + type: array + items: + $ref: '#/components/schemas/application' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListApplication + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json: + servers: + - url: https://api.twilio.com + description: An Application instance resource represents an application that you + have created with Twilio. An application inside of Twilio is just a set of URLs + and other configuration data that tells Twilio how to behave when one of your + Twilio numbers receives a call or SMS message. + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + - date_created + pathType: instance + parent: /Accounts/{Sid}.json + delete: + description: Delete the application by the specified application sid + tags: + - Api20100401Application + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Application resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Application + resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteApplication + x-maturity: + - GA + get: + description: Fetch the application specified by the provided sid + tags: + - Api20100401Application + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Application resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Application + resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/application' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchApplication + x-maturity: + - GA + post: + description: Updates the application's properties + tags: + - Api20100401Application + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Application resources to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Application + resource to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/application' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateApplication + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateApplicationRequest + properties: + FriendlyName: + type: string + description: A descriptive string that you create to describe the + resource. It can be up to 64 characters long. + ApiVersion: + type: string + description: 'The API version to use to start a new TwiML session. + Can be: `2010-04-01` or `2008-08-01`. The default value is your + account''s default API version.' + VoiceUrl: + type: string + format: uri + description: The URL we should call when the phone number assigned + to this application 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 retrieving + or executing the TwiML requested by `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`.' + StatusCallback: + type: string + format: uri + description: The URL we should call using the `status_callback_method` + to send status information 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`. + Can be: `GET` or `POST`.' + VoiceCallerIdLookup: + type: boolean + description: 'Whether we should look up the caller''s caller-ID + name from the CNAM database (additional charges apply). Can be: + `true` or `false`.' + SmsUrl: + type: string + format: uri + description: The URL we should call when the phone number receives + an incoming SMS message. + SmsMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use to call `sms_url`. Can + be: `GET` or `POST`.' + SmsFallbackUrl: + type: string + format: uri + description: The URL that we should call when an error occurs while + retrieving or executing the TwiML from `sms_url`. + SmsFallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use to call `sms_fallback_url`. + Can be: `GET` or `POST`.' + SmsStatusCallback: + type: string + format: uri + description: 'Same as message_status_callback: The URL we should + call using a POST method to send status information about SMS + messages sent by the application. Deprecated, included for backwards + compatibility.' + MessageStatusCallback: + type: string + format: uri + description: The URL we should call using a POST method to send + message status information to your application. + PublicApplicationConnectEnabled: + type: boolean + description: 'Whether to allow other Twilio accounts to dial this + applicaton using Dial verb. Can be: `true` or `false`.' + /2010-04-01/Accounts/{AccountSid}/AuthorizedConnectApps/{ConnectAppSid}.json: + servers: + - url: https://api.twilio.com + description: Authorized Twilio Connect apps + x-twilio: + defaultOutputProperties: + - connect_app_sid + - connect_app_friendly_name + pathType: instance + parent: /Accounts/{Sid}.json + get: + description: Fetch an instance of an authorized-connect-app + tags: + - Api20100401AuthorizedConnectApp + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the AuthorizedConnectApp resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ConnectAppSid + in: path + description: The SID of the Connect App to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CN[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/authorized_connect_app' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchAuthorizedConnectApp + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/AuthorizedConnectApps.json: + servers: + - url: https://api.twilio.com + description: Authorized Twilio Connect apps + x-twilio: + defaultOutputProperties: + - connect_app_sid + - connect_app_friendly_name + pathType: list + parent: /Accounts/{Sid}.json + get: + description: Retrieve a list of authorized-connect-apps belonging to the account + used to make the request + tags: + - Api20100401AuthorizedConnectApp + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the AuthorizedConnectApp resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + 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: + type: object + title: ListAuthorizedConnectAppResponse + properties: + authorized_connect_apps: + type: array + items: + $ref: '#/components/schemas/authorized_connect_app' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListAuthorizedConnectApp + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers.json: + servers: + - url: https://api.twilio.com + description: Country codes with available phone numbers + x-twilio: + defaultOutputProperties: + - country_code + - country + - beta + pathType: list + dependentProperties: + local: + mapping: + account_sid: account_sid + country_code: country_code + resource_url: /2010-04-01/Accounts/{account_sid}/AvailablePhoneNumbers/{country_code}/Local.json + toll_free: + mapping: + account_sid: account_sid + country_code: country_code + resource_url: /2010-04-01/Accounts/{account_sid}/AvailablePhoneNumbers/{country_code}/TollFree.json + mobile: + mapping: + account_sid: account_sid + country_code: country_code + resource_url: /2010-04-01/Accounts/{account_sid}/AvailablePhoneNumbers/{country_code}/Mobile.json + national: + mapping: + account_sid: account_sid + country_code: country_code + resource_url: /2010-04-01/Accounts/{account_sid}/AvailablePhoneNumbers/{country_code}/National.json + voip: + mapping: + account_sid: account_sid + country_code: country_code + resource_url: /2010-04-01/Accounts/{account_sid}/AvailablePhoneNumbers/{country_code}/Voip.json + shared_cost: + mapping: + account_sid: account_sid + country_code: country_code + resource_url: /2010-04-01/Accounts/{account_sid}/AvailablePhoneNumbers/{country_code}/SharedCost.json + machine_to_machine: + mapping: + account_sid: account_sid + country_code: country_code + resource_url: /2010-04-01/Accounts/{account_sid}/AvailablePhoneNumbers/{country_code}/MachineToMachine.json + parent: /Accounts/{Sid}.json + className: available_phone_number_country + get: + description: '' + tags: + - Api20100401AvailablePhoneNumberCountry + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + requesting the available phone number Country resources. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + 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: + type: object + title: ListAvailablePhoneNumberCountryResponse + properties: + countries: + type: array + items: + $ref: '#/components/schemas/available_phone_number_country' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListAvailablePhoneNumberCountry + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json: + servers: + - url: https://api.twilio.com + description: Country codes with available phone numbers + x-twilio: + defaultOutputProperties: + - country_code + - country + - beta + pathType: instance + dependentProperties: + local: + mapping: + account_sid: account_sid + country_code: country_code + resource_url: /2010-04-01/Accounts/{account_sid}/AvailablePhoneNumbers/{country_code}/Local.json + toll_free: + mapping: + account_sid: account_sid + country_code: country_code + resource_url: /2010-04-01/Accounts/{account_sid}/AvailablePhoneNumbers/{country_code}/TollFree.json + mobile: + mapping: + account_sid: account_sid + country_code: country_code + resource_url: /2010-04-01/Accounts/{account_sid}/AvailablePhoneNumbers/{country_code}/Mobile.json + national: + mapping: + account_sid: account_sid + country_code: country_code + resource_url: /2010-04-01/Accounts/{account_sid}/AvailablePhoneNumbers/{country_code}/National.json + voip: + mapping: + account_sid: account_sid + country_code: country_code + resource_url: /2010-04-01/Accounts/{account_sid}/AvailablePhoneNumbers/{country_code}/Voip.json + shared_cost: + mapping: + account_sid: account_sid + country_code: country_code + resource_url: /2010-04-01/Accounts/{account_sid}/AvailablePhoneNumbers/{country_code}/SharedCost.json + machine_to_machine: + mapping: + account_sid: account_sid + country_code: country_code + resource_url: /2010-04-01/Accounts/{account_sid}/AvailablePhoneNumbers/{country_code}/MachineToMachine.json + parent: /Accounts/{Sid}.json + className: available_phone_number_country + get: + description: '' + tags: + - Api20100401AvailablePhoneNumberCountry + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + requesting the available phone number Country resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CountryCode + in: path + description: The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + country code of the country to fetch available phone number information + about. + schema: + type: string + format: iso-country-code + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/available_phone_number_country' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchAvailablePhoneNumberCountry + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Local.json: + servers: + - url: https://api.twilio.com + description: Available local phone numbers + x-twilio: + defaultOutputProperties: + - phone_number + - region + - beta + pathType: list + parent: /Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json + get: + description: '' + tags: + - Api20100401Local + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + requesting the AvailablePhoneNumber resources. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CountryCode + in: path + description: The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + country code of the country from which to read phone numbers. + schema: + type: string + format: iso-country-code + required: true + - name: AreaCode + in: query + description: The area code of the phone numbers to read. Applies to only phone + numbers in the US and Canada. + schema: + type: integer + - name: Contains + in: query + description: The pattern on which to match phone numbers. Valid characters + are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. + For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-number-pattern) + and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-character-pattern). + If specified, this value must have at least two characters. + schema: + type: string + - name: SmsEnabled + in: query + description: 'Whether the phone numbers can receive text messages. Can be: + `true` or `false`.' + schema: + type: boolean + - name: MmsEnabled + in: query + description: 'Whether the phone numbers can receive MMS messages. Can be: + `true` or `false`.' + schema: + type: boolean + - name: VoiceEnabled + in: query + description: 'Whether the phone numbers can receive calls. Can be: `true` + or `false`.' + schema: + type: boolean + - name: ExcludeAllAddressRequired + in: query + description: 'Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: ExcludeLocalAddressRequired + in: query + description: 'Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: ExcludeForeignAddressRequired + in: query + description: 'Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: Beta + in: query + description: 'Whether to read phone numbers that are new to the Twilio platform. + Can be: `true` or `false` and the default is `true`.' + schema: + type: boolean + - name: NearNumber + in: query + description: Given a phone number, find a geographically close number within + `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers + in the US and Canada. + schema: + type: string + format: phone-number + - name: NearLatLong + in: query + description: Given a latitude/longitude pair `lat,long` find geographically + close numbers within `distance` miles. Applies to only phone numbers in + the US and Canada. + schema: + type: string + - name: Distance + in: query + description: The search radius, in miles, for a `near_` query. Can be up + to `500` and the default is `25`. Applies to only phone numbers in the US + and Canada. + schema: + type: integer + - name: InPostalCode + in: query + description: Limit results to a particular postal code. Given a phone number, + search within the same postal code as that number. Applies to only phone + numbers in the US and Canada. + schema: + type: string + - name: InRegion + in: query + description: Limit results to a particular region, state, or province. Given + a phone number, search within the same region as that number. Applies to + only phone numbers in the US and Canada. + schema: + type: string + - name: InRateCenter + in: query + description: Limit results to a specific rate center, or given a phone number + search within the same rate center as that number. Requires `in_lata` to + be set as well. Applies to only phone numbers in the US and Canada. + schema: + type: string + - name: InLata + in: query + description: Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). + Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) + as that number. Applies to only phone numbers in the US and Canada. + schema: + type: string + - name: InLocality + in: query + description: Limit results to a particular locality or city. Given a phone + number, search within the same Locality as that number. + schema: + type: string + - name: FaxEnabled + in: query + description: 'Whether the phone numbers can receive faxes. 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: + type: object + title: ListAvailablePhoneNumberLocalResponse + properties: + available_phone_numbers: + type: array + items: + $ref: '#/components/schemas/available_phone_number_local' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListAvailablePhoneNumberLocal + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/MachineToMachine.json: + servers: + - url: https://api.twilio.com + description: Available machine-to-machine phone numbers + x-twilio: + defaultOutputProperties: + - phone_number + - region + - beta + pathType: list + parent: /Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json + get: + description: '' + tags: + - Api20100401MachineToMachine + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + requesting the AvailablePhoneNumber resources. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CountryCode + in: path + description: The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + country code of the country from which to read phone numbers. + schema: + type: string + format: iso-country-code + required: true + - name: AreaCode + in: query + description: The area code of the phone numbers to read. Applies to only phone + numbers in the US and Canada. + schema: + type: integer + - name: Contains + in: query + description: The pattern on which to match phone numbers. Valid characters + are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. + For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) + and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). + If specified, this value must have at least two characters. + schema: + type: string + - name: SmsEnabled + in: query + description: 'Whether the phone numbers can receive text messages. Can be: + `true` or `false`.' + schema: + type: boolean + - name: MmsEnabled + in: query + description: 'Whether the phone numbers can receive MMS messages. Can be: + `true` or `false`.' + schema: + type: boolean + - name: VoiceEnabled + in: query + description: 'Whether the phone numbers can receive calls. Can be: `true` + or `false`.' + schema: + type: boolean + - name: ExcludeAllAddressRequired + in: query + description: 'Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: ExcludeLocalAddressRequired + in: query + description: 'Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: ExcludeForeignAddressRequired + in: query + description: 'Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: Beta + in: query + description: 'Whether to read phone numbers that are new to the Twilio platform. + Can be: `true` or `false` and the default is `true`.' + schema: + type: boolean + - name: NearNumber + in: query + description: Given a phone number, find a geographically close number within + `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers + in the US and Canada. + schema: + type: string + format: phone-number + - name: NearLatLong + in: query + description: Given a latitude/longitude pair `lat,long` find geographically + close numbers within `distance` miles. Applies to only phone numbers in + the US and Canada. + schema: + type: string + - name: Distance + in: query + description: The search radius, in miles, for a `near_` query. Can be up + to `500` and the default is `25`. Applies to only phone numbers in the US + and Canada. + schema: + type: integer + - name: InPostalCode + in: query + description: Limit results to a particular postal code. Given a phone number, + search within the same postal code as that number. Applies to only phone + numbers in the US and Canada. + schema: + type: string + - name: InRegion + in: query + description: Limit results to a particular region, state, or province. Given + a phone number, search within the same region as that number. Applies to + only phone numbers in the US and Canada. + schema: + type: string + - name: InRateCenter + in: query + description: Limit results to a specific rate center, or given a phone number + search within the same rate center as that number. Requires `in_lata` to + be set as well. Applies to only phone numbers in the US and Canada. + schema: + type: string + - name: InLata + in: query + description: Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). + Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) + as that number. Applies to only phone numbers in the US and Canada. + schema: + type: string + - name: InLocality + in: query + description: Limit results to a particular locality or city. Given a phone + number, search within the same Locality as that number. + schema: + type: string + - name: FaxEnabled + in: query + description: 'Whether the phone numbers can receive faxes. 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: + type: object + title: ListAvailablePhoneNumberMachineToMachineResponse + properties: + available_phone_numbers: + type: array + items: + $ref: '#/components/schemas/available_phone_number_machine_to_machine' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListAvailablePhoneNumberMachineToMachine + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Mobile.json: + servers: + - url: https://api.twilio.com + description: Available mobile phone numbers + x-twilio: + defaultOutputProperties: + - phone_number + - region + - beta + pathType: list + parent: /Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json + get: + description: '' + tags: + - Api20100401Mobile + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + requesting the AvailablePhoneNumber resources. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CountryCode + in: path + description: The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + country code of the country from which to read phone numbers. + schema: + type: string + format: iso-country-code + required: true + - name: AreaCode + in: query + description: The area code of the phone numbers to read. Applies to only phone + numbers in the US and Canada. + schema: + type: integer + - name: Contains + in: query + description: The pattern on which to match phone numbers. Valid characters + are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. + For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) + and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). + If specified, this value must have at least two characters. + schema: + type: string + - name: SmsEnabled + in: query + description: 'Whether the phone numbers can receive text messages. Can be: + `true` or `false`.' + schema: + type: boolean + - name: MmsEnabled + in: query + description: 'Whether the phone numbers can receive MMS messages. Can be: + `true` or `false`.' + schema: + type: boolean + - name: VoiceEnabled + in: query + description: 'Whether the phone numbers can receive calls. Can be: `true` + or `false`.' + schema: + type: boolean + - name: ExcludeAllAddressRequired + in: query + description: 'Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: ExcludeLocalAddressRequired + in: query + description: 'Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: ExcludeForeignAddressRequired + in: query + description: 'Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: Beta + in: query + description: 'Whether to read phone numbers that are new to the Twilio platform. + Can be: `true` or `false` and the default is `true`.' + schema: + type: boolean + - name: NearNumber + in: query + description: Given a phone number, find a geographically close number within + `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers + in the US and Canada. + schema: + type: string + format: phone-number + - name: NearLatLong + in: query + description: Given a latitude/longitude pair `lat,long` find geographically + close numbers within `distance` miles. Applies to only phone numbers in + the US and Canada. + schema: + type: string + - name: Distance + in: query + description: The search radius, in miles, for a `near_` query. Can be up + to `500` and the default is `25`. Applies to only phone numbers in the US + and Canada. + schema: + type: integer + - name: InPostalCode + in: query + description: Limit results to a particular postal code. Given a phone number, + search within the same postal code as that number. Applies to only phone + numbers in the US and Canada. + schema: + type: string + - name: InRegion + in: query + description: Limit results to a particular region, state, or province. Given + a phone number, search within the same region as that number. Applies to + only phone numbers in the US and Canada. + schema: + type: string + - name: InRateCenter + in: query + description: Limit results to a specific rate center, or given a phone number + search within the same rate center as that number. Requires `in_lata` to + be set as well. Applies to only phone numbers in the US and Canada. + schema: + type: string + - name: InLata + in: query + description: Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). + Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) + as that number. Applies to only phone numbers in the US and Canada. + schema: + type: string + - name: InLocality + in: query + description: Limit results to a particular locality or city. Given a phone + number, search within the same Locality as that number. + schema: + type: string + - name: FaxEnabled + in: query + description: 'Whether the phone numbers can receive faxes. 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: + type: object + title: ListAvailablePhoneNumberMobileResponse + properties: + available_phone_numbers: + type: array + items: + $ref: '#/components/schemas/available_phone_number_mobile' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListAvailablePhoneNumberMobile + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/National.json: + servers: + - url: https://api.twilio.com + description: Available national phone numbers + x-twilio: + defaultOutputProperties: + - phone_number + - region + - beta + pathType: list + parent: /Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json + get: + description: '' + tags: + - Api20100401National + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + requesting the AvailablePhoneNumber resources. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CountryCode + in: path + description: The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + country code of the country from which to read phone numbers. + schema: + type: string + format: iso-country-code + required: true + - name: AreaCode + in: query + description: The area code of the phone numbers to read. Applies to only phone + numbers in the US and Canada. + schema: + type: integer + - name: Contains + in: query + description: The pattern on which to match phone numbers. Valid characters + are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. + For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) + and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). + If specified, this value must have at least two characters. + schema: + type: string + - name: SmsEnabled + in: query + description: 'Whether the phone numbers can receive text messages. Can be: + `true` or `false`.' + schema: + type: boolean + - name: MmsEnabled + in: query + description: 'Whether the phone numbers can receive MMS messages. Can be: + `true` or `false`.' + schema: + type: boolean + - name: VoiceEnabled + in: query + description: 'Whether the phone numbers can receive calls. Can be: `true` + or `false`.' + schema: + type: boolean + - name: ExcludeAllAddressRequired + in: query + description: 'Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: ExcludeLocalAddressRequired + in: query + description: 'Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: ExcludeForeignAddressRequired + in: query + description: 'Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: Beta + in: query + description: 'Whether to read phone numbers that are new to the Twilio platform. + Can be: `true` or `false` and the default is `true`.' + schema: + type: boolean + - name: NearNumber + in: query + description: Given a phone number, find a geographically close number within + `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers + in the US and Canada. + schema: + type: string + format: phone-number + - name: NearLatLong + in: query + description: Given a latitude/longitude pair `lat,long` find geographically + close numbers within `distance` miles. Applies to only phone numbers in + the US and Canada. + schema: + type: string + - name: Distance + in: query + description: The search radius, in miles, for a `near_` query. Can be up + to `500` and the default is `25`. Applies to only phone numbers in the US + and Canada. + schema: + type: integer + - name: InPostalCode + in: query + description: Limit results to a particular postal code. Given a phone number, + search within the same postal code as that number. Applies to only phone + numbers in the US and Canada. + schema: + type: string + - name: InRegion + in: query + description: Limit results to a particular region, state, or province. Given + a phone number, search within the same region as that number. Applies to + only phone numbers in the US and Canada. + schema: + type: string + - name: InRateCenter + in: query + description: Limit results to a specific rate center, or given a phone number + search within the same rate center as that number. Requires `in_lata` to + be set as well. Applies to only phone numbers in the US and Canada. + schema: + type: string + - name: InLata + in: query + description: Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). + Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) + as that number. Applies to only phone numbers in the US and Canada. + schema: + type: string + - name: InLocality + in: query + description: Limit results to a particular locality or city. Given a phone + number, search within the same Locality as that number. + schema: + type: string + - name: FaxEnabled + in: query + description: 'Whether the phone numbers can receive faxes. 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: + type: object + title: ListAvailablePhoneNumberNationalResponse + properties: + available_phone_numbers: + type: array + items: + $ref: '#/components/schemas/available_phone_number_national' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListAvailablePhoneNumberNational + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/SharedCost.json: + servers: + - url: https://api.twilio.com + description: Available shared cost numbers + x-twilio: + defaultOutputProperties: + - phone_number + - region + - beta + pathType: list + parent: /Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json + get: + description: '' + tags: + - Api20100401SharedCost + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + requesting the AvailablePhoneNumber resources. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CountryCode + in: path + description: The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + country code of the country from which to read phone numbers. + schema: + type: string + format: iso-country-code + required: true + - name: AreaCode + in: query + description: The area code of the phone numbers to read. Applies to only phone + numbers in the US and Canada. + schema: + type: integer + - name: Contains + in: query + description: The pattern on which to match phone numbers. Valid characters + are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. + For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) + and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). + If specified, this value must have at least two characters. + schema: + type: string + - name: SmsEnabled + in: query + description: 'Whether the phone numbers can receive text messages. Can be: + `true` or `false`.' + schema: + type: boolean + - name: MmsEnabled + in: query + description: 'Whether the phone numbers can receive MMS messages. Can be: + `true` or `false`.' + schema: + type: boolean + - name: VoiceEnabled + in: query + description: 'Whether the phone numbers can receive calls. Can be: `true` + or `false`.' + schema: + type: boolean + - name: ExcludeAllAddressRequired + in: query + description: 'Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: ExcludeLocalAddressRequired + in: query + description: 'Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: ExcludeForeignAddressRequired + in: query + description: 'Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: Beta + in: query + description: 'Whether to read phone numbers that are new to the Twilio platform. + Can be: `true` or `false` and the default is `true`.' + schema: + type: boolean + - name: NearNumber + in: query + description: Given a phone number, find a geographically close number within + `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers + in the US and Canada. + schema: + type: string + format: phone-number + - name: NearLatLong + in: query + description: Given a latitude/longitude pair `lat,long` find geographically + close numbers within `distance` miles. Applies to only phone numbers in + the US and Canada. + schema: + type: string + - name: Distance + in: query + description: The search radius, in miles, for a `near_` query. Can be up + to `500` and the default is `25`. Applies to only phone numbers in the US + and Canada. + schema: + type: integer + - name: InPostalCode + in: query + description: Limit results to a particular postal code. Given a phone number, + search within the same postal code as that number. Applies to only phone + numbers in the US and Canada. + schema: + type: string + - name: InRegion + in: query + description: Limit results to a particular region, state, or province. Given + a phone number, search within the same region as that number. Applies to + only phone numbers in the US and Canada. + schema: + type: string + - name: InRateCenter + in: query + description: Limit results to a specific rate center, or given a phone number + search within the same rate center as that number. Requires `in_lata` to + be set as well. Applies to only phone numbers in the US and Canada. + schema: + type: string + - name: InLata + in: query + description: Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). + Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) + as that number. Applies to only phone numbers in the US and Canada. + schema: + type: string + - name: InLocality + in: query + description: Limit results to a particular locality or city. Given a phone + number, search within the same Locality as that number. + schema: + type: string + - name: FaxEnabled + in: query + description: 'Whether the phone numbers can receive faxes. 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: + type: object + title: ListAvailablePhoneNumberSharedCostResponse + properties: + available_phone_numbers: + type: array + items: + $ref: '#/components/schemas/available_phone_number_shared_cost' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListAvailablePhoneNumberSharedCost + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/TollFree.json: + servers: + - url: https://api.twilio.com + description: Available toll free phone numbers + x-twilio: + defaultOutputProperties: + - phone_number + - region + - beta + pathType: list + parent: /Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json + get: + description: '' + tags: + - Api20100401TollFree + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + requesting the AvailablePhoneNumber resources. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CountryCode + in: path + description: The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + country code of the country from which to read phone numbers. + schema: + type: string + format: iso-country-code + required: true + - name: AreaCode + in: query + description: The area code of the phone numbers to read. Applies to only phone + numbers in the US and Canada. + schema: + type: integer + - name: Contains + in: query + description: The pattern on which to match phone numbers. Valid characters + are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. + For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) + and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). + If specified, this value must have at least two characters. + schema: + type: string + - name: SmsEnabled + in: query + description: 'Whether the phone numbers can receive text messages. Can be: + `true` or `false`.' + schema: + type: boolean + - name: MmsEnabled + in: query + description: 'Whether the phone numbers can receive MMS messages. Can be: + `true` or `false`.' + schema: + type: boolean + - name: VoiceEnabled + in: query + description: 'Whether the phone numbers can receive calls. Can be: `true` + or `false`.' + schema: + type: boolean + - name: ExcludeAllAddressRequired + in: query + description: 'Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: ExcludeLocalAddressRequired + in: query + description: 'Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: ExcludeForeignAddressRequired + in: query + description: 'Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: Beta + in: query + description: 'Whether to read phone numbers that are new to the Twilio platform. + Can be: `true` or `false` and the default is `true`.' + schema: + type: boolean + - name: NearNumber + in: query + description: Given a phone number, find a geographically close number within + `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers + in the US and Canada. + schema: + type: string + format: phone-number + - name: NearLatLong + in: query + description: Given a latitude/longitude pair `lat,long` find geographically + close numbers within `distance` miles. Applies to only phone numbers in + the US and Canada. + schema: + type: string + - name: Distance + in: query + description: The search radius, in miles, for a `near_` query. Can be up + to `500` and the default is `25`. Applies to only phone numbers in the US + and Canada. + schema: + type: integer + - name: InPostalCode + in: query + description: Limit results to a particular postal code. Given a phone number, + search within the same postal code as that number. Applies to only phone + numbers in the US and Canada. + schema: + type: string + - name: InRegion + in: query + description: Limit results to a particular region, state, or province. Given + a phone number, search within the same region as that number. Applies to + only phone numbers in the US and Canada. + schema: + type: string + - name: InRateCenter + in: query + description: Limit results to a specific rate center, or given a phone number + search within the same rate center as that number. Requires `in_lata` to + be set as well. Applies to only phone numbers in the US and Canada. + schema: + type: string + - name: InLata + in: query + description: Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). + Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) + as that number. Applies to only phone numbers in the US and Canada. + schema: + type: string + - name: InLocality + in: query + description: Limit results to a particular locality or city. Given a phone + number, search within the same Locality as that number. + schema: + type: string + - name: FaxEnabled + in: query + description: 'Whether the phone numbers can receive faxes. 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: + type: object + title: ListAvailablePhoneNumberTollFreeResponse + properties: + available_phone_numbers: + type: array + items: + $ref: '#/components/schemas/available_phone_number_toll_free' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListAvailablePhoneNumberTollFree + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Voip.json: + servers: + - url: https://api.twilio.com + description: Available VoIP phone numbers + x-twilio: + defaultOutputProperties: + - phone_number + - region + - beta + pathType: list + parent: /Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json + get: + description: '' + tags: + - Api20100401Voip + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + requesting the AvailablePhoneNumber resources. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CountryCode + in: path + description: The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + country code of the country from which to read phone numbers. + schema: + type: string + format: iso-country-code + required: true + - name: AreaCode + in: query + description: The area code of the phone numbers to read. Applies to only phone + numbers in the US and Canada. + schema: + type: integer + - name: Contains + in: query + description: The pattern on which to match phone numbers. Valid characters + are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. + For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) + and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). + If specified, this value must have at least two characters. + schema: + type: string + - name: SmsEnabled + in: query + description: 'Whether the phone numbers can receive text messages. Can be: + `true` or `false`.' + schema: + type: boolean + - name: MmsEnabled + in: query + description: 'Whether the phone numbers can receive MMS messages. Can be: + `true` or `false`.' + schema: + type: boolean + - name: VoiceEnabled + in: query + description: 'Whether the phone numbers can receive calls. Can be: `true` + or `false`.' + schema: + type: boolean + - name: ExcludeAllAddressRequired + in: query + description: 'Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: ExcludeLocalAddressRequired + in: query + description: 'Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: ExcludeForeignAddressRequired + in: query + description: 'Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). + Can be: `true` or `false` and the default is `false`.' + schema: + type: boolean + - name: Beta + in: query + description: 'Whether to read phone numbers that are new to the Twilio platform. + Can be: `true` or `false` and the default is `true`.' + schema: + type: boolean + - name: NearNumber + in: query + description: Given a phone number, find a geographically close number within + `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers + in the US and Canada. + schema: + type: string + format: phone-number + - name: NearLatLong + in: query + description: Given a latitude/longitude pair `lat,long` find geographically + close numbers within `distance` miles. Applies to only phone numbers in + the US and Canada. + schema: + type: string + - name: Distance + in: query + description: The search radius, in miles, for a `near_` query. Can be up + to `500` and the default is `25`. Applies to only phone numbers in the US + and Canada. + schema: + type: integer + - name: InPostalCode + in: query + description: Limit results to a particular postal code. Given a phone number, + search within the same postal code as that number. Applies to only phone + numbers in the US and Canada. + schema: + type: string + - name: InRegion + in: query + description: Limit results to a particular region, state, or province. Given + a phone number, search within the same region as that number. Applies to + only phone numbers in the US and Canada. + schema: + type: string + - name: InRateCenter + in: query + description: Limit results to a specific rate center, or given a phone number + search within the same rate center as that number. Requires `in_lata` to + be set as well. Applies to only phone numbers in the US and Canada. + schema: + type: string + - name: InLata + in: query + description: Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). + Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) + as that number. Applies to only phone numbers in the US and Canada. + schema: + type: string + - name: InLocality + in: query + description: Limit results to a particular locality or city. Given a phone + number, search within the same Locality as that number. + schema: + type: string + - name: FaxEnabled + in: query + description: 'Whether the phone numbers can receive faxes. 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: + type: object + title: ListAvailablePhoneNumberVoipResponse + properties: + available_phone_numbers: + type: array + items: + $ref: '#/components/schemas/available_phone_number_voip' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListAvailablePhoneNumberVoip + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Balance.json: + servers: + - url: https://api.twilio.com + description: Account balance + x-twilio: + defaultOutputProperties: + - account_sid + - balance + - currency + pathType: list + parent: /Accounts/{Sid}.json + get: + description: Fetch the balance for an Account based on Account Sid. Balance + changes may not be reflected immediately. Child accounts do not contain balance + information + tags: + - Api20100401Balance + parameters: + - name: AccountSid + in: path + description: The unique SID identifier of the Account. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/balance' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchBalance + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Calls.json: + servers: + - url: https://api.twilio.com + description: A Call is an object that represents a connection between a telephone + and Twilio. + x-twilio: + defaultOutputProperties: + - sid + - from + - to + - status + - start_time + pathType: list + dependentProperties: + recordings: + mapping: + account_sid: account_sid + call_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Calls/{call_sid}/Recordings.json + notifications: + mapping: + account_sid: account_sid + call_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Calls/{call_sid}/Notifications.json + feedback: + mapping: + account_sid: account_sid + call_sid: sid + resource_url: /2010-04-01None + events: + mapping: + account_sid: account_sid + call_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Calls/{call_sid}/Events.json + payments: + mapping: + account_sid: account_sid + call_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Calls/{call_sid}/Payments.json + siprec: + mapping: + account_sid: account_sid + call_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Calls/{call_sid}/Siprec.json + streams: + mapping: + account_sid: account_sid + call_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Calls/{call_sid}/Streams.json + user_defined_message_subscriptions: + mapping: + account_sid: account_sid + call_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Calls/{call_sid}/UserDefinedMessageSubscriptions.json + user_defined_messages: + mapping: + account_sid: account_sid + call_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Calls/{call_sid}/UserDefinedMessages.json + parent: /Accounts/{Sid}.json + post: + description: Create a new outgoing call to phones, SIP-enabled endpoints or + Twilio Client connections + tags: + - Api20100401Call + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will create the resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/call' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateCall + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateCallRequest + properties: + To: + type: string + format: endpoint + description: The phone number, SIP address, or client identifier + to call. + From: + type: string + format: endpoint + description: The phone number or client identifier to use as the + caller id. If using a phone number, it must be a Twilio number + or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) + for your account. If the `to` parameter is a phone number, `From` + must also be a phone number. + Method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use when calling the `url` + parameter''s value. Can be: `GET` or `POST` and the default is + `POST`. If an `application_sid` parameter is present, this parameter + is ignored.' + FallbackUrl: + type: string + format: uri + description: The URL that we call using the `fallback_method` if + an error occurs when requesting or executing the TwiML at `url`. + If an `application_sid` parameter is present, this parameter is + ignored. + FallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to request the + `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. + If an `application_sid` parameter is present, this parameter is + ignored.' + StatusCallback: + type: string + format: uri + description: The URL we should call using the `status_callback_method` + to send status information to your application. If no `status_callback_event` + is specified, we will send the `completed` status. If an `application_sid` + parameter is present, this parameter is ignored. URLs must contain + a valid hostname (underscores are not permitted). + StatusCallbackEvent: + type: array + items: + type: string + description: 'The call progress events that we will send to the + `status_callback` URL. Can be: `initiated`, `ringing`, `answered`, + and `completed`. If no event is specified, we send the `completed` + status. If you want to receive multiple events, specify each one + in a separate `status_callback_event` parameter. See the code + sample for [monitoring call progress](https://www.twilio.com/docs/voice/api/call-resource?code-sample=code-create-a-call-resource-and-specify-a-statuscallbackevent&code-sdk-version=json). + If an `application_sid` is present, this parameter is ignored.' + StatusCallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use when calling the `status_callback` + URL. Can be: `GET` or `POST` and the default is `POST`. If an + `application_sid` parameter is present, this parameter is ignored.' + SendDigits: + type: string + description: 'A string of keys to dial after connecting to the number, + maximum of 32 digits. Valid digits in the string include: any + digit (`0`-`9`), ''`#`'', ''`*`'' and ''`w`'', to insert a half + second pause. For example, if you connected to a company phone + number and wanted to pause for one second, and then dial extension + 1234 followed by the pound key, the value of this parameter would + be `ww1234#`. Remember to URL-encode this string, since the ''`#`'' + character has special meaning in a URL. If both `SendDigits` and + `MachineDetection` parameters are provided, then `MachineDetection` + will be ignored.' + Timeout: + type: integer + description: The integer number of seconds that we should allow + the phone to ring before assuming there is no answer. The default + is `60` seconds and the maximum is `600` seconds. For some call + flows, we will add a 5-second buffer to the timeout value you + provide. For this reason, a timeout value of 10 seconds could + result in an actual timeout closer to 15 seconds. You can set + this to a short time, such as `15` seconds, to hang up before + reaching an answering machine or voicemail. + Record: + type: boolean + description: Whether to record the call. Can be `true` to record + the phone call, or `false` to not. The default is `false`. The + `recording_url` is sent to the `status_callback` URL. + RecordingChannels: + type: string + description: 'The number of channels in the final recording. Can + be: `mono` or `dual`. The default is `mono`. `mono` records both + legs of the call in a single channel of the recording file. `dual` + records each leg to a separate channel of the recording file. + The first channel of a dual-channel recording contains the parent + call and the second channel contains the child call.' + RecordingStatusCallback: + type: string + description: The URL that we call when the recording is available + to be accessed. + RecordingStatusCallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use when calling the `recording_status_callback` + URL. Can be: `GET` or `POST` and the default is `POST`.' + SipAuthUsername: + type: string + description: The username used to authenticate the caller making + a SIP call. + SipAuthPassword: + type: string + description: The password required to authenticate the user account + specified in `sip_auth_username`. + MachineDetection: + type: string + description: 'Whether to detect if a human, answering machine, or + fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. + Use `Enable` if you would like us to return `AnsweredBy` as soon + as the called party is identified. Use `DetectMessageEnd`, if + you would like to leave a message on an answering machine. If + `send_digits` is provided, this parameter is ignored. For more + information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection).' + MachineDetectionTimeout: + type: integer + description: The number of seconds that we should attempt to detect + an answering machine before timing out and sending a voice request + with `AnsweredBy` of `unknown`. The default timeout is 30 seconds. + RecordingStatusCallbackEvent: + type: array + items: + type: string + description: 'The recording status events that will trigger calls + to the URL specified in `recording_status_callback`. Can be: `in-progress`, + `completed` and `absent`. Defaults to `completed`. Separate multiple + values with a space.' + Trim: + type: string + description: 'Whether to trim any leading and trailing silence from + the recording. Can be: `trim-silence` or `do-not-trim` and the + default is `trim-silence`.' + CallerId: + type: string + description: The phone number, SIP address, or Client identifier + that made this call. Phone numbers are in [E.164 format](https://wwnw.twilio.com/docs/glossary/what-e164) + (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. + MachineDetectionSpeechThreshold: + type: integer + description: 'The number of milliseconds that is used as the measuring + stick for the length of the speech activity, where durations lower + than this value will be interpreted as a human and longer than + this value as a machine. Possible Values: 1000-6000. Default: + 2400.' + MachineDetectionSpeechEndThreshold: + type: integer + description: 'The number of milliseconds of silence after speech + activity at which point the speech activity is considered complete. + Possible Values: 500-5000. Default: 1200.' + MachineDetectionSilenceTimeout: + type: integer + description: 'The number of milliseconds of initial silence after + which an `unknown` AnsweredBy result will be returned. Possible + Values: 2000-10000. Default: 5000.' + AsyncAmd: + type: string + description: 'Select whether to perform answering machine detection + in the background. Default, blocks the execution of the call until + Answering Machine Detection is completed. Can be: `true` or `false`.' + AsyncAmdStatusCallback: + type: string + format: uri + description: The URL that we should call using the `async_amd_status_callback_method` + to notify customer application whether the call was answered by + human, machine or fax. + AsyncAmdStatusCallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use when calling the `async_amd_status_callback` + URL. Can be: `GET` or `POST` and the default is `POST`.' + Byoc: + type: string + minLength: 34 + maxLength: 34 + pattern: ^BY[0-9a-fA-F]{32}$ + description: The SID of a BYOC (Bring Your Own Carrier) trunk to + route this call with. Note that `byoc` is only meaningful when + `to` is a phone number; it will otherwise be ignored. (Beta) + CallReason: + type: string + description: The Reason for the outgoing call. Use it to specify + the purpose of the call that is presented on the called party's + phone. (Branded Calls Beta) + CallToken: + type: string + description: A token string needed to invoke a forwarded call. A + call_token is generated when an incoming call is received on a + Twilio number. Pass an incoming call's call_token value to a forwarded + call via the call_token parameter when creating a new call. A + forwarded call should bear the same CallerID of the original incoming + call. + RecordingTrack: + type: string + description: 'The audio track to record for the call. Can be: `inbound`, + `outbound` or `both`. The default is `both`. `inbound` records + the audio that is received by Twilio. `outbound` records the audio + that is generated from Twilio. `both` records the audio that is + received and generated by Twilio.' + TimeLimit: + type: integer + description: The maximum duration of the call in seconds. Constraints + depend on account and configuration. + Url: + type: string + format: uri + description: The absolute URL that returns the TwiML instructions + for the call. We will call this URL using the `method` when the + call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) + section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). + Twiml: + type: string + format: twiml + description: TwiML instructions for the call Twilio will use without + fetching Twiml from url parameter. If both `twiml` and `url` are + provided then `twiml` parameter will be ignored. Max 4000 characters. + ApplicationSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + description: The SID of the Application resource that will handle + the call, if the call will be handled by an application. + required: + - To + - From + x-twilio: + conditional: + - - url + - twiml + - application_sid + get: + description: Retrieves a collection of calls made to and from your account + tags: + - Api20100401Call + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Call resource(s) to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: To + in: query + description: Only show calls made to this phone number, SIP address, Client + identifier or SIM SID. + schema: + type: string + format: phone-number + - name: From + in: query + description: Only include calls from this phone number, SIP address, Client + identifier or SIM SID. + schema: + type: string + format: phone-number + - name: ParentCallSid + in: query + description: Only include calls spawned by calls with this SID. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + - name: Status + in: query + description: 'The status of the calls to include. Can be: `queued`, `ringing`, + `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`.' + schema: + type: string + $ref: '#/components/schemas/call_enum_status' + - name: StartTime + in: query + description: 'Only include calls that started on this date. Specify a date + as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that + started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, + to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` + to read calls that started on or after midnight of this date.' + schema: + type: string + format: date-time + - name: startedOnOrBefore + in: query + description: 'Only include calls that started on this date. Specify a date + as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that + started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, + to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` + to read calls that started on or after midnight of this date.' + schema: + type: string + format: date-time + - name: startedOnOrAfter + in: query + description: 'Only include calls that started on this date. Specify a date + as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that + started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, + to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` + to read calls that started on or after midnight of this date.' + schema: + type: string + format: date-time + - name: EndTime + in: query + description: 'Only include calls that ended on this date. Specify a date as + `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that + ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, + to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` + to read calls that ended on or after midnight of this date.' + schema: + type: string + format: date-time + - name: endedOnOrBefore + in: query + description: 'Only include calls that ended on this date. Specify a date as + `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that + ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, + to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` + to read calls that ended on or after midnight of this date.' + schema: + type: string + format: date-time + - name: endedOnOrAfter + in: query + description: 'Only include calls that ended on this date. Specify a date as + `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that + ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, + to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` + to read calls that ended on or after midnight of this date.' + schema: + type: string + format: date-time + - 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: + type: object + title: ListCallResponse + properties: + calls: + type: array + items: + $ref: '#/components/schemas/call' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListCall + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json: + servers: + - url: https://api.twilio.com + description: A Call is an object that represents a connection between a telephone + and Twilio. + x-twilio: + defaultOutputProperties: + - sid + - from + - to + - status + - start_time + pathType: instance + dependentProperties: + recordings: + mapping: + account_sid: account_sid + call_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Calls/{call_sid}/Recordings.json + notifications: + mapping: + account_sid: account_sid + call_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Calls/{call_sid}/Notifications.json + feedback: + mapping: + account_sid: account_sid + call_sid: sid + resource_url: /2010-04-01None + events: + mapping: + account_sid: account_sid + call_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Calls/{call_sid}/Events.json + payments: + mapping: + account_sid: account_sid + call_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Calls/{call_sid}/Payments.json + siprec: + mapping: + account_sid: account_sid + call_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Calls/{call_sid}/Siprec.json + streams: + mapping: + account_sid: account_sid + call_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Calls/{call_sid}/Streams.json + user_defined_message_subscriptions: + mapping: + account_sid: account_sid + call_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Calls/{call_sid}/UserDefinedMessageSubscriptions.json + user_defined_messages: + mapping: + account_sid: account_sid + call_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Calls/{call_sid}/UserDefinedMessages.json + parent: /Accounts/{Sid}.json + delete: + description: Delete a Call record from your account. Once the record is deleted, + it will no longer appear in the API and Account Portal logs. + tags: + - Api20100401Call + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Call resource(s) to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided Call SID that uniquely identifies the Call + resource to delete + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteCall + x-maturity: + - GA + get: + description: Fetch the call specified by the provided Call SID + tags: + - Api20100401Call + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Call resource(s) to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The SID of the Call resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/call' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchCall + x-maturity: + - GA + post: + description: Initiates a call redirect or terminates a call + tags: + - Api20100401Call + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Call resource(s) to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Call + resource to update + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/call' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateCall + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateCallRequest + properties: + Url: + type: string + format: uri + description: The absolute URL that returns the TwiML instructions + for the call. We will call this URL using the `method` when the + call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) + section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). + Method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use when calling the `url`. + Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` + parameter is present, this parameter is ignored.' + Status: + type: string + $ref: '#/components/schemas/call_enum_update_status' + description: 'The new status of the resource. Can be: `canceled` + or `completed`. Specifying `canceled` will attempt to hang up + calls that are queued or ringing; however, it will not affect + calls already in progress. Specifying `completed` will attempt + to hang up a call even if it''s already in progress.' + FallbackUrl: + type: string + format: uri + description: The URL that we call using the `fallback_method` if + an error occurs when requesting or executing the TwiML at `url`. + If an `application_sid` parameter is present, this parameter is + ignored. + FallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to request the + `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. + If an `application_sid` parameter is present, this parameter is + ignored.' + StatusCallback: + type: string + format: uri + description: The URL we should call using the `status_callback_method` + to send status information to your application. If no `status_callback_event` + is specified, we will send the `completed` status. If an `application_sid` + parameter is present, this parameter is ignored. URLs must contain + a valid hostname (underscores are not permitted). + StatusCallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use when requesting the + `status_callback` URL. Can be: `GET` or `POST` and the default + is `POST`. If an `application_sid` parameter is present, this + parameter is ignored.' + Twiml: + type: string + format: twiml + description: TwiML instructions for the call Twilio will use without + fetching Twiml from url. Twiml and url parameters are mutually + exclusive + TimeLimit: + type: integer + description: The maximum duration of the call in seconds. Constraints + depend on account and configuration. + /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Events.json: + servers: + - url: https://api.twilio.com + description: API and webhook requests and responses. Contains parameters and TwiML + for application control. + x-twilio: + defaultOutputProperties: + - request + - response + pathType: list + parent: /Accounts/{AccountSid}/Calls/{Sid}.json + get: + description: Retrieve a list of all events for a call. + tags: + - Api20100401Event + parameters: + - name: AccountSid + in: path + description: The unique SID identifier of the Account. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The unique SID identifier of the Call. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + 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: + type: object + title: ListCallEventResponse + properties: + events: + type: array + items: + $ref: '#/components/schemas/call.call_event' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListCallEvent + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Feedback.json: + servers: + - url: https://api.twilio.com + description: The call Feedback subresource describes the quality experienced during + a phone call. + x-twilio: + defaultOutputProperties: + - sid + - quality_score + - date_created + pathType: instance + parent: /Accounts/{AccountSid}/Calls/{Sid}.json + get: + description: Fetch a Feedback resource from a call + tags: + - Api20100401Feedback + parameters: + - name: AccountSid + in: path + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The call sid that uniquely identifies the call + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/call.call_feedback' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchCallFeedback + x-maturity: + - GA + post: + description: Update a Feedback resource for a call + tags: + - Api20100401Feedback + parameters: + - name: AccountSid + in: path + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The call sid that uniquely identifies the call + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/call.call_feedback' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateCallFeedback + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateCallFeedbackRequest + properties: + QualityScore: + type: integer + description: The call quality expressed as an integer from `1` to + `5` where `1` represents very poor call quality and `5` represents + a perfect call. + Issue: + type: array + items: + type: string + $ref: '#/components/schemas/call_feedback_enum_issues' + description: 'One or more issues experienced during the call. The + issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, + `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, + or `one-way-audio`.' + /2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary.json: + servers: + - url: https://api.twilio.com + description: Call FeedbackSummary resources provide an idea of how your end user's + perceive the quality of their calls and the most common issues they have encountered + in the context of all your voice traffic during a specific time frame. + x-twilio: + defaultOutputProperties: + - sid + - call_feedback_count + - quality_score_average + - start_date + pathType: list + parent: /Accounts/{AccountSid}/Calls.json + mountName: feedback_summaries + post: + description: Create a FeedbackSummary resource for a call + tags: + - Api20100401FeedbackSummary + parameters: + - name: AccountSid + in: path + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/call.call_feedback_summary' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateCallFeedbackSummary + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateCallFeedbackSummaryRequest + properties: + StartDate: + type: string + format: date + description: Only include feedback given on or after this date. + Format is `YYYY-MM-DD` and specified in UTC. + EndDate: + type: string + format: date + description: Only include feedback given on or before this date. + Format is `YYYY-MM-DD` and specified in UTC. + IncludeSubaccounts: + type: boolean + description: Whether to also include Feedback resources from all + subaccounts. `true` includes feedback from all subaccounts and + `false`, the default, includes feedback from only the specified + account. + StatusCallback: + type: string + format: uri + description: The URL that we will request when the feedback summary + is complete. + StatusCallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: The HTTP method (`GET` or `POST`) we use to make the + request to the `StatusCallback` URL. + required: + - StartDate + - EndDate + /2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Call FeedbackSummary resources provide an idea of how your end user's + perceive the quality of their calls and the most common issues they have encountered + in the context of all your voice traffic during a specific time frame. + x-twilio: + defaultOutputProperties: + - sid + - call_feedback_count + - quality_score_average + - start_date + pathType: instance + parent: /Accounts/{AccountSid}/Calls.json + mountName: feedback_summaries + get: + description: Fetch a FeedbackSummary resource from a call + tags: + - Api20100401FeedbackSummary + parameters: + - name: AccountSid + in: path + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: A 34 character string that uniquely identifies this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^FS[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/call.call_feedback_summary' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchCallFeedbackSummary + x-maturity: + - GA + delete: + description: Delete a FeedbackSummary resource from a call + tags: + - Api20100401FeedbackSummary + parameters: + - name: AccountSid + in: path + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: A 34 character string that uniquely identifies this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^FS[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteCallFeedbackSummary + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Error notifications for calls + x-twilio: + defaultOutputProperties: + - sid + - call_sid + - error_code + - message_date + pathType: instance + parent: /Accounts/{AccountSid}/Calls/{Sid}.json + get: + description: '' + tags: + - Api20100401Notification + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Call Notification resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The [Call](https://www.twilio.com/docs/voice/api/call-resource) + SID of the Call Notification resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Call + Notification resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^NO[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/call.call_notification-instance' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchCallNotification + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications.json: + servers: + - url: https://api.twilio.com + description: Error notifications for calls + x-twilio: + defaultOutputProperties: + - sid + - call_sid + - error_code + - message_date + pathType: list + parent: /Accounts/{AccountSid}/Calls/{Sid}.json + get: + description: '' + tags: + - Api20100401Notification + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Call Notification resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The [Call](https://www.twilio.com/docs/voice/api/call-resource) + SID of the Call Notification resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + required: true + - name: Log + in: query + description: 'Only read notifications of the specified log level. Can be: `0` + to read only ERROR notifications or `1` to read only WARNING notifications. + By default, all notifications are read.' + schema: + type: integer + - name: MessageDate + in: query + description: Only show notifications for the specified date, formatted as + `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` + for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for + messages logged at or after midnight on a date. + schema: + type: string + format: date + - name: loggedAtOrBefore + in: query + description: Only show notifications for the specified date, formatted as + `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` + for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for + messages logged at or after midnight on a date. + schema: + type: string + format: date + - name: loggedAtOrAfter + in: query + description: Only show notifications for the specified date, formatted as + `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` + for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for + messages logged at or after midnight on a date. + schema: + type: string + format: date + - 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: + type: object + title: ListCallNotificationResponse + properties: + notifications: + type: array + items: + $ref: '#/components/schemas/call.call_notification' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListCallNotification + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings.json: + servers: + - url: https://api.twilio.com + description: A Recording resource represents the recording associated with a voice + call, conference, or SIP Trunk. + x-twilio: + defaultOutputProperties: + - sid + - call_sid + - status + - start_time + - duration + pathType: list + parent: /Accounts/{AccountSid}/Calls/{Sid}.json + post: + description: Create a recording for the call + tags: + - Api20100401Recording + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will create the resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + to associate the resource with. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/call.call_recording' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateCallRecording + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateCallRecordingRequest + properties: + RecordingStatusCallbackEvent: + type: array + items: + type: string + description: 'The recording status events on which we should call + the `recording_status_callback` URL. Can be: `in-progress`, `completed` + and `absent` and the default is `completed`. Separate multiple + event values with a space.' + RecordingStatusCallback: + type: string + format: uri + description: The URL we should call using the `recording_status_callback_method` + on each recording event specified in `recording_status_callback_event`. + For more information, see [RecordingStatusCallback parameters](https://www.twilio.com/docs/voice/api/recording#recordingstatuscallback). + RecordingStatusCallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use to call `recording_status_callback`. + Can be: `GET` or `POST` and the default is `POST`.' + Trim: + type: string + description: 'Whether to trim any leading and trailing silence in + the recording. Can be: `trim-silence` or `do-not-trim` and the + default is `do-not-trim`. `trim-silence` trims the silence from + the beginning and end of the recording and `do-not-trim` does + not.' + RecordingChannels: + type: string + description: 'The number of channels used in the recording. Can + be: `mono` or `dual` and the default is `mono`. `mono` records + all parties of the call into one channel. `dual` records each + party of a 2-party call into separate channels.' + RecordingTrack: + type: string + description: 'The audio track to record for the call. Can be: `inbound`, + `outbound` or `both`. The default is `both`. `inbound` records + the audio that is received by Twilio. `outbound` records the audio + that is generated from Twilio. `both` records the audio that is + received and generated by Twilio.' + get: + description: Retrieve a list of recordings belonging to the call used to make + the request + tags: + - Api20100401Recording + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Recording resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The [Call](https://www.twilio.com/docs/voice/api/call-resource) + SID of the resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + required: true + - name: DateCreated + in: query + description: 'The `date_created` value, specified as `YYYY-MM-DD`, of the + resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` + will return recordings generated at or before midnight on a given date, + and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight + on a date.' + schema: + type: string + format: date + - name: dateCreatedOnOrBefore + in: query + description: 'The `date_created` value, specified as `YYYY-MM-DD`, of the + resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` + will return recordings generated at or before midnight on a given date, + and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight + on a date.' + schema: + type: string + format: date + - name: dateCreatedOnOrAfter + in: query + description: 'The `date_created` value, specified as `YYYY-MM-DD`, of the + resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` + will return recordings generated at or before midnight on a given date, + and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight + on a date.' + schema: + type: string + format: date + - 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: + type: object + title: ListCallRecordingResponse + properties: + recordings: + type: array + items: + $ref: '#/components/schemas/call.call_recording' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListCallRecording + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json: + servers: + - url: https://api.twilio.com + description: A Recording resource represents the recording associated with a voice + call, conference, or SIP Trunk. + x-twilio: + defaultOutputProperties: + - sid + - call_sid + - status + - start_time + - duration + pathType: instance + parent: /Accounts/{AccountSid}/Calls/{Sid}.json + post: + description: 'Changes the status of the recording to paused, stopped, or in-progress. + Note: Pass `Twilio.CURRENT` instead of recording sid to reference current + active recording.' + tags: + - Api20100401Recording + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Recording resource to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The [Call](https://www.twilio.com/docs/voice/api/call-resource) + SID of the resource to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Recording + resource to update. + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/call.call_recording' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateCallRecording + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateCallRecordingRequest + properties: + Status: + type: string + $ref: '#/components/schemas/call_recording_enum_status' + description: 'The new status of the recording. Can be: `stopped`, + `paused`, `in-progress`.' + PauseBehavior: + type: string + description: 'Whether to record during a pause. Can be: `skip` or + `silence` and the default is `silence`. `skip` does not record + during the pause period, while `silence` will replace the actual + audio of the call with silence during the pause period. This parameter + only applies when setting `status` is set to `paused`.' + required: + - Status + get: + description: Fetch an instance of a recording for a call + tags: + - Api20100401Recording + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Recording resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The [Call](https://www.twilio.com/docs/voice/api/call-resource) + SID of the resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Recording + resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/call.call_recording' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchCallRecording + x-maturity: + - GA + delete: + description: Delete a recording from your account + tags: + - Api20100401Recording + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Recording resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The [Call](https://www.twilio.com/docs/voice/api/call-resource) + SID of the resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Recording + resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteCallRecording + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Conferences/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Voice call conferences + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + - status + pathType: instance + dependentProperties: + participants: + mapping: + account_sid: account_sid + conference_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Conferences/{conference_sid}/Participants.json + recordings: + mapping: + account_sid: account_sid + conference_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Conferences/{conference_sid}/Recordings.json + parent: /Accounts/{Sid}.json + get: + description: Fetch an instance of a conference + tags: + - Api20100401Conference + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Conference resource(s) to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Conference + resource to fetch + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CF[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/conference' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchConference + x-maturity: + - GA + post: + description: '' + tags: + - Api20100401Conference + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Conference resource(s) to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Conference + resource to update + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/conference' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateConference + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateConferenceRequest + properties: + Status: + type: string + $ref: '#/components/schemas/conference_enum_update_status' + description: 'The new status of the resource. Can be: Can be: `init`, + `in-progress`, or `completed`. Specifying `completed` will end + the conference and hang up all participants' + AnnounceUrl: + type: string + format: uri + description: The URL we should call to announce something into the + conference. The URL may return an MP3 file, a WAV file, or a TwiML + document that contains ``, ``, ``, or `` + verbs. + AnnounceMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method used to call `announce_url`. Can be: + `GET` or `POST` and the default is `POST`' + /2010-04-01/Accounts/{AccountSid}/Conferences.json: + servers: + - url: https://api.twilio.com + description: Voice call conferences + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + - status + pathType: list + dependentProperties: + participants: + mapping: + account_sid: account_sid + conference_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Conferences/{conference_sid}/Participants.json + recordings: + mapping: + account_sid: account_sid + conference_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Conferences/{conference_sid}/Recordings.json + parent: /Accounts/{Sid}.json + get: + description: Retrieve a list of conferences belonging to the account used to + make the request + tags: + - Api20100401Conference + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Conference resource(s) to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DateCreated + in: query + description: The `date_created` value, specified as `YYYY-MM-DD`, of the resources + to read. To read conferences that started on or before midnight on a date, + use `<=YYYY-MM-DD`, and to specify conferences that started on or after + midnight on a date, use `>=YYYY-MM-DD`. + schema: + type: string + format: date + - name: dateCreatedOnOrBefore + in: query + description: The `date_created` value, specified as `YYYY-MM-DD`, of the resources + to read. To read conferences that started on or before midnight on a date, + use `<=YYYY-MM-DD`, and to specify conferences that started on or after + midnight on a date, use `>=YYYY-MM-DD`. + schema: + type: string + format: date + - name: dateCreatedOnOrAfter + in: query + description: The `date_created` value, specified as `YYYY-MM-DD`, of the resources + to read. To read conferences that started on or before midnight on a date, + use `<=YYYY-MM-DD`, and to specify conferences that started on or after + midnight on a date, use `>=YYYY-MM-DD`. + schema: + type: string + format: date + - name: DateUpdated + in: query + description: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources + to read. To read conferences that were last updated on or before midnight + on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last + updated on or after midnight on a given date, use `>=YYYY-MM-DD`. + schema: + type: string + format: date + - name: dateUpdatedOnOrBefore + in: query + description: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources + to read. To read conferences that were last updated on or before midnight + on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last + updated on or after midnight on a given date, use `>=YYYY-MM-DD`. + schema: + type: string + format: date + - name: dateUpdatedOnOrAfter + in: query + description: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources + to read. To read conferences that were last updated on or before midnight + on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last + updated on or after midnight on a given date, use `>=YYYY-MM-DD`. + schema: + type: string + format: date + - name: FriendlyName + in: query + description: The string that identifies the Conference resources to read. + schema: + type: string + - name: Status + in: query + description: 'The status of the resources to read. Can be: `init`, `in-progress`, + or `completed`.' + schema: + type: string + $ref: '#/components/schemas/conference_enum_status' + - 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: + type: object + title: ListConferenceResponse + properties: + conferences: + type: array + items: + $ref: '#/components/schemas/conference' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListConference + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Recordings of conferences + x-twilio: + defaultOutputProperties: + - sid + - conference_sid + - status + - start_time + - duration + pathType: instance + parent: /Accounts/{AccountSid}/Conferences/{Sid}.json + post: + description: 'Changes the status of the recording to paused, stopped, or in-progress. + Note: To use `Twilio.CURRENT`, pass it as recording sid.' + tags: + - Api20100401Recording + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Conference Recording resource to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ConferenceSid + in: path + description: The Conference SID that identifies the conference associated + with the recording to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CF[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Conference + Recording resource to update. Use `Twilio.CURRENT` to reference the current + active recording. + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/conference.conference_recording' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateConferenceRecording + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateConferenceRecordingRequest + properties: + Status: + type: string + $ref: '#/components/schemas/conference_recording_enum_status' + description: 'The new status of the recording. Can be: `stopped`, + `paused`, `in-progress`.' + PauseBehavior: + type: string + description: 'Whether to record during a pause. Can be: `skip` or + `silence` and the default is `silence`. `skip` does not record + during the pause period, while `silence` will replace the actual + audio of the call with silence during the pause period. This parameter + only applies when setting `status` is set to `paused`.' + required: + - Status + get: + description: Fetch an instance of a recording for a call + tags: + - Api20100401Recording + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Conference Recording resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ConferenceSid + in: path + description: The Conference SID that identifies the conference associated + with the recording to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CF[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Conference + Recording resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/conference.conference_recording' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchConferenceRecording + x-maturity: + - GA + delete: + description: Delete a recording from your account + tags: + - Api20100401Recording + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Conference Recording resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ConferenceSid + in: path + description: The Conference SID that identifies the conference associated + with the recording to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CF[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Conference + Recording resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteConferenceRecording + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings.json: + servers: + - url: https://api.twilio.com + description: Recordings of conferences + x-twilio: + defaultOutputProperties: + - sid + - conference_sid + - status + - start_time + - duration + pathType: list + parent: /Accounts/{AccountSid}/Conferences/{Sid}.json + get: + description: Retrieve a list of recordings belonging to the call used to make + the request + tags: + - Api20100401Recording + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Conference Recording resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ConferenceSid + in: path + description: The Conference SID that identifies the conference associated + with the recording to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CF[0-9a-fA-F]{32}$ + required: true + - name: DateCreated + in: query + description: 'The `date_created` value, specified as `YYYY-MM-DD`, of the + resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` + will return recordings generated at or before midnight on a given date, + and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight + on a date.' + schema: + type: string + format: date + - name: dateCreatedOnOrBefore + in: query + description: 'The `date_created` value, specified as `YYYY-MM-DD`, of the + resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` + will return recordings generated at or before midnight on a given date, + and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight + on a date.' + schema: + type: string + format: date + - name: dateCreatedOnOrAfter + in: query + description: 'The `date_created` value, specified as `YYYY-MM-DD`, of the + resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` + will return recordings generated at or before midnight on a given date, + and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight + on a date.' + schema: + type: string + format: date + - 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: + type: object + title: ListConferenceRecordingResponse + properties: + recordings: + type: array + items: + $ref: '#/components/schemas/conference.conference_recording' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListConferenceRecording + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Twilio Connect apps + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + pathType: instance + parent: /Accounts/{Sid}.json + get: + description: Fetch an instance of a connect-app + tags: + - Api20100401ConnectApp + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the ConnectApp resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the ConnectApp + resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CN[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/connect_app' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchConnectApp + x-maturity: + - GA + post: + description: Update a connect-app with the specified parameters + tags: + - Api20100401ConnectApp + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the ConnectApp resources to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the ConnectApp + resource to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CN[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/connect_app' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateConnectApp + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateConnectAppRequest + properties: + AuthorizeRedirectUrl: + type: string + format: uri + description: The URL to redirect the user to after we authenticate + the user and obtain authorization to access the Connect App. + CompanyName: + type: string + description: The company name to set for the Connect App. + DeauthorizeCallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: The HTTP method to use when calling `deauthorize_callback_url`. + DeauthorizeCallbackUrl: + type: string + format: uri + description: The URL to call using the `deauthorize_callback_method` + to de-authorize the Connect App. + Description: + type: string + description: A description of the Connect App. + FriendlyName: + type: string + description: A descriptive string that you create to describe the + resource. It can be up to 64 characters long. + HomepageUrl: + type: string + format: uri + description: A public URL where users can obtain more information + about this Connect App. + Permissions: + type: array + items: + type: string + $ref: '#/components/schemas/connect_app_enum_permission' + description: 'A comma-separated list of the permissions you will + request from the users of this ConnectApp. Can include: `get-all` + and `post-all`.' + delete: + description: Delete an instance of a connect-app + tags: + - Api20100401ConnectApp + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the ConnectApp resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the ConnectApp + resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CN[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteConnectApp + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/ConnectApps.json: + servers: + - url: https://api.twilio.com + description: Twilio Connect apps + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + pathType: list + parent: /Accounts/{Sid}.json + get: + description: Retrieve a list of connect-apps belonging to the account used to + make the request + tags: + - Api20100401ConnectApp + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the ConnectApp resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + 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: + type: object + title: ListConnectAppResponse + properties: + connect_apps: + type: array + items: + $ref: '#/components/schemas/connect_app' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListConnectApp + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Addresses/{AddressSid}/DependentPhoneNumbers.json: + servers: + - url: https://api.twilio.com + description: Phone numbers dependent on an Address resource + x-twilio: + defaultOutputProperties: + - sid + - phone_number + - friendly_name + pathType: list + parent: /Accounts/{AccountSid}/Addresses/{Sid}.json + get: + description: '' + tags: + - Api20100401DependentPhoneNumber + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the DependentPhoneNumber resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: AddressSid + in: path + description: The SID of the Address resource associated with the phone number. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + 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: + type: object + title: ListDependentPhoneNumberResponse + properties: + dependent_phone_numbers: + type: array + items: + $ref: '#/components/schemas/address.dependent_phone_number' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListDependentPhoneNumber + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Incoming phone numbers on a Twilio account/project + x-twilio: + defaultOutputProperties: + - sid + - phone_number + - friendly_name + pathType: instance + dependentProperties: + assigned_add_ons: + mapping: + account_sid: account_sid + resource_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/IncomingPhoneNumbers/{resource_sid}/AssignedAddOns.json + parent: /Accounts/{Sid}.json + post: + description: Update an incoming-phone-number instance. + tags: + - Api20100401IncomingPhoneNumber + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the IncomingPhoneNumber resource to update. For more information, + see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers). + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the IncomingPhoneNumber + resource to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/incoming_phone_number' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateIncomingPhoneNumber + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateIncomingPhoneNumberRequest + properties: + AccountSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the IncomingPhoneNumber resource to update. For + more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers). + ApiVersion: + type: string + description: The API version to use for incoming calls made to the + phone number. The default is `2010-04-01`. + FriendlyName: + type: string + description: A descriptive string that you created to describe this + phone number. It can be up to 64 characters long. By default, + this is a formatted version of the phone number. + SmsApplicationSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + description: The SID of the application that should handle SMS messages + sent to the number. If an `sms_application_sid` is present, we + ignore all of the `sms_*_url` urls and use those set on the application. + SmsFallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call `sms_fallback_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + SmsFallbackUrl: + type: string + format: uri + description: The URL that we should call when an error occurs while + requesting or executing the TwiML defined by `sms_url`. + SmsMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call `sms_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + SmsUrl: + type: string + format: uri + description: The URL we should call when the phone number receives + an incoming SMS message. + StatusCallback: + type: string + format: uri + description: The URL we should call using the `status_callback_method` + to send status information 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`. + Can be: `GET` or `POST` and defaults to `POST`.' + VoiceApplicationSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + description: The SID of the application we should use to handle + phone calls to the phone number. If a `voice_application_sid` + is present, we ignore all of the voice urls and use only those + set on the application. Setting a `voice_application_sid` will + automatically delete your `trunk_sid` and vice versa. + VoiceCallerIdLookup: + type: boolean + description: 'Whether to lookup the caller''s name from the CNAM + database and post it to your app. Can be: `true` or `false` and + defaults to `false`.' + VoiceFallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call `voice_fallback_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + VoiceFallbackUrl: + type: string + format: uri + description: The URL that we should call when an error occurs retrieving + or executing the TwiML requested by `url`. + VoiceMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call `voice_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + VoiceUrl: + type: string + format: uri + description: The URL that we should call to answer a call to the + phone number. The `voice_url` will not be called if a `voice_application_sid` + or a `trunk_sid` is set. + EmergencyStatus: + type: string + $ref: '#/components/schemas/incoming_phone_number_enum_emergency_status' + description: The parameter displays if emergency calling is enabled + for this number. Active numbers may place emergency calls by dialing + valid emergency numbers for the country. + EmergencyAddressSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + description: The SID of the emergency address configuration to use + for emergency calling from this phone number. + TrunkSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^TK[0-9a-fA-F]{32}$ + description: The SID of the Trunk we should use to handle phone + calls to the phone number. If a `trunk_sid` is present, we ignore + all of the voice urls and voice applications and use only those + set on the Trunk. Setting a `trunk_sid` will automatically delete + your `voice_application_sid` and vice versa. + VoiceReceiveMode: + type: string + $ref: '#/components/schemas/incoming_phone_number_enum_voice_receive_mode' + description: 'The configuration parameter for the phone number to + receive incoming voice calls or faxes. Can be: `fax` or `voice` + and defaults to `voice`.' + IdentitySid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RI[0-9a-fA-F]{32}$ + description: The SID of the Identity resource that we should associate + with the phone number. Some regions require an identity to meet + local regulations. + AddressSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + description: The SID of the Address resource we should associate + with the phone number. Some regions require addresses to meet + local regulations. + BundleSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^BU[0-9a-fA-F]{32}$ + description: The SID of the Bundle resource that you associate with + the phone number. Some regions require a Bundle to meet local + Regulations. + get: + description: Fetch an incoming-phone-number belonging to the account used to + make the request. + tags: + - Api20100401IncomingPhoneNumber + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the IncomingPhoneNumber resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the IncomingPhoneNumber + resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/incoming_phone_number' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchIncomingPhoneNumber + x-maturity: + - GA + delete: + description: Delete a phone-numbers belonging to the account used to make the + request. + tags: + - Api20100401IncomingPhoneNumber + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the IncomingPhoneNumber resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the IncomingPhoneNumber + resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteIncomingPhoneNumber + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json: + servers: + - url: https://api.twilio.com + description: Incoming phone numbers on a Twilio account/project + x-twilio: + defaultOutputProperties: + - sid + - phone_number + - friendly_name + pathType: list + dependentProperties: + assigned_add_ons: + mapping: + account_sid: account_sid + resource_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/IncomingPhoneNumbers/{resource_sid}/AssignedAddOns.json + parent: /Accounts/{Sid}.json + get: + description: Retrieve a list of incoming-phone-numbers belonging to the account + used to make the request. + tags: + - Api20100401IncomingPhoneNumber + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the IncomingPhoneNumber resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Beta + in: query + description: 'Whether to include phone numbers new to the Twilio platform. + Can be: `true` or `false` and the default is `true`.' + schema: + type: boolean + - name: FriendlyName + in: query + description: A string that identifies the IncomingPhoneNumber resources to + read. + schema: + type: string + - name: PhoneNumber + in: query + description: The phone numbers of the IncomingPhoneNumber resources to read. + You can specify partial numbers and use '*' as a wildcard for any digit. + schema: + type: string + format: phone-number + - name: Origin + in: query + description: 'Whether to include phone numbers based on their origin. Can + be: `twilio` or `hosted`. By default, phone numbers of all origin are included.' + schema: + type: string + - 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: + type: object + title: ListIncomingPhoneNumberResponse + properties: + incoming_phone_numbers: + type: array + items: + $ref: '#/components/schemas/incoming_phone_number' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListIncomingPhoneNumber + x-maturity: + - GA + post: + description: Purchase a phone-number for the account. + tags: + - Api20100401IncomingPhoneNumber + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will create the resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/incoming_phone_number' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateIncomingPhoneNumber + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateIncomingPhoneNumberRequest + properties: + ApiVersion: + type: string + description: The API version to use for incoming calls made to the + new phone number. The default is `2010-04-01`. + FriendlyName: + type: string + description: A descriptive string that you created to describe the + new phone number. It can be up to 64 characters long. By default, + this is a formatted version of the new phone number. + SmsApplicationSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + description: The SID of the application that should handle SMS messages + sent to the new phone number. If an `sms_application_sid` is present, + we ignore all of the `sms_*_url` urls and use those set on the + application. + SmsFallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call `sms_fallback_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + SmsFallbackUrl: + type: string + format: uri + description: The URL that we should call when an error occurs while + requesting or executing the TwiML defined by `sms_url`. + SmsMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call `sms_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + SmsUrl: + type: string + format: uri + description: The URL we should call when the new phone number receives + an incoming SMS message. + StatusCallback: + type: string + format: uri + description: The URL we should call using the `status_callback_method` + to send status information 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`. + Can be: `GET` or `POST` and defaults to `POST`.' + VoiceApplicationSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + description: The SID of the application we should use to handle + calls to the new phone number. If a `voice_application_sid` is + present, we ignore all of the voice urls and use only those set + on the application. Setting a `voice_application_sid` will automatically + delete your `trunk_sid` and vice versa. + VoiceCallerIdLookup: + type: boolean + description: 'Whether to lookup the caller''s name from the CNAM + database and post it to your app. Can be: `true` or `false` and + defaults to `false`.' + VoiceFallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call `voice_fallback_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + VoiceFallbackUrl: + type: string + format: uri + description: The URL that we should call when an error occurs retrieving + or executing the TwiML requested by `url`. + VoiceMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call `voice_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + VoiceUrl: + type: string + format: uri + description: The URL that we should call to answer a call to the + new phone number. The `voice_url` will not be called if a `voice_application_sid` + or a `trunk_sid` is set. + EmergencyStatus: + type: string + $ref: '#/components/schemas/incoming_phone_number_enum_emergency_status' + description: The parameter displays if emergency calling is enabled + for this number. Active numbers may place emergency calls by dialing + valid emergency numbers for the country. + EmergencyAddressSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + description: The SID of the emergency address configuration to use + for emergency calling from the new phone number. + TrunkSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^TK[0-9a-fA-F]{32}$ + description: The SID of the Trunk we should use to handle calls + to the new phone number. If a `trunk_sid` is present, we ignore + all of the voice urls and voice applications and use only those + set on the Trunk. Setting a `trunk_sid` will automatically delete + your `voice_application_sid` and vice versa. + IdentitySid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RI[0-9a-fA-F]{32}$ + description: The SID of the Identity resource that we should associate + with the new phone number. Some regions require an identity to + meet local regulations. + AddressSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + description: The SID of the Address resource we should associate + with the new phone number. Some regions require addresses to meet + local regulations. + VoiceReceiveMode: + type: string + $ref: '#/components/schemas/incoming_phone_number_enum_voice_receive_mode' + description: 'The configuration parameter for the new phone number + to receive incoming voice calls or faxes. Can be: `fax` or `voice` + and defaults to `voice`.' + BundleSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^BU[0-9a-fA-F]{32}$ + description: The SID of the Bundle resource that you associate with + the phone number. Some regions require a Bundle to meet local + Regulations. + PhoneNumber: + type: string + format: phone-number + description: The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) + format. E.164 phone numbers consist of a + followed by the country + code and subscriber number without punctuation characters. For + example, +14155551234. + AreaCode: + type: string + description: The desired area code for your new incoming phone number. + Can be any three-digit, US or Canada area code. We will provision + an available phone number within this area code for you. **You + must provide an `area_code` or a `phone_number`.** (US and Canada + only). + x-twilio: + conditional: + - - phone_number + - area_code + /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{Sid}.json: + servers: + - url: https://api.twilio.com + description: 'TODO: Resource-level docs' + x-twilio: + defaultOutputProperties: + - sid + - unique_name + - friendly_name + - description + pathType: instance + dependentProperties: + extensions: + mapping: + account_sid: account_sid + resource_sid: resource_sid + assigned_add_on_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/IncomingPhoneNumbers/{resource_sid}/AssignedAddOns/{assigned_add_on_sid}/Extensions.json + parent: /Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json + get: + description: Fetch an instance of an Add-on installation currently assigned + to this Number. + tags: + - Api20100401AssignedAddOn + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ResourceSid + in: path + description: The SID of the Phone Number to which the Add-on is assigned. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the resource + to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XE[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/incoming_phone_number.incoming_phone_number_assigned_add_on' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchIncomingPhoneNumberAssignedAddOn + x-maturity: + - Beta + delete: + description: Remove the assignment of an Add-on installation from the Number + specified. + tags: + - Api20100401AssignedAddOn + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ResourceSid + in: path + description: The SID of the Phone Number to which the Add-on is assigned. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the resource + to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XE[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteIncomingPhoneNumberAssignedAddOn + x-maturity: + - Beta + /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns.json: + servers: + - url: https://api.twilio.com + description: 'TODO: Resource-level docs' + x-twilio: + defaultOutputProperties: + - sid + - unique_name + - friendly_name + - description + pathType: list + dependentProperties: + extensions: + mapping: + account_sid: account_sid + resource_sid: resource_sid + assigned_add_on_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/IncomingPhoneNumbers/{resource_sid}/AssignedAddOns/{assigned_add_on_sid}/Extensions.json + parent: /Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json + get: + description: Retrieve a list of Add-on installations currently assigned to this + Number. + tags: + - Api20100401AssignedAddOn + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ResourceSid + in: path + description: The SID of the Phone Number to which the Add-on is assigned. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + 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: + type: object + title: ListIncomingPhoneNumberAssignedAddOnResponse + properties: + assigned_add_ons: + type: array + items: + $ref: '#/components/schemas/incoming_phone_number.incoming_phone_number_assigned_add_on' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListIncomingPhoneNumberAssignedAddOn + x-maturity: + - Beta + post: + description: Assign an Add-on installation to the Number specified. + tags: + - Api20100401AssignedAddOn + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will create the resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ResourceSid + in: path + description: The SID of the Phone Number to assign the Add-on. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/incoming_phone_number.incoming_phone_number_assigned_add_on' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateIncomingPhoneNumberAssignedAddOn + x-maturity: + - Beta + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateIncomingPhoneNumberAssignedAddOnRequest + properties: + InstalledAddOnSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XE[0-9a-fA-F]{32}$ + description: The SID that identifies the Add-on installation. + required: + - InstalledAddOnSid + ? /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions/{Sid}.json + : servers: + - url: https://api.twilio.com + description: 'TODO: Resource-level docs' + x-twilio: + defaultOutputProperties: + - sid + - unique_name + - friendly_name + - product_name + pathType: instance + parent: /Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{Sid}.json + className: assigned_add_on_extension + get: + description: Fetch an instance of an Extension for the Assigned Add-on. + tags: + - Api20100401AssignedAddOnExtension + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ResourceSid + in: path + description: The SID of the Phone Number to which the Add-on is assigned. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + required: true + - name: AssignedAddOnSid + in: path + description: The SID that uniquely identifies the assigned Add-on installation. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XE[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the resource + to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XF[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/incoming_phone_number.incoming_phone_number_assigned_add_on.incoming_phone_number_assigned_add_on_extension' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchIncomingPhoneNumberAssignedAddOnExtension + x-maturity: + - Beta + /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions.json: + servers: + - url: https://api.twilio.com + description: 'TODO: Resource-level docs' + x-twilio: + defaultOutputProperties: + - sid + - unique_name + - friendly_name + - product_name + pathType: list + parent: /Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{Sid}.json + className: assigned_add_on_extension + get: + description: Retrieve a list of Extensions for the Assigned Add-on. + tags: + - Api20100401AssignedAddOnExtension + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ResourceSid + in: path + description: The SID of the Phone Number to which the Add-on is assigned. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + required: true + - name: AssignedAddOnSid + in: path + description: The SID that uniquely identifies the assigned Add-on installation. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XE[0-9a-fA-F]{32}$ + 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: + type: object + title: ListIncomingPhoneNumberAssignedAddOnExtensionResponse + properties: + extensions: + type: array + items: + $ref: '#/components/schemas/incoming_phone_number.incoming_phone_number_assigned_add_on.incoming_phone_number_assigned_add_on_extension' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListIncomingPhoneNumberAssignedAddOnExtension + x-maturity: + - Beta + /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Local.json: + servers: + - url: https://api.twilio.com + description: Incoming local phone numbers on a Twilio account/project + x-twilio: + defaultOutputProperties: + - sid + - phone_number + - friendly_name + pathType: list + parent: /Accounts/{AccountSid}/IncomingPhoneNumbers.json + get: + description: '' + tags: + - Api20100401Local + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Beta + in: query + description: 'Whether to include phone numbers new to the Twilio platform. + Can be: `true` or `false` and the default is `true`.' + schema: + type: boolean + - name: FriendlyName + in: query + description: A string that identifies the resources to read. + schema: + type: string + - name: PhoneNumber + in: query + description: The phone numbers of the IncomingPhoneNumber resources to read. + You can specify partial numbers and use '*' as a wildcard for any digit. + schema: + type: string + format: phone-number + - name: Origin + in: query + description: 'Whether to include phone numbers based on their origin. Can + be: `twilio` or `hosted`. By default, phone numbers of all origin are included.' + schema: + type: string + - 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: + type: object + title: ListIncomingPhoneNumberLocalResponse + properties: + incoming_phone_numbers: + type: array + items: + $ref: '#/components/schemas/incoming_phone_number.incoming_phone_number_local' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListIncomingPhoneNumberLocal + x-maturity: + - GA + post: + description: '' + tags: + - Api20100401Local + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will create the resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/incoming_phone_number.incoming_phone_number_local' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateIncomingPhoneNumberLocal + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateIncomingPhoneNumberLocalRequest + properties: + PhoneNumber: + type: string + format: phone-number + description: The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) + format. E.164 phone numbers consist of a + followed by the country + code and subscriber number without punctuation characters. For + example, +14155551234. + ApiVersion: + type: string + description: The API version to use for incoming calls made to the + new phone number. The default is `2010-04-01`. + FriendlyName: + type: string + description: A descriptive string that you created to describe the + new phone number. It can be up to 64 characters long. By default, + this is a formatted version of the phone number. + SmsApplicationSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + description: The SID of the application that should handle SMS messages + sent to the new phone number. If an `sms_application_sid` is present, + we ignore all of the `sms_*_url` urls and use those set on the + application. + SmsFallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call `sms_fallback_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + SmsFallbackUrl: + type: string + format: uri + description: The URL that we should call when an error occurs while + requesting or executing the TwiML defined by `sms_url`. + SmsMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call `sms_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + SmsUrl: + type: string + format: uri + description: The URL we should call when the new phone number receives + an incoming SMS message. + StatusCallback: + type: string + format: uri + description: The URL we should call using the `status_callback_method` + to send status information 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`. + Can be: `GET` or `POST` and defaults to `POST`.' + VoiceApplicationSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + description: The SID of the application we should use to handle + calls to the new phone number. If a `voice_application_sid` is + present, we ignore all of the voice urls and use only those set + on the application. Setting a `voice_application_sid` will automatically + delete your `trunk_sid` and vice versa. + VoiceCallerIdLookup: + type: boolean + description: 'Whether to lookup the caller''s name from the CNAM + database and post it to your app. Can be: `true` or `false` and + defaults to `false`.' + VoiceFallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call `voice_fallback_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + VoiceFallbackUrl: + type: string + format: uri + description: The URL that we should call when an error occurs retrieving + or executing the TwiML requested by `url`. + VoiceMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call `voice_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + VoiceUrl: + type: string + format: uri + description: The URL that we should call to answer a call to the + new phone number. The `voice_url` will not be called if a `voice_application_sid` + or a `trunk_sid` is set. + IdentitySid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RI[0-9a-fA-F]{32}$ + description: The SID of the Identity resource that we should associate + with the new phone number. Some regions require an identity to + meet local regulations. + AddressSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + description: The SID of the Address resource we should associate + with the new phone number. Some regions require addresses to meet + local regulations. + EmergencyStatus: + type: string + $ref: '#/components/schemas/incoming_phone_number_local_enum_emergency_status' + description: The parameter displays if emergency calling is enabled + for this number. Active numbers may place emergency calls by dialing + valid emergency numbers for the country. + EmergencyAddressSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + description: The SID of the emergency address configuration to use + for emergency calling from the new phone number. + TrunkSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^TK[0-9a-fA-F]{32}$ + description: The SID of the Trunk we should use to handle calls + to the new phone number. If a `trunk_sid` is present, we ignore + all of the voice urls and voice applications and use only those + set on the Trunk. Setting a `trunk_sid` will automatically delete + your `voice_application_sid` and vice versa. + VoiceReceiveMode: + type: string + $ref: '#/components/schemas/incoming_phone_number_local_enum_voice_receive_mode' + description: 'The configuration parameter for the new phone number + to receive incoming voice calls or faxes. Can be: `fax` or `voice` + and defaults to `voice`.' + BundleSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^BU[0-9a-fA-F]{32}$ + description: The SID of the Bundle resource that you associate with + the phone number. Some regions require a Bundle to meet local + Regulations. + required: + - PhoneNumber + /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Mobile.json: + servers: + - url: https://api.twilio.com + description: Incoming mobile phone numbers on a Twilio account/project + x-twilio: + defaultOutputProperties: + - sid + - phone_number + - friendly_name + pathType: list + parent: /Accounts/{AccountSid}/IncomingPhoneNumbers.json + get: + description: '' + tags: + - Api20100401Mobile + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Beta + in: query + description: 'Whether to include phone numbers new to the Twilio platform. + Can be: `true` or `false` and the default is `true`.' + schema: + type: boolean + - name: FriendlyName + in: query + description: A string that identifies the resources to read. + schema: + type: string + - name: PhoneNumber + in: query + description: The phone numbers of the IncomingPhoneNumber resources to read. + You can specify partial numbers and use '*' as a wildcard for any digit. + schema: + type: string + format: phone-number + - name: Origin + in: query + description: 'Whether to include phone numbers based on their origin. Can + be: `twilio` or `hosted`. By default, phone numbers of all origin are included.' + schema: + type: string + - 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: + type: object + title: ListIncomingPhoneNumberMobileResponse + properties: + incoming_phone_numbers: + type: array + items: + $ref: '#/components/schemas/incoming_phone_number.incoming_phone_number_mobile' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListIncomingPhoneNumberMobile + x-maturity: + - GA + post: + description: '' + tags: + - Api20100401Mobile + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will create the resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/incoming_phone_number.incoming_phone_number_mobile' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateIncomingPhoneNumberMobile + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateIncomingPhoneNumberMobileRequest + properties: + PhoneNumber: + type: string + format: phone-number + description: The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) + format. E.164 phone numbers consist of a + followed by the country + code and subscriber number without punctuation characters. For + example, +14155551234. + ApiVersion: + type: string + description: The API version to use for incoming calls made to the + new phone number. The default is `2010-04-01`. + FriendlyName: + type: string + description: A descriptive string that you created to describe the + new phone number. It can be up to 64 characters long. By default, + the is a formatted version of the phone number. + SmsApplicationSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + description: The SID of the application that should handle SMS messages + sent to the new phone number. If an `sms_application_sid` is present, + we ignore all of the `sms_*_url` urls and use those of the application. + SmsFallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call `sms_fallback_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + SmsFallbackUrl: + type: string + format: uri + description: The URL that we should call when an error occurs while + requesting or executing the TwiML defined by `sms_url`. + SmsMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call `sms_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + SmsUrl: + type: string + format: uri + description: The URL we should call when the new phone number receives + an incoming SMS message. + StatusCallback: + type: string + format: uri + description: The URL we should call using the `status_callback_method` + to send status information 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`. + Can be: `GET` or `POST` and defaults to `POST`.' + VoiceApplicationSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + description: The SID of the application we should use to handle + calls to the new phone number. If a `voice_application_sid` is + present, we ignore all of the voice urls and use only those set + on the application. Setting a `voice_application_sid` will automatically + delete your `trunk_sid` and vice versa. + VoiceCallerIdLookup: + type: boolean + description: 'Whether to lookup the caller''s name from the CNAM + database and post it to your app. Can be: `true` or `false` and + defaults to `false`.' + VoiceFallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call `voice_fallback_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + VoiceFallbackUrl: + type: string + format: uri + description: The URL that we should call when an error occurs retrieving + or executing the TwiML requested by `url`. + VoiceMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call `voice_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + VoiceUrl: + type: string + format: uri + description: The URL that we should call to answer a call to the + new phone number. The `voice_url` will not be called if a `voice_application_sid` + or a `trunk_sid` is set. + IdentitySid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RI[0-9a-fA-F]{32}$ + description: The SID of the Identity resource that we should associate + with the new phone number. Some regions require an identity to + meet local regulations. + AddressSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + description: The SID of the Address resource we should associate + with the new phone number. Some regions require addresses to meet + local regulations. + EmergencyStatus: + type: string + $ref: '#/components/schemas/incoming_phone_number_mobile_enum_emergency_status' + description: The parameter displays if emergency calling is enabled + for this number. Active numbers may place emergency calls by dialing + valid emergency numbers for the country. + EmergencyAddressSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + description: The SID of the emergency address configuration to use + for emergency calling from the new phone number. + TrunkSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^TK[0-9a-fA-F]{32}$ + description: The SID of the Trunk we should use to handle calls + to the new phone number. If a `trunk_sid` is present, we ignore + all of the voice urls and voice applications and use only those + set on the Trunk. Setting a `trunk_sid` will automatically delete + your `voice_application_sid` and vice versa. + VoiceReceiveMode: + type: string + $ref: '#/components/schemas/incoming_phone_number_mobile_enum_voice_receive_mode' + description: 'The configuration parameter for the new phone number + to receive incoming voice calls or faxes. Can be: `fax` or `voice` + and defaults to `voice`.' + BundleSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^BU[0-9a-fA-F]{32}$ + description: The SID of the Bundle resource that you associate with + the phone number. Some regions require a Bundle to meet local + Regulations. + required: + - PhoneNumber + /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/TollFree.json: + servers: + - url: https://api.twilio.com + description: Incoming toll free phone numbers on a Twilio account/project + x-twilio: + defaultOutputProperties: + - sid + - phone_number + - friendly_name + pathType: list + parent: /Accounts/{AccountSid}/IncomingPhoneNumbers.json + get: + description: '' + tags: + - Api20100401TollFree + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Beta + in: query + description: 'Whether to include phone numbers new to the Twilio platform. + Can be: `true` or `false` and the default is `true`.' + schema: + type: boolean + - name: FriendlyName + in: query + description: A string that identifies the resources to read. + schema: + type: string + - name: PhoneNumber + in: query + description: The phone numbers of the IncomingPhoneNumber resources to read. + You can specify partial numbers and use '*' as a wildcard for any digit. + schema: + type: string + format: phone-number + - name: Origin + in: query + description: 'Whether to include phone numbers based on their origin. Can + be: `twilio` or `hosted`. By default, phone numbers of all origin are included.' + schema: + type: string + - 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: + type: object + title: ListIncomingPhoneNumberTollFreeResponse + properties: + incoming_phone_numbers: + type: array + items: + $ref: '#/components/schemas/incoming_phone_number.incoming_phone_number_toll_free' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListIncomingPhoneNumberTollFree + x-maturity: + - GA + post: + description: '' + tags: + - Api20100401TollFree + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will create the resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/incoming_phone_number.incoming_phone_number_toll_free' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateIncomingPhoneNumberTollFree + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateIncomingPhoneNumberTollFreeRequest + properties: + PhoneNumber: + type: string + format: phone-number + description: The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) + format. E.164 phone numbers consist of a + followed by the country + code and subscriber number without punctuation characters. For + example, +14155551234. + ApiVersion: + type: string + description: The API version to use for incoming calls made to the + new phone number. The default is `2010-04-01`. + FriendlyName: + type: string + description: A descriptive string that you created to describe the + new phone number. It can be up to 64 characters long. By default, + this is a formatted version of the phone number. + SmsApplicationSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + description: The SID of the application that should handle SMS messages + sent to the new phone number. If an `sms_application_sid` is present, + we ignore all `sms_*_url` values and use those of the application. + SmsFallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call `sms_fallback_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + SmsFallbackUrl: + type: string + format: uri + description: The URL that we should call when an error occurs while + requesting or executing the TwiML defined by `sms_url`. + SmsMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call `sms_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + SmsUrl: + type: string + format: uri + description: The URL we should call when the new phone number receives + an incoming SMS message. + StatusCallback: + type: string + format: uri + description: The URL we should call using the `status_callback_method` + to send status information 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`. + Can be: `GET` or `POST` and defaults to `POST`.' + VoiceApplicationSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + description: The SID of the application we should use to handle + calls to the new phone number. If a `voice_application_sid` is + present, we ignore all of the voice urls and use those set on + the application. Setting a `voice_application_sid` will automatically + delete your `trunk_sid` and vice versa. + VoiceCallerIdLookup: + type: boolean + description: 'Whether to lookup the caller''s name from the CNAM + database and post it to your app. Can be: `true` or `false` and + defaults to `false`.' + VoiceFallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call `voice_fallback_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + VoiceFallbackUrl: + type: string + format: uri + description: The URL that we should call when an error occurs retrieving + or executing the TwiML requested by `url`. + VoiceMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call `voice_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + VoiceUrl: + type: string + format: uri + description: The URL that we should call to answer a call to the + new phone number. The `voice_url` will not be called if a `voice_application_sid` + or a `trunk_sid` is set. + IdentitySid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RI[0-9a-fA-F]{32}$ + description: The SID of the Identity resource that we should associate + with the new phone number. Some regions require an Identity to + meet local regulations. + AddressSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + description: The SID of the Address resource we should associate + with the new phone number. Some regions require addresses to meet + local regulations. + EmergencyStatus: + type: string + $ref: '#/components/schemas/incoming_phone_number_toll_free_enum_emergency_status' + description: The parameter displays if emergency calling is enabled + for this number. Active numbers may place emergency calls by dialing + valid emergency numbers for the country. + EmergencyAddressSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AD[0-9a-fA-F]{32}$ + description: The SID of the emergency address configuration to use + for emergency calling from the new phone number. + TrunkSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^TK[0-9a-fA-F]{32}$ + description: The SID of the Trunk we should use to handle calls + to the new phone number. If a `trunk_sid` is present, we ignore + all of the voice urls and voice applications and use only those + set on the Trunk. Setting a `trunk_sid` will automatically delete + your `voice_application_sid` and vice versa. + VoiceReceiveMode: + type: string + $ref: '#/components/schemas/incoming_phone_number_toll_free_enum_voice_receive_mode' + description: 'The configuration parameter for the new phone number + to receive incoming voice calls or faxes. Can be: `fax` or `voice` + and defaults to `voice`.' + BundleSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^BU[0-9a-fA-F]{32}$ + description: The SID of the Bundle resource that you associate with + the phone number. Some regions require a Bundle to meet local + Regulations. + required: + - PhoneNumber + /2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json: + servers: + - url: https://api.twilio.com + description: API keys + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + - date_created + pathType: instance + parent: /Accounts/{Sid}.json + get: + description: '' + tags: + - Api20100401Key + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Key resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Key resource + to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SK[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/key' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchKey + x-maturity: + - GA + post: + description: '' + tags: + - Api20100401Key + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Key resources to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Key resource + to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SK[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/key' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateKey + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateKeyRequest + properties: + FriendlyName: + type: string + description: A descriptive string that you create to describe the + resource. It can be up to 64 characters long. + delete: + description: '' + tags: + - Api20100401Key + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Key resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Key resource + to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SK[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteKey + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Keys.json: + servers: + - url: https://api.twilio.com + description: API keys + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + - date_created + pathType: list + parent: /Accounts/{Sid}.json + get: + description: '' + tags: + - Api20100401Key + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Key resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + 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: + type: object + title: ListKeyResponse + properties: + keys: + type: array + items: + $ref: '#/components/schemas/key' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListKey + x-maturity: + - GA + post: + description: '' + tags: + - Api20100401NewKey + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will be responsible for the new Key resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/new_key' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateNewKey + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateNewKeyRequest + properties: + FriendlyName: + type: string + description: A descriptive string that you create to describe the + resource. It can be up to 64 characters long. + x-twilio: + mountName: new_keys + /2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{Sid}.json: + servers: + - url: https://api.twilio.com + description: The Media subresource of a Message resource represents a piece of + media, such as an image, that is associated with the Message. + x-twilio: + defaultOutputProperties: + - sid + - parent_sid + - content_type + pathType: instance + parent: /Accounts/{AccountSid}/Messages/{Sid}.json + delete: + description: Delete the Media resource. + tags: + - Api20100401Media + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that is associated with the Media resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: MessageSid + in: path + description: The SID of the Message resource that is associated with the Media + resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^(SM|MM)[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The unique identifier of the to-be-deleted Media resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^ME[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteMedia + x-maturity: + - GA + get: + description: Fetch a single Media resource associated with a specific Message + resource + tags: + - Api20100401Media + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + associated with the Media resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: MessageSid + in: path + description: The SID of the Message resource that is associated with the Media + resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^(SM|MM)[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Media + resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^ME[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/message.media' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchMedia + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media.json: + servers: + - url: https://api.twilio.com + description: The Media subresource of a Message resource represents a piece of + media, such as an image, that is associated with the Message. + x-twilio: + defaultOutputProperties: + - sid + - parent_sid + - content_type + pathType: list + parent: /Accounts/{AccountSid}/Messages/{Sid}.json + get: + description: Read a list of Media resources associated with a specific Message + resource + tags: + - Api20100401Media + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that is associated with the Media resources. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: MessageSid + in: path + description: The SID of the Message resource that is associated with the Media + resources. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^(SM|MM)[0-9a-fA-F]{32}$ + required: true + - name: DateCreated + in: query + description: 'Only include Media resources that were created on this date. + Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read + Media that were created on this date. You can also specify an inequality, + such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before + midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were + created on or after midnight of this date.' + schema: + type: string + format: date-time + - name: dateCreatedOnOrBefore + in: query + description: 'Only include Media resources that were created on this date. + Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read + Media that were created on this date. You can also specify an inequality, + such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before + midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were + created on or after midnight of this date.' + schema: + type: string + format: date-time + - name: dateCreatedOnOrAfter + in: query + description: 'Only include Media resources that were created on this date. + Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read + Media that were created on this date. You can also specify an inequality, + such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before + midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were + created on or after midnight of this date.' + schema: + type: string + format: date-time + - 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: + type: object + title: ListMediaResponse + properties: + media_list: + type: array + items: + $ref: '#/components/schemas/message.media' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListMedia + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/{CallSid}.json: + servers: + - url: https://api.twilio.com + description: Calls in a call queue + x-twilio: + defaultOutputProperties: + - call_sid + - date_enqueued + - position + - wait_time + pathType: instance + parent: /Accounts/{AccountSid}/Queues/{Sid}.json + get: + description: Fetch a specific member from the queue + tags: + - Api20100401Member + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Member resource(s) to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: QueueSid + in: path + description: The SID of the Queue in which to find the members to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^QU[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The [Call](https://www.twilio.com/docs/voice/api/call-resource) + SID of the resource(s) to fetch. + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/queue.member' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchMember + x-maturity: + - GA + post: + description: Dequeue a member from a queue and have the member's call begin + executing the TwiML document at that URL + tags: + - Api20100401Member + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Member resource(s) to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: QueueSid + in: path + description: The SID of the Queue in which to find the members to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^QU[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The [Call](https://www.twilio.com/docs/voice/api/call-resource) + SID of the resource(s) to update. + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/queue.member' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateMember + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateMemberRequest + properties: + Url: + type: string + format: uri + description: The absolute URL of the Queue resource. + Method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: How to pass the update request data. Can be `GET` or + `POST` and the default is `POST`. `POST` sends the data as encoded + form data and `GET` sends the data as query parameters. + required: + - Url + /2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members.json: + servers: + - url: https://api.twilio.com + description: Calls in a call queue + x-twilio: + defaultOutputProperties: + - call_sid + - date_enqueued + - position + - wait_time + pathType: list + parent: /Accounts/{AccountSid}/Queues/{Sid}.json + get: + description: Retrieve the members of the queue + tags: + - Api20100401Member + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Member resource(s) to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: QueueSid + in: path + description: The SID of the Queue in which to find the members + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^QU[0-9a-fA-F]{32}$ + 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: + type: object + title: ListMemberResponse + properties: + queue_members: + type: array + items: + $ref: '#/components/schemas/queue.member' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListMember + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Messages.json: + servers: + - url: https://api.twilio.com + description: A Message resource represents an inbound or outbound message. + x-twilio: + defaultOutputProperties: + - sid + - from + - to + - status + - direction + - date_sent + pathType: list + dependentProperties: + media: + mapping: + account_sid: account_sid + message_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Messages/{message_sid}/Media.json + feedback: + mapping: + account_sid: account_sid + message_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Messages/{message_sid}/Feedback.json + parent: /Accounts/{Sid}.json + post: + description: Send a message + tags: + - Api20100401Message + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + creating the Message resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/message' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateMessage + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateMessageRequest + properties: + To: + type: string + format: phone-number + description: The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) + format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/messaging/channels), + e.g. `whatsapp:+15552229999`. + StatusCallback: + type: string + format: uri + description: 'The URL of the endpoint to which Twilio sends [Message + status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). + URL must contain a valid hostname and underscores are not allowed. + If you include this parameter with the `messaging_service_sid`, + Twilio uses this URL instead of the Status Callback URL of the + [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource). ' + ApplicationSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AP[0-9a-fA-F]{32}$ + description: The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). + If this parameter is provided, the `status_callback` parameter + of this request is ignored; [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) + are sent to the TwiML App's `message_status_callback` URL. + MaxPrice: + type: number + description: The maximum price in US dollars that you are willing + to pay for this Message's delivery. The value can have up to four + decimal places. When the `max_price` parameter is provided, the + cost of a message is checked before it is sent. If the cost exceeds + `max_price`, the message is not sent and the Message `status` + is `failed`. + ProvideFeedback: + type: boolean + description: Boolean indicating whether or not you intend to provide + delivery confirmation feedback to Twilio (used in conjunction + with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). + Default value is `false`. + Attempt: + type: integer + description: Total number of attempts made (including this request) + to send the message regardless of the provider used + ValidityPeriod: + type: integer + description: The maximum length in seconds that the Message can + remain in Twilio's outgoing message queue. If a queued Message + exceeds the `validity_period`, the Message is not sent. Accepted + values are integers from `1` to `14400`. Default value is `14400`. + A `validity_period` greater than `5` is recommended. [Learn more + about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html) + ForceDelivery: + type: boolean + description: Reserved + ContentRetention: + type: string + $ref: '#/components/schemas/message_enum_content_retention' + description: Determines if the message content can be stored or + redacted based on privacy settings + AddressRetention: + type: string + $ref: '#/components/schemas/message_enum_address_retention' + description: Determines if the address can be stored or obfuscated + based on privacy settings + SmartEncoded: + type: boolean + description: 'Whether to detect Unicode characters that have a similar + GSM-7 character and replace them. Can be: `true` or `false`.' + PersistentAction: + type: array + items: + type: string + description: Rich actions for non-SMS/MMS channels. Used for [sending + location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp). + ShortenUrls: + type: boolean + description: 'For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/how-to-configure-link-shortening) + only: A Boolean indicating whether or not Twilio should shorten + links in the `body` of the Message. Default value is `false`. + If `true`, the `messaging_service_sid` parameter must also be + provided.' + ScheduleType: + type: string + $ref: '#/components/schemas/message_enum_schedule_type' + description: 'For Messaging Services only: Include this parameter + with a value of `fixed` in conjuction with the `send_time` parameter + in order to [schedule a Message](https://www.twilio.com/docs/messaging/features/message-scheduling).' + SendAt: + type: string + format: date-time + description: The time that Twilio will send the message. Must be + in ISO 8601 format. + SendAsMms: + type: boolean + description: If set to `true`, Twilio delivers the message as a + single MMS message, regardless of the presence of media. + ContentVariables: + type: string + description: 'For [Content Editor/API](https://www.twilio.com/docs/content) + only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) + and their substitution values. `content_sid` parameter must also + be provided. If values are not defined in the `content_variables` + parameter, the [Template''s default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) + are used.' + RiskCheck: + type: string + $ref: '#/components/schemas/message_enum_risk_check' + description: 'For SMS pumping protection feature only (public beta + to be available soon): Include this parameter with a value of + `disable` to skip any kind of risk check on the respective message + request.' + From: + type: string + format: phone-number + description: The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) + format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), + [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), + [short code](https://www.twilio.com/docs/sms/api/short-code), + or [channel address](https://www.twilio.com/docs/messaging/channels) + (e.g., `whatsapp:+15554449999`). The value of the `from` parameter + must be a sender that is hosted within Twilio and belongs to the + Account creating the Message. If you are using `messaging_service_sid`, + this parameter can be empty (Twilio assigns a `from` value from + the Messaging Service's Sender Pool) or you can provide a specific + sender from your Sender Pool. + MessagingServiceSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^MG[0-9a-fA-F]{32}$ + description: The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) + you want to associate with the Message. When this parameter is + provided and the `from` parameter is omitted, Twilio selects the + optimal sender from the Messaging Service's Sender Pool. You may + also provide a `from` parameter if you want to use a specific + Sender from the Sender Pool. + Body: + type: string + description: 'The text content of the outgoing message. Can be up + to 1,600 characters in length. SMS only: If the `body` contains + more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) + characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) + characters), the message is segmented and charged accordingly. + For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages).' + MediaUrl: + type: array + items: + type: string + format: uri + description: The URL of media to include in the Message content. + `jpeg`, `jpg`, `gif`, and `png` file types are fully supported + by Twilio and content is formatted for delivery on destination + devices. The media size limit is 5 MB for supported file types + (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) + of accepted media. To send more than one image in the message, + provide multiple `media_url` parameters in the POST request. You + can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) + and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) + limits apply. + ContentSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^HX[0-9a-fA-F]{32}$ + description: 'For [Content Editor/API](https://www.twilio.com/docs/content) + only: The SID of the Content Template to be used with the Message, + e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not + provided, a Content Template is not used. Find the SID in the + Console on the Content Editor page. For Content API users, the + SID is found in Twilio''s response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) + or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources).' + required: + - To + x-twilio: + conditional: + - - from + - messaging_service_sid + - - body + - media_url + - content_sid + get: + description: Retrieve a list of Message resources associated with a Twilio Account + tags: + - Api20100401Message + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + associated with the Message resources. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: To + in: query + description: 'Filter by recipient. For example: Set this `to` parameter to + `+15558881111` to retrieve a list of Message resources with `to` properties + of `+15558881111`' + schema: + type: string + format: phone-number + - name: From + in: query + description: 'Filter by sender. For example: Set this `from` parameter to + `+15552229999` to retrieve a list of Message resources with `from` properties + of `+15552229999`' + schema: + type: string + format: phone-number + - name: DateSent + in: query + description: 'Filter by Message `sent_date`. Accepts GMT dates in the following + formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` + (to find Messages with `sent_date`s on and before a specific date), and + `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific + date).' + schema: + type: string + format: date-time + - name: dateSentOnOrBefore + in: query + description: 'Filter by Message `sent_date`. Accepts GMT dates in the following + formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` + (to find Messages with `sent_date`s on and before a specific date), and + `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific + date).' + schema: + type: string + format: date-time + - name: dateSentOnOrAfter + in: query + description: 'Filter by Message `sent_date`. Accepts GMT dates in the following + formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` + (to find Messages with `sent_date`s on and before a specific date), and + `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific + date).' + schema: + type: string + format: date-time + - 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: + type: object + title: ListMessageResponse + properties: + messages: + type: array + items: + $ref: '#/components/schemas/message' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListMessage + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json: + servers: + - url: https://api.twilio.com + description: A Message resource represents an inbound or outbound message. + x-twilio: + defaultOutputProperties: + - sid + - from + - to + - status + - direction + - date_sent + pathType: instance + dependentProperties: + media: + mapping: + account_sid: account_sid + message_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Messages/{message_sid}/Media.json + feedback: + mapping: + account_sid: account_sid + message_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Messages/{message_sid}/Feedback.json + parent: /Accounts/{Sid}.json + delete: + description: Deletes a Message resource from your account + tags: + - Api20100401Message + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + associated with the Message resource + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The SID of the Message resource you wish to delete + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^(SM|MM)[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteMessage + x-maturity: + - GA + get: + description: Fetch a specific Message + tags: + - Api20100401Message + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + associated with the Message resource + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The SID of the Message resource to be fetched + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^(SM|MM)[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/message' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchMessage + x-maturity: + - GA + post: + description: Update a Message resource (used to redact Message `body` text and + to cancel not-yet-sent messages) + tags: + - Api20100401Message + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Message resources to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The SID of the Message resource to be updated + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^(SM|MM)[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/message' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateMessage + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateMessageRequest + properties: + Body: + type: string + description: The new `body` of the Message resource. To redact the + text content of a Message, this parameter's value must be an empty + string + Status: + type: string + $ref: '#/components/schemas/message_enum_update_status' + description: Set as `canceled` to prevent a not-yet-sent Message + from being sent. Can be used to cancel sending a [scheduled Message](https://www.twilio.com/docs/messaging/features/message-scheduling) + (Messaging Services only). + /2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Feedback.json: + servers: + - url: https://api.twilio.com + description: The MessageFeedback subresource of a Message resource. MessageFeedback + contains the reported outcome of whether the Message recipient performed a tracked + user action. + x-twilio: + defaultOutputProperties: + - message_sid + - outcome + - date_created + pathType: list + parent: /Accounts/{AccountSid}/Messages/{Sid}.json + post: + description: Create Message Feedback to confirm a tracked user action was performed + by the recipient of the associated Message + tags: + - Api20100401Feedback + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + associated with the Message resource for which to create MessageFeedback. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: MessageSid + in: path + description: The SID of the Message resource for which to create MessageFeedback. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^(SM|MM)[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/message.message_feedback' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateMessageFeedback + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateMessageFeedbackRequest + properties: + Outcome: + type: string + $ref: '#/components/schemas/message_feedback_enum_outcome' + description: The outcome to report. Use `confirmed` to indicate + that the Message recipient performed the tracked user action. + Set `ProvideFeedback`=`true` when [creating a new Message](https://www.twilio.com/docs/sms/api/message-resource#create-a-message-resource) + to track Message Feedback. Do not pass `unconfirmed` as the value + of the `Outcome` parameter, since it is already the initial value + for the MessageFeedback of a newly created Message. + /2010-04-01/Accounts/{AccountSid}/SigningKeys.json: + servers: + - url: https://api.twilio.com + description: Create a new signing key + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + - secret + pathType: list + parent: /Accounts/{Sid}.json + post: + description: Create a new Signing Key for the account making the request. + tags: + - Api20100401NewSigningKey + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will be responsible for the new Key resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/new_signing_key' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateNewSigningKey + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateNewSigningKeyRequest + properties: + FriendlyName: + type: string + description: A descriptive string that you create to describe the + resource. It can be up to 64 characters long. + x-twilio: + mountName: new_signing_keys + get: + description: '' + tags: + - Api20100401SigningKey + parameters: + - name: AccountSid + in: path + description: '' + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + 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: + type: object + title: ListSigningKeyResponse + properties: + signing_keys: + type: array + items: + $ref: '#/components/schemas/signing_key' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListSigningKey + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Notifications/{Sid}.json: + servers: + - url: https://api.twilio.com + description: '[DEPRECATED] Log entries' + x-twilio: + defaultOutputProperties: + - sid + - call_sid + - error_code + - message_date + pathType: instance + parent: /Accounts/{Sid}.json + get: + description: Fetch a notification belonging to the account used to make the + request + tags: + - Api20100401Notification + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Notification resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Notification + resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^NO[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/notification-instance' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchNotification + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Notifications.json: + servers: + - url: https://api.twilio.com + description: '[DEPRECATED] Log entries' + x-twilio: + defaultOutputProperties: + - sid + - call_sid + - error_code + - message_date + pathType: list + parent: /Accounts/{Sid}.json + get: + description: Retrieve a list of notifications belonging to the account used + to make the request + tags: + - Api20100401Notification + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Notification resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Log + in: query + description: 'Only read notifications of the specified log level. Can be: `0` + to read only ERROR notifications or `1` to read only WARNING notifications. + By default, all notifications are read.' + schema: + type: integer + - name: MessageDate + in: query + description: Only show notifications for the specified date, formatted as + `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` + for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for + messages logged at or after midnight on a date. + schema: + type: string + format: date + - name: loggedAtOrBefore + in: query + description: Only show notifications for the specified date, formatted as + `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` + for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for + messages logged at or after midnight on a date. + schema: + type: string + format: date + - name: loggedAtOrAfter + in: query + description: Only show notifications for the specified date, formatted as + `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` + for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for + messages logged at or after midnight on a date. + schema: + type: string + format: date + - 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: + type: object + title: ListNotificationResponse + properties: + notifications: + type: array + items: + $ref: '#/components/schemas/notification' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListNotification + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json: + servers: + - url: https://api.twilio.com + description: An OutgoingCallerId resource represents a single verified number + that may be used as a caller ID when making outgoing calls via the REST API + and within the TwiML verb. + x-twilio: + defaultOutputProperties: + - sid + - phone_number + - friendly_name + pathType: instance + parent: /Accounts/{Sid}.json + get: + description: Fetch an outgoing-caller-id belonging to the account used to make + the request + tags: + - Api20100401OutgoingCallerId + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the OutgoingCallerId resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the OutgoingCallerId + resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/outgoing_caller_id' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchOutgoingCallerId + x-maturity: + - GA + post: + description: Updates the caller-id + tags: + - Api20100401OutgoingCallerId + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the OutgoingCallerId resources to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the OutgoingCallerId + resource to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/outgoing_caller_id' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateOutgoingCallerId + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateOutgoingCallerIdRequest + properties: + FriendlyName: + type: string + description: A descriptive string that you create to describe the + resource. It can be up to 64 characters long. + delete: + description: Delete the caller-id specified from the account + tags: + - Api20100401OutgoingCallerId + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the OutgoingCallerId resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the OutgoingCallerId + resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteOutgoingCallerId + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds.json: + servers: + - url: https://api.twilio.com + description: An OutgoingCallerId resource represents a single verified number + that may be used as a caller ID when making outgoing calls via the REST API + and within the TwiML verb. + x-twilio: + defaultOutputProperties: + - sid + - phone_number + - friendly_name + pathType: list + parent: /Accounts/{Sid}.json + get: + description: Retrieve a list of outgoing-caller-ids belonging to the account + used to make the request + tags: + - Api20100401OutgoingCallerId + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the OutgoingCallerId resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: PhoneNumber + in: query + description: The phone number of the OutgoingCallerId resources to read. + schema: + type: string + format: phone-number + - name: FriendlyName + in: query + description: The string that identifies the OutgoingCallerId resources to + read. + schema: + type: string + - 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: + type: object + title: ListOutgoingCallerIdResponse + properties: + outgoing_caller_ids: + type: array + items: + $ref: '#/components/schemas/outgoing_caller_id' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListOutgoingCallerId + x-maturity: + - GA + post: + description: '' + tags: + - Api20100401ValidationRequest + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for the new caller ID resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/validation_request' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateValidationRequest + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateValidationRequestRequest + properties: + PhoneNumber: + type: string + format: phone-number + description: The phone number to verify in [E.164](https://www.twilio.com/docs/glossary/what-e164) + format, which consists of a + followed by the country code and + subscriber number. + FriendlyName: + type: string + description: A descriptive string that you create to describe the + new caller ID resource. It can be up to 64 characters long. The + default value is a formatted version of the phone number. + CallDelay: + type: integer + description: The number of seconds to delay before initiating the + verification call. Can be an integer between `0` and `60`, inclusive. + The default is `0`. + Extension: + type: string + description: The digits to dial after connecting the verification + call. + StatusCallback: + type: string + format: uri + description: The URL we should call using the `status_callback_method` + to send status information about the verification process 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`. + Can be: `GET` or `POST`, and the default is `POST`.' + required: + - PhoneNumber + x-twilio: + mountName: validation_requests + /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json: + servers: + - url: https://api.twilio.com + description: Conference participants + x-twilio: + defaultOutputProperties: + - call_sid + - label + - status + - muted + - hold + pathType: instance + parent: /Accounts/{AccountSid}/Conferences/{Sid}.json + get: + description: Fetch an instance of a participant + tags: + - Api20100401Participant + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Participant resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ConferenceSid + in: path + description: The SID of the conference with the participant to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CF[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The [Call](https://www.twilio.com/docs/voice/api/call-resource) + SID or label of the participant to fetch. Non URL safe characters in a label + must be percent encoded, for example, a space character is represented as + %20. + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/conference.participant' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchParticipant + x-maturity: + - GA + post: + description: Update the properties of the participant + tags: + - Api20100401Participant + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Participant resources to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ConferenceSid + in: path + description: The SID of the conference with the participant to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CF[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The [Call](https://www.twilio.com/docs/voice/api/call-resource) + SID or label of the participant to update. Non URL safe characters in a + label must be percent encoded, for example, a space character is represented + as %20. + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/conference.participant' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateParticipant + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateParticipantRequest + properties: + Muted: + type: boolean + description: Whether the participant should be muted. Can be `true` + or `false`. `true` will mute the participant, and `false` will + un-mute them. Anything value other than `true` or `false` is interpreted + as `false`. + Hold: + type: boolean + description: 'Whether the participant should be on hold. Can be: + `true` or `false`. `true` puts the participant on hold, and `false` + lets them rejoin the conference.' + HoldUrl: + type: string + format: uri + description: The URL we call using the `hold_method` for music that + plays when the participant is on hold. The URL may return an MP3 + file, a WAV file, or a TwiML document that contains ``, + ``, ``, or `` verbs. + HoldMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use to call `hold_url`. + Can be: `GET` or `POST` and the default is `GET`.' + AnnounceUrl: + type: string + format: uri + description: The URL we call using the `announce_method` for an + announcement to the participant. The URL may return an MP3 file, + a WAV file, or a TwiML document that contains ``, ``, + ``, or `` verbs. + AnnounceMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use to call `announce_url`. + Can be: `GET` or `POST` and defaults to `POST`.' + WaitUrl: + type: string + format: uri + description: The URL we call using the `wait_method` for the music + to play while participants are waiting for the conference to start. + The URL may return an MP3 file, a WAV file, or a TwiML document + that contains ``, ``, ``, or `` verbs. + The default value is the URL of our standard hold music. [Learn + more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). + WaitMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: The HTTP method we should use to call `wait_url`. Can + be `GET` or `POST` and the default is `POST`. When using a static + audio file, this should be `GET` so that we can cache the file. + BeepOnExit: + type: boolean + description: 'Whether to play a notification beep to the conference + when the participant exits. Can be: `true` or `false`.' + EndConferenceOnExit: + type: boolean + description: 'Whether to end the conference when the participant + leaves. Can be: `true` or `false` and defaults to `false`.' + Coaching: + type: boolean + description: 'Whether the participant is coaching another call. + Can be: `true` or `false`. If not present, defaults to `false` + unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` + must be defined.' + CallSidToCoach: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + description: The SID of the participant who is being `coached`. + The participant being coached is the only participant who can + hear the participant who is `coaching`. + delete: + description: Kick a participant from a given conference + tags: + - Api20100401Participant + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Participant resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ConferenceSid + in: path + description: The SID of the conference with the participants to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CF[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The [Call](https://www.twilio.com/docs/voice/api/call-resource) + SID or label of the participant to delete. Non URL safe characters in a + label must be percent encoded, for example, a space character is represented + as %20. + schema: + type: string + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteParticipant + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants.json: + servers: + - url: https://api.twilio.com + description: Conference participants + x-twilio: + defaultOutputProperties: + - call_sid + - label + - status + - muted + - hold + pathType: list + parent: /Accounts/{AccountSid}/Conferences/{Sid}.json + post: + description: '' + tags: + - Api20100401Participant + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will create the resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ConferenceSid + in: path + description: The SID of the participant's conference. + schema: + type: string + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/conference.participant' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateParticipant + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateParticipantRequest + properties: + From: + type: string + format: endpoint + description: The phone number, Client identifier, or username portion + of SIP address that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) + format (e.g., +16175551212). Client identifiers are formatted + `client:name`. If using a phone number, it must be a Twilio number + or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) + for your account. If the `to` parameter is a phone number, `from` + must also be a phone number. If `to` is sip address, this value + of `from` should be a username portion to be used to populate + the P-Asserted-Identity header that is passed to the SIP endpoint. + To: + type: string + format: endpoint + description: The phone number, SIP address, or Client identifier + that received this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) + format (e.g., +16175551212). SIP addresses are formatted as `sip:name@company.com`. + Client identifiers are formatted `client:name`. [Custom parameters](https://www.twilio.com/docs/voice/api/conference-participant-resource#custom-parameters) + may also be specified. + StatusCallback: + type: string + format: uri + description: The URL we should call using the `status_callback_method` + to send status information 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`. + Can be: `GET` and `POST` and defaults to `POST`.' + StatusCallbackEvent: + type: array + items: + type: string + description: 'The conference state changes that should generate + a call to `status_callback`. Can be: `initiated`, `ringing`, `answered`, + and `completed`. Separate multiple values with a space. The default + value is `completed`.' + Label: + type: string + description: A label for this participant. If one is supplied, it + may subsequently be used to fetch, update or delete the participant. + Timeout: + type: integer + description: The number of seconds that we should allow the phone + to ring before assuming there is no answer. Can be an integer + between `5` and `600`, inclusive. The default value is `60`. We + always add a 5-second timeout buffer to outgoing calls, so value + of 10 would result in an actual timeout that was closer to 15 + seconds. + Record: + type: boolean + description: Whether to record the participant and their conferences, + including the time between conferences. Can be `true` or `false` + and the default is `false`. + Muted: + type: boolean + description: Whether the agent is muted in the conference. Can be + `true` or `false` and the default is `false`. + Beep: + type: string + description: 'Whether to play a notification beep to the conference + when the participant joins. Can be: `true`, `false`, `onEnter`, + or `onExit`. The default value is `true`.' + StartConferenceOnEnter: + type: boolean + description: 'Whether to start the conference when the participant + joins, if it has not already started. Can be: `true` or `false` + and the default is `true`. If `false` and the conference has not + started, the participant is muted and hears background music until + another participant starts the conference.' + EndConferenceOnExit: + type: boolean + description: 'Whether to end the conference when the participant + leaves. Can be: `true` or `false` and defaults to `false`.' + WaitUrl: + type: string + format: uri + description: The URL we should call using the `wait_method` for + the music to play while participants are waiting for the conference + to start. The default value is the URL of our standard hold music. + [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). + WaitMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: The HTTP method we should use to call `wait_url`. Can + be `GET` or `POST` and the default is `POST`. When using a static + audio file, this should be `GET` so that we can cache the file. + EarlyMedia: + type: boolean + description: 'Whether to allow an agent to hear the state of the + outbound call, including ringing or disconnect messages. Can be: + `true` or `false` and defaults to `true`.' + MaxParticipants: + type: integer + description: The maximum number of participants in the conference. + Can be a positive integer from `2` to `250`. The default value + is `250`. + ConferenceRecord: + type: string + description: 'Whether to record the conference the participant is + joining. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. + The default value is `false`.' + ConferenceTrim: + type: string + description: 'Whether to trim leading and trailing silence from + the conference recording. Can be: `trim-silence` or `do-not-trim` + and defaults to `trim-silence`.' + ConferenceStatusCallback: + type: string + format: uri + description: The URL we should call using the `conference_status_callback_method` + when the conference events in `conference_status_callback_event` + occur. Only the value set by the first participant to join the + conference is used. Subsequent `conference_status_callback` values + are ignored. + ConferenceStatusCallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use to call `conference_status_callback`. + Can be: `GET` or `POST` and defaults to `POST`.' + ConferenceStatusCallbackEvent: + type: array + items: + type: string + description: 'The conference state changes that should generate + a call to `conference_status_callback`. Can be: `start`, `end`, + `join`, `leave`, `mute`, `hold`, `modify`, `speaker`, and `announcement`. + Separate multiple values with a space. Defaults to `start end`.' + RecordingChannels: + type: string + description: 'The recording channels for the final recording. Can + be: `mono` or `dual` and the default is `mono`.' + RecordingStatusCallback: + type: string + format: uri + description: The URL that we should call using the `recording_status_callback_method` + when the recording status changes. + RecordingStatusCallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use when we call `recording_status_callback`. + Can be: `GET` or `POST` and defaults to `POST`.' + SipAuthUsername: + type: string + description: The SIP username used for authentication. + SipAuthPassword: + type: string + description: The SIP password for authentication. + Region: + type: string + description: The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) + where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, + `sg1`, `br1`, `au1`, or `jp1`. + ConferenceRecordingStatusCallback: + type: string + format: uri + description: The URL we should call using the `conference_recording_status_callback_method` + when the conference recording is available. + ConferenceRecordingStatusCallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use to call `conference_recording_status_callback`. + Can be: `GET` or `POST` and defaults to `POST`.' + RecordingStatusCallbackEvent: + type: array + items: + type: string + description: 'The recording state changes that should generate a + call to `recording_status_callback`. Can be: `started`, `in-progress`, + `paused`, `resumed`, `stopped`, `completed`, `failed`, and `absent`. + Separate multiple values with a space, ex: `''in-progress completed + failed''`.' + ConferenceRecordingStatusCallbackEvent: + type: array + items: + type: string + description: 'The conference recording state changes that generate + a call to `conference_recording_status_callback`. Can be: `in-progress`, + `completed`, `failed`, and `absent`. Separate multiple values + with a space, ex: `''in-progress completed failed''`' + Coaching: + type: boolean + description: 'Whether the participant is coaching another call. + Can be: `true` or `false`. If not present, defaults to `false` + unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` + must be defined.' + CallSidToCoach: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + description: The SID of the participant who is being `coached`. + The participant being coached is the only participant who can + hear the participant who is `coaching`. + JitterBufferSize: + type: string + description: 'Jitter buffer size for the connecting participant. + Twilio will use this setting to apply Jitter Buffer before participant''s + audio is mixed into the conference. Can be: `off`, `small`, `medium`, + and `large`. Default to `large`.' + Byoc: + type: string + minLength: 34 + maxLength: 34 + pattern: ^BY[0-9a-fA-F]{32}$ + description: The SID of a BYOC (Bring Your Own Carrier) trunk to + route this call with. Note that `byoc` is only meaningful when + `to` is a phone number; it will otherwise be ignored. (Beta) + CallerId: + type: string + description: The phone number, Client identifier, or username portion + of SIP address that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) + format (e.g., +16175551212). Client identifiers are formatted + `client:name`. If using a phone number, it must be a Twilio number + or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) + for your account. If the `to` parameter is a phone number, `callerId` + must also be a phone number. If `to` is sip address, this value + of `callerId` should be a username portion to be used to populate + the From header that is passed to the SIP endpoint. + CallReason: + type: string + description: The Reason for the outgoing call. Use it to specify + the purpose of the call that is presented on the called party's + phone. (Branded Calls Beta) + RecordingTrack: + type: string + description: 'The audio track to record for the call. Can be: `inbound`, + `outbound` or `both`. The default is `both`. `inbound` records + the audio that is received by Twilio. `outbound` records the audio + that is sent from Twilio. `both` records the audio that is received + and sent by Twilio.' + TimeLimit: + type: integer + description: The maximum duration of the call in seconds. Constraints + depend on account and configuration. + MachineDetection: + type: string + description: 'Whether to detect if a human, answering machine, or + fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. + Use `Enable` if you would like us to return `AnsweredBy` as soon + as the called party is identified. Use `DetectMessageEnd`, if + you would like to leave a message on an answering machine. For + more information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection).' + MachineDetectionTimeout: + type: integer + description: The number of seconds that we should attempt to detect + an answering machine before timing out and sending a voice request + with `AnsweredBy` of `unknown`. The default timeout is 30 seconds. + MachineDetectionSpeechThreshold: + type: integer + description: 'The number of milliseconds that is used as the measuring + stick for the length of the speech activity, where durations lower + than this value will be interpreted as a human and longer than + this value as a machine. Possible Values: 1000-6000. Default: + 2400.' + MachineDetectionSpeechEndThreshold: + type: integer + description: 'The number of milliseconds of silence after speech + activity at which point the speech activity is considered complete. + Possible Values: 500-5000. Default: 1200.' + MachineDetectionSilenceTimeout: + type: integer + description: 'The number of milliseconds of initial silence after + which an `unknown` AnsweredBy result will be returned. Possible + Values: 2000-10000. Default: 5000.' + AmdStatusCallback: + type: string + format: uri + description: The URL that we should call using the `amd_status_callback_method` + to notify customer application whether the call was answered by + human, machine or fax. + AmdStatusCallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use when calling the `amd_status_callback` + URL. Can be: `GET` or `POST` and the default is `POST`.' + Trim: + type: string + description: 'Whether to trim any leading and trailing silence from + the participant recording. Can be: `trim-silence` or `do-not-trim` + and the default is `trim-silence`.' + CallToken: + type: string + description: A token string needed to invoke a forwarded call. A + call_token is generated when an incoming call is received on a + Twilio number. Pass an incoming call's call_token value to a forwarded + call via the call_token parameter when creating a new call. A + forwarded call should bear the same CallerID of the original incoming + call. + required: + - From + - To + get: + description: Retrieve a list of participants belonging to the account used to + make the request + tags: + - Api20100401Participant + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Participant resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ConferenceSid + in: path + description: The SID of the conference with the participants to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CF[0-9a-fA-F]{32}$ + required: true + - name: Muted + in: query + description: 'Whether to return only participants that are muted. Can be: + `true` or `false`.' + schema: + type: boolean + - name: Hold + in: query + description: 'Whether to return only participants that are on hold. Can be: + `true` or `false`.' + schema: + type: boolean + - name: Coaching + in: query + description: 'Whether to return only participants who are coaching another + call. 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: + type: object + title: ListParticipantResponse + properties: + participants: + type: array + items: + $ref: '#/components/schemas/conference.participant' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListParticipant + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments.json: + servers: + - url: https://api.twilio.com + description: Twilio enabled secure payments solution for accepting credit and + ACH payments over the phone. + x-twilio: + defaultOutputProperties: + - sid + pathType: list + parent: /Accounts/{AccountSid}/Calls/{Sid}.json + post: + description: create an instance of payments. This will start a new payments + session + tags: + - Api20100401Payment + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will create the resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The SID of the call that will create the resource. Call leg associated + with this sid is expected to provide payment information thru DTMF. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/call.payments' + description: Created + security: + - accountSid_authToken: [] + operationId: CreatePayments + x-maturity: + - Preview + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreatePaymentsRequest + properties: + IdempotencyKey: + type: string + description: A unique token that will be used to ensure that multiple + API calls with the same information do not result in multiple + transactions. This should be a unique string value per API call + and can be a randomly generated. + StatusCallback: + type: string + format: uri + description: Provide an absolute or relative URL to receive status + updates regarding your Pay session. Read more about the [expected + StatusCallback values](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback) + BankAccountType: + type: string + $ref: '#/components/schemas/payments_enum_bank_account_type' + description: Type of bank account if payment source is ACH. One + of `consumer-checking`, `consumer-savings`, or `commercial-checking`. + The default value is `consumer-checking`. + ChargeAmount: + type: number + description: A positive decimal value less than 1,000,000 to charge + against the credit card or bank account. Default currency can + be overwritten with `currency` field. Leave blank or set to 0 + to tokenize. + Currency: + type: string + description: The currency of the `charge_amount`, formatted as [ISO + 4127](http://www.iso.org/iso/home/standards/currency_codes.htm) + format. The default value is `USD` and all values allowed from + the Pay Connector are accepted. + Description: + type: string + description: The description can be used to provide more details + regarding the transaction. This information is submitted along + with the payment details to the Payment Connector which are then + posted on the transactions. + Input: + type: string + description: A list of inputs that should be accepted. Currently + only `dtmf` is supported. All digits captured during a pay session + are redacted from the logs. + MinPostalCodeLength: + type: integer + description: A positive integer that is used to validate the length + of the `PostalCode` inputted by the user. User must enter this + many digits. + Parameter: + description: A single-level JSON object used to pass custom parameters + to payment processors. (Required for ACH payments). The information + that has to be included here depends on the Connector. [Read + more](https://www.twilio.com/console/voice/pay-connectors). + PaymentConnector: + type: string + description: This is the unique name corresponding to the Pay Connector + installed in the Twilio Add-ons. Learn more about [ Connectors](https://www.twilio.com/console/voice/pay-connectors). + The default value is `Default`. + PaymentMethod: + type: string + $ref: '#/components/schemas/payments_enum_payment_method' + description: Type of payment being captured. One of `credit-card` + or `ach-debit`. The default value is `credit-card`. + PostalCode: + type: boolean + description: Indicates whether the credit card postal code (zip + code) is a required piece of payment information that must be + provided by the caller. The default is `true`. + SecurityCode: + type: boolean + description: Indicates whether the credit card security code is + a required piece of payment information that must be provided + by the caller. The default is `true`. + Timeout: + type: integer + description: The number of seconds that should wait for the + caller to press a digit between each subsequent digit, after the + first one, before moving on to validate the digits captured. The + default is `5`, maximum is `600`. + TokenType: + type: string + $ref: '#/components/schemas/payments_enum_token_type' + description: Indicates whether the payment method should be tokenized + as a `one-time` or `reusable` token. The default value is `reusable`. + Do not enter a charge amount when tokenizing. If a charge amount + is entered, the payment method will be charged and not tokenized. + ValidCardTypes: + type: string + description: Credit card types separated by space that Pay should + accept. The default value is `visa mastercard amex` + required: + - IdempotencyKey + - StatusCallback + /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Twilio enabled secure payments solution for accepting credit and + ACH payments over the phone. + x-twilio: + defaultOutputProperties: + - sid + pathType: instance + parent: /Accounts/{AccountSid}/Calls/{Sid}.json + post: + description: update an instance of payments with different phases of payment + flows. + tags: + - Api20100401Payment + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will update the resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The SID of the call that will update the resource. This should + be the same call sid that was used to create payments resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The SID of Payments session that needs to be updated. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PK[0-9a-fA-F]{32}$ + required: true + responses: + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/call.payments' + description: Accepted + security: + - accountSid_authToken: [] + operationId: UpdatePayments + x-maturity: + - Preview + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdatePaymentsRequest + properties: + IdempotencyKey: + type: string + description: A unique token that will be used to ensure that multiple + API calls with the same information do not result in multiple + transactions. This should be a unique string value per API call + and can be a randomly generated. + StatusCallback: + type: string + format: uri + description: Provide an absolute or relative URL to receive status + updates regarding your Pay session. Read more about the [Update](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-update) + and [Complete/Cancel](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-cancelcomplete) + POST requests. + Capture: + type: string + $ref: '#/components/schemas/payments_enum_capture' + description: The piece of payment information that you wish the + caller to enter. Must be one of `payment-card-number`, `expiration-date`, + `security-code`, `postal-code`, `bank-routing-number`, or `bank-account-number`. + Status: + type: string + $ref: '#/components/schemas/payments_enum_status' + description: Indicates whether the current payment session should + be cancelled or completed. When `cancel` the payment session is + cancelled. When `complete`, Twilio sends the payment information + to the selected Pay Connector for processing. + required: + - IdempotencyKey + - StatusCallback + /2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Queues of calls + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + - current_size + - average_wait_time + pathType: instance + dependentProperties: + members: + mapping: + account_sid: account_sid + queue_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Queues/{queue_sid}/Members.json + parent: /Accounts/{Sid}.json + get: + description: Fetch an instance of a queue identified by the QueueSid + tags: + - Api20100401Queue + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Queue resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Queue + resource to fetch + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^QU[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/queue' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchQueue + x-maturity: + - GA + post: + description: Update the queue with the new parameters + tags: + - Api20100401Queue + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Queue resource to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Queue + resource to update + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^QU[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/queue' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateQueue + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateQueueRequest + properties: + FriendlyName: + type: string + description: A descriptive string that you created to describe this + resource. It can be up to 64 characters long. + MaxSize: + type: integer + description: The maximum number of calls allowed to be in the queue. + The default is 1000. The maximum is 5000. + delete: + description: Remove an empty queue + tags: + - Api20100401Queue + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Queue resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Queue + resource to delete + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^QU[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteQueue + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Queues.json: + servers: + - url: https://api.twilio.com + description: Queues of calls + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + - current_size + - average_wait_time + pathType: list + dependentProperties: + members: + mapping: + account_sid: account_sid + queue_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Queues/{queue_sid}/Members.json + parent: /Accounts/{Sid}.json + get: + description: Retrieve a list of queues belonging to the account used to make + the request + tags: + - Api20100401Queue + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Queue resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + 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: + type: object + title: ListQueueResponse + properties: + queues: + type: array + items: + $ref: '#/components/schemas/queue' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListQueue + x-maturity: + - GA + post: + description: Create a queue + tags: + - Api20100401Queue + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will create the resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/queue' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateQueue + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateQueueRequest + properties: + FriendlyName: + type: string + description: A descriptive string that you created to describe this + resource. It can be up to 64 characters long. + MaxSize: + type: integer + description: The maximum number of calls allowed to be in the queue. + The default is 1000. The maximum is 5000. + required: + - FriendlyName + /2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Recordings of phone calls + x-twilio: + defaultOutputProperties: + - sid + - call_sid + - status + - start_time + - duration + pathType: instance + dependentProperties: + transcriptions: + mapping: + account_sid: account_sid + recording_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Recordings/{recording_sid}/Transcriptions.json + add_on_results: + mapping: + account_sid: account_sid + reference_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Recordings/{reference_sid}/AddOnResults.json + parent: /Accounts/{Sid}.json + get: + description: Fetch an instance of a recording + tags: + - Api20100401Recording + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Recording resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Recording + resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + required: true + - name: IncludeSoftDeleted + in: query + description: A boolean parameter indicating whether to retrieve soft deleted + recordings or not. Recordings metadata are kept after deletion for a retention + period of 40 days. + schema: + type: boolean + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/recording' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchRecording + x-maturity: + - GA + delete: + description: Delete a recording from your account + tags: + - Api20100401Recording + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Recording resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Recording + resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteRecording + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Recordings.json: + servers: + - url: https://api.twilio.com + description: Recordings of phone calls + x-twilio: + defaultOutputProperties: + - sid + - call_sid + - status + - start_time + - duration + pathType: list + dependentProperties: + transcriptions: + mapping: + account_sid: account_sid + recording_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Recordings/{recording_sid}/Transcriptions.json + add_on_results: + mapping: + account_sid: account_sid + reference_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Recordings/{reference_sid}/AddOnResults.json + parent: /Accounts/{Sid}.json + get: + description: Retrieve a list of recordings belonging to the account used to + make the request + tags: + - Api20100401Recording + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Recording resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DateCreated + in: query + description: 'Only include recordings that were created on this date. Specify + a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings + that were created on this date. You can also specify an inequality, such + as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or + before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings + that were created on or after midnight of this date.' + schema: + type: string + format: date-time + - name: dateCreatedOnOrBefore + in: query + description: 'Only include recordings that were created on this date. Specify + a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings + that were created on this date. You can also specify an inequality, such + as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or + before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings + that were created on or after midnight of this date.' + schema: + type: string + format: date-time + - name: dateCreatedOnOrAfter + in: query + description: 'Only include recordings that were created on this date. Specify + a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings + that were created on this date. You can also specify an inequality, such + as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or + before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings + that were created on or after midnight of this date.' + schema: + type: string + format: date-time + - name: CallSid + in: query + description: The [Call](https://www.twilio.com/docs/voice/api/call-resource) + SID of the resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + - name: ConferenceSid + in: query + description: The Conference SID that identifies the conference associated + with the recording to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CF[0-9a-fA-F]{32}$ + - name: IncludeSoftDeleted + in: query + description: A boolean parameter indicating whether to retrieve soft deleted + recordings or not. Recordings metadata are kept after deletion for a retention + period of 40 days. + 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: + type: object + title: ListRecordingResponse + properties: + recordings: + type: array + items: + $ref: '#/components/schemas/recording' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListRecording + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{Sid}.json: + servers: + - url: https://api.twilio.com + description: The results of an Add-on API call + x-twilio: + defaultOutputProperties: + - sid + - status + - add_on_sid + - date_created + pathType: instance + dependentProperties: + payloads: + mapping: + account_sid: account_sid + reference_sid: reference_sid + add_on_result_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Recordings/{reference_sid}/AddOnResults/{add_on_result_sid}/Payloads.json + parent: /Accounts/{AccountSid}/Recordings/{Sid}.json + get: + description: Fetch an instance of an AddOnResult + tags: + - Api20100401AddOnResult + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Recording AddOnResult resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ReferenceSid + in: path + description: The SID of the recording to which the result to fetch belongs. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Recording + AddOnResult resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XR[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/recording.recording_add_on_result' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchRecordingAddOnResult + x-maturity: + - GA + delete: + description: Delete a result and purge all associated Payloads + tags: + - Api20100401AddOnResult + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Recording AddOnResult resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ReferenceSid + in: path + description: The SID of the recording to which the result to delete belongs. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Recording + AddOnResult resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XR[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteRecordingAddOnResult + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults.json: + servers: + - url: https://api.twilio.com + description: The results of an Add-on API call + x-twilio: + defaultOutputProperties: + - sid + - status + - add_on_sid + - date_created + pathType: list + dependentProperties: + payloads: + mapping: + account_sid: account_sid + reference_sid: reference_sid + add_on_result_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/Recordings/{reference_sid}/AddOnResults/{add_on_result_sid}/Payloads.json + parent: /Accounts/{AccountSid}/Recordings/{Sid}.json + get: + description: Retrieve a list of results belonging to the recording + tags: + - Api20100401AddOnResult + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Recording AddOnResult resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ReferenceSid + in: path + description: The SID of the recording to which the result to read belongs. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + 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: + type: object + title: ListRecordingAddOnResultResponse + properties: + add_on_results: + type: array + items: + $ref: '#/components/schemas/recording.recording_add_on_result' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListRecordingAddOnResult + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads/{Sid}.json: + servers: + - url: https://api.twilio.com + description: A single Add-on results' payload + x-twilio: + defaultOutputProperties: + - sid + - label + - content_type + pathType: instance + dependentProperties: + data: + mapping: + account_sid: account_sid + reference_sid: reference_sid + add_on_result_sid: add_on_result_sid + payload_sid: sid + resource_url: /2010-04-01None + parent: /Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{Sid}.json + get: + description: Fetch an instance of a result payload + tags: + - Api20100401Payload + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Recording AddOnResult Payload resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ReferenceSid + in: path + description: The SID of the recording to which the AddOnResult resource that + contains the payload to fetch belongs. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + required: true + - name: AddOnResultSid + in: path + description: The SID of the AddOnResult to which the payload to fetch belongs. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XR[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Recording + AddOnResult Payload resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XH[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/recording.recording_add_on_result.recording_add_on_result_payload' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchRecordingAddOnResultPayload + x-maturity: + - GA + delete: + description: Delete a payload from the result along with all associated Data + tags: + - Api20100401Payload + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Recording AddOnResult Payload resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ReferenceSid + in: path + description: The SID of the recording to which the AddOnResult resource that + contains the payloads to delete belongs. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + required: true + - name: AddOnResultSid + in: path + description: The SID of the AddOnResult to which the payloads to delete belongs. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XR[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Recording + AddOnResult Payload resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XH[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteRecordingAddOnResultPayload + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads.json: + servers: + - url: https://api.twilio.com + description: A single Add-on results' payload + x-twilio: + defaultOutputProperties: + - sid + - label + - content_type + pathType: list + dependentProperties: + data: + mapping: + account_sid: account_sid + reference_sid: reference_sid + add_on_result_sid: add_on_result_sid + payload_sid: sid + resource_url: /2010-04-01None + parent: /Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{Sid}.json + get: + description: Retrieve a list of payloads belonging to the AddOnResult + tags: + - Api20100401Payload + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Recording AddOnResult Payload resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: ReferenceSid + in: path + description: The SID of the recording to which the AddOnResult resource that + contains the payloads to read belongs. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + required: true + - name: AddOnResultSid + in: path + description: The SID of the AddOnResult to which the payloads to read belongs. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^XR[0-9a-fA-F]{32}$ + 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: + type: object + title: ListRecordingAddOnResultPayloadResponse + properties: + payloads: + type: array + items: + $ref: '#/components/schemas/recording.recording_add_on_result.recording_add_on_result_payload' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListRecordingAddOnResultPayload + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions/{Sid}.json: + servers: + - url: https://api.twilio.com + description: References to text transcriptions of call recordings + x-twilio: + defaultOutputProperties: + - sid + - type + - status + - duration + pathType: instance + parent: /Accounts/{AccountSid}/Recordings/{Sid}.json + get: + description: '' + tags: + - Api20100401Transcription + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Transcription resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: RecordingSid + in: path + description: The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) + that created the transcription to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Transcription + resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^TR[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/recording.recording_transcription' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchRecordingTranscription + x-maturity: + - GA + delete: + description: '' + tags: + - Api20100401Transcription + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Transcription resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: RecordingSid + in: path + description: The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) + that created the transcription to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Transcription + resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^TR[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteRecordingTranscription + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions.json: + servers: + - url: https://api.twilio.com + description: References to text transcriptions of call recordings + x-twilio: + defaultOutputProperties: + - sid + - type + - status + - duration + pathType: list + parent: /Accounts/{AccountSid}/Recordings/{Sid}.json + get: + description: '' + tags: + - Api20100401Transcription + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Transcription resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: RecordingSid + in: path + description: The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) + that created the transcriptions to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^RE[0-9a-fA-F]{32}$ + 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: + type: object + title: ListRecordingTranscriptionResponse + properties: + transcriptions: + type: array + items: + $ref: '#/components/schemas/recording.recording_transcription' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListRecordingTranscription + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Messaging short codes + x-twilio: + defaultOutputProperties: + - sid + - short_code + - friendly_name + pathType: instance + parent: /Accounts/{Sid}.json + get: + description: Fetch an instance of a short code + tags: + - Api20100401ShortCode + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the ShortCode resource(s) to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the ShortCode + resource to fetch + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SC[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/short_code' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchShortCode + x-maturity: + - GA + post: + description: Update a short code with the following parameters + tags: + - Api20100401ShortCode + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the ShortCode resource(s) to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the ShortCode + resource to update + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SC[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/short_code' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateShortCode + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateShortCodeRequest + properties: + FriendlyName: + type: string + description: A descriptive string that you created to describe this + resource. It can be up to 64 characters long. By default, the + `FriendlyName` is the short code. + ApiVersion: + type: string + description: 'The API version to use to start a new TwiML session. + Can be: `2010-04-01` or `2008-08-01`.' + SmsUrl: + type: string + format: uri + description: The URL we should call when receiving an incoming SMS + message to this short code. + SmsMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use when calling the `sms_url`. + Can be: `GET` or `POST`.' + SmsFallbackUrl: + type: string + format: uri + description: The URL that we should call if an error occurs while + retrieving or executing the TwiML from `sms_url`. + SmsFallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method that we should use to call the `sms_fallback_url`. + Can be: `GET` or `POST`.' + /2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes.json: + servers: + - url: https://api.twilio.com + description: Messaging short codes + x-twilio: + defaultOutputProperties: + - sid + - short_code + - friendly_name + pathType: list + parent: /Accounts/{Sid}.json + get: + description: Retrieve a list of short-codes belonging to the account used to + make the request + tags: + - Api20100401ShortCode + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the ShortCode resource(s) to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: FriendlyName + in: query + description: The string that identifies the ShortCode resources to read. + schema: + type: string + - name: ShortCode + in: query + description: Only show the ShortCode resources that match this pattern. You + can specify partial numbers and use '*' as a wildcard for any digit. + schema: + type: string + - 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: + type: object + title: ListShortCodeResponse + properties: + short_codes: + type: array + items: + $ref: '#/components/schemas/short_code' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListShortCode + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json: + servers: + - url: https://api.twilio.com + description: 'TODO: Resource-level docs' + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + pathType: instance + parent: /Accounts/{Sid}.json + get: + description: '' + tags: + - Api20100401SigningKey + parameters: + - name: AccountSid + in: path + description: '' + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: '' + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SK[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/signing_key' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchSigningKey + x-maturity: + - GA + post: + description: '' + tags: + - Api20100401SigningKey + parameters: + - name: AccountSid + in: path + description: '' + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: '' + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SK[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/signing_key' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateSigningKey + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateSigningKeyRequest + properties: + FriendlyName: + type: string + description: '' + delete: + description: '' + tags: + - Api20100401SigningKey + parameters: + - name: AccountSid + in: path + description: '' + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: '' + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SK[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteSigningKey + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/SIP.json: + servers: + - url: https://api.twilio.com + description: 'TODO: Resource-level docs' + x-twilio: + defaultOutputProperties: [] + pathType: list + parent: /Accounts/{Sid}.json + /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth.json: + servers: + - url: https://api.twilio.com + description: 'TODO: Resource-level docs' + x-twilio: + defaultOutputProperties: [] + pathType: list + parent: /Accounts/{AccountSid}/SIP/Domains/{Sid}.json + className: auth_types + /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls.json: + servers: + - url: https://api.twilio.com + description: 'TODO: Resource-level docs' + x-twilio: + defaultOutputProperties: [] + pathType: list + parent: /Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth.json + className: auth_type_calls + /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings.json: + servers: + - url: https://api.twilio.com + description: Credential lists for SIP calls + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + pathType: list + parent: /Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls.json + className: auth_calls_credential_list_mapping + post: + description: Create a new credential list mapping resource + tags: + - Api20100401AuthCallsCredentialListMapping + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will create the resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DomainSid + in: path + description: The SID of the SIP domain that will contain the new resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_domain.sip_auth.sip_auth_calls.sip_auth_calls_credential_list_mapping' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateSipAuthCallsCredentialListMapping + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateSipAuthCallsCredentialListMappingRequest + properties: + CredentialListSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + description: The SID of the CredentialList resource to map to the + SIP domain. + required: + - CredentialListSid + get: + description: Retrieve a list of credential list mappings belonging to the domain + used in the request + tags: + - Api20100401AuthCallsCredentialListMapping + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the CredentialListMapping resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DomainSid + in: path + description: The SID of the SIP domain that contains the resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + 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: + type: object + title: ListSipAuthCallsCredentialListMappingResponse + properties: + contents: + type: array + items: + $ref: '#/components/schemas/sip.sip_domain.sip_auth.sip_auth_calls.sip_auth_calls_credential_list_mapping' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListSipAuthCallsCredentialListMapping + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Credential lists for SIP calls + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + pathType: instance + parent: /Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls.json + className: auth_calls_credential_list_mapping + get: + description: Fetch a specific instance of a credential list mapping + tags: + - Api20100401AuthCallsCredentialListMapping + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the CredentialListMapping resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DomainSid + in: path + description: The SID of the SIP domain that contains the resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the CredentialListMapping + resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_domain.sip_auth.sip_auth_calls.sip_auth_calls_credential_list_mapping' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchSipAuthCallsCredentialListMapping + x-maturity: + - GA + delete: + description: Delete a credential list mapping from the requested domain + tags: + - Api20100401AuthCallsCredentialListMapping + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the CredentialListMapping resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DomainSid + in: path + description: The SID of the SIP domain that contains the resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the CredentialListMapping + resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteSipAuthCallsCredentialListMapping + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings.json: + servers: + - url: https://api.twilio.com + description: IP address lists for SIP calls + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + pathType: list + parent: /Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls.json + className: auth_calls_ip_access_control_list_mapping + post: + description: Create a new IP Access Control List mapping + tags: + - Api20100401AuthCallsIpAccessControlListMapping + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will create the resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DomainSid + in: path + description: The SID of the SIP domain that will contain the new resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_domain.sip_auth.sip_auth_calls.sip_auth_calls_ip_access_control_list_mapping' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateSipAuthCallsIpAccessControlListMapping + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateSipAuthCallsIpAccessControlListMappingRequest + properties: + IpAccessControlListSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AL[0-9a-fA-F]{32}$ + description: The SID of the IpAccessControlList resource to map + to the SIP domain. + required: + - IpAccessControlListSid + get: + description: Retrieve a list of IP Access Control List mappings belonging to + the domain used in the request + tags: + - Api20100401AuthCallsIpAccessControlListMapping + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the IpAccessControlListMapping resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DomainSid + in: path + description: The SID of the SIP domain that contains the resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + 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: + type: object + title: ListSipAuthCallsIpAccessControlListMappingResponse + properties: + contents: + type: array + items: + $ref: '#/components/schemas/sip.sip_domain.sip_auth.sip_auth_calls.sip_auth_calls_ip_access_control_list_mapping' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListSipAuthCallsIpAccessControlListMapping + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings/{Sid}.json: + servers: + - url: https://api.twilio.com + description: IP address lists for SIP calls + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + pathType: instance + parent: /Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls.json + className: auth_calls_ip_access_control_list_mapping + get: + description: Fetch a specific instance of an IP Access Control List mapping + tags: + - Api20100401AuthCallsIpAccessControlListMapping + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the IpAccessControlListMapping resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DomainSid + in: path + description: The SID of the SIP domain that contains the resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the IpAccessControlListMapping + resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AL[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_domain.sip_auth.sip_auth_calls.sip_auth_calls_ip_access_control_list_mapping' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchSipAuthCallsIpAccessControlListMapping + x-maturity: + - GA + delete: + description: Delete an IP Access Control List mapping from the requested domain + tags: + - Api20100401AuthCallsIpAccessControlListMapping + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the IpAccessControlListMapping resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DomainSid + in: path + description: The SID of the SIP domain that contains the resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the IpAccessControlListMapping + resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AL[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteSipAuthCallsIpAccessControlListMapping + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations.json: + servers: + - url: https://api.twilio.com + description: 'TODO: Resource-level docs' + x-twilio: + defaultOutputProperties: [] + pathType: list + parent: /Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth.json + className: auth_type_registrations + /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings.json: + servers: + - url: https://api.twilio.com + description: Credential lists for SIP registrations + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + pathType: list + parent: /Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations.json + className: auth_registrations_credential_list_mapping + post: + description: Create a new credential list mapping resource + tags: + - Api20100401AuthRegistrationsCredentialListMapping + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will create the resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DomainSid + in: path + description: The SID of the SIP domain that will contain the new resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_domain.sip_auth.sip_auth_registrations.sip_auth_registrations_credential_list_mapping' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateSipAuthRegistrationsCredentialListMapping + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateSipAuthRegistrationsCredentialListMappingRequest + properties: + CredentialListSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + description: The SID of the CredentialList resource to map to the + SIP domain. + required: + - CredentialListSid + get: + description: Retrieve a list of credential list mappings belonging to the domain + used in the request + tags: + - Api20100401AuthRegistrationsCredentialListMapping + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the CredentialListMapping resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DomainSid + in: path + description: The SID of the SIP domain that contains the resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + 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: + type: object + title: ListSipAuthRegistrationsCredentialListMappingResponse + properties: + contents: + type: array + items: + $ref: '#/components/schemas/sip.sip_domain.sip_auth.sip_auth_registrations.sip_auth_registrations_credential_list_mapping' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListSipAuthRegistrationsCredentialListMapping + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Credential lists for SIP registrations + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + pathType: instance + parent: /Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations.json + className: auth_registrations_credential_list_mapping + get: + description: Fetch a specific instance of a credential list mapping + tags: + - Api20100401AuthRegistrationsCredentialListMapping + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the CredentialListMapping resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DomainSid + in: path + description: The SID of the SIP domain that contains the resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the CredentialListMapping + resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_domain.sip_auth.sip_auth_registrations.sip_auth_registrations_credential_list_mapping' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchSipAuthRegistrationsCredentialListMapping + x-maturity: + - GA + delete: + description: Delete a credential list mapping from the requested domain + tags: + - Api20100401AuthRegistrationsCredentialListMapping + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the CredentialListMapping resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DomainSid + in: path + description: The SID of the SIP domain that contains the resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the CredentialListMapping + resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteSipAuthRegistrationsCredentialListMapping + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials.json: + servers: + - url: https://api.twilio.com + description: Username and password information for SIP Domains + x-twilio: + defaultOutputProperties: + - sid + - username + - credential_list_sid + pathType: list + parent: /Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json + get: + description: Retrieve a list of credentials. + tags: + - Api20100401Credential + parameters: + - name: AccountSid + in: path + description: The unique id of the Account that is responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CredentialListSid + in: path + description: The unique id that identifies the credential list that contains + the desired credentials. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + 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: + type: object + title: ListSipCredentialResponse + properties: + credentials: + type: array + items: + $ref: '#/components/schemas/sip.sip_credential_list.sip_credential' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListSipCredential + x-maturity: + - GA + post: + description: Create a new credential resource. + tags: + - Api20100401Credential + parameters: + - name: AccountSid + in: path + description: The unique id of the Account that is responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CredentialListSid + in: path + description: The unique id that identifies the credential list to include + the created credential. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_credential_list.sip_credential' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateSipCredential + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateSipCredentialRequest + properties: + Username: + type: string + description: The username that will be passed when authenticating + SIP requests. The username should be sent in response to Twilio's + challenge of the initial INVITE. It can be up to 32 characters + long. + Password: + type: string + description: The password that the username will use when authenticating + SIP requests. The password must be a minimum of 12 characters, + contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`) + required: + - Username + - Password + /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Username and password information for SIP Domains + x-twilio: + defaultOutputProperties: + - sid + - username + - credential_list_sid + pathType: instance + parent: /Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json + get: + description: Fetch a single credential. + tags: + - Api20100401Credential + parameters: + - name: AccountSid + in: path + description: The unique id of the Account that is responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CredentialListSid + in: path + description: The unique id that identifies the credential list that contains + the desired credential. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The unique id that identifies the resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CR[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_credential_list.sip_credential' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchSipCredential + x-maturity: + - GA + post: + description: Update a credential resource. + tags: + - Api20100401Credential + parameters: + - name: AccountSid + in: path + description: The unique id of the Account that is responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CredentialListSid + in: path + description: The unique id that identifies the credential list that includes + this credential. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The unique id that identifies the resource to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CR[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_credential_list.sip_credential' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateSipCredential + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateSipCredentialRequest + properties: + Password: + type: string + description: The password that the username will use when authenticating + SIP requests. The password must be a minimum of 12 characters, + contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`) + delete: + description: Delete a credential resource. + tags: + - Api20100401Credential + parameters: + - name: AccountSid + in: path + description: The unique id of the Account that is responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CredentialListSid + in: path + description: The unique id that identifies the credential list that contains + the desired credentials. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The unique id that identifies the resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CR[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteSipCredential + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists.json: + servers: + - url: https://api.twilio.com + description: Lists of SIP credentials + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + pathType: list + dependentProperties: + credentials: + mapping: + account_sid: account_sid + credential_list_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/SIP/CredentialLists/{credential_list_sid}/Credentials.json + parent: /Accounts/{AccountSid}/SIP.json + get: + description: Get All Credential Lists + tags: + - Api20100401CredentialList + parameters: + - name: AccountSid + in: path + description: The unique id of the Account that is responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + 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: + type: object + title: ListSipCredentialListResponse + properties: + credential_lists: + type: array + items: + $ref: '#/components/schemas/sip.sip_credential_list' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListSipCredentialList + x-maturity: + - GA + post: + description: Create a Credential List + tags: + - Api20100401CredentialList + parameters: + - name: AccountSid + in: path + description: The unique id of the Account that is responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_credential_list' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateSipCredentialList + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateSipCredentialListRequest + properties: + FriendlyName: + type: string + description: A human readable descriptive text that describes the + CredentialList, up to 64 characters long. + required: + - FriendlyName + /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Lists of SIP credentials + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + pathType: instance + dependentProperties: + credentials: + mapping: + account_sid: account_sid + credential_list_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/SIP/CredentialLists/{credential_list_sid}/Credentials.json + parent: /Accounts/{AccountSid}/SIP.json + get: + description: Get a Credential List + tags: + - Api20100401CredentialList + parameters: + - name: AccountSid + in: path + description: The unique id of the Account that is responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The credential list Sid that uniquely identifies this resource + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_credential_list' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchSipCredentialList + x-maturity: + - GA + post: + description: Update a Credential List + tags: + - Api20100401CredentialList + parameters: + - name: AccountSid + in: path + description: The unique id of the Account that is responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The credential list Sid that uniquely identifies this resource + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_credential_list' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateSipCredentialList + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateSipCredentialListRequest + properties: + FriendlyName: + type: string + description: A human readable descriptive text for a CredentialList, + up to 64 characters long. + required: + - FriendlyName + delete: + description: Delete a Credential List + tags: + - Api20100401CredentialList + parameters: + - name: AccountSid + in: path + description: The unique id of the Account that is responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The credential list Sid that uniquely identifies this resource + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteSipCredentialList + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings.json: + servers: + - url: https://api.twilio.com + description: Credential lists associated with a SIP Domain + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + pathType: list + parent: /Accounts/{AccountSid}/SIP/Domains/{Sid}.json + post: + description: Create a CredentialListMapping resource for an account. + tags: + - Api20100401CredentialListMapping + parameters: + - name: AccountSid + in: path + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DomainSid + in: path + description: A 34 character string that uniquely identifies the SIP Domain + for which the CredentialList resource will be mapped. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_domain.sip_credential_list_mapping' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateSipCredentialListMapping + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateSipCredentialListMappingRequest + properties: + CredentialListSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + description: A 34 character string that uniquely identifies the + CredentialList resource to map to the SIP domain. + required: + - CredentialListSid + get: + description: Read multiple CredentialListMapping resources from an account. + tags: + - Api20100401CredentialListMapping + parameters: + - name: AccountSid + in: path + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DomainSid + in: path + description: A 34 character string that uniquely identifies the SIP Domain + that includes the resource to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + 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: + type: object + title: ListSipCredentialListMappingResponse + properties: + credential_list_mappings: + type: array + items: + $ref: '#/components/schemas/sip.sip_domain.sip_credential_list_mapping' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListSipCredentialListMapping + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Credential lists associated with a SIP Domain + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + pathType: instance + parent: /Accounts/{AccountSid}/SIP/Domains/{Sid}.json + get: + description: Fetch a single CredentialListMapping resource from an account. + tags: + - Api20100401CredentialListMapping + parameters: + - name: AccountSid + in: path + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DomainSid + in: path + description: A 34 character string that uniquely identifies the SIP Domain + that includes the resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: A 34 character string that uniquely identifies the resource to + fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_domain.sip_credential_list_mapping' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchSipCredentialListMapping + x-maturity: + - GA + delete: + description: Delete a CredentialListMapping resource from an account. + tags: + - Api20100401CredentialListMapping + parameters: + - name: AccountSid + in: path + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DomainSid + in: path + description: A 34 character string that uniquely identifies the SIP Domain + that includes the resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: A 34 character string that uniquely identifies the resource to + delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CL[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteSipCredentialListMapping + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/SIP/Domains.json: + servers: + - url: https://api.twilio.com + description: Custom DNS hostnames that can accept SIP traffic + x-twilio: + defaultOutputProperties: + - sid + - domain_name + - friendly_name + pathType: list + dependentProperties: + ip_access_control_list_mappings: + mapping: + account_sid: account_sid + domain_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/SIP/Domains/{domain_sid}/IpAccessControlListMappings.json + credential_list_mappings: + mapping: + account_sid: account_sid + domain_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/SIP/Domains/{domain_sid}/CredentialListMappings.json + auth: + mapping: + account_sid: account_sid + domain_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/SIP/Domains/{domain_sid}/Auth.json + parent: /Accounts/{AccountSid}/SIP.json + get: + description: Retrieve a list of domains belonging to the account used to make + the request + tags: + - Api20100401Domain + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the SipDomain resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + 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: + type: object + title: ListSipDomainResponse + properties: + domains: + type: array + items: + $ref: '#/components/schemas/sip.sip_domain' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListSipDomain + x-maturity: + - GA + post: + description: Create a new Domain + tags: + - Api20100401Domain + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will create the resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_domain' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateSipDomain + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateSipDomainRequest + properties: + DomainName: + type: string + description: The unique address you reserve on Twilio to which you + route your SIP traffic. Domain names can contain letters, digits, + and "-" and must end with `sip.twilio.com`. + FriendlyName: + type: string + description: A descriptive string that you created to describe the + resource. It can be up to 64 characters long. + VoiceUrl: + type: string + format: uri + description: The URL we should when the domain 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`.' + VoiceStatusCallbackUrl: + type: string + format: uri + description: The URL that we should call to pass status parameters + (such as call ended) to your application. + VoiceStatusCallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use to call `voice_status_callback_url`. + Can be: `GET` or `POST`.' + SipRegistration: + type: boolean + description: Whether to allow SIP Endpoints to register with the + domain to receive calls. Can be `true` or `false`. `true` allows + SIP Endpoints to register with the domain to receive calls, `false` + does not. + EmergencyCallingEnabled: + type: boolean + description: Whether emergency calling is enabled for the domain. + If enabled, allows emergency calls on the domain from phone numbers + with validated addresses. + Secure: + type: boolean + description: Whether secure SIP is enabled for the domain. If enabled, + TLS will be enforced and SRTP will be negotiated on all incoming + calls to this sip domain. + ByocTrunkSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^BY[0-9a-fA-F]{32}$ + description: The SID of the BYOC Trunk(Bring Your Own Carrier) resource + that the Sip Domain will be associated with. + EmergencyCallerSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + description: Whether an emergency caller sid is configured for the + domain. If present, this phone number will be used as the callback + for the emergency call. + required: + - DomainName + /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Custom DNS hostnames that can accept SIP traffic + x-twilio: + defaultOutputProperties: + - sid + - domain_name + - friendly_name + pathType: instance + dependentProperties: + ip_access_control_list_mappings: + mapping: + account_sid: account_sid + domain_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/SIP/Domains/{domain_sid}/IpAccessControlListMappings.json + credential_list_mappings: + mapping: + account_sid: account_sid + domain_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/SIP/Domains/{domain_sid}/CredentialListMappings.json + auth: + mapping: + account_sid: account_sid + domain_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/SIP/Domains/{domain_sid}/Auth.json + parent: /Accounts/{AccountSid}/SIP.json + get: + description: Fetch an instance of a Domain + tags: + - Api20100401Domain + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the SipDomain resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the SipDomain + resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_domain' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchSipDomain + x-maturity: + - GA + post: + description: Update the attributes of a domain + tags: + - Api20100401Domain + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the SipDomain resource to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the SipDomain + resource to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_domain' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateSipDomain + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateSipDomainRequest + properties: + FriendlyName: + type: string + description: A descriptive string that you created to describe the + resource. It can be up to 64 characters long. + 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`.' + 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`. + VoiceMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: The HTTP method we should use to call `voice_url` + VoiceStatusCallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use to call `voice_status_callback_url`. + Can be: `GET` or `POST`.' + VoiceStatusCallbackUrl: + type: string + format: uri + description: The URL that we should call to pass status parameters + (such as call ended) to your application. + VoiceUrl: + type: string + format: uri + description: The URL we should call when the domain receives a call. + SipRegistration: + type: boolean + description: Whether to allow SIP Endpoints to register with the + domain to receive calls. Can be `true` or `false`. `true` allows + SIP Endpoints to register with the domain to receive calls, `false` + does not. + DomainName: + type: string + description: The unique address you reserve on Twilio to which you + route your SIP traffic. Domain names can contain letters, digits, + and "-" and must end with `sip.twilio.com`. + EmergencyCallingEnabled: + type: boolean + description: Whether emergency calling is enabled for the domain. + If enabled, allows emergency calls on the domain from phone numbers + with validated addresses. + Secure: + type: boolean + description: Whether secure SIP is enabled for the domain. If enabled, + TLS will be enforced and SRTP will be negotiated on all incoming + calls to this sip domain. + ByocTrunkSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^BY[0-9a-fA-F]{32}$ + description: The SID of the BYOC Trunk(Bring Your Own Carrier) resource + that the Sip Domain will be associated with. + EmergencyCallerSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^PN[0-9a-fA-F]{32}$ + description: Whether an emergency caller sid is configured for the + domain. If present, this phone number will be used as the callback + for the emergency call. + delete: + description: Delete an instance of a Domain + tags: + - Api20100401Domain + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the SipDomain resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the SipDomain + resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteSipDomain + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists.json: + servers: + - url: https://api.twilio.com + description: Access control lists of IP address resources + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + pathType: list + dependentProperties: + ip_addresses: + mapping: + account_sid: account_sid + ip_access_control_list_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/SIP/IpAccessControlLists/{ip_access_control_list_sid}/IpAddresses.json + parent: /Accounts/{AccountSid}/SIP.json + get: + description: Retrieve a list of IpAccessControlLists that belong to the account + used to make the request + tags: + - Api20100401IpAccessControlList + parameters: + - name: AccountSid + in: path + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + 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: + type: object + title: ListSipIpAccessControlListResponse + properties: + ip_access_control_lists: + type: array + items: + $ref: '#/components/schemas/sip.sip_ip_access_control_list' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListSipIpAccessControlList + x-maturity: + - GA + post: + description: Create a new IpAccessControlList resource + tags: + - Api20100401IpAccessControlList + parameters: + - name: AccountSid + in: path + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_ip_access_control_list' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateSipIpAccessControlList + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateSipIpAccessControlListRequest + properties: + FriendlyName: + type: string + description: A human readable descriptive text that describes the + IpAccessControlList, up to 255 characters long. + required: + - FriendlyName + /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Access control lists of IP address resources + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + pathType: instance + dependentProperties: + ip_addresses: + mapping: + account_sid: account_sid + ip_access_control_list_sid: sid + resource_url: /2010-04-01/Accounts/{account_sid}/SIP/IpAccessControlLists/{ip_access_control_list_sid}/IpAddresses.json + parent: /Accounts/{AccountSid}/SIP.json + get: + description: Fetch a specific instance of an IpAccessControlList + tags: + - Api20100401IpAccessControlList + parameters: + - name: AccountSid + in: path + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: A 34 character string that uniquely identifies the resource to + fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AL[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_ip_access_control_list' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchSipIpAccessControlList + x-maturity: + - GA + post: + description: Rename an IpAccessControlList + tags: + - Api20100401IpAccessControlList + parameters: + - name: AccountSid + in: path + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: A 34 character string that uniquely identifies the resource to + udpate. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AL[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_ip_access_control_list' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateSipIpAccessControlList + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateSipIpAccessControlListRequest + properties: + FriendlyName: + type: string + description: A human readable descriptive text, up to 255 characters + long. + required: + - FriendlyName + delete: + description: Delete an IpAccessControlList from the requested account + tags: + - Api20100401IpAccessControlList + parameters: + - name: AccountSid + in: path + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: A 34 character string that uniquely identifies the resource to + delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AL[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteSipIpAccessControlList + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Access control lists associated with a SIP Domain + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + pathType: instance + parent: /Accounts/{AccountSid}/SIP/Domains/{Sid}.json + get: + description: Fetch an IpAccessControlListMapping resource. + tags: + - Api20100401IpAccessControlListMapping + parameters: + - name: AccountSid + in: path + description: The unique id of the Account that is responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DomainSid + in: path + description: A 34 character string that uniquely identifies the SIP domain. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: A 34 character string that uniquely identifies the resource to + fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AL[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_domain.sip_ip_access_control_list_mapping' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchSipIpAccessControlListMapping + x-maturity: + - GA + delete: + description: Delete an IpAccessControlListMapping resource. + tags: + - Api20100401IpAccessControlListMapping + parameters: + - name: AccountSid + in: path + description: The unique id of the Account that is responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DomainSid + in: path + description: A 34 character string that uniquely identifies the SIP domain. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: A 34 character string that uniquely identifies the resource to + delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AL[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteSipIpAccessControlListMapping + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings.json: + servers: + - url: https://api.twilio.com + description: Access control lists associated with a SIP Domain + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + pathType: list + parent: /Accounts/{AccountSid}/SIP/Domains/{Sid}.json + post: + description: Create a new IpAccessControlListMapping resource. + tags: + - Api20100401IpAccessControlListMapping + parameters: + - name: AccountSid + in: path + description: The unique id of the Account that is responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DomainSid + in: path + description: A 34 character string that uniquely identifies the SIP domain. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_domain.sip_ip_access_control_list_mapping' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateSipIpAccessControlListMapping + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateSipIpAccessControlListMappingRequest + properties: + IpAccessControlListSid: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AL[0-9a-fA-F]{32}$ + description: The unique id of the IP access control list to map + to the SIP domain. + required: + - IpAccessControlListSid + get: + description: Retrieve a list of IpAccessControlListMapping resources. + tags: + - Api20100401IpAccessControlListMapping + parameters: + - name: AccountSid + in: path + description: The unique id of the Account that is responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: DomainSid + in: path + description: A 34 character string that uniquely identifies the SIP domain. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^SD[0-9a-fA-F]{32}$ + 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: + type: object + title: ListSipIpAccessControlListMappingResponse + properties: + ip_access_control_list_mappings: + type: array + items: + $ref: '#/components/schemas/sip.sip_domain.sip_ip_access_control_list_mapping' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListSipIpAccessControlListMapping + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses.json: + servers: + - url: https://api.twilio.com + description: IP addresses that have access to a SIP Domain + x-twilio: + defaultOutputProperties: + - sid + - ip_address + - friendly_name + pathType: list + parent: /Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json + get: + description: Read multiple IpAddress resources. + tags: + - Api20100401IpAddress + parameters: + - name: AccountSid + in: path + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: IpAccessControlListSid + in: path + description: The IpAccessControlList Sid that identifies the IpAddress resources + to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AL[0-9a-fA-F]{32}$ + 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: + type: object + title: ListSipIpAddressResponse + properties: + ip_addresses: + type: array + items: + $ref: '#/components/schemas/sip.sip_ip_access_control_list.sip_ip_address' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListSipIpAddress + x-maturity: + - GA + post: + description: Create a new IpAddress resource. + tags: + - Api20100401IpAddress + parameters: + - name: AccountSid + in: path + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: IpAccessControlListSid + in: path + description: The IpAccessControlList Sid with which to associate the created + IpAddress resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AL[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_ip_access_control_list.sip_ip_address' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateSipIpAddress + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateSipIpAddressRequest + properties: + FriendlyName: + type: string + description: A human readable descriptive text for this resource, + up to 255 characters long. + IpAddress: + type: string + description: An IP address in dotted decimal notation from which + you want to accept traffic. Any SIP requests from this IP address + will be allowed by Twilio. IPv4 only supported today. + CidrPrefixLength: + type: integer + description: An integer representing the length of the CIDR prefix + to use with this IP address when accepting traffic. By default + the entire IP address is used. + required: + - FriendlyName + - IpAddress + /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json: + servers: + - url: https://api.twilio.com + description: IP addresses that have access to a SIP Domain + x-twilio: + defaultOutputProperties: + - sid + - ip_address + - friendly_name + pathType: instance + parent: /Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json + get: + description: Read one IpAddress resource. + tags: + - Api20100401IpAddress + parameters: + - name: AccountSid + in: path + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: IpAccessControlListSid + in: path + description: The IpAccessControlList Sid that identifies the IpAddress resources + to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AL[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: A 34 character string that uniquely identifies the IpAddress + resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^IP[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_ip_access_control_list.sip_ip_address' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchSipIpAddress + x-maturity: + - GA + post: + description: Update an IpAddress resource. + tags: + - Api20100401IpAddress + parameters: + - name: AccountSid + in: path + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: IpAccessControlListSid + in: path + description: The IpAccessControlList Sid that identifies the IpAddress resources + to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AL[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: A 34 character string that identifies the IpAddress resource + to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^IP[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/sip.sip_ip_access_control_list.sip_ip_address' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateSipIpAddress + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateSipIpAddressRequest + properties: + IpAddress: + type: string + description: An IP address in dotted decimal notation from which + you want to accept traffic. Any SIP requests from this IP address + will be allowed by Twilio. IPv4 only supported today. + FriendlyName: + type: string + description: A human readable descriptive text for this resource, + up to 255 characters long. + CidrPrefixLength: + type: integer + description: An integer representing the length of the CIDR prefix + to use with this IP address when accepting traffic. By default + the entire IP address is used. + delete: + description: Delete an IpAddress resource. + tags: + - Api20100401IpAddress + parameters: + - name: AccountSid + in: path + description: The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) + responsible for this resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: IpAccessControlListSid + in: path + description: The IpAccessControlList Sid that identifies the IpAddress resources + to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AL[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: A 34 character string that uniquely identifies the resource to + delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^IP[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteSipIpAddress + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Siprec.json: + servers: + - url: https://api.twilio.com + description: Start and stop forked media streaming using the SIPREC protocol. + x-twilio: + defaultOutputProperties: + - call_sid + - name + pathType: list + parent: /Accounts/{AccountSid}/Calls/{Sid}.json + post: + description: Create a Siprec + tags: + - Api20100401Siprec + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created this Siprec resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the Siprec resource is associated with. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/call.siprec' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateSiprec + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateSiprecRequest + properties: + Name: + type: string + description: The user-specified name of this Siprec, if one was + given when the Siprec was created. This may be used to stop the + Siprec. + ConnectorName: + type: string + description: Unique name used when configuring the connector via + Marketplace Add-on. + Track: + type: string + $ref: '#/components/schemas/siprec_enum_track' + description: One of `inbound_track`, `outbound_track`, `both_tracks`. + StatusCallback: + type: string + format: uri + description: Absolute URL of the status callback. + StatusCallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: The http method for the status_callback (one of GET, + POST). + Parameter1.Name: + type: string + description: Parameter name + Parameter1.Value: + type: string + description: Parameter value + Parameter2.Name: + type: string + description: Parameter name + Parameter2.Value: + type: string + description: Parameter value + Parameter3.Name: + type: string + description: Parameter name + Parameter3.Value: + type: string + description: Parameter value + Parameter4.Name: + type: string + description: Parameter name + Parameter4.Value: + type: string + description: Parameter value + Parameter5.Name: + type: string + description: Parameter name + Parameter5.Value: + type: string + description: Parameter value + Parameter6.Name: + type: string + description: Parameter name + Parameter6.Value: + type: string + description: Parameter value + Parameter7.Name: + type: string + description: Parameter name + Parameter7.Value: + type: string + description: Parameter value + Parameter8.Name: + type: string + description: Parameter name + Parameter8.Value: + type: string + description: Parameter value + Parameter9.Name: + type: string + description: Parameter name + Parameter9.Value: + type: string + description: Parameter value + Parameter10.Name: + type: string + description: Parameter name + Parameter10.Value: + type: string + description: Parameter value + Parameter11.Name: + type: string + description: Parameter name + Parameter11.Value: + type: string + description: Parameter value + Parameter12.Name: + type: string + description: Parameter name + Parameter12.Value: + type: string + description: Parameter value + Parameter13.Name: + type: string + description: Parameter name + Parameter13.Value: + type: string + description: Parameter value + Parameter14.Name: + type: string + description: Parameter name + Parameter14.Value: + type: string + description: Parameter value + Parameter15.Name: + type: string + description: Parameter name + Parameter15.Value: + type: string + description: Parameter value + Parameter16.Name: + type: string + description: Parameter name + Parameter16.Value: + type: string + description: Parameter value + Parameter17.Name: + type: string + description: Parameter name + Parameter17.Value: + type: string + description: Parameter value + Parameter18.Name: + type: string + description: Parameter name + Parameter18.Value: + type: string + description: Parameter value + Parameter19.Name: + type: string + description: Parameter name + Parameter19.Value: + type: string + description: Parameter value + Parameter20.Name: + type: string + description: Parameter name + Parameter20.Value: + type: string + description: Parameter value + Parameter21.Name: + type: string + description: Parameter name + Parameter21.Value: + type: string + description: Parameter value + Parameter22.Name: + type: string + description: Parameter name + Parameter22.Value: + type: string + description: Parameter value + Parameter23.Name: + type: string + description: Parameter name + Parameter23.Value: + type: string + description: Parameter value + Parameter24.Name: + type: string + description: Parameter name + Parameter24.Value: + type: string + description: Parameter value + Parameter25.Name: + type: string + description: Parameter name + Parameter25.Value: + type: string + description: Parameter value + Parameter26.Name: + type: string + description: Parameter name + Parameter26.Value: + type: string + description: Parameter value + Parameter27.Name: + type: string + description: Parameter name + Parameter27.Value: + type: string + description: Parameter value + Parameter28.Name: + type: string + description: Parameter name + Parameter28.Value: + type: string + description: Parameter value + Parameter29.Name: + type: string + description: Parameter name + Parameter29.Value: + type: string + description: Parameter value + Parameter30.Name: + type: string + description: Parameter name + Parameter30.Value: + type: string + description: Parameter value + Parameter31.Name: + type: string + description: Parameter name + Parameter31.Value: + type: string + description: Parameter value + Parameter32.Name: + type: string + description: Parameter name + Parameter32.Value: + type: string + description: Parameter value + Parameter33.Name: + type: string + description: Parameter name + Parameter33.Value: + type: string + description: Parameter value + Parameter34.Name: + type: string + description: Parameter name + Parameter34.Value: + type: string + description: Parameter value + Parameter35.Name: + type: string + description: Parameter name + Parameter35.Value: + type: string + description: Parameter value + Parameter36.Name: + type: string + description: Parameter name + Parameter36.Value: + type: string + description: Parameter value + Parameter37.Name: + type: string + description: Parameter name + Parameter37.Value: + type: string + description: Parameter value + Parameter38.Name: + type: string + description: Parameter name + Parameter38.Value: + type: string + description: Parameter value + Parameter39.Name: + type: string + description: Parameter name + Parameter39.Value: + type: string + description: Parameter value + Parameter40.Name: + type: string + description: Parameter name + Parameter40.Value: + type: string + description: Parameter value + Parameter41.Name: + type: string + description: Parameter name + Parameter41.Value: + type: string + description: Parameter value + Parameter42.Name: + type: string + description: Parameter name + Parameter42.Value: + type: string + description: Parameter value + Parameter43.Name: + type: string + description: Parameter name + Parameter43.Value: + type: string + description: Parameter value + Parameter44.Name: + type: string + description: Parameter name + Parameter44.Value: + type: string + description: Parameter value + Parameter45.Name: + type: string + description: Parameter name + Parameter45.Value: + type: string + description: Parameter value + Parameter46.Name: + type: string + description: Parameter name + Parameter46.Value: + type: string + description: Parameter value + Parameter47.Name: + type: string + description: Parameter name + Parameter47.Value: + type: string + description: Parameter value + Parameter48.Name: + type: string + description: Parameter name + Parameter48.Value: + type: string + description: Parameter value + Parameter49.Name: + type: string + description: Parameter name + Parameter49.Value: + type: string + description: Parameter value + Parameter50.Name: + type: string + description: Parameter name + Parameter50.Value: + type: string + description: Parameter value + Parameter51.Name: + type: string + description: Parameter name + Parameter51.Value: + type: string + description: Parameter value + Parameter52.Name: + type: string + description: Parameter name + Parameter52.Value: + type: string + description: Parameter value + Parameter53.Name: + type: string + description: Parameter name + Parameter53.Value: + type: string + description: Parameter value + Parameter54.Name: + type: string + description: Parameter name + Parameter54.Value: + type: string + description: Parameter value + Parameter55.Name: + type: string + description: Parameter name + Parameter55.Value: + type: string + description: Parameter value + Parameter56.Name: + type: string + description: Parameter name + Parameter56.Value: + type: string + description: Parameter value + Parameter57.Name: + type: string + description: Parameter name + Parameter57.Value: + type: string + description: Parameter value + Parameter58.Name: + type: string + description: Parameter name + Parameter58.Value: + type: string + description: Parameter value + Parameter59.Name: + type: string + description: Parameter name + Parameter59.Value: + type: string + description: Parameter value + Parameter60.Name: + type: string + description: Parameter name + Parameter60.Value: + type: string + description: Parameter value + Parameter61.Name: + type: string + description: Parameter name + Parameter61.Value: + type: string + description: Parameter value + Parameter62.Name: + type: string + description: Parameter name + Parameter62.Value: + type: string + description: Parameter value + Parameter63.Name: + type: string + description: Parameter name + Parameter63.Value: + type: string + description: Parameter value + Parameter64.Name: + type: string + description: Parameter name + Parameter64.Value: + type: string + description: Parameter value + Parameter65.Name: + type: string + description: Parameter name + Parameter65.Value: + type: string + description: Parameter value + Parameter66.Name: + type: string + description: Parameter name + Parameter66.Value: + type: string + description: Parameter value + Parameter67.Name: + type: string + description: Parameter name + Parameter67.Value: + type: string + description: Parameter value + Parameter68.Name: + type: string + description: Parameter name + Parameter68.Value: + type: string + description: Parameter value + Parameter69.Name: + type: string + description: Parameter name + Parameter69.Value: + type: string + description: Parameter value + Parameter70.Name: + type: string + description: Parameter name + Parameter70.Value: + type: string + description: Parameter value + Parameter71.Name: + type: string + description: Parameter name + Parameter71.Value: + type: string + description: Parameter value + Parameter72.Name: + type: string + description: Parameter name + Parameter72.Value: + type: string + description: Parameter value + Parameter73.Name: + type: string + description: Parameter name + Parameter73.Value: + type: string + description: Parameter value + Parameter74.Name: + type: string + description: Parameter name + Parameter74.Value: + type: string + description: Parameter value + Parameter75.Name: + type: string + description: Parameter name + Parameter75.Value: + type: string + description: Parameter value + Parameter76.Name: + type: string + description: Parameter name + Parameter76.Value: + type: string + description: Parameter value + Parameter77.Name: + type: string + description: Parameter name + Parameter77.Value: + type: string + description: Parameter value + Parameter78.Name: + type: string + description: Parameter name + Parameter78.Value: + type: string + description: Parameter value + Parameter79.Name: + type: string + description: Parameter name + Parameter79.Value: + type: string + description: Parameter value + Parameter80.Name: + type: string + description: Parameter name + Parameter80.Value: + type: string + description: Parameter value + Parameter81.Name: + type: string + description: Parameter name + Parameter81.Value: + type: string + description: Parameter value + Parameter82.Name: + type: string + description: Parameter name + Parameter82.Value: + type: string + description: Parameter value + Parameter83.Name: + type: string + description: Parameter name + Parameter83.Value: + type: string + description: Parameter value + Parameter84.Name: + type: string + description: Parameter name + Parameter84.Value: + type: string + description: Parameter value + Parameter85.Name: + type: string + description: Parameter name + Parameter85.Value: + type: string + description: Parameter value + Parameter86.Name: + type: string + description: Parameter name + Parameter86.Value: + type: string + description: Parameter value + Parameter87.Name: + type: string + description: Parameter name + Parameter87.Value: + type: string + description: Parameter value + Parameter88.Name: + type: string + description: Parameter name + Parameter88.Value: + type: string + description: Parameter value + Parameter89.Name: + type: string + description: Parameter name + Parameter89.Value: + type: string + description: Parameter value + Parameter90.Name: + type: string + description: Parameter name + Parameter90.Value: + type: string + description: Parameter value + Parameter91.Name: + type: string + description: Parameter name + Parameter91.Value: + type: string + description: Parameter value + Parameter92.Name: + type: string + description: Parameter name + Parameter92.Value: + type: string + description: Parameter value + Parameter93.Name: + type: string + description: Parameter name + Parameter93.Value: + type: string + description: Parameter value + Parameter94.Name: + type: string + description: Parameter name + Parameter94.Value: + type: string + description: Parameter value + Parameter95.Name: + type: string + description: Parameter name + Parameter95.Value: + type: string + description: Parameter value + Parameter96.Name: + type: string + description: Parameter name + Parameter96.Value: + type: string + description: Parameter value + Parameter97.Name: + type: string + description: Parameter name + Parameter97.Value: + type: string + description: Parameter value + Parameter98.Name: + type: string + description: Parameter name + Parameter98.Value: + type: string + description: Parameter value + Parameter99.Name: + type: string + description: Parameter name + Parameter99.Value: + type: string + description: Parameter value + /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Siprec/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Start and stop forked media streaming using the SIPREC protocol. + x-twilio: + defaultOutputProperties: + - call_sid + - name + pathType: instance + parent: /Accounts/{AccountSid}/Calls/{Sid}.json + post: + description: Stop a Siprec using either the SID of the Siprec resource or the + `name` used when creating the resource + tags: + - Api20100401Siprec + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created this Siprec resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the Siprec resource is associated with. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The SID of the Siprec resource, or the `name` used when creating + the resource + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/call.siprec' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateSiprec + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateSiprecRequest + properties: + Status: + type: string + $ref: '#/components/schemas/siprec_enum_update_status' + description: The status. Must have the value `stopped` + required: + - Status + /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Streams.json: + servers: + - url: https://api.twilio.com + description: Twilio enabled secure payments solution for accepting credit and + ACH payments over the phone. + x-twilio: + defaultOutputProperties: + - call_sid + - name + pathType: list + parent: /Accounts/{AccountSid}/Calls/{Sid}.json + post: + description: Create a Stream + tags: + - Api20100401Stream + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created this Stream resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the Stream resource is associated with. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/call.stream' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateStream + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateStreamRequest + properties: + Url: + type: string + format: uri + description: Relative or absolute url where WebSocket connection + will be established. + Name: + type: string + description: The user-specified name of this Stream, if one was + given when the Stream was created. This may be used to stop the + Stream. + Track: + type: string + $ref: '#/components/schemas/stream_enum_track' + description: One of `inbound_track`, `outbound_track`, `both_tracks`. + StatusCallback: + type: string + format: uri + description: Absolute URL of the status callback. + StatusCallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: The http method for the status_callback (one of GET, + POST). + Parameter1.Name: + type: string + description: Parameter name + Parameter1.Value: + type: string + description: Parameter value + Parameter2.Name: + type: string + description: Parameter name + Parameter2.Value: + type: string + description: Parameter value + Parameter3.Name: + type: string + description: Parameter name + Parameter3.Value: + type: string + description: Parameter value + Parameter4.Name: + type: string + description: Parameter name + Parameter4.Value: + type: string + description: Parameter value + Parameter5.Name: + type: string + description: Parameter name + Parameter5.Value: + type: string + description: Parameter value + Parameter6.Name: + type: string + description: Parameter name + Parameter6.Value: + type: string + description: Parameter value + Parameter7.Name: + type: string + description: Parameter name + Parameter7.Value: + type: string + description: Parameter value + Parameter8.Name: + type: string + description: Parameter name + Parameter8.Value: + type: string + description: Parameter value + Parameter9.Name: + type: string + description: Parameter name + Parameter9.Value: + type: string + description: Parameter value + Parameter10.Name: + type: string + description: Parameter name + Parameter10.Value: + type: string + description: Parameter value + Parameter11.Name: + type: string + description: Parameter name + Parameter11.Value: + type: string + description: Parameter value + Parameter12.Name: + type: string + description: Parameter name + Parameter12.Value: + type: string + description: Parameter value + Parameter13.Name: + type: string + description: Parameter name + Parameter13.Value: + type: string + description: Parameter value + Parameter14.Name: + type: string + description: Parameter name + Parameter14.Value: + type: string + description: Parameter value + Parameter15.Name: + type: string + description: Parameter name + Parameter15.Value: + type: string + description: Parameter value + Parameter16.Name: + type: string + description: Parameter name + Parameter16.Value: + type: string + description: Parameter value + Parameter17.Name: + type: string + description: Parameter name + Parameter17.Value: + type: string + description: Parameter value + Parameter18.Name: + type: string + description: Parameter name + Parameter18.Value: + type: string + description: Parameter value + Parameter19.Name: + type: string + description: Parameter name + Parameter19.Value: + type: string + description: Parameter value + Parameter20.Name: + type: string + description: Parameter name + Parameter20.Value: + type: string + description: Parameter value + Parameter21.Name: + type: string + description: Parameter name + Parameter21.Value: + type: string + description: Parameter value + Parameter22.Name: + type: string + description: Parameter name + Parameter22.Value: + type: string + description: Parameter value + Parameter23.Name: + type: string + description: Parameter name + Parameter23.Value: + type: string + description: Parameter value + Parameter24.Name: + type: string + description: Parameter name + Parameter24.Value: + type: string + description: Parameter value + Parameter25.Name: + type: string + description: Parameter name + Parameter25.Value: + type: string + description: Parameter value + Parameter26.Name: + type: string + description: Parameter name + Parameter26.Value: + type: string + description: Parameter value + Parameter27.Name: + type: string + description: Parameter name + Parameter27.Value: + type: string + description: Parameter value + Parameter28.Name: + type: string + description: Parameter name + Parameter28.Value: + type: string + description: Parameter value + Parameter29.Name: + type: string + description: Parameter name + Parameter29.Value: + type: string + description: Parameter value + Parameter30.Name: + type: string + description: Parameter name + Parameter30.Value: + type: string + description: Parameter value + Parameter31.Name: + type: string + description: Parameter name + Parameter31.Value: + type: string + description: Parameter value + Parameter32.Name: + type: string + description: Parameter name + Parameter32.Value: + type: string + description: Parameter value + Parameter33.Name: + type: string + description: Parameter name + Parameter33.Value: + type: string + description: Parameter value + Parameter34.Name: + type: string + description: Parameter name + Parameter34.Value: + type: string + description: Parameter value + Parameter35.Name: + type: string + description: Parameter name + Parameter35.Value: + type: string + description: Parameter value + Parameter36.Name: + type: string + description: Parameter name + Parameter36.Value: + type: string + description: Parameter value + Parameter37.Name: + type: string + description: Parameter name + Parameter37.Value: + type: string + description: Parameter value + Parameter38.Name: + type: string + description: Parameter name + Parameter38.Value: + type: string + description: Parameter value + Parameter39.Name: + type: string + description: Parameter name + Parameter39.Value: + type: string + description: Parameter value + Parameter40.Name: + type: string + description: Parameter name + Parameter40.Value: + type: string + description: Parameter value + Parameter41.Name: + type: string + description: Parameter name + Parameter41.Value: + type: string + description: Parameter value + Parameter42.Name: + type: string + description: Parameter name + Parameter42.Value: + type: string + description: Parameter value + Parameter43.Name: + type: string + description: Parameter name + Parameter43.Value: + type: string + description: Parameter value + Parameter44.Name: + type: string + description: Parameter name + Parameter44.Value: + type: string + description: Parameter value + Parameter45.Name: + type: string + description: Parameter name + Parameter45.Value: + type: string + description: Parameter value + Parameter46.Name: + type: string + description: Parameter name + Parameter46.Value: + type: string + description: Parameter value + Parameter47.Name: + type: string + description: Parameter name + Parameter47.Value: + type: string + description: Parameter value + Parameter48.Name: + type: string + description: Parameter name + Parameter48.Value: + type: string + description: Parameter value + Parameter49.Name: + type: string + description: Parameter name + Parameter49.Value: + type: string + description: Parameter value + Parameter50.Name: + type: string + description: Parameter name + Parameter50.Value: + type: string + description: Parameter value + Parameter51.Name: + type: string + description: Parameter name + Parameter51.Value: + type: string + description: Parameter value + Parameter52.Name: + type: string + description: Parameter name + Parameter52.Value: + type: string + description: Parameter value + Parameter53.Name: + type: string + description: Parameter name + Parameter53.Value: + type: string + description: Parameter value + Parameter54.Name: + type: string + description: Parameter name + Parameter54.Value: + type: string + description: Parameter value + Parameter55.Name: + type: string + description: Parameter name + Parameter55.Value: + type: string + description: Parameter value + Parameter56.Name: + type: string + description: Parameter name + Parameter56.Value: + type: string + description: Parameter value + Parameter57.Name: + type: string + description: Parameter name + Parameter57.Value: + type: string + description: Parameter value + Parameter58.Name: + type: string + description: Parameter name + Parameter58.Value: + type: string + description: Parameter value + Parameter59.Name: + type: string + description: Parameter name + Parameter59.Value: + type: string + description: Parameter value + Parameter60.Name: + type: string + description: Parameter name + Parameter60.Value: + type: string + description: Parameter value + Parameter61.Name: + type: string + description: Parameter name + Parameter61.Value: + type: string + description: Parameter value + Parameter62.Name: + type: string + description: Parameter name + Parameter62.Value: + type: string + description: Parameter value + Parameter63.Name: + type: string + description: Parameter name + Parameter63.Value: + type: string + description: Parameter value + Parameter64.Name: + type: string + description: Parameter name + Parameter64.Value: + type: string + description: Parameter value + Parameter65.Name: + type: string + description: Parameter name + Parameter65.Value: + type: string + description: Parameter value + Parameter66.Name: + type: string + description: Parameter name + Parameter66.Value: + type: string + description: Parameter value + Parameter67.Name: + type: string + description: Parameter name + Parameter67.Value: + type: string + description: Parameter value + Parameter68.Name: + type: string + description: Parameter name + Parameter68.Value: + type: string + description: Parameter value + Parameter69.Name: + type: string + description: Parameter name + Parameter69.Value: + type: string + description: Parameter value + Parameter70.Name: + type: string + description: Parameter name + Parameter70.Value: + type: string + description: Parameter value + Parameter71.Name: + type: string + description: Parameter name + Parameter71.Value: + type: string + description: Parameter value + Parameter72.Name: + type: string + description: Parameter name + Parameter72.Value: + type: string + description: Parameter value + Parameter73.Name: + type: string + description: Parameter name + Parameter73.Value: + type: string + description: Parameter value + Parameter74.Name: + type: string + description: Parameter name + Parameter74.Value: + type: string + description: Parameter value + Parameter75.Name: + type: string + description: Parameter name + Parameter75.Value: + type: string + description: Parameter value + Parameter76.Name: + type: string + description: Parameter name + Parameter76.Value: + type: string + description: Parameter value + Parameter77.Name: + type: string + description: Parameter name + Parameter77.Value: + type: string + description: Parameter value + Parameter78.Name: + type: string + description: Parameter name + Parameter78.Value: + type: string + description: Parameter value + Parameter79.Name: + type: string + description: Parameter name + Parameter79.Value: + type: string + description: Parameter value + Parameter80.Name: + type: string + description: Parameter name + Parameter80.Value: + type: string + description: Parameter value + Parameter81.Name: + type: string + description: Parameter name + Parameter81.Value: + type: string + description: Parameter value + Parameter82.Name: + type: string + description: Parameter name + Parameter82.Value: + type: string + description: Parameter value + Parameter83.Name: + type: string + description: Parameter name + Parameter83.Value: + type: string + description: Parameter value + Parameter84.Name: + type: string + description: Parameter name + Parameter84.Value: + type: string + description: Parameter value + Parameter85.Name: + type: string + description: Parameter name + Parameter85.Value: + type: string + description: Parameter value + Parameter86.Name: + type: string + description: Parameter name + Parameter86.Value: + type: string + description: Parameter value + Parameter87.Name: + type: string + description: Parameter name + Parameter87.Value: + type: string + description: Parameter value + Parameter88.Name: + type: string + description: Parameter name + Parameter88.Value: + type: string + description: Parameter value + Parameter89.Name: + type: string + description: Parameter name + Parameter89.Value: + type: string + description: Parameter value + Parameter90.Name: + type: string + description: Parameter name + Parameter90.Value: + type: string + description: Parameter value + Parameter91.Name: + type: string + description: Parameter name + Parameter91.Value: + type: string + description: Parameter value + Parameter92.Name: + type: string + description: Parameter name + Parameter92.Value: + type: string + description: Parameter value + Parameter93.Name: + type: string + description: Parameter name + Parameter93.Value: + type: string + description: Parameter value + Parameter94.Name: + type: string + description: Parameter name + Parameter94.Value: + type: string + description: Parameter value + Parameter95.Name: + type: string + description: Parameter name + Parameter95.Value: + type: string + description: Parameter value + Parameter96.Name: + type: string + description: Parameter name + Parameter96.Value: + type: string + description: Parameter value + Parameter97.Name: + type: string + description: Parameter name + Parameter97.Value: + type: string + description: Parameter value + Parameter98.Name: + type: string + description: Parameter name + Parameter98.Value: + type: string + description: Parameter value + Parameter99.Name: + type: string + description: Parameter name + Parameter99.Value: + type: string + description: Parameter value + required: + - Url + /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Streams/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Twilio enabled secure payments solution for accepting credit and + ACH payments over the phone. + x-twilio: + defaultOutputProperties: + - call_sid + - name + pathType: instance + parent: /Accounts/{AccountSid}/Calls/{Sid}.json + post: + description: Stop a Stream using either the SID of the Stream resource or the + `name` used when creating the resource + tags: + - Api20100401Stream + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created this Stream resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the Stream resource is associated with. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The SID of the Stream resource, or the `name` used when creating + the resource + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/call.stream' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateStream + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateStreamRequest + properties: + Status: + type: string + $ref: '#/components/schemas/stream_enum_update_status' + description: The status. Must have the value `stopped` + required: + - Status + /2010-04-01/Accounts/{AccountSid}/Tokens.json: + servers: + - url: https://api.twilio.com + description: Credentials for ICE servers + x-twilio: + defaultOutputProperties: + - username + - ice_servers + pathType: list + parent: /Accounts/{Sid}.json + post: + description: Create a new token for ICE servers + tags: + - Api20100401Token + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will create the resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/token' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateToken + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateTokenRequest + properties: + Ttl: + type: integer + description: The duration in seconds for which the generated credentials + are valid. The default value is 86400 (24 hours). + /2010-04-01/Accounts/{AccountSid}/Transcriptions/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Text transcriptions of call recordings + x-twilio: + defaultOutputProperties: + - sid + - type + - status + - duration + pathType: instance + parent: /Accounts/{Sid}.json + get: + description: Fetch an instance of a Transcription + tags: + - Api20100401Transcription + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Transcription resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Transcription + resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^TR[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/transcription' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchTranscription + x-maturity: + - GA + delete: + description: Delete a transcription from the account used to make the request + tags: + - Api20100401Transcription + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Transcription resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the Transcription + resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^TR[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteTranscription + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Transcriptions.json: + servers: + - url: https://api.twilio.com + description: Text transcriptions of call recordings + x-twilio: + defaultOutputProperties: + - sid + - type + - status + - duration + pathType: list + parent: /Accounts/{Sid}.json + get: + description: Retrieve a list of transcriptions belonging to the account used + to make the request + tags: + - Api20100401Transcription + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the Transcription resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + 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: + type: object + title: ListTranscriptionResponse + properties: + transcriptions: + type: array + items: + $ref: '#/components/schemas/transcription' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListTranscription + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Usage.json: + servers: + - url: https://api.twilio.com + description: 'TODO: Resource-level docs' + x-twilio: + defaultOutputProperties: [] + pathType: list + parent: /Accounts/{Sid}.json + /2010-04-01/Accounts/{AccountSid}/Usage/Records.json: + servers: + - url: https://api.twilio.com + description: Twilio account usage records + x-twilio: + defaultOutputProperties: + - category + - start_date + - end_date + - count + - count_unit + pathType: list + parent: /Accounts/{AccountSid}/Usage.json + get: + description: Retrieve a list of usage-records belonging to the account used + to make the request + tags: + - Api20100401Record + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the UsageRecord resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Category + in: query + description: The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) + of the UsageRecord resources to read. Only UsageRecord resources in the + specified category are retrieved. + schema: + type: string + $ref: '#/components/schemas/usage_record_enum_category' + - name: StartDate + in: query + description: 'Only include usage that has occurred on or after this date. + Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify + offsets from the current date, such as: `-30days`, which will set the start + date to be 30 days before the current date.' + schema: + type: string + format: date + - name: EndDate + in: query + description: 'Only include usage that occurred on or before this date. Specify + the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets + from the current date, such as: `+30days`, which will set the end date to + 30 days from the current date.' + schema: + type: string + format: date + - name: IncludeSubaccounts + in: query + description: 'Whether to include usage from the master account and all its + subaccounts. Can be: `true` (the default) to include usage from the master + account and all subaccounts or `false` to retrieve usage from only the specified + account.' + 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: + type: object + title: ListUsageRecordResponse + properties: + usage_records: + type: array + items: + $ref: '#/components/schemas/usage.usage_record' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListUsageRecord + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Usage/Records/AllTime.json: + servers: + - url: https://api.twilio.com + description: Usage records for all time + x-twilio: + defaultOutputProperties: + - category + - start_date + - end_date + - count + - count_unit + pathType: list + parent: /Accounts/{AccountSid}/Usage/Records.json + get: + description: '' + tags: + - Api20100401AllTime + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the UsageRecord resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Category + in: query + description: The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) + of the UsageRecord resources to read. Only UsageRecord resources in the + specified category are retrieved. + schema: + type: string + $ref: '#/components/schemas/usage_record_all_time_enum_category' + - name: StartDate + in: query + description: 'Only include usage that has occurred on or after this date. + Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify + offsets from the current date, such as: `-30days`, which will set the start + date to be 30 days before the current date.' + schema: + type: string + format: date + - name: EndDate + in: query + description: 'Only include usage that occurred on or before this date. Specify + the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets + from the current date, such as: `+30days`, which will set the end date to + 30 days from the current date.' + schema: + type: string + format: date + - name: IncludeSubaccounts + in: query + description: 'Whether to include usage from the master account and all its + subaccounts. Can be: `true` (the default) to include usage from the master + account and all subaccounts or `false` to retrieve usage from only the specified + account.' + 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: + type: object + title: ListUsageRecordAllTimeResponse + properties: + usage_records: + type: array + items: + $ref: '#/components/schemas/usage.usage_record.usage_record_all_time' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListUsageRecordAllTime + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Usage/Records/Daily.json: + servers: + - url: https://api.twilio.com + description: Usage records summarized by day + x-twilio: + defaultOutputProperties: + - category + - start_date + - end_date + - count + - count_unit + pathType: list + parent: /Accounts/{AccountSid}/Usage/Records.json + get: + description: '' + tags: + - Api20100401Daily + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the UsageRecord resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Category + in: query + description: The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) + of the UsageRecord resources to read. Only UsageRecord resources in the + specified category are retrieved. + schema: + type: string + $ref: '#/components/schemas/usage_record_daily_enum_category' + - name: StartDate + in: query + description: 'Only include usage that has occurred on or after this date. + Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify + offsets from the current date, such as: `-30days`, which will set the start + date to be 30 days before the current date.' + schema: + type: string + format: date + - name: EndDate + in: query + description: 'Only include usage that occurred on or before this date. Specify + the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets + from the current date, such as: `+30days`, which will set the end date to + 30 days from the current date.' + schema: + type: string + format: date + - name: IncludeSubaccounts + in: query + description: 'Whether to include usage from the master account and all its + subaccounts. Can be: `true` (the default) to include usage from the master + account and all subaccounts or `false` to retrieve usage from only the specified + account.' + 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: + type: object + title: ListUsageRecordDailyResponse + properties: + usage_records: + type: array + items: + $ref: '#/components/schemas/usage.usage_record.usage_record_daily' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListUsageRecordDaily + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Usage/Records/LastMonth.json: + servers: + - url: https://api.twilio.com + description: Usage records for last month + x-twilio: + defaultOutputProperties: + - category + - start_date + - end_date + - count + - count_unit + pathType: list + parent: /Accounts/{AccountSid}/Usage/Records.json + get: + description: '' + tags: + - Api20100401LastMonth + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the UsageRecord resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Category + in: query + description: The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) + of the UsageRecord resources to read. Only UsageRecord resources in the + specified category are retrieved. + schema: + type: string + $ref: '#/components/schemas/usage_record_last_month_enum_category' + - name: StartDate + in: query + description: 'Only include usage that has occurred on or after this date. + Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify + offsets from the current date, such as: `-30days`, which will set the start + date to be 30 days before the current date.' + schema: + type: string + format: date + - name: EndDate + in: query + description: 'Only include usage that occurred on or before this date. Specify + the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets + from the current date, such as: `+30days`, which will set the end date to + 30 days from the current date.' + schema: + type: string + format: date + - name: IncludeSubaccounts + in: query + description: 'Whether to include usage from the master account and all its + subaccounts. Can be: `true` (the default) to include usage from the master + account and all subaccounts or `false` to retrieve usage from only the specified + account.' + 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: + type: object + title: ListUsageRecordLastMonthResponse + properties: + usage_records: + type: array + items: + $ref: '#/components/schemas/usage.usage_record.usage_record_last_month' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListUsageRecordLastMonth + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Usage/Records/Monthly.json: + servers: + - url: https://api.twilio.com + description: Usage records summarized by month + x-twilio: + defaultOutputProperties: + - category + - start_date + - end_date + - count + - count_unit + pathType: list + parent: /Accounts/{AccountSid}/Usage/Records.json + get: + description: '' + tags: + - Api20100401Monthly + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the UsageRecord resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Category + in: query + description: The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) + of the UsageRecord resources to read. Only UsageRecord resources in the + specified category are retrieved. + schema: + type: string + $ref: '#/components/schemas/usage_record_monthly_enum_category' + - name: StartDate + in: query + description: 'Only include usage that has occurred on or after this date. + Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify + offsets from the current date, such as: `-30days`, which will set the start + date to be 30 days before the current date.' + schema: + type: string + format: date + - name: EndDate + in: query + description: 'Only include usage that occurred on or before this date. Specify + the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets + from the current date, such as: `+30days`, which will set the end date to + 30 days from the current date.' + schema: + type: string + format: date + - name: IncludeSubaccounts + in: query + description: 'Whether to include usage from the master account and all its + subaccounts. Can be: `true` (the default) to include usage from the master + account and all subaccounts or `false` to retrieve usage from only the specified + account.' + 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: + type: object + title: ListUsageRecordMonthlyResponse + properties: + usage_records: + type: array + items: + $ref: '#/components/schemas/usage.usage_record.usage_record_monthly' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListUsageRecordMonthly + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Usage/Records/ThisMonth.json: + servers: + - url: https://api.twilio.com + description: Usage records for this month + x-twilio: + defaultOutputProperties: + - category + - start_date + - end_date + - count + - count_unit + pathType: list + parent: /Accounts/{AccountSid}/Usage/Records.json + get: + description: '' + tags: + - Api20100401ThisMonth + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the UsageRecord resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Category + in: query + description: The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) + of the UsageRecord resources to read. Only UsageRecord resources in the + specified category are retrieved. + schema: + type: string + $ref: '#/components/schemas/usage_record_this_month_enum_category' + - name: StartDate + in: query + description: 'Only include usage that has occurred on or after this date. + Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify + offsets from the current date, such as: `-30days`, which will set the start + date to be 30 days before the current date.' + schema: + type: string + format: date + - name: EndDate + in: query + description: 'Only include usage that occurred on or before this date. Specify + the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets + from the current date, such as: `+30days`, which will set the end date to + 30 days from the current date.' + schema: + type: string + format: date + - name: IncludeSubaccounts + in: query + description: 'Whether to include usage from the master account and all its + subaccounts. Can be: `true` (the default) to include usage from the master + account and all subaccounts or `false` to retrieve usage from only the specified + account.' + 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: + type: object + title: ListUsageRecordThisMonthResponse + properties: + usage_records: + type: array + items: + $ref: '#/components/schemas/usage.usage_record.usage_record_this_month' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListUsageRecordThisMonth + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Usage/Records/Today.json: + servers: + - url: https://api.twilio.com + description: Usage records for today + x-twilio: + defaultOutputProperties: + - category + - start_date + - end_date + - count + - count_unit + pathType: list + parent: /Accounts/{AccountSid}/Usage/Records.json + get: + description: '' + tags: + - Api20100401Today + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the UsageRecord resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Category + in: query + description: The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) + of the UsageRecord resources to read. Only UsageRecord resources in the + specified category are retrieved. + schema: + type: string + $ref: '#/components/schemas/usage_record_today_enum_category' + - name: StartDate + in: query + description: 'Only include usage that has occurred on or after this date. + Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify + offsets from the current date, such as: `-30days`, which will set the start + date to be 30 days before the current date.' + schema: + type: string + format: date + - name: EndDate + in: query + description: 'Only include usage that occurred on or before this date. Specify + the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets + from the current date, such as: `+30days`, which will set the end date to + 30 days from the current date.' + schema: + type: string + format: date + - name: IncludeSubaccounts + in: query + description: 'Whether to include usage from the master account and all its + subaccounts. Can be: `true` (the default) to include usage from the master + account and all subaccounts or `false` to retrieve usage from only the specified + account.' + 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: + type: object + title: ListUsageRecordTodayResponse + properties: + usage_records: + type: array + items: + $ref: '#/components/schemas/usage.usage_record.usage_record_today' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListUsageRecordToday + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Usage/Records/Yearly.json: + servers: + - url: https://api.twilio.com + description: Usage records summarized by year + x-twilio: + defaultOutputProperties: + - category + - start_date + - end_date + - count + - count_unit + pathType: list + parent: /Accounts/{AccountSid}/Usage/Records.json + get: + description: '' + tags: + - Api20100401Yearly + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the UsageRecord resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Category + in: query + description: The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) + of the UsageRecord resources to read. Only UsageRecord resources in the + specified category are retrieved. + schema: + type: string + $ref: '#/components/schemas/usage_record_yearly_enum_category' + - name: StartDate + in: query + description: 'Only include usage that has occurred on or after this date. + Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify + offsets from the current date, such as: `-30days`, which will set the start + date to be 30 days before the current date.' + schema: + type: string + format: date + - name: EndDate + in: query + description: 'Only include usage that occurred on or before this date. Specify + the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets + from the current date, such as: `+30days`, which will set the end date to + 30 days from the current date.' + schema: + type: string + format: date + - name: IncludeSubaccounts + in: query + description: 'Whether to include usage from the master account and all its + subaccounts. Can be: `true` (the default) to include usage from the master + account and all subaccounts or `false` to retrieve usage from only the specified + account.' + 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: + type: object + title: ListUsageRecordYearlyResponse + properties: + usage_records: + type: array + items: + $ref: '#/components/schemas/usage.usage_record.usage_record_yearly' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListUsageRecordYearly + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Usage/Records/Yesterday.json: + servers: + - url: https://api.twilio.com + description: Usage records for yesterday + x-twilio: + defaultOutputProperties: + - category + - start_date + - end_date + - count + - count_unit + pathType: list + parent: /Accounts/{AccountSid}/Usage/Records.json + get: + description: '' + tags: + - Api20100401Yesterday + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the UsageRecord resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Category + in: query + description: The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) + of the UsageRecord resources to read. Only UsageRecord resources in the + specified category are retrieved. + schema: + type: string + $ref: '#/components/schemas/usage_record_yesterday_enum_category' + - name: StartDate + in: query + description: 'Only include usage that has occurred on or after this date. + Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify + offsets from the current date, such as: `-30days`, which will set the start + date to be 30 days before the current date.' + schema: + type: string + format: date + - name: EndDate + in: query + description: 'Only include usage that occurred on or before this date. Specify + the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets + from the current date, such as: `+30days`, which will set the end date to + 30 days from the current date.' + schema: + type: string + format: date + - name: IncludeSubaccounts + in: query + description: 'Whether to include usage from the master account and all its + subaccounts. Can be: `true` (the default) to include usage from the master + account and all subaccounts or `false` to retrieve usage from only the specified + account.' + 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: + type: object + title: ListUsageRecordYesterdayResponse + properties: + usage_records: + type: array + items: + $ref: '#/components/schemas/usage.usage_record.usage_record_yesterday' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListUsageRecordYesterday + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Webhooks that notify you of usage thresholds + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + - usage_category + - trigger_by + pathType: instance + parent: /Accounts/{AccountSid}/Usage.json + get: + description: Fetch and instance of a usage-trigger + tags: + - Api20100401Trigger + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the UsageTrigger resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the UsageTrigger + resource to fetch. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^UT[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/usage.usage_trigger' + description: OK + security: + - accountSid_authToken: [] + operationId: FetchUsageTrigger + x-maturity: + - GA + post: + description: Update an instance of a usage trigger + tags: + - Api20100401Trigger + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the UsageTrigger resources to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the UsageTrigger + resource to update. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^UT[0-9a-fA-F]{32}$ + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/usage.usage_trigger' + description: OK + security: + - accountSid_authToken: [] + operationId: UpdateUsageTrigger + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: UpdateUsageTriggerRequest + properties: + CallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use to call `callback_url`. + Can be: `GET` or `POST` and the default is `POST`.' + CallbackUrl: + type: string + format: uri + description: The URL we should call using `callback_method` when + the trigger fires. + FriendlyName: + type: string + description: A descriptive string that you create to describe the + resource. It can be up to 64 characters long. + delete: + description: '' + tags: + - Api20100401Trigger + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the UsageTrigger resources to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The Twilio-provided string that uniquely identifies the UsageTrigger + resource to delete. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^UT[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteUsageTrigger + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json: + servers: + - url: https://api.twilio.com + description: Webhooks that notify you of usage thresholds + x-twilio: + defaultOutputProperties: + - sid + - friendly_name + - usage_category + - trigger_by + pathType: list + parent: /Accounts/{AccountSid}/Usage.json + post: + description: Create a new UsageTrigger + tags: + - Api20100401Trigger + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that will create the resource. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/usage.usage_trigger' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateUsageTrigger + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateUsageTriggerRequest + properties: + CallbackUrl: + type: string + format: uri + description: The URL we should call using `callback_method` when + the trigger fires. + TriggerValue: + type: string + description: The usage value at which the trigger should fire. For + convenience, you can use an offset value such as `+30` to specify + a trigger_value that is 30 units more than the current usage value. + Be sure to urlencode a `+` as `%2B`. + UsageCategory: + type: string + $ref: '#/components/schemas/usage_trigger_enum_usage_category' + description: The usage category that the trigger should watch. Use + one of the supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) + for this value. + CallbackMethod: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: 'The HTTP method we should use to call `callback_url`. + Can be: `GET` or `POST` and the default is `POST`.' + FriendlyName: + type: string + description: A descriptive string that you create to describe the + resource. It can be up to 64 characters long. + Recurring: + type: string + $ref: '#/components/schemas/usage_trigger_enum_recurring' + description: 'The frequency of a recurring UsageTrigger. Can be: + `daily`, `monthly`, or `yearly` for recurring triggers or empty + for non-recurring triggers. A trigger will only fire once during + each period. Recurring times are in GMT.' + TriggerBy: + type: string + $ref: '#/components/schemas/usage_trigger_enum_trigger_field' + description: 'The field in the [UsageRecord](https://www.twilio.com/docs/usage/api/usage-record) + resource that should fire the trigger. Can be: `count`, `usage`, + or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price). The + default is `usage`.' + required: + - CallbackUrl + - TriggerValue + - UsageCategory + get: + description: Retrieve a list of usage-triggers belonging to the account used + to make the request + tags: + - Api20100401Trigger + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created the UsageTrigger resources to read. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: Recurring + in: query + description: 'The frequency of recurring UsageTriggers to read. Can be: `daily`, + `monthly`, or `yearly` to read recurring UsageTriggers. An empty value or + a value of `alltime` reads non-recurring UsageTriggers.' + schema: + type: string + $ref: '#/components/schemas/usage_trigger_enum_recurring' + - name: TriggerBy + in: query + description: 'The trigger field of the UsageTriggers to read. Can be: `count`, + `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price).' + schema: + type: string + $ref: '#/components/schemas/usage_trigger_enum_trigger_field' + - name: UsageCategory + in: query + description: The usage category of the UsageTriggers to read. Must be a supported + [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories). + schema: + type: string + $ref: '#/components/schemas/usage_trigger_enum_usage_category' + - 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: + type: object + title: ListUsageTriggerResponse + properties: + usage_triggers: + type: array + items: + $ref: '#/components/schemas/usage.usage_trigger' + end: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "end")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "end")' + first_page_uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "firstpageuri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "firstpageuri")' + next_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "nextpageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "nextpageuri")' + page: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "page")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "page")' + page_size: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "pagesize")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "pagesize")' + previous_page_uri: + type: string + format: uri + nullable: true + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "previouspageuri") @JsonSerialize(nullsUsing = XmlNullToEmptyStringSerializer.class)' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "previouspageuri")' + start: + type: integer + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "start")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "start")' + uri: + type: string + format: uri + x-field-extra-annotation: '@JacksonXmlProperty(isAttribute = true, + localName = "uri")' + x-getter-extra-annotation: '@JacksonXmlProperty(isAttribute = + true, localName = "uri")' + description: OK + security: + - accountSid_authToken: [] + operationId: ListUsageTrigger + x-maturity: + - GA + /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/UserDefinedMessages.json: + servers: + - url: https://api.twilio.com + description: Allows your server-side application to send messages to the Voice + SDK end user during an active Call. + x-twilio: + defaultOutputProperties: + - sid + pathType: list + parent: /Accounts/{AccountSid}/Calls/{Sid}.json + post: + description: Create a new User Defined Message for the given Call SID. + tags: + - Api20100401UserDefinedMessage + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that created User Defined Message. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the User Defined Message is associated with. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/call.user_defined_message' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateUserDefinedMessage + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateUserDefinedMessageRequest + properties: + Content: + type: string + description: The User Defined Message in the form of URL-encoded + JSON string. + IdempotencyKey: + type: string + description: A unique string value to identify API call. This should + be a unique string value per API call and can be a randomly generated. + required: + - Content + /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/UserDefinedMessageSubscriptions.json: + servers: + - url: https://api.twilio.com + description: Subscription for server-side application access to messages sent + from the Voice SDK for an active Call. + x-twilio: + defaultOutputProperties: + - sid + pathType: list + parent: /Accounts/{AccountSid}/Calls/{Sid}.json + post: + description: Subscribe to User Defined Messages for a given Call SID. + tags: + - Api20100401UserDefinedMessageSubscription + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that subscribed to the User Defined Messages. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the User Defined Messages subscription is associated with. This refers to + the Call SID that is producing the user defined messages. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/call.user_defined_message_subscription' + description: Created + security: + - accountSid_authToken: [] + operationId: CreateUserDefinedMessageSubscription + x-maturity: + - GA + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + title: CreateUserDefinedMessageSubscriptionRequest + properties: + Callback: + type: string + format: uri + description: The URL we should call using the `method` to send user + defined events to your application. URLs must contain a valid + hostname (underscores are not permitted). + IdempotencyKey: + type: string + description: A unique string value to identify API call. This should + be a unique string value per API call and can be a randomly generated. + Method: + type: string + format: http-method + enum: + - HEAD + - GET + - POST + - PATCH + - PUT + - DELETE + description: The HTTP method Twilio will use when requesting the + above `Url`. Either `GET` or `POST`. Default is `POST`. + required: + - Callback + /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/UserDefinedMessageSubscriptions/{Sid}.json: + servers: + - url: https://api.twilio.com + description: Subscription for server-side application access to messages sent + from the Voice SDK for an active Call. + x-twilio: + defaultOutputProperties: + - sid + pathType: instance + parent: /Accounts/{AccountSid}/Calls/{Sid}.json + delete: + description: Delete a specific User Defined Message Subscription. + tags: + - Api20100401UserDefinedMessageSubscription + parameters: + - name: AccountSid + in: path + description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) + that subscribed to the User Defined Messages. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^AC[0-9a-fA-F]{32}$ + required: true + - name: CallSid + in: path + description: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) + the User Defined Message Subscription is associated with. This refers to + the Call SID that is producing the User Defined Messages. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^CA[0-9a-fA-F]{32}$ + required: true + - name: Sid + in: path + description: The SID that uniquely identifies this User Defined Message Subscription. + schema: + type: string + minLength: 34 + maxLength: 34 + pattern: ^ZY[0-9a-fA-F]{32}$ + required: true + responses: + '204': + description: The resource was deleted successfully. + security: + - accountSid_authToken: [] + operationId: DeleteUserDefinedMessageSubscription + x-maturity: + - GA +servers: +- url: https://api.twilio.com +tags: +- name: Api20100401Account +- name: Api20100401AddOnResult +- name: Api20100401Address +- name: Api20100401AllTime +- name: Api20100401Application +- name: Api20100401AssignedAddOn +- name: Api20100401AssignedAddOnExtension +- name: Api20100401AuthCallsCredentialListMapping +- name: Api20100401AuthCallsIpAccessControlListMapping +- name: Api20100401AuthRegistrationsCredentialListMapping +- name: Api20100401AuthorizedConnectApp +- name: Api20100401AvailablePhoneNumberCountry +- name: Api20100401Balance +- name: Api20100401Call +- name: Api20100401Conference +- name: Api20100401ConnectApp +- name: Api20100401Credential +- name: Api20100401CredentialList +- name: Api20100401CredentialListMapping +- name: Api20100401Daily +- name: Api20100401DependentPhoneNumber +- name: Api20100401Domain +- name: Api20100401Event +- name: Api20100401Feedback +- name: Api20100401FeedbackSummary +- name: Api20100401IncomingPhoneNumber +- name: Api20100401IpAccessControlList +- name: Api20100401IpAccessControlListMapping +- name: Api20100401IpAddress +- name: Api20100401Key +- name: Api20100401LastMonth +- name: Api20100401Local +- name: Api20100401MachineToMachine +- name: Api20100401Media +- name: Api20100401Member +- name: Api20100401Message +- name: Api20100401Mobile +- name: Api20100401Monthly +- name: Api20100401National +- name: Api20100401NewKey +- name: Api20100401NewSigningKey +- name: Api20100401Notification +- name: Api20100401OutgoingCallerId +- name: Api20100401Participant +- name: Api20100401Payload +- name: Api20100401Payment +- name: Api20100401Queue +- name: Api20100401Record +- name: Api20100401Recording +- name: Api20100401SharedCost +- name: Api20100401ShortCode +- name: Api20100401SigningKey +- name: Api20100401Siprec +- name: Api20100401Stream +- name: Api20100401ThisMonth +- name: Api20100401Today +- name: Api20100401Token +- name: Api20100401TollFree +- name: Api20100401Transcription +- name: Api20100401Trigger +- name: Api20100401UserDefinedMessage +- name: Api20100401UserDefinedMessageSubscription +- name: Api20100401ValidationRequest +- name: Api20100401Voip +- name: Api20100401Yearly +- name: Api20100401Yesterday +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. +- name: Preview + description: PLEASE NOTE that this is a Preview product that is subject to change. + Use it with caution. If you currently do not have developer preview access, please + contact https://www.twilio.com/help/contact. diff --git a/docs/spec/wrapper.md b/docs/spec/wrapper.md new file mode 100644 index 00000000..7cafa8d1 --- /dev/null +++ b/docs/spec/wrapper.md @@ -0,0 +1,19 @@ +# Sanitizations for client +After generating the client using open API specification, the following modifications are made to the generated client by introducing a wrapper client. + +1. Removed the `string accountSid` parameter from all non-account-related functions and added it as an optional parameter to each function, with the default parameter set to `accountSid` in the initial client configurations. + +For example, the function: + +```ballerina +remote isolated function createCall(string accountSid, CreateCallRequest payload) returns Call|error { +} +``` + +is restructured as: + +```ballerina +remote isolated function createCall(CreateCallRequest payload, string? accountSid = ()) returns Call|error { + return self.generatedClient->createCall(accountSid ?: self.accountSid, payload); +} +``` diff --git a/examples/accounts/create_sub_account.bal b/examples/accounts/create_sub_account.bal new file mode 100644 index 00000000..a71f6c3f --- /dev/null +++ b/examples/accounts/create_sub_account.bal @@ -0,0 +1,41 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/io; +import ballerina/os; +import ballerinax/twilio; + +configurable string accountSID = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); + +// Twilio configurations +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +// This sample demonstrates a scenario where Twilio connector is used to create a subaccount under the account which one used to make the request. +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + + twilio:CreateAccountRequest subAccountReqest = { + FriendlyName: "Sample Sub Account" + }; + + twilio:Account subAccountInfo = check twilio->createAccount(subAccountReqest); + io:println(subAccountInfo.toString()); +} diff --git a/examples/accounts/fetch_account.bal b/examples/accounts/fetch_account.bal new file mode 100644 index 00000000..765b089b --- /dev/null +++ b/examples/accounts/fetch_account.bal @@ -0,0 +1,36 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/io; +import ballerina/os; +import ballerinax/twilio; + +configurable string accountSID = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); + +// Twilio configurations +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +// This sample demonstrates a scenario where Twilio connector is used to fetch an account +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + twilio:Account account = check twilio->fetchAccount(accountSID); + io:println("Account details: " + account.toString()); +} diff --git a/examples/accounts/fetch_balance.bal b/examples/accounts/fetch_balance.bal new file mode 100644 index 00000000..a4a095f9 --- /dev/null +++ b/examples/accounts/fetch_balance.bal @@ -0,0 +1,36 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/io; +import ballerina/os; +import ballerinax/twilio; + +configurable string accountSID = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); + +// Twilio configurations +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +// This sample demonstrates a scenario where Twilio connector is used to fetch balance of an account +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + twilio:Balance balance = check twilio->fetchBalance(accountSID); + io:println(balance?.balance, balance?.currency); +} diff --git a/examples/accounts/list_accounts.bal b/examples/accounts/list_accounts.bal new file mode 100644 index 00000000..92c96e16 --- /dev/null +++ b/examples/accounts/list_accounts.bal @@ -0,0 +1,42 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/io; +import ballerina/os; +import ballerinax/twilio; + +configurable string accountSID = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); + +// Twilio configurations +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +// This sample demonstrates a scenario where Twilio connector is used to list all accounts. +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + twilio:ListAccountResponse response = check twilio->listAccount(); + + twilio:Account[]? accounts = response.accounts; + if accounts is twilio:Account[] { + accounts.forEach(function(twilio:Account account) { + io:println("Account details: " + account.toString()); + }); + } +} diff --git a/examples/accounts/update_account.bal b/examples/accounts/update_account.bal new file mode 100644 index 00000000..f3078e05 --- /dev/null +++ b/examples/accounts/update_account.bal @@ -0,0 +1,41 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/io; +import ballerina/os; +import ballerinax/twilio; + +configurable string accountSID = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); + +// Twilio configurations +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +// This sample demonstrates a scenario where Twilio connector is used to update a Twilio account. +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + + twilio:UpdateAccountRequest updateAccountRequest = { + FriendlyName: "Sample Account Name" + }; + + twilio:Account updatedAccountInfo = check twilio->updateAccount(accountSID, updateAccountRequest); + io:println(updatedAccountInfo?.friendly_name); +} diff --git a/examples/build.gradle b/examples/build.gradle new file mode 100644 index 00000000..9103469a --- /dev/null +++ b/examples/build.gradle @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.apache.tools.ant.taskdefs.condition.Os + +apply plugin: 'java' + +def graalvmFlag = "" + +task testExamples { + if (project.hasProperty("balGraalVMTest")) { + graalvmFlag = "--graalvm" + } + doLast { + try { + exec { + workingDir project.projectDir + println("Working dir: ${workingDir}") + if (Os.isFamily(Os.FAMILY_WINDOWS)) { + commandLine 'cmd', "/c", "chmod +x ./build.sh && ./build.sh run && exit %%ERRORLEVEL%%" + } else { + commandLine 'sh', "-c", "chmod +x ./build.sh && ./build.sh run" + } + } + } catch (Exception e) { + println("Example Build failed: " + e.message) + throw e + } + } +} + +task buildExamples { + gradle.taskGraph.whenReady { graph -> + if (graph.hasTask(":twilio-examples:test")) { + buildExamples.enabled = false + } else { + testExamples.enabled = false + } + } + doLast { + try { + exec { + workingDir project.projectDir + println("Working dir: ${workingDir}") + if (Os.isFamily(Os.FAMILY_WINDOWS)) { + commandLine 'cmd', "/c", "chmod +x ./build.sh && ./build.sh build && exit %%ERRORLEVEL%%" + } else { + commandLine 'sh', "-c", "chmod +x ./build.sh && ./build.sh build" + } + } + } catch (Exception e) { + println("Example Build failed: " + e.message) + throw e + } + } +} + +buildExamples.dependsOn ":twilio-ballerina:build" +testExamples.dependsOn ":twilio-ballerina:build" + +build.dependsOn buildExamples diff --git a/examples/build.sh b/examples/build.sh index f5336274..826ac1de 100755 --- a/examples/build.sh +++ b/examples/build.sh @@ -1,7 +1,7 @@ #!/bin/bash BAL_EXAMPLES_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -BAL_CENTRAL_DIR="$HOME/.ballerina/repositories/central.ballerina.io/" +BAL_CENTRAL_DIR="$HOME/.ballerina/repositories/central.ballerina.io" BAL_HOME_DIR="$BAL_EXAMPLES_DIR/../ballerina" set -e @@ -28,12 +28,15 @@ cd "$BAL_HOME_DIR" && bal push --repository=local # Remove the cache directories in the repositories -cacheDirs=($(ls -d "$BAL_CENTRAL_DIR"/cache-* 2>/dev/null)) +cacheDirs=$(ls -d $BAL_CENTRAL_DIR/cache-* 2>/dev/null) || true for dir in "${cacheDirs[@]}"; do [ -d "$dir" ] && rm -r "$dir" done echo "Successfully cleaned the cache directories" +# Create the package directory in the central repository, this will not be present if no modules are pulled +mkdir -p "$BAL_CENTRAL_DIR/bala/ballerinax/$BAL_PACKAGE_NAME" + # Update the central repository BAL_DESTINATION_DIR="$HOME/.ballerina/repositories/central.ballerina.io/bala/ballerinax/$BAL_PACKAGE_NAME" BAL_SOURCE_DIR="$HOME/.ballerina/repositories/local/bala/ballerinax/$BAL_PACKAGE_NAME" @@ -41,7 +44,15 @@ BAL_SOURCE_DIR="$HOME/.ballerina/repositories/local/bala/ballerinax/$BAL_PACKAGE [ -d "$BAL_SOURCE_DIR" ] && cp -r "$BAL_SOURCE_DIR" "$BAL_DESTINATION_DIR" echo "Successfully updated the local central repositories" +echo "$BAL_DESTINATION_DIR" +echo "$BAL_SOURCE_DIR" + # Loop through examples in the examples directory find "$BAL_EXAMPLES_DIR" -type f -name "*.bal" | while read -r BAL_EXAMPLE_FILE; do bal "$BAL_CMD" --offline "$BAL_EXAMPLE_FILE" done + +# Remove generated JAR files +find "$BAL_HOME_DIR" -maxdepth 1 -type f -name "*.jar" | while read -r JAR_FILE; do + rm "$JAR_FILE" +done diff --git a/examples/calls/delete_call_log.bal b/examples/calls/delete_call_log.bal new file mode 100644 index 00000000..6350b4c1 --- /dev/null +++ b/examples/calls/delete_call_log.bal @@ -0,0 +1,46 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/http; +import ballerina/io; +import ballerina/os; +import ballerinax/twilio; + +configurable string accountSID = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); + +// Twilio configurations +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +// This sample demonstrates a scenario where Twilio connector is used to delete a call log. +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + + // Call SID: An identifier of 34 digits in length that uniquely identifies a call (https://support.twilio.com/hc/en-us/articles/223180488-What-is-a-Call-SID-). + // You can obtain this identifier by running the 'listCall()' or by accessing the TwilioConsole > Monitor > Logs > CallLogs + string CallSID = "CAeb8427d6e95108ff0a8953fa301d1f1f"; + + http:Response? response = check twilio->deleteCall(CallSID); + if response is http:Response { + io:println("Call log Deleted."); + } else { + io:println("Error! deleting the call log failed."); + } +} diff --git a/examples/calls/fetch_call_log.bal b/examples/calls/fetch_call_log.bal new file mode 100644 index 00000000..49808b48 --- /dev/null +++ b/examples/calls/fetch_call_log.bal @@ -0,0 +1,41 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/io; +import ballerina/os; +import ballerinax/twilio; + +configurable string accountSID = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); + +// Twilio configurations +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +// This sample demonstrates a scenario where Twilio connector is used to fetch a call log. +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + + // Call SID: An identifier of 34 digits in length that uniquely identifies a call (https://support.twilio.com/hc/en-us/articles/223180488-What-is-a-Call-SID-). + // You can obtain this identifier by running the 'listCall()' or by accessing the TwilioConsole > Monitor > Logs > CallLogs + string CallSID = "CAeb8427d6e95108ff0a8953fa301d1f1f"; + + twilio:Call call = check twilio->fetchCall(CallSID); + io:println("Call details: " + call.toString()); +} diff --git a/examples/calls/list_call_logs.bal b/examples/calls/list_call_logs.bal new file mode 100644 index 00000000..920b1ff6 --- /dev/null +++ b/examples/calls/list_call_logs.bal @@ -0,0 +1,43 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/io; +import ballerina/os; +import ballerinax/twilio; + +configurable string accountSID = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); + +// Twilio configurations +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +// This sample demonstrates a scenario where Twilio connector is used to list all call logs. +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + + twilio:ListCallResponse response = check twilio->listCall(); + + twilio:Call[]? calls = response.calls; + if calls is twilio:Call[] { + calls.forEach(function(twilio:Call call) { + io:println("Call details: " + call.toString()); + }); + } +} diff --git a/examples/calls/make_call.bal b/examples/calls/make_call.bal new file mode 100644 index 00000000..cced3516 --- /dev/null +++ b/examples/calls/make_call.bal @@ -0,0 +1,43 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/io; +import ballerina/os; +import ballerinax/twilio; + +configurable string accountSID = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); + +// Twilio configurations +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +// This sample demonstrates a scenario where Twilio connector is used to make a voice call to a number. +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + + twilio:CreateCallRequest callRequest = { + To: "+00123456789", + From: "+00123456789", + Url: "http://demo.twilio.com/docs/voice.xml" + }; + + twilio:Call response = check twilio->createCall(callRequest); + io:println("Call Status: ",response?.status); +} diff --git a/examples/docs/dashboardTokens.png b/examples/docs/dashboardTokens.png deleted file mode 100644 index 5e035a49..00000000 Binary files a/examples/docs/dashboardTokens.png and /dev/null differ diff --git a/examples/getAccountDetail.bal b/examples/getAccountDetail.bal deleted file mode 100644 index 0a9cf621..00000000 --- a/examples/getAccountDetail.bal +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerina/log; -import ballerinax/twilio; - -configurable string accountSId = ?; -configurable string authToken = ?; - -public function main() returns error? { - //Twilio Client configuration - twilio:ConnectionConfig twilioConfig = { - twilioAuth: { - accountSId: accountSId, - authToken: authToken - } - }; - - //Twilio Client - twilio:Client twilioClient = check new (twilioConfig); - - //Get account detail remote function is called by the twilio client - twilio:Account accountDetails = check twilioClient->getAccountDetails(); - log:printInfo("Account Details: " + accountDetails.toString()); -} diff --git a/examples/getMessage.bal b/examples/getMessage.bal deleted file mode 100644 index b54a6f8b..00000000 --- a/examples/getMessage.bal +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerina/log; -import ballerinax/twilio; - -configurable string accountSId = ?; -configurable string authToken = ?; - -public function main() returns error? { - //Twilio Client configuration - twilio:ConnectionConfig twilioConfig = { - twilioAuth: { - accountSId: accountSId, - authToken: authToken - } - }; - - //Twilio Client - twilio:Client twilioClient = check new (twilioConfig); - - //Set Message resource SID to get the message detial - string messageSid = ""; - - //Get SMS remote function is called by the twilio client - twilio:MessageResourceResponse details = check twilioClient->getMessage(messageSid); - log:printInfo("Message Detail: " + details.toString()); -} diff --git a/examples/makeVoiceCall.bal b/examples/makeVoiceCall.bal deleted file mode 100644 index 3540e372..00000000 --- a/examples/makeVoiceCall.bal +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerina/log; -import ballerinax/twilio; - -configurable string accountSId = ?; -configurable string authToken = ?; -configurable string fromMobile = ?; -configurable string toMobile = ?; -configurable string messageOrLink = ?; - -public function main() returns error? { - //Voice message type: twilio:MESSAGE_IN_TEXT or twilio:TWIML_URL - twilio:VoiceCallInput voiceInput = { - userInput: messageOrLink, - userInputType: twilio:MESSAGE_IN_TEXT - }; - - //Twilio Client configuration - twilio:ConnectionConfig twilioConfig = { - twilioAuth: { - accountSId: accountSId, - authToken: authToken - } - }; - - //Twilio Client - twilio:Client twilioClient = check new (twilioConfig); - - //Make voice Call remote function is called by the twilio client - twilio:VoiceCallResponse response = check twilioClient->makeVoiceCall(fromMobile, toMobile, voiceInput); - log:printInfo("Voice Call Response: " + response.toString()); -} diff --git a/examples/messages/delete_message.bal b/examples/messages/delete_message.bal new file mode 100644 index 00000000..efdce8e6 --- /dev/null +++ b/examples/messages/delete_message.bal @@ -0,0 +1,44 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/http; +import ballerina/io; +import ballerina/os; +import ballerinax/twilio; + +configurable string accountSID = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); + +// Twilio configurations +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +// This sample demonstrates a scenario where Twilio connector is used to fetch a message. +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + + string MessageSID = "SM55a867023dcf1e506aa6a67b514d370c"; + + http:Response? response = check twilio->deleteMessage(MessageSID); + if response is http:Response { + io:println("Message deleted successfully!"); + } else { + io:println("Error! deleting the message failed."); + } +} diff --git a/examples/messages/fetch_message.bal b/examples/messages/fetch_message.bal new file mode 100644 index 00000000..ad941d17 --- /dev/null +++ b/examples/messages/fetch_message.bal @@ -0,0 +1,39 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/io; +import ballerina/os; +import ballerinax/twilio; + +configurable string accountSID = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); + +// Twilio configurations +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +// This sample demonstrates a scenario where Twilio connector is used to fetch a message. +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + + string MessageSID = "SM4f16fca1d7391c99249b842f063c4da0"; + + twilio:Message message = check twilio->fetchMessage(MessageSID); + io:println("Message details: " + message.toString()); +} diff --git a/examples/messages/list_messages.bal b/examples/messages/list_messages.bal new file mode 100644 index 00000000..5ca02347 --- /dev/null +++ b/examples/messages/list_messages.bal @@ -0,0 +1,43 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/io; +import ballerina/os; +import ballerinax/twilio; + +configurable string accountSID = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); + +// Twilio configurations +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +// This sample demonstrates a scenario where Twilio connector is used to list all messages. +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + + twilio:ListMessageResponse response = check twilio->listMessage(); + + twilio:Message[]? messages = response.messages; + if messages is twilio:Message[] { + messages.forEach(function(twilio:Message message) { + io:println("Message: " + message.toString()); + }); + } +} diff --git a/examples/messages/send_sms.bal b/examples/messages/send_sms.bal new file mode 100644 index 00000000..f57d55b1 --- /dev/null +++ b/examples/messages/send_sms.bal @@ -0,0 +1,43 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/io; +import ballerina/os; +import ballerinax/twilio; + +configurable string accountSID = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); + +// Twilio configurations +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +// This sample demonstrates a scenario where Twilio connector is used to send a text message to a number. +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + + twilio:CreateMessageRequest messageRequest = { + To: "+00123456789", + From: "+00123456789", + Body: "Hello from Ballerina" + }; + + twilio:Message response = check twilio->createMessage(messageRequest); + io:print("Message Status: ",response?.status); +} diff --git a/examples/messages/send_whatsapp_message.bal b/examples/messages/send_whatsapp_message.bal new file mode 100644 index 00000000..3ad26972 --- /dev/null +++ b/examples/messages/send_whatsapp_message.bal @@ -0,0 +1,43 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/io; +import ballerina/os; +import ballerinax/twilio; + +configurable string accountSID = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); + +// Twilio configurations +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +// This sample demonstrates a scenario where Twilio connector is used to send a whatsapp message to a number. +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + + twilio:CreateMessageRequest messageRequest = { + To: "whatsapp:+00123456789", + From: "whatsapp:+00123456789", + Body: "Hello from Ballerina" + }; + + twilio:Message response = check twilio->createMessage(messageRequest); + io:print("Whatsapp Message Status: ",response?.status); +} diff --git a/examples/queues/create_queue.bal b/examples/queues/create_queue.bal new file mode 100644 index 00000000..c2c06422 --- /dev/null +++ b/examples/queues/create_queue.bal @@ -0,0 +1,40 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/io; +import ballerina/os; +import ballerinax/twilio; + +configurable string accountSID = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); + +// Twilio configurations +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +// This sample demonstrates a scenario where Twilio connector is used to create a queue +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + twilio:CreateQueueRequest queueRequest = { + FriendlyName: "Sample Queue" + }; + + twilio:Queue response = check twilio->createQueue(queueRequest); + io:print("Created ", response?.date_created); +} diff --git a/examples/queues/delete_queue.bal b/examples/queues/delete_queue.bal new file mode 100644 index 00000000..e72818da --- /dev/null +++ b/examples/queues/delete_queue.bal @@ -0,0 +1,45 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/http; +import ballerina/io; +import ballerina/os; +import ballerinax/twilio; + +configurable string accountSID = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); + +// Twilio configurations +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +// This sample demonstrates a scenario where Twilio connector is used to fetch a queue. +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + + // QueueSID: An identifier of 34 digits in length that uniquely identifies a queue + string QueueSID = "QUe770a247b1e6168d6acef1078c3c4828"; + http:Response? response = check twilio->deleteQueue(QueueSID); + + if response is http:Response { + io:println("Queue Deleted."); + } else { + io:println("Error! deleting the queue log failed."); + } +} diff --git a/examples/queues/fetch_queue.bal b/examples/queues/fetch_queue.bal new file mode 100644 index 00000000..8b3d8078 --- /dev/null +++ b/examples/queues/fetch_queue.bal @@ -0,0 +1,40 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/io; +import ballerina/os; +import ballerinax/twilio; + +configurable string accountSID = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); + +// Twilio configurations +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +// This sample demonstrates a scenario where Twilio connector is used to fetch a queue. +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + + // QueueSID: An identifier of 34 digits in length that uniquely identifies a queue + string QueueSID = "QUe770a247b1e6168d6acef1078c3c4828"; + + twilio:Queue queue = check twilio->fetchQueue(QueueSID); + io:println("Queue details: ", queue.toString()); +} diff --git a/examples/queues/list_queues.bal b/examples/queues/list_queues.bal new file mode 100644 index 00000000..430c09dd --- /dev/null +++ b/examples/queues/list_queues.bal @@ -0,0 +1,42 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/io; +import ballerina/os; +import ballerinax/twilio; + +configurable string accountSID = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); + +// Twilio configurations +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +// This sample demonstrates a scenario where Twilio connector is used to list all queues. +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + twilio:ListQueueResponse response = check twilio->listQueue(); + + twilio:Queue[]? queues = response.queues; + if queues is twilio:Queue[] { + queues.forEach(function(twilio:Queue queue) { + io:println("Queue details: " + queue.toString()); + }); + } +} diff --git a/examples/queues/update_queue.bal b/examples/queues/update_queue.bal new file mode 100644 index 00000000..4bfbca56 --- /dev/null +++ b/examples/queues/update_queue.bal @@ -0,0 +1,44 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/io; +import ballerina/os; +import ballerinax/twilio; + +configurable string accountSID = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); + +// Twilio configurations +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +// This sample demonstrates a scenario where Twilio connector is used to update a queue +public function main() returns error? { + twilio:Client twilio = check new (twilioConfig); + + // QueueSID: An identifier of 34 digits in length that uniquely identifies a queue + string QueueSID = "QUe770a247b1e6168d6acef1078c3c4828"; + twilio:UpdateQueueRequest queueRequest = { + FriendlyName: "Sample Queue", + MaxSize: 2000 + }; + + twilio:Queue response = check twilio->updateQueue(QueueSID, queueRequest); + io:println(response?.friendly_name, response?.max_size); +} diff --git a/examples/scenario/README.md b/examples/scenario/README.md new file mode 100644 index 00000000..35d3ab67 --- /dev/null +++ b/examples/scenario/README.md @@ -0,0 +1,21 @@ +# Account Verification Process + +This Ballerina code demonstrates an account verification process that involves both SMS and call verification using Twilio. + +## Prerequisites +1. Make sure you have a Twilio account with a valid account SID and authentication token. +2. Set up a Twilio phone number and note down its value. +3. Configure environment variables `accountSID`, `authToken`, and `twilioPhoneNumber` with your Twilio account details. + +## Code Explanation +- `generateVerificationCode()`: Generates a random 6-digit verification code. +- `sendSMSVerification()`: Sends an SMS with the verification code to the recipient's phone number. +- `makeCallVerification()`: Initiates a call with a verification code URL. + +## Usage +1. Set the recipient's phone number, your Twilio phone number, and the relevant Twilio environment variables in the Ballerina code. +2. Execute the code to generate a verification code, send an SMS, and make a call for verification. + +For the SMS verification, the recipient will receive a message with the verification code. For call verification, the recipient will receive a call with instructions to verify using the code provided. + +Enjoy using this Ballerinax/Twilio code for account verification! diff --git a/examples/scenario/account_verify.bal b/examples/scenario/account_verify.bal new file mode 100644 index 00000000..9a4833aa --- /dev/null +++ b/examples/scenario/account_verify.bal @@ -0,0 +1,78 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import ballerina/io; +import ballerina/os; +import ballerina/random; +import ballerinax/twilio; + +// Configurations +configurable string accountSID = os:getEnv("ACCOUNT_SID"); +configurable string authToken = os:getEnv("AUTH_TOKEN"); +configurable string twilioPhoneNumber = os:getEnv("PHONE_NUMBER"); + +// Twilio configurations +twilio:ConnectionConfig twilioConfig = { + auth: { + username: accountSID, + password: authToken + } +}; + +public function main() returns error? { + // User Phone Number + string phoneNumber = "+xxxxxxxxxxx"; + // Initialize Twilio Client + twilio:Client twilio = check new (twilioConfig); + // Generate a random verification code + string|error verificationCode = generateVerificationCode(); + if verificationCode is string { + check sendSMSVerification(twilio, phoneNumber, verificationCode); + check makeCallVerification(twilio, phoneNumber, verificationCode); + } +} + +# Generates a random 6 digit verification code +function generateVerificationCode() returns string|error { + int min = 100000; + int max = 999999; + int|error code = random:createIntInRange(min, max); + if code is error { + return code; + } + return code.toString(); +} + +# Sends an SMS verification +function sendSMSVerification(twilio:Client twilio, string phoneNumber, string verificationCode) returns error? { + twilio:CreateMessageRequest messageRequest = { + To: phoneNumber, + From: twilioPhoneNumber, + Body: "Your verification code is: " + verificationCode + }; + twilio:Message response = check twilio->createMessage(messageRequest); + io:println("SMS verification sent with status: ", response?.status); +} + +# Makes a call verification +function makeCallVerification(twilio:Client twilio, string phoneNumber, string verificationCode) returns error? { + twilio:CreateCallRequest callRequest = { + To: phoneNumber, + From: twilioPhoneNumber, + Url: "http://yourserver.com/verify-call.xml?code=" + verificationCode + }; + twilio:Call response = check twilio->createCall(callRequest); + io:println("Call verification initiated with status: ", response?.status); +} diff --git a/examples/sendSMS.bal b/examples/sendSMS.bal deleted file mode 100644 index 00c7b7ee..00000000 --- a/examples/sendSMS.bal +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerina/log; -import ballerinax/twilio; - -configurable string fromMobile = ?; -configurable string toMobile = ?; -configurable string accountSId = ?; -configurable string authToken = ?; -configurable string message = "Wso2-Test-SMS-Message"; - -public function main() returns error? { - //Twilio Client configuration - twilio:ConnectionConfig twilioConfig = { - twilioAuth: { - accountSId: accountSId, - authToken: authToken - } - }; - - //Twilio Client - twilio:Client twilioClient = check new (twilioConfig); - - //Send SMS remote function is called by the twilio client - twilio:SmsResponse response = check twilioClient->sendSms(fromMobile, toMobile, message); - log:printInfo("SMS_SID: " + response.sid.toString() + ", Body: " + response.body.toString()); -} diff --git a/examples/sendWhatsappMessage.bal b/examples/sendWhatsappMessage.bal deleted file mode 100644 index c1161a14..00000000 --- a/examples/sendWhatsappMessage.bal +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerina/log; -import ballerinax/twilio; - -configurable string accountSId = ?; -configurable string authToken = ?; -configurable string fromMobile = ?; -configurable string toMobile = ?; - -public function main() returns error? { - //Twilio Client configuration - twilio:ConnectionConfig twilioConfig = { - twilioAuth: { - accountSId: accountSId, - authToken: authToken - } - }; - - //Twilio Client - twilio:Client twilioClient = check new (twilioConfig); - - //Send whatsapp remote function is called by the twilio client - twilio:WhatsAppResponse response = check twilioClient->sendWhatsAppMessage(fromNo = fromMobile, toNo = toMobile, - message = "Test Whatsapp"); - log:printInfo("Message Detail: " + response.toString()); -} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 00000000..63393024 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,12 @@ +org.gradle.caching=true +group=io.ballerina.stdlib +version=4.0.0-SNAPSHOT + +checkstylePluginVersion=10.12.0 +spotbugsPluginVersion=5.0.14 +shadowJarPluginVersion=8.1.1 +downloadPluginVersion=5.4.0 +releasePluginVersion=2.8.0 +testngVersion=7.6.1 +eclipseLsp4jVersion=0.12.0 +ballerinaGradlePluginVersion=2.1.6 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..7f93135c Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..9f4197d5 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 00000000..1aa94a42 --- /dev/null +++ b/gradlew @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 00000000..6689b85b --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 00000000..a9377f99 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,46 @@ +/* + * This file was generated by the Gradle 'init' task. + * + * The settings file is used to specify which projects to include in your build. + * For more detailed information on multi-project builds, please refer to https://docs.gradle.org/8.3/userguide/building_swift_projects.html in the Gradle documentation. + */ + +pluginManagement { + plugins { + id "com.github.spotbugs-base" version "${spotbugsPluginVersion}" + id "com.github.johnrengelman.shadow" version "${shadowJarPluginVersion}" + id "de.undercouch.download" version "${downloadPluginVersion}" + id "net.researchgate.release" version "${releasePluginVersion}" + id "io.ballerina.plugin" version "${ballerinaGradlePluginVersion}" + } + + repositories { + gradlePluginPortal() + maven { + url = 'https://maven.pkg.github.com/ballerina-platform/*' + credentials { + username System.getenv("packageUser") + password System.getenv("packagePAT") + } + } + } +} + +plugins { + id "com.gradle.enterprise" version "3.2" +} + +rootProject.name = 'module-ballerinax-twilio' + +include ':twilio-ballerina' +include ':twilio-examples' + +project(':twilio-ballerina').projectDir = file("ballerina") +project(':twilio-examples').projectDir = file("examples") + +gradleEnterprise { + buildScan { + termsOfServiceUrl = 'https://gradle.com/terms-of-service' + termsOfServiceAgree = 'yes' + } +}