This API only supports a JSON reponse.
To release a number from your account, you need to make a HTTP DELETE request to:
https://<your_api_key>:<your_api_token><subdomain>/v2_beta/Accounts/<your_sid>/IncomingPhoneNumbers/<exophone_sid>
<your_api_key> and <your_api_token> with the API key and token created by you.<your_sid> with your “Account sid”<subdomain> with the region of your account
<your_api_key> , <your_api_token> and <your_sid> are available in the API settings page of your Exotel Dashboard
curl -X DELETE https://<your_api_key>:<your_api_token><subdomain>/v2_beta/Accounts/<your_sid>/IncomingPhoneNumbers/<exophone_sid>
var request = require('request');
var options = {
url: 'https://<your_api_key>:<your_api_token><subdomain>/v2_beta/Accounts/<your_sid>/IncomingPhoneNumbers/<exophone_sid>'
};
function callback(error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body);
}
}
request(options, callback);
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array();
$response = Requests::get('https://<your_api_key>:<your_api_token><subdomain>/v2_beta/Accounts/<your_sid>/IncomingPhoneNumbers/<exophone_sid>', $headers);
import requests
requests.delete('https://<your_api_key>:<your_api_token><subdomain>/v2_beta/Accounts/<your_sid>/IncomingPhoneNumbers/<exophone_sid>')
require 'net/http'
require 'uri'
uri = URI.parse("https://<your_api_key>:<your_api_token><subdomain>/v2_beta/Accounts/<your_sid>/IncomingPhoneNumbers/<number_sid>")
response = Net::HTTP.get_response(uri)
# response.code
# response.body
HTTP Response:
{ "Status":202, "Message":"Accepted" }