Chilkat Online Tools

SQL Server / Twilio Messaging / SMS / Buy a phone number

Back to Collection Items

-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
    DECLARE @hr int
    DECLARE @iTmp0 int
    -- Important: Do not use nvarchar(max).  See the warning about using nvarchar(max).
    DECLARE @sTmp0 nvarchar(4000)
    -- This example assumes the Chilkat API to have been previously unlocked.
    -- See Global Unlock Sample for sample code.

    DECLARE @http int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.Http', @http OUT
    IF @hr <> 0
    BEGIN
        PRINT 'Failed to create ActiveX component'
        RETURN
    END

    DECLARE @success int

    EXEC sp_OASetProperty @http, 'BasicAuth', 1
    EXEC sp_OASetProperty @http, 'Login', '{{TWILIO_ACCOUNT_SID}}'
    EXEC sp_OASetProperty @http, 'Password', '{{TWILIO_AUTH_TOKEN}}'

    DECLARE @req int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.HttpRequest', @req OUT

    EXEC sp_OAMethod @req, 'AddParam', NULL, 'PhoneNumber', '+12513060906'

    DECLARE @resp int
    EXEC sp_OAMethod @http, 'PostUrlEncoded', @resp OUT, 'https://api.twilio.com/2010-04-01/Accounts/:AccountSid/IncomingPhoneNumbers.json', @req
    EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
    IF @iTmp0 = 0
      BEGIN
        EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @req
        RETURN
      END

    DECLARE @sbResponseBody int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.StringBuilder', @sbResponseBody OUT

    EXEC sp_OAMethod @resp, 'GetBodySb', @success OUT, @sbResponseBody

    DECLARE @jResp int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.JsonObject', @jResp OUT

    EXEC sp_OAMethod @jResp, 'LoadSb', @success OUT, @sbResponseBody
    EXEC sp_OASetProperty @jResp, 'EmitCompact', 0


    PRINT 'Response Body:'
    EXEC sp_OAMethod @jResp, 'Emit', @sTmp0 OUT
    PRINT @sTmp0

    DECLARE @respStatusCode int
    EXEC sp_OAGetProperty @resp, 'StatusCode', @respStatusCode OUT

    PRINT 'Response Status Code = ' + @respStatusCode
    IF @respStatusCode >= 400
      BEGIN

        PRINT 'Response Header:'
        EXEC sp_OAGetProperty @resp, 'Header', @sTmp0 OUT
        PRINT @sTmp0

        PRINT 'Failed.'
        EXEC @hr = sp_OADestroy @resp

        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @req
        EXEC @hr = sp_OADestroy @sbResponseBody
        EXEC @hr = sp_OADestroy @jResp
        RETURN
      END
    EXEC @hr = sp_OADestroy @resp

    -- Sample JSON response:
    -- (Sample code for parsing the JSON response is shown below)

    -- {
    --   "account_sid": "ACB6",
    --   "address_requirements": "foreign",
    --   "address_sid": "ADeA",
    --   "api_version": "reprehenderit laborum Excepteur",
    --   "beta": false,
    --   "bundle_sid": "BUB2",
    --   "capabilities": {},
    --   "date_created": "incididunt ad",
    --   "date_updated": "consequat nostrud non Excepteur",
    --   "emergency_address_sid": "ADAd",
    --   "emergency_status": "Inactive",
    --   "friendly_name": "Excepteur qui aute occaecat",
    --   "identity_sid": "RI4F",
    --   "origin": "ex sit non",
    --   "phone_number": "incididunt",
    --   "sid": "PNFd",
    --   "sms_application_sid": "APD1",
    --   "sms_fallback_method": "put",
    --   "sms_fallback_url": "https://sqnVhokvKfX.ggVS",
    --   "sms_method": "delete",
    --   "sms_url": "http://KvTTK.eixDOBAKnXDodC",
    --   "status": "Duis est",
    --   "status_callback": "https://lukPySBKCSJZRDfZeLGCQEJiiZlrSGtT.slbsog2f2Byb3SNOpnvFCnKiEUbexVWC5tK9Qaj0IFkIVhVKN+mNB826euAwsZOYNBGrdhphsN",
    --   "status_callback_method": "HEAD",
    --   "trunk_sid": "TK29",
    --   "uri": "http://efvlxkNPQlPFtoHjtYEM.qceW6gOSsyL5X8uZPGhiRrpPWucrUmJlQexyf4Dl9T7ahcoPDgC3k2TRG",
    --   "voice_application_sid": "AP5b",
    --   "voice_caller_id_lookup": true,
    --   "voice_fallback_method": "head",
    --   "voice_fallback_url": "https://YYJSXXIemHJDgyPulvPuSDhUfIJ.ofhsUNmlqzZSTo7nnhXYYLQgunn2ScfFWt4qoJ,M2zYA,",
    --   "voice_method": "PATCH",
    --   "voice_receive_mode": "voice",
    --   "voice_url": "https://lNOljQzheebolftPuuCa.qjzdVdF,m6lXjsq+rV4sijQkntubbHInkrQaJO2zBraF0"
    -- }

    -- Sample code for parsing the JSON response...
    -- Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

    DECLARE @date_created int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.DtObj', @date_created OUT

    DECLARE @date_updated int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.DtObj', @date_updated OUT

    DECLARE @account_sid nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @account_sid OUT, 'account_sid'
    DECLARE @address_requirements nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @address_requirements OUT, 'address_requirements'
    DECLARE @address_sid nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @address_sid OUT, 'address_sid'
    DECLARE @api_version nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @api_version OUT, 'api_version'
    DECLARE @beta int
    EXEC sp_OAMethod @jResp, 'BoolOf', @beta OUT, 'beta'
    DECLARE @bundle_sid nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @bundle_sid OUT, 'bundle_sid'
    EXEC sp_OAMethod @jResp, 'DtOf', @success OUT, 'date_created', 0, @date_created
    EXEC sp_OAMethod @jResp, 'DtOf', @success OUT, 'date_updated', 0, @date_updated
    DECLARE @emergency_address_sid nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @emergency_address_sid OUT, 'emergency_address_sid'
    DECLARE @emergency_status nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @emergency_status OUT, 'emergency_status'
    DECLARE @friendly_name nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @friendly_name OUT, 'friendly_name'
    DECLARE @identity_sid nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @identity_sid OUT, 'identity_sid'
    DECLARE @origin nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @origin OUT, 'origin'
    DECLARE @phone_number nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @phone_number OUT, 'phone_number'
    DECLARE @sid nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @sid OUT, 'sid'
    DECLARE @sms_application_sid nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @sms_application_sid OUT, 'sms_application_sid'
    DECLARE @sms_fallback_method nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @sms_fallback_method OUT, 'sms_fallback_method'
    DECLARE @sms_fallback_url nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @sms_fallback_url OUT, 'sms_fallback_url'
    DECLARE @sms_method nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @sms_method OUT, 'sms_method'
    DECLARE @sms_url nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @sms_url OUT, 'sms_url'
    DECLARE @status nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @status OUT, 'status'
    DECLARE @status_callback nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @status_callback OUT, 'status_callback'
    DECLARE @status_callback_method nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @status_callback_method OUT, 'status_callback_method'
    DECLARE @trunk_sid nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @trunk_sid OUT, 'trunk_sid'
    DECLARE @uri nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @uri OUT, 'uri'
    DECLARE @voice_application_sid nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @voice_application_sid OUT, 'voice_application_sid'
    DECLARE @voice_caller_id_lookup int
    EXEC sp_OAMethod @jResp, 'BoolOf', @voice_caller_id_lookup OUT, 'voice_caller_id_lookup'
    DECLARE @voice_fallback_method nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @voice_fallback_method OUT, 'voice_fallback_method'
    DECLARE @voice_fallback_url nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @voice_fallback_url OUT, 'voice_fallback_url'
    DECLARE @voice_method nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @voice_method OUT, 'voice_method'
    DECLARE @voice_receive_mode nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @voice_receive_mode OUT, 'voice_receive_mode'
    DECLARE @voice_url nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @voice_url OUT, 'voice_url'

    EXEC @hr = sp_OADestroy @http
    EXEC @hr = sp_OADestroy @req
    EXEC @hr = sp_OADestroy @sbResponseBody
    EXEC @hr = sp_OADestroy @jResp
    EXEC @hr = sp_OADestroy @date_created
    EXEC @hr = sp_OADestroy @date_updated


END
GO

Curl Command

curl -X POST
	-u '{{TWILIO_ACCOUNT_SID}}:{{TWILIO_AUTH_TOKEN}}'
	-H "Content-Type: application/x-www-form-urlencoded"
	--data-urlencode 'PhoneNumber=+12513060906'
https://api.twilio.com/2010-04-01/Accounts/:AccountSid/IncomingPhoneNumbers.json

Postman Collection Item JSON

{
  "name": "Buy a phone number",
  "event": [
    {
      "listen": "test",
      "script": {
        "exec": [
          "var jsonData = JSON.parse(responseBody);",
          "postman.setEnvironmentVariable('TWILIO_PHONE_NUMBER', jsonData.phone_number);"
        ],
        "type": "text/javascript"
      }
    }
  ],
  "request": {
    "auth": {
      "type": "basic",
      "basic": [
        {
          "key": "password",
          "value": "{{TWILIO_AUTH_TOKEN}}",
          "type": "string"
        },
        {
          "key": "username",
          "value": "{{TWILIO_ACCOUNT_SID}}",
          "type": "string"
        }
      ]
    },
    "method": "POST",
    "header": [
      {
        "key": "Content-Type",
        "value": "application/x-www-form-urlencoded"
      }
    ],
    "body": {
      "mode": "urlencoded",
      "urlencoded": [
        {
          "key": "PhoneNumber",
          "value": "+12513060906",
          "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."
        },
        {
          "key": "AddressSid",
          "value": "<string>",
          "description": "The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations.",
          "disabled": true
        },
        {
          "key": "ApiVersion",
          "value": "<string>",
          "description": "The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`.",
          "disabled": true
        },
        {
          "key": "AreaCode",
          "value": "<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).",
          "disabled": true
        },
        {
          "key": "BundleSid",
          "value": "<string>",
          "description": "The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.",
          "disabled": true
        },
        {
          "key": "EmergencyAddressSid",
          "value": "<string>",
          "description": "The SID of the emergency address configuration to use for emergency calling from the new phone number.",
          "disabled": true
        },
        {
          "key": "EmergencyStatus",
          "value": "<string>",
          "description": "The configuration status parameter that determines whether the new phone number is enabled for emergency calling. (This can only be one of Active,Inactive)",
          "disabled": true
        },
        {
          "key": "FriendlyName",
          "value": "<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.",
          "disabled": true
        },
        {
          "key": "IdentitySid",
          "value": "<string>",
          "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.",
          "disabled": true
        },
        {
          "key": "SmsApplicationSid",
          "value": "<string>",
          "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.",
          "disabled": true
        },
        {
          "key": "SmsFallbackMethod",
          "value": "<string>",
          "description": "The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. (This can only be one of head,get,post,patch,put,delete,HEAD,GET,POST,PATCH,PUT,DELETE)",
          "disabled": true
        },
        {
          "key": "SmsFallbackUrl",
          "value": "<uri>",
          "description": "The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.",
          "disabled": true
        },
        {
          "key": "SmsMethod",
          "value": "<string>",
          "description": "The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. (This can only be one of head,get,post,patch,put,delete,HEAD,GET,POST,PATCH,PUT,DELETE)",
          "disabled": true
        },
        {
          "key": "SmsUrl",
          "value": "<uri>",
          "description": "The URL we should call when the new phone number receives an incoming SMS message.",
          "disabled": true
        },
        {
          "key": "StatusCallback",
          "value": "<uri>",
          "description": "The URL we should call using the `status_callback_method` to send status information to your application.",
          "disabled": true
        },
        {
          "key": "StatusCallbackMethod",
          "value": "<string>",
          "description": "The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. (This can only be one of head,get,post,patch,put,delete,HEAD,GET,POST,PATCH,PUT,DELETE)",
          "disabled": true
        },
        {
          "key": "TrunkSid",
          "value": "<string>",
          "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.",
          "disabled": true
        },
        {
          "key": "VoiceApplicationSid",
          "value": "<string>",
          "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.",
          "disabled": true
        },
        {
          "key": "VoiceCallerIdLookup",
          "value": "<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`.",
          "disabled": true
        },
        {
          "key": "VoiceFallbackMethod",
          "value": "<string>",
          "description": "The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. (This can only be one of head,get,post,patch,put,delete,HEAD,GET,POST,PATCH,PUT,DELETE)",
          "disabled": true
        },
        {
          "key": "VoiceFallbackUrl",
          "value": "<uri>",
          "description": "The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.",
          "disabled": true
        },
        {
          "key": "VoiceMethod",
          "value": "<string>",
          "description": "The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. (This can only be one of head,get,post,patch,put,delete,HEAD,GET,POST,PATCH,PUT,DELETE)",
          "disabled": true
        },
        {
          "key": "VoiceReceiveMode",
          "value": "<string>",
          "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`. (This can only be one of voice,fax)",
          "disabled": true
        },
        {
          "key": "VoiceUrl",
          "value": "<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.",
          "disabled": true
        }
      ]
    },
    "url": {
      "raw": "{{2010-04-01-Accounts-AccountSid-IncomingPhoneNumbers.json-Url}}/2010-04-01/Accounts/:AccountSid/IncomingPhoneNumbers.json",
      "host": [
        "{{2010-04-01-Accounts-AccountSid-IncomingPhoneNumbers.json-Url}}"
      ],
      "path": [
        "2010-04-01",
        "Accounts",
        ":AccountSid",
        "IncomingPhoneNumbers.json"
      ],
      "variable": [
        {
          "key": "AccountSid",
          "value": "{{TWILIO_ACCOUNT_SID}}",
          "description": "(Required) The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource."
        }
      ]
    },
    "description": "Purchase a phone-number for your Twilio account. Afterwards you can use this number to send or receive SMS and calls.\n\nRead more about it in the [Twilio Docs](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource#create-an-incomingphonenumber-resource)"
  },
  "response": [
    {
      "name": "Created",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: basic",
            "key": "Authorization",
            "value": "Basic <credentials>"
          }
        ],
        "body": {
          "mode": "urlencoded",
          "urlencoded": [
            {
              "key": "AddressSid",
              "value": "<string>",
              "description": "The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations."
            },
            {
              "key": "ApiVersion",
              "value": "<string>",
              "description": "The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`."
            },
            {
              "key": "AreaCode",
              "value": "<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)."
            },
            {
              "key": "BundleSid",
              "value": "<string>",
              "description": "The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations."
            },
            {
              "key": "EmergencyAddressSid",
              "value": "<string>",
              "description": "The SID of the emergency address configuration to use for emergency calling from the new phone number."
            },
            {
              "key": "EmergencyStatus",
              "value": "<string>",
              "description": "The configuration status parameter that determines whether the new phone number is enabled for emergency calling. (This can only be one of Active,Inactive)"
            },
            {
              "key": "FriendlyName",
              "value": "<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."
            },
            {
              "key": "IdentitySid",
              "value": "<string>",
              "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."
            },
            {
              "key": "PhoneNumber",
              "value": "<string>",
              "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."
            },
            {
              "key": "SmsApplicationSid",
              "value": "<string>",
              "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."
            },
            {
              "key": "SmsFallbackMethod",
              "value": "<string>",
              "description": "The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. (This can only be one of head,get,post,patch,put,delete,HEAD,GET,POST,PATCH,PUT,DELETE)"
            },
            {
              "key": "SmsFallbackUrl",
              "value": "<uri>",
              "description": "The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`."
            },
            {
              "key": "SmsMethod",
              "value": "<string>",
              "description": "The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. (This can only be one of head,get,post,patch,put,delete,HEAD,GET,POST,PATCH,PUT,DELETE)"
            },
            {
              "key": "SmsUrl",
              "value": "<uri>",
              "description": "The URL we should call when the new phone number receives an incoming SMS message."
            },
            {
              "key": "StatusCallback",
              "value": "<uri>",
              "description": "The URL we should call using the `status_callback_method` to send status information to your application."
            },
            {
              "key": "StatusCallbackMethod",
              "value": "<string>",
              "description": "The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. (This can only be one of head,get,post,patch,put,delete,HEAD,GET,POST,PATCH,PUT,DELETE)"
            },
            {
              "key": "TrunkSid",
              "value": "<string>",
              "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."
            },
            {
              "key": "VoiceApplicationSid",
              "value": "<string>",
              "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."
            },
            {
              "key": "VoiceCallerIdLookup",
              "value": "<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`."
            },
            {
              "key": "VoiceFallbackMethod",
              "value": "<string>",
              "description": "The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. (This can only be one of head,get,post,patch,put,delete,HEAD,GET,POST,PATCH,PUT,DELETE)"
            },
            {
              "key": "VoiceFallbackUrl",
              "value": "<uri>",
              "description": "The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`."
            },
            {
              "key": "VoiceMethod",
              "value": "<string>",
              "description": "The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. (This can only be one of head,get,post,patch,put,delete,HEAD,GET,POST,PATCH,PUT,DELETE)"
            },
            {
              "key": "VoiceReceiveMode",
              "value": "<string>",
              "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`. (This can only be one of voice,fax)"
            },
            {
              "key": "VoiceUrl",
              "value": "<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."
            }
          ]
        },
        "url": {
          "raw": "{{2010-04-01-Accounts-AccountSid-IncomingPhoneNumbers.json-Url}}/2010-04-01/Accounts/:AccountSid/IncomingPhoneNumbers.json",
          "host": [
            "{{2010-04-01-Accounts-AccountSid-IncomingPhoneNumbers.json-Url}}"
          ],
          "path": [
            "2010-04-01",
            "Accounts",
            ":AccountSid",
            "IncomingPhoneNumbers.json"
          ],
          "variable": [
            {
              "key": "AccountSid"
            }
          ]
        }
      },
      "status": "Created",
      "code": 201,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"account_sid\": \"ACB6\",\n \"address_requirements\": \"foreign\",\n \"address_sid\": \"ADeA\",\n \"api_version\": \"reprehenderit laborum Excepteur\",\n \"beta\": false,\n \"bundle_sid\": \"BUB2\",\n \"capabilities\": {},\n \"date_created\": \"incididunt ad\",\n \"date_updated\": \"consequat nostrud non Excepteur\",\n \"emergency_address_sid\": \"ADAd\",\n \"emergency_status\": \"Inactive\",\n \"friendly_name\": \"Excepteur qui aute occaecat\",\n \"identity_sid\": \"RI4F\",\n \"origin\": \"ex sit non\",\n \"phone_number\": \"incididunt\",\n \"sid\": \"PNFd\",\n \"sms_application_sid\": \"APD1\",\n \"sms_fallback_method\": \"put\",\n \"sms_fallback_url\": \"https://sqnVhokvKfX.ggVS\",\n \"sms_method\": \"delete\",\n \"sms_url\": \"http://KvTTK.eixDOBAKnXDodC\",\n \"status\": \"Duis est\",\n \"status_callback\": \"https://lukPySBKCSJZRDfZeLGCQEJiiZlrSGtT.slbsog2f2Byb3SNOpnvFCnKiEUbexVWC5tK9Qaj0IFkIVhVKN+mNB826euAwsZOYNBGrdhphsN\",\n \"status_callback_method\": \"HEAD\",\n \"trunk_sid\": \"TK29\",\n \"uri\": \"http://efvlxkNPQlPFtoHjtYEM.qceW6gOSsyL5X8uZPGhiRrpPWucrUmJlQexyf4Dl9T7ahcoPDgC3k2TRG\",\n \"voice_application_sid\": \"AP5b\",\n \"voice_caller_id_lookup\": true,\n \"voice_fallback_method\": \"head\",\n \"voice_fallback_url\": \"https://YYJSXXIemHJDgyPulvPuSDhUfIJ.ofhsUNmlqzZSTo7nnhXYYLQgunn2ScfFWt4qoJ,M2zYA,\",\n \"voice_method\": \"PATCH\",\n \"voice_receive_mode\": \"voice\",\n \"voice_url\": \"https://lNOljQzheebolftPuuCa.qjzdVdF,m6lXjsq+rV4sijQkntubbHInkrQaJO2zBraF0\"\n}"
    }
  ]
}