Set a number's auto-renewal preference
curl --request PATCH \
--url https://api.orbit.devotel.io/api/v1/numbers/{id}/auto-renew \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"auto_renew": true
}
'import requests
url = "https://api.orbit.devotel.io/api/v1/numbers/{id}/auto-renew"
payload = { "auto_renew": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({auto_renew: true})
};
fetch('https://api.orbit.devotel.io/api/v1/numbers/{id}/auto-renew', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.orbit.devotel.io/api/v1/numbers/{id}/auto-renew",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'auto_renew' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.orbit.devotel.io/api/v1/numbers/{id}/auto-renew"
payload := strings.NewReader("{\n \"auto_renew\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.orbit.devotel.io/api/v1/numbers/{id}/auto-renew")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"auto_renew\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/numbers/{id}/auto-renew")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"auto_renew\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"phone_number": "<string>",
"status": "pending_compliance",
"created_at": "2023-11-07T05:31:56Z",
"tenant_id": "<string>",
"country_code": "<string>",
"capabilities": [
"voice"
],
"type": "local",
"provider": "telnyx",
"provider_order_id": "<string>",
"voice_application_sid": "<string>",
"sms_application_sid": "<string>",
"monthly_cost_cents": 123,
"setup_cost_cents": 123,
"updated_at": "2023-11-07T05:31:56Z"
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docs_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"details": {}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docs_url": "<string>"
}
}Numbers
Set a number's auto-renewal preference
Toggle automatic recurring renewal for a held DID. When enabled the number is re-billed each cycle so it does not lapse at its next billing date; when disabled it is allowed to expire and release at the end of the current term. Org-ownership is enforced; owner/admin/developer only.
PATCH
/
api
/
v1
/
numbers
/
{id}
/
auto-renew
Set a number's auto-renewal preference
curl --request PATCH \
--url https://api.orbit.devotel.io/api/v1/numbers/{id}/auto-renew \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"auto_renew": true
}
'import requests
url = "https://api.orbit.devotel.io/api/v1/numbers/{id}/auto-renew"
payload = { "auto_renew": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({auto_renew: true})
};
fetch('https://api.orbit.devotel.io/api/v1/numbers/{id}/auto-renew', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.orbit.devotel.io/api/v1/numbers/{id}/auto-renew",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'auto_renew' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.orbit.devotel.io/api/v1/numbers/{id}/auto-renew"
payload := strings.NewReader("{\n \"auto_renew\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.orbit.devotel.io/api/v1/numbers/{id}/auto-renew")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"auto_renew\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/numbers/{id}/auto-renew")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"auto_renew\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"phone_number": "<string>",
"status": "pending_compliance",
"created_at": "2023-11-07T05:31:56Z",
"tenant_id": "<string>",
"country_code": "<string>",
"capabilities": [
"voice"
],
"type": "local",
"provider": "telnyx",
"provider_order_id": "<string>",
"voice_application_sid": "<string>",
"sms_application_sid": "<string>",
"monthly_cost_cents": 123,
"setup_cost_cents": 123,
"updated_at": "2023-11-07T05:31:56Z"
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docs_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"details": {}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docs_url": "<string>"
}
}Authorizations
BearerApiKey
Dashboard JWT token from Clerk
Path Parameters
The phone number record id.
Body
application/json
True to re-bill the number each cycle; false to let it lapse at term end.
⌘I