curl --request PATCH \
--url https://api.useanima.sh/v1/phone/numbers/{phoneIdentityId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"voiceId": "<string>"
}
'import requests
url = "https://api.useanima.sh/v1/phone/numbers/{phoneIdentityId}"
payload = { "voiceId": "<string>" }
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({voiceId: '<string>'})
};
fetch('https://api.useanima.sh/v1/phone/numbers/{phoneIdentityId}', 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.useanima.sh/v1/phone/numbers/{phoneIdentityId}",
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([
'voiceId' => '<string>'
]),
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.useanima.sh/v1/phone/numbers/{phoneIdentityId}"
payload := strings.NewReader("{\n \"voiceId\": \"<string>\"\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.useanima.sh/v1/phone/numbers/{phoneIdentityId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"voiceId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useanima.sh/v1/phone/numbers/{phoneIdentityId}")
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 \"voiceId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"phoneNumber": "<string>",
"providerId": "<string>",
"capabilities": {
"sms": false,
"mms": false,
"voice": false
},
"tenDlcStatus": "PENDING",
"isPrimary": true,
"voiceId": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}Patch phonenumbers
curl --request PATCH \
--url https://api.useanima.sh/v1/phone/numbers/{phoneIdentityId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"voiceId": "<string>"
}
'import requests
url = "https://api.useanima.sh/v1/phone/numbers/{phoneIdentityId}"
payload = { "voiceId": "<string>" }
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({voiceId: '<string>'})
};
fetch('https://api.useanima.sh/v1/phone/numbers/{phoneIdentityId}', 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.useanima.sh/v1/phone/numbers/{phoneIdentityId}",
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([
'voiceId' => '<string>'
]),
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.useanima.sh/v1/phone/numbers/{phoneIdentityId}"
payload := strings.NewReader("{\n \"voiceId\": \"<string>\"\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.useanima.sh/v1/phone/numbers/{phoneIdentityId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"voiceId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useanima.sh/v1/phone/numbers/{phoneIdentityId}")
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 \"voiceId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"phoneNumber": "<string>",
"providerId": "<string>",
"capabilities": {
"sms": false,
"mms": false,
"voice": false
},
"tenDlcStatus": "PENDING",
"isPrimary": true,
"voiceId": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}Authorizations
JWT Bearer token obtained from authentication. Pass as: Authorization: Bearer
Path Parameters
The number to update
Body
Update one phone number's settings
Voice id from the catalog, or null to fall back to the agent's voice. Rejected if the id is not in the catalog.
Response
OK
Phone identity associated with an agent
Unique identifier of the phone identity
^[cC][^\s-]{8,}$Phone number in E.164 format
Opaque carrier-side identifier for this phone number
Communication capabilities supported by this phone number
Show child attributes
Show child attributes
10DLC campaign registration status
PENDING, REGISTERED, REJECTED, NOT_REQUIRED, UNREGISTERED Whether this is the agent's primary phone identity
The voice this number answers with, from the voice catalog. Null means it uses the agent's voice, and then the system default. Set it per number so one agent's support line and sales line can sound different.
Timestamp when the phone identity was created
