Skip to main content
PATCH
/
caller-profiles
/
agents
/
{agent_id}
/
{phone}
Update Caller Profile
curl --request PATCH \
  --url https://api.example.com/caller-profiles/agents/{agent_id}/{phone} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "caller_name": "<string>",
  "preferred_language": "<string>",
  "notes": {}
}
'
import requests

url = "https://api.example.com/caller-profiles/agents/{agent_id}/{phone}"

payload = {
"caller_name": "<string>",
"preferred_language": "<string>",
"notes": {}
}
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({caller_name: '<string>', preferred_language: '<string>', notes: {}})
};

fetch('https://api.example.com/caller-profiles/agents/{agent_id}/{phone}', 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.example.com/caller-profiles/agents/{agent_id}/{phone}",
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([
'caller_name' => '<string>',
'preferred_language' => '<string>',
'notes' => [

]
]),
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.example.com/caller-profiles/agents/{agent_id}/{phone}"

payload := strings.NewReader("{\n \"caller_name\": \"<string>\",\n \"preferred_language\": \"<string>\",\n \"notes\": {}\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.example.com/caller-profiles/agents/{agent_id}/{phone}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"caller_name\": \"<string>\",\n \"preferred_language\": \"<string>\",\n \"notes\": {}\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/caller-profiles/agents/{agent_id}/{phone}")

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 \"caller_name\": \"<string>\",\n \"preferred_language\": \"<string>\",\n \"notes\": {}\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "tenant_id": "<string>",
  "agent_id": "<string>",
  "phone_number": "<string>",
  "total_calls": 123,
  "agent_name": "<string>",
  "first_seen_at": "<string>",
  "last_seen_at": "<string>",
  "last_call_id": "<string>",
  "last_call_summary": "<string>",
  "last_call_outcome": "<string>",
  "caller_name": "<string>",
  "preferred_language": "<string>",
  "country_code": "<string>",
  "notes": {}
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agent_id
string<uuid>
required
phone
string
required

Body

application/json
caller_name
string | null
preferred_language
string | null
notes
Notes · object | null

Response

Successful Response

id
string
required
tenant_id
string
required
agent_id
string
required
phone_number
string
required
total_calls
integer
required
agent_name
string | null
first_seen_at
string | null
last_seen_at
string | null
last_call_id
string | null
last_call_summary
string | null
last_call_outcome
string | null
caller_name
string | null
preferred_language
string | null
country_code
string | null
notes
Notes · object