Update the Caller ID (ANI) allowlist
curl --request PATCH \
--url https://api.coval.dev/v1/organization/caller-id \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"allowlist": [
"<string>"
]
}
'import requests
url = "https://api.coval.dev/v1/organization/caller-id"
payload = { "allowlist": ["<string>"] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({allowlist: ['<string>']})
};
fetch('https://api.coval.dev/v1/organization/caller-id', 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.coval.dev/v1/organization/caller-id",
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([
'allowlist' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coval.dev/v1/organization/caller-id"
payload := strings.NewReader("{\n \"allowlist\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.coval.dev/v1/organization/caller-id")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"allowlist\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coval.dev/v1/organization/caller-id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allowlist\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"pool_numbers": [
"<string>"
],
"allowlist": [
"<string>"
]
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request body",
"details": [
{
"field": "conditional_conversation_metrics",
"description": "Provide exactly one of 'metric' or 'metrics'."
}
]
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication failed",
"details": [
{
"field": "x-api-key",
"description": "API key is required in the x-api-key header"
}
]
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request body",
"details": [
{
"field": "default_conversation_metrics",
"description": "Provide at least one of 'default_conversation_metrics' or 'conditional_conversation_metrics'."
}
]
}
}{
"error": {
"code": "PERMISSION_DENIED",
"message": "Insufficient permissions",
"details": [
{
"field": "permissions",
"description": "The API key does not include the required organization permission."
}
]
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Organization not found",
"details": [
{
"description": "Organization not found."
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Internal server error",
"details": [
{
"description": "An unexpected error occurred while processing the organization request"
}
]
}
}Conversations Config
Update the Caller ID (ANI) allowlist
Replaces the additional authorized ANI allowlist (E.164 numbers). Coval pool numbers are always allowed by default. Requires organization:write. Every submitted number must be a Coval pool number or a number Coval support has carrier-verified for this organization (a one-time, support-led step recorded against the org); unverified numbers are rejected with 400 and never reach the dial path.
PATCH
/
organization
/
caller-id
Update the Caller ID (ANI) allowlist
curl --request PATCH \
--url https://api.coval.dev/v1/organization/caller-id \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"allowlist": [
"<string>"
]
}
'import requests
url = "https://api.coval.dev/v1/organization/caller-id"
payload = { "allowlist": ["<string>"] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({allowlist: ['<string>']})
};
fetch('https://api.coval.dev/v1/organization/caller-id', 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.coval.dev/v1/organization/caller-id",
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([
'allowlist' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coval.dev/v1/organization/caller-id"
payload := strings.NewReader("{\n \"allowlist\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.coval.dev/v1/organization/caller-id")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"allowlist\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coval.dev/v1/organization/caller-id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allowlist\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"pool_numbers": [
"<string>"
],
"allowlist": [
"<string>"
]
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request body",
"details": [
{
"field": "conditional_conversation_metrics",
"description": "Provide exactly one of 'metric' or 'metrics'."
}
]
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication failed",
"details": [
{
"field": "x-api-key",
"description": "API key is required in the x-api-key header"
}
]
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request body",
"details": [
{
"field": "default_conversation_metrics",
"description": "Provide at least one of 'default_conversation_metrics' or 'conditional_conversation_metrics'."
}
]
}
}{
"error": {
"code": "PERMISSION_DENIED",
"message": "Insufficient permissions",
"details": [
{
"field": "permissions",
"description": "The API key does not include the required organization permission."
}
]
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Organization not found",
"details": [
{
"description": "Organization not found."
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Internal server error",
"details": [
{
"description": "An unexpected error occurred while processing the organization request"
}
]
}
}Body
application/json
Was this page helpful?