curl --request PATCH \
--url https://api.neoagent.io/public-api/phone/numbers/{number} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"after_hours_instructions": "<string>",
"business_hours": {
"override": {
"end_time": "<string>",
"start_time": "<string>",
"work_days": []
}
},
"passive_note_visible_to_customer": true
}
'import requests
url = "https://api.neoagent.io/public-api/phone/numbers/{number}"
payload = {
"after_hours_instructions": "<string>",
"business_hours": { "override": {
"end_time": "<string>",
"start_time": "<string>",
"work_days": []
} },
"passive_note_visible_to_customer": True
}
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({
after_hours_instructions: '<string>',
business_hours: {override: {end_time: '<string>', start_time: '<string>', work_days: []}},
passive_note_visible_to_customer: true
})
};
fetch('https://api.neoagent.io/public-api/phone/numbers/{number}', 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.neoagent.io/public-api/phone/numbers/{number}",
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([
'after_hours_instructions' => '<string>',
'business_hours' => [
'override' => [
'end_time' => '<string>',
'start_time' => '<string>',
'work_days' => [
]
]
],
'passive_note_visible_to_customer' => true
]),
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.neoagent.io/public-api/phone/numbers/{number}"
payload := strings.NewReader("{\n \"after_hours_instructions\": \"<string>\",\n \"business_hours\": {\n \"override\": {\n \"end_time\": \"<string>\",\n \"start_time\": \"<string>\",\n \"work_days\": []\n }\n },\n \"passive_note_visible_to_customer\": true\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.neoagent.io/public-api/phone/numbers/{number}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"after_hours_instructions\": \"<string>\",\n \"business_hours\": {\n \"override\": {\n \"end_time\": \"<string>\",\n \"start_time\": \"<string>\",\n \"work_days\": []\n }\n },\n \"passive_note_visible_to_customer\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neoagent.io/public-api/phone/numbers/{number}")
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 \"after_hours_instructions\": \"<string>\",\n \"business_hours\": {\n \"override\": {\n \"end_time\": \"<string>\",\n \"start_time\": \"<string>\",\n \"work_days\": []\n }\n },\n \"passive_note_visible_to_customer\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"agent_settings": {},
"country": [
"US",
"+1",
null,
null
],
"created_at": "2023-11-07T05:31:56Z",
"id": 123,
"minutes_used_this_month": 123,
"number": "<string>",
"psa_settings": {},
"status": "ACTIVE",
"updated_at": "2023-11-07T05:31:56Z"
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timings_ms": {},
"pagination": {
"has_more": true,
"next_cursor": "<string>"
},
"warnings": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Change a number's after-hours instructions, business hours, passive note visibility and transfer setting
Partial patch of four settings of one number the tenant still holds, given in E.164 (+15550100000; the + may be left out). A field left out keeps its stored value. after_hours_instructions replace the number’s custom instructions on calls that start outside business hours, on a non-work day or on a holiday; null or an empty string turns them off. business_hours.override sets the number’s own work days and one window (HH:MM, in the tenant’s time zone, not past midnight); null returns to the tenant’s business hours from Settings, Monday to Friday. business_hours.holiday_source is COUNTRY (the default: public holidays of the number’s country, England for UK numbers) or NONE. passive_note_visible_to_customer (true or false) decides whether the note a PASSIVE number writes after a call is visible to the customer; it is internal by default. transfer_mode is OFF, BLIND, WARM or BOTH (the custom instructions say which kind each case gets, warm where they do not say); it rewrites only the transfer values in psa_settings.available_tools, and the number to transfer to comes from the custom instructions. WARM and BOTH are rejected with 400 where warm transfer is not available yet, unless the number already has it. Any other field is rejected with 400; change the other settings in the dashboard. Returns the updated number. 404 phone_number_not_found for a number the tenant does not hold.
curl --request PATCH \
--url https://api.neoagent.io/public-api/phone/numbers/{number} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"after_hours_instructions": "<string>",
"business_hours": {
"override": {
"end_time": "<string>",
"start_time": "<string>",
"work_days": []
}
},
"passive_note_visible_to_customer": true
}
'import requests
url = "https://api.neoagent.io/public-api/phone/numbers/{number}"
payload = {
"after_hours_instructions": "<string>",
"business_hours": { "override": {
"end_time": "<string>",
"start_time": "<string>",
"work_days": []
} },
"passive_note_visible_to_customer": True
}
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({
after_hours_instructions: '<string>',
business_hours: {override: {end_time: '<string>', start_time: '<string>', work_days: []}},
passive_note_visible_to_customer: true
})
};
fetch('https://api.neoagent.io/public-api/phone/numbers/{number}', 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.neoagent.io/public-api/phone/numbers/{number}",
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([
'after_hours_instructions' => '<string>',
'business_hours' => [
'override' => [
'end_time' => '<string>',
'start_time' => '<string>',
'work_days' => [
]
]
],
'passive_note_visible_to_customer' => true
]),
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.neoagent.io/public-api/phone/numbers/{number}"
payload := strings.NewReader("{\n \"after_hours_instructions\": \"<string>\",\n \"business_hours\": {\n \"override\": {\n \"end_time\": \"<string>\",\n \"start_time\": \"<string>\",\n \"work_days\": []\n }\n },\n \"passive_note_visible_to_customer\": true\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.neoagent.io/public-api/phone/numbers/{number}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"after_hours_instructions\": \"<string>\",\n \"business_hours\": {\n \"override\": {\n \"end_time\": \"<string>\",\n \"start_time\": \"<string>\",\n \"work_days\": []\n }\n },\n \"passive_note_visible_to_customer\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neoagent.io/public-api/phone/numbers/{number}")
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 \"after_hours_instructions\": \"<string>\",\n \"business_hours\": {\n \"override\": {\n \"end_time\": \"<string>\",\n \"start_time\": \"<string>\",\n \"work_days\": []\n }\n },\n \"passive_note_visible_to_customer\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"agent_settings": {},
"country": [
"US",
"+1",
null,
null
],
"created_at": "2023-11-07T05:31:56Z",
"id": 123,
"minutes_used_this_month": 123,
"number": "<string>",
"psa_settings": {},
"status": "ACTIVE",
"updated_at": "2023-11-07T05:31:56Z"
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timings_ms": {},
"pagination": {
"has_more": true,
"next_cursor": "<string>"
},
"warnings": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Authorizations
Authorization: Bearer <token> where <token> is either a neo_sk_<env>_<secret> API key (service account) or a Microsoft Entra ID access token (dashboard user).
Path Parameters
Body
A change to a number's after-hours instructions, business hours, passive-mode note visibility or transfer setting. A field left out keeps its stored value.
Used in place of the number's custom instructions on calls that start outside business hours or on a holiday. Send null or an empty string to turn them off.
The business hours to change. A field left out keeps its stored value.
Show child attributes
Show child attributes
For a number whose call_mode is PASSIVE: true makes the note with the call's transcript and summary visible to the customer on the ticket, false (the default) keeps it internal. Left out, the stored value stays.
How the agent puts a caller through to a person: OFF (never), BLIND (hands the call over and leaves it), WARM (holds the caller, briefs whoever answers, and connects them only when that person agrees) or BOTH (the custom instructions say which kind each case gets, warm where they do not say). The number to transfer to comes from the custom instructions.
OFF, BLIND, WARM, BOTH Response
Success.
Public projection of a phone_numbers row.
psa_settings and agent_settings are returned as opaque JSON — their
inner shapes (which PSA action to take on missing customer, which voice
profile, which custom prompt) are tenant-curated and not part of the public
contract. Anyone wanting to edit them goes through the dashboard.
agent_settings.attached_memory_ids lists the ids of the MSP-wide memories
attached to the number, which the agent reads on every call, except one
that was deleted or no longer fits the 4,000-character total. A call uses
the newest edit of each, so an id can name an older version.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
