curl --request PATCH \
--url https://api.wavix.com/v1/numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
123,
456
],
"sms_enabled": true,
"destinations": [
{
"destination": "32882",
"priority": 1,
"transport": 5,
"trunk_id": 3107
}
],
"sms_relay_url": "https://your-site.com/sms",
"call_recording_enabled": true,
"transcription_enabled": true,
"transcription_threshold": 30,
"call_status_url": "https://your-site.com/calls"
}
'import requests
url = "https://api.wavix.com/v1/numbers"
payload = {
"ids": [123, 456],
"sms_enabled": True,
"destinations": [
{
"destination": "32882",
"priority": 1,
"transport": 5,
"trunk_id": 3107
}
],
"sms_relay_url": "https://your-site.com/sms",
"call_recording_enabled": True,
"transcription_enabled": True,
"transcription_threshold": 30,
"call_status_url": "https://your-site.com/calls"
}
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({
ids: [123, 456],
sms_enabled: true,
destinations: [{destination: '32882', priority: 1, transport: 5, trunk_id: 3107}],
sms_relay_url: 'https://your-site.com/sms',
call_recording_enabled: true,
transcription_enabled: true,
transcription_threshold: 30,
call_status_url: 'https://your-site.com/calls'
})
};
fetch('https://api.wavix.com/v1/numbers', 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.wavix.com/v1/numbers",
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([
'ids' => [
123,
456
],
'sms_enabled' => true,
'destinations' => [
[
'destination' => '32882',
'priority' => 1,
'transport' => 5,
'trunk_id' => 3107
]
],
'sms_relay_url' => 'https://your-site.com/sms',
'call_recording_enabled' => true,
'transcription_enabled' => true,
'transcription_threshold' => 30,
'call_status_url' => 'https://your-site.com/calls'
]),
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.wavix.com/v1/numbers"
payload := strings.NewReader("{\n \"ids\": [\n 123,\n 456\n ],\n \"sms_enabled\": true,\n \"destinations\": [\n {\n \"destination\": \"32882\",\n \"priority\": 1,\n \"transport\": 5,\n \"trunk_id\": 3107\n }\n ],\n \"sms_relay_url\": \"https://your-site.com/sms\",\n \"call_recording_enabled\": true,\n \"transcription_enabled\": true,\n \"transcription_threshold\": 30,\n \"call_status_url\": \"https://your-site.com/calls\"\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.wavix.com/v1/numbers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n 123,\n 456\n ],\n \"sms_enabled\": true,\n \"destinations\": [\n {\n \"destination\": \"32882\",\n \"priority\": 1,\n \"transport\": 5,\n \"trunk_id\": 3107\n }\n ],\n \"sms_relay_url\": \"https://your-site.com/sms\",\n \"call_recording_enabled\": true,\n \"transcription_enabled\": true,\n \"transcription_threshold\": 30,\n \"call_status_url\": \"https://your-site.com/calls\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wavix.com/v1/numbers")
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 \"ids\": [\n 123,\n 456\n ],\n \"sms_enabled\": true,\n \"destinations\": [\n {\n \"destination\": \"32882\",\n \"priority\": 1,\n \"transport\": 5,\n \"trunk_id\": 3107\n }\n ],\n \"sms_relay_url\": \"https://your-site.com/sms\",\n \"call_recording_enabled\": true,\n \"transcription_enabled\": true,\n \"transcription_threshold\": 30,\n \"call_status_url\": \"https://your-site.com/calls\"\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"id": 123,
"number": "12565378257",
"activation_fee": "0.99",
"monthly_fee": "0.99",
"per_min": "0.01",
"city": "DETROIT, MI",
"country": "United States",
"country_short_name": "US",
"destination": [
{
"id": 1,
"destination": "[did]@sipuri.com",
"priority": 1,
"trunk_id": 23123,
"trunk_label": "My trunk",
"srtp": false
}
],
"channels": 24,
"require_docs": [
"1"
],
"documents": [
{
"id": 423,
"allow_replace": false,
"did_number": "12565378257",
"doc_content_type": "image/png",
"doc_file_name": "Copy of ID.png",
"doc_type_id": 1,
"status": "approved",
"url": "https://api.wavix.com/v1/numbers/24882/papers/1"
}
],
"domestic_cli": true,
"label": "<string>",
"status": "<string>",
"seconds": "<string>",
"added": "2023-04-10T06:42:59.000Z",
"paid_until": "2023-12-07",
"sms_enabled": false,
"sms_relay_url": "https://your-website.com/webhook",
"cnam": true,
"call_recording_enabled": true,
"transcription_enabled": true,
"transcription_threshold": 6,
"state": "<string>",
"free_min": 123,
"unlimited": true,
"call_status_url": "https://example.com"
}
]
}{
"success": false,
"message": "Missing or invalid parameter <param_name>"
}{
"success": false,
"message": "The service is not provisioned for your account."
}{
"success": false,
"message": "Record not found"
}Bulk update phone numbers
Applies the same changes to every listed phone number. Only the provided fields are changed. Destination and SMS callback changes are applied asynchronously and may not be reflected in the response immediately.
curl --request PATCH \
--url https://api.wavix.com/v1/numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
123,
456
],
"sms_enabled": true,
"destinations": [
{
"destination": "32882",
"priority": 1,
"transport": 5,
"trunk_id": 3107
}
],
"sms_relay_url": "https://your-site.com/sms",
"call_recording_enabled": true,
"transcription_enabled": true,
"transcription_threshold": 30,
"call_status_url": "https://your-site.com/calls"
}
'import requests
url = "https://api.wavix.com/v1/numbers"
payload = {
"ids": [123, 456],
"sms_enabled": True,
"destinations": [
{
"destination": "32882",
"priority": 1,
"transport": 5,
"trunk_id": 3107
}
],
"sms_relay_url": "https://your-site.com/sms",
"call_recording_enabled": True,
"transcription_enabled": True,
"transcription_threshold": 30,
"call_status_url": "https://your-site.com/calls"
}
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({
ids: [123, 456],
sms_enabled: true,
destinations: [{destination: '32882', priority: 1, transport: 5, trunk_id: 3107}],
sms_relay_url: 'https://your-site.com/sms',
call_recording_enabled: true,
transcription_enabled: true,
transcription_threshold: 30,
call_status_url: 'https://your-site.com/calls'
})
};
fetch('https://api.wavix.com/v1/numbers', 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.wavix.com/v1/numbers",
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([
'ids' => [
123,
456
],
'sms_enabled' => true,
'destinations' => [
[
'destination' => '32882',
'priority' => 1,
'transport' => 5,
'trunk_id' => 3107
]
],
'sms_relay_url' => 'https://your-site.com/sms',
'call_recording_enabled' => true,
'transcription_enabled' => true,
'transcription_threshold' => 30,
'call_status_url' => 'https://your-site.com/calls'
]),
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.wavix.com/v1/numbers"
payload := strings.NewReader("{\n \"ids\": [\n 123,\n 456\n ],\n \"sms_enabled\": true,\n \"destinations\": [\n {\n \"destination\": \"32882\",\n \"priority\": 1,\n \"transport\": 5,\n \"trunk_id\": 3107\n }\n ],\n \"sms_relay_url\": \"https://your-site.com/sms\",\n \"call_recording_enabled\": true,\n \"transcription_enabled\": true,\n \"transcription_threshold\": 30,\n \"call_status_url\": \"https://your-site.com/calls\"\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.wavix.com/v1/numbers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n 123,\n 456\n ],\n \"sms_enabled\": true,\n \"destinations\": [\n {\n \"destination\": \"32882\",\n \"priority\": 1,\n \"transport\": 5,\n \"trunk_id\": 3107\n }\n ],\n \"sms_relay_url\": \"https://your-site.com/sms\",\n \"call_recording_enabled\": true,\n \"transcription_enabled\": true,\n \"transcription_threshold\": 30,\n \"call_status_url\": \"https://your-site.com/calls\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wavix.com/v1/numbers")
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 \"ids\": [\n 123,\n 456\n ],\n \"sms_enabled\": true,\n \"destinations\": [\n {\n \"destination\": \"32882\",\n \"priority\": 1,\n \"transport\": 5,\n \"trunk_id\": 3107\n }\n ],\n \"sms_relay_url\": \"https://your-site.com/sms\",\n \"call_recording_enabled\": true,\n \"transcription_enabled\": true,\n \"transcription_threshold\": 30,\n \"call_status_url\": \"https://your-site.com/calls\"\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"id": 123,
"number": "12565378257",
"activation_fee": "0.99",
"monthly_fee": "0.99",
"per_min": "0.01",
"city": "DETROIT, MI",
"country": "United States",
"country_short_name": "US",
"destination": [
{
"id": 1,
"destination": "[did]@sipuri.com",
"priority": 1,
"trunk_id": 23123,
"trunk_label": "My trunk",
"srtp": false
}
],
"channels": 24,
"require_docs": [
"1"
],
"documents": [
{
"id": 423,
"allow_replace": false,
"did_number": "12565378257",
"doc_content_type": "image/png",
"doc_file_name": "Copy of ID.png",
"doc_type_id": 1,
"status": "approved",
"url": "https://api.wavix.com/v1/numbers/24882/papers/1"
}
],
"domestic_cli": true,
"label": "<string>",
"status": "<string>",
"seconds": "<string>",
"added": "2023-04-10T06:42:59.000Z",
"paid_until": "2023-12-07",
"sms_enabled": false,
"sms_relay_url": "https://your-website.com/webhook",
"cnam": true,
"call_recording_enabled": true,
"transcription_enabled": true,
"transcription_threshold": 6,
"state": "<string>",
"free_min": 123,
"unlimited": true,
"call_status_url": "https://example.com"
}
]
}{
"success": false,
"message": "Missing or invalid parameter <param_name>"
}{
"success": false,
"message": "The service is not provisioned for your account."
}{
"success": false,
"message": "Record not found"
}Authorizations
Wavix API key. Pass as Authorization: Bearer <api_key>. Keys support per-resource scopes (none / read / write). See Restricted keys and scopes.
Body
A single patch applied to every listed phone number. All mutable fields are optional.
Numbers (by ID) to apply the patch to. The same patch is applied to every listed number.
[123, 456]
Indicates whether SMS is enabled for the phone numbers.
true
Inbound call routing destinations for the phone numbers.
Show child attributes
Show child attributes
Callback URL for inbound messages.
"https://your-site.com/sms"
Indicates whether call recording is enabled.
true
Indicates whether call transcription is enabled.
true
Minimum call duration in seconds before transcription runs.
30
Callback URL for call status updates.
"https://your-site.com/calls"
Response
Returns the updated phone numbers.
The updated phone numbers.
Show child attributes
Show child attributes
Was this page helpful?