List routing rules
curl --request GET \
--url https://api.zeroruntime.ai/v2/sip/routing-rule \
--header 'Authorization: <api-key>'import requests
url = "https://api.zeroruntime.ai/v2/sip/routing-rule"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.zeroruntime.ai/v2/sip/routing-rule', 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.zeroruntime.ai/v2/sip/routing-rule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zeroruntime.ai/v2/sip/routing-rule"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.zeroruntime.ai/v2/sip/routing-rule")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeroruntime.ai/v2/sip/routing-rule")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"pageInfo": {
"currentPage": 1,
"perPage": 20,
"lastPage": 1,
"total": 2
},
"data": [
{
"id": "rr_8k2m1x",
"type": "inbound",
"numbers": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"phoneNumbers": [
"<string>"
],
"apiKey": "<string>",
"agentId": "<string>",
"agentMetadata": {},
"room": {
"type": "dynamic",
"prefix": "blank"
},
"includeHeaders": "NONE",
"headers": {},
"headersToAttributes": {},
"allowedNumbers": [
"<string>"
],
"allowedIpAddresses": [
"<string>"
],
"tags": [
"<string>"
],
"recording": false,
"dtmf": false,
"noiseCancellation": false,
"hidePhoneNumber": false
}
]
}Routing rules
List routing rules
Lists your routing rules, newest first.
GET
/
v2
/
sip
/
routing-rule
List routing rules
curl --request GET \
--url https://api.zeroruntime.ai/v2/sip/routing-rule \
--header 'Authorization: <api-key>'import requests
url = "https://api.zeroruntime.ai/v2/sip/routing-rule"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.zeroruntime.ai/v2/sip/routing-rule', 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.zeroruntime.ai/v2/sip/routing-rule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zeroruntime.ai/v2/sip/routing-rule"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.zeroruntime.ai/v2/sip/routing-rule")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeroruntime.ai/v2/sip/routing-rule")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"pageInfo": {
"currentPage": 1,
"perPage": 20,
"lastPage": 1,
"total": 2
},
"data": [
{
"id": "rr_8k2m1x",
"type": "inbound",
"numbers": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"phoneNumbers": [
"<string>"
],
"apiKey": "<string>",
"agentId": "<string>",
"agentMetadata": {},
"room": {
"type": "dynamic",
"prefix": "blank"
},
"includeHeaders": "NONE",
"headers": {},
"headersToAttributes": {},
"allowedNumbers": [
"<string>"
],
"allowedIpAddresses": [
"<string>"
],
"tags": [
"<string>"
],
"recording": false,
"dtmf": false,
"noiseCancellation": false,
"hidePhoneNumber": false
}
]
}Authorizations
Your API token, sent raw (no Bearer prefix).
Query Parameters
Case-insensitive match on name or on any attached number.
inbound or outbound. Anything else is ignored.
Available options:
inbound, outbound Comma-separated or repeated, e.g. rr_8k2m1x,rr_3b9d0c.
static, dynamic, or both comma-separated.