Web calls toggle
curl --request PUT \
--url https://api.nixflex.com/v1/integrations/web-calls/number/{phoneNumber} \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'import requests
url = "https://api.nixflex.com/v1/integrations/web-calls/number/{phoneNumber}"
payload = { "enabled": True }
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://api.nixflex.com/v1/integrations/web-calls/number/{phoneNumber}', 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.nixflex.com/v1/integrations/web-calls/number/{phoneNumber}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"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.nixflex.com/v1/integrations/web-calls/number/{phoneNumber}"
payload := strings.NewReader("{\n \"enabled\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.nixflex.com/v1/integrations/web-calls/number/{phoneNumber}")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nixflex.com/v1/integrations/web-calls/number/{phoneNumber}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_bodyPhone numbers
Web calls toggle
Enable or disable browser (web) calls for one of your numbers.
PUT
/
v1
/
integrations
/
web-calls
/
number
/
{phoneNumber}
Web calls toggle
curl --request PUT \
--url https://api.nixflex.com/v1/integrations/web-calls/number/{phoneNumber} \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'import requests
url = "https://api.nixflex.com/v1/integrations/web-calls/number/{phoneNumber}"
payload = { "enabled": True }
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://api.nixflex.com/v1/integrations/web-calls/number/{phoneNumber}', 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.nixflex.com/v1/integrations/web-calls/number/{phoneNumber}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"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.nixflex.com/v1/integrations/web-calls/number/{phoneNumber}"
payload := strings.NewReader("{\n \"enabled\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.nixflex.com/v1/integrations/web-calls/number/{phoneNumber}")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nixflex.com/v1/integrations/web-calls/number/{phoneNumber}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_bodyWeb calls are off by default. This endpoint flips the per-number flag. See the Web Calls concept for how calls are started and billed.
Path
string
required
The number, E.164 (
+44...). Must belong to your account.Body
boolean
required
true to allow web calls to this number’s agent, false to refuse them.Request
curl -X PUT https://api.nixflex.com/v1/integrations/web-calls/number/+441234567890 \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled": true}'
Response
{ "ok": true, "phone_number": "+441234567890", "web_calls_enabled": true }
GET the same path returns { "phone_number": "...", "web_calls_enabled": true|false }. DELETE forces the flag off. All three are scoped to your key - you can never read or change another account’s numbers.
Enabling web calls bills that number’s calls at $0.09/min (same rate and rule as Live Monitor - either feature on means 0.09, both on is still 0.09).
⌘I