Get AI receptionist configuration
curl --request GET \
--url https://api.withallo.com/v2/api/numbers/{number}/agent \
--header 'Authorization: <api-key>'import requests
url = "https://api.withallo.com/v2/api/numbers/{number}/agent"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.withallo.com/v2/api/numbers/{number}/agent', 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.withallo.com/v2/api/numbers/{number}/agent",
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.withallo.com/v2/api/numbers/{number}/agent"
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.withallo.com/v2/api/numbers/{number}/agent")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/numbers/{number}/agent")
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{
"data": {
"agent": {
"id": "agt-abc123",
"name": "Maya",
"is_default": true,
"business_name": "Acme Plumbing",
"business_address": "12 Main Street, Austin TX",
"business_phone": "+14155551234",
"business_email": "[email protected]",
"business_website": "https://acme.test",
"business_industry": "Plumbing",
"language": "en-US",
"voice_id": "maya",
"greeting_message": "Thanks for calling Acme Plumbing, how can I help?",
"closing_message": "Thanks for calling, have a good day.",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"prompt": {
"sections": [
{
"title": "Objective",
"content": "Book a visit with the caller.",
"fields": [
{
"label": "Email",
"question": "What is the best email to send the quote to?",
"complete_when": "a valid email address is given"
}
]
}
],
"custom_prompt": "<string>"
},
"capabilities": {
"SCHEDULING": true,
"CALL_TRANSFER": true,
"WARM_TRANSFER": true
},
"business_hours": {
"timezone": "America/New_York",
"schedule": [
{
"schedule": [
{
"start_time": 32400,
"end_time": 61200
}
]
}
]
},
"transfer_rules": [
{
"description": "Billing or invoice questions",
"transfer_message": "Let me put you through to billing.",
"target_number": "+14155551234",
"target_member_id": "<string>",
"target_line_number": "<string>"
}
],
"scheduling": {
"calendars": [
{
"calendar_connection_id": "exc-abc123",
"name": "Acme bookings",
"is_team_default": true,
"owner": {
"user_id": "<string>",
"user_name": "<string>",
"email": "<string>",
"is_current_user": true
},
"event_types": [
{
"id": "42",
"slug": "intro-call",
"title": "Intro call",
"length_in_minutes": 30,
"description": "Book this one when the caller wants a quote.",
"required_questions": [
{
"id": "notes",
"label": "Anything we should know before the visit?"
}
]
}
]
}
]
},
"knowledge": {
"text": "<string>",
"websites": [
{
"id": "wkb-abc123",
"url": "https://acme.test/pricing",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"files": [
{
"id": "fkb-abc123",
"file_name": "pricing.pdf",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}Réceptionniste IA
Lire la configuration
Returns the whole configuration of a line’s AI receptionist in one call: business details, voice and language, prompt, capabilities, business hours, transfer rules, connected calendars and knowledge sources. Call this before a write, because PATCH replaces whole collections.
GET
/
v2
/
api
/
numbers
/
{number}
/
agent
Get AI receptionist configuration
curl --request GET \
--url https://api.withallo.com/v2/api/numbers/{number}/agent \
--header 'Authorization: <api-key>'import requests
url = "https://api.withallo.com/v2/api/numbers/{number}/agent"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.withallo.com/v2/api/numbers/{number}/agent', 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.withallo.com/v2/api/numbers/{number}/agent",
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.withallo.com/v2/api/numbers/{number}/agent"
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.withallo.com/v2/api/numbers/{number}/agent")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/numbers/{number}/agent")
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{
"data": {
"agent": {
"id": "agt-abc123",
"name": "Maya",
"is_default": true,
"business_name": "Acme Plumbing",
"business_address": "12 Main Street, Austin TX",
"business_phone": "+14155551234",
"business_email": "[email protected]",
"business_website": "https://acme.test",
"business_industry": "Plumbing",
"language": "en-US",
"voice_id": "maya",
"greeting_message": "Thanks for calling Acme Plumbing, how can I help?",
"closing_message": "Thanks for calling, have a good day.",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"prompt": {
"sections": [
{
"title": "Objective",
"content": "Book a visit with the caller.",
"fields": [
{
"label": "Email",
"question": "What is the best email to send the quote to?",
"complete_when": "a valid email address is given"
}
]
}
],
"custom_prompt": "<string>"
},
"capabilities": {
"SCHEDULING": true,
"CALL_TRANSFER": true,
"WARM_TRANSFER": true
},
"business_hours": {
"timezone": "America/New_York",
"schedule": [
{
"schedule": [
{
"start_time": 32400,
"end_time": 61200
}
]
}
]
},
"transfer_rules": [
{
"description": "Billing or invoice questions",
"transfer_message": "Let me put you through to billing.",
"target_number": "+14155551234",
"target_member_id": "<string>",
"target_line_number": "<string>"
}
],
"scheduling": {
"calendars": [
{
"calendar_connection_id": "exc-abc123",
"name": "Acme bookings",
"is_team_default": true,
"owner": {
"user_id": "<string>",
"user_name": "<string>",
"email": "<string>",
"is_current_user": true
},
"event_types": [
{
"id": "42",
"slug": "intro-call",
"title": "Intro call",
"length_in_minutes": 30,
"description": "Book this one when the caller wants a quote.",
"required_questions": [
{
"id": "notes",
"label": "Anything we should know before the visit?"
}
]
}
]
}
]
},
"knowledge": {
"text": "<string>",
"websites": [
{
"id": "wkb-abc123",
"url": "https://acme.test/pricing",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"files": [
{
"id": "fkb-abc123",
"file_name": "pricing.pdf",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}Scope requis :
AGENTS_READComportement
Renvoie toute la configuration du réceptionniste IA d’une ligne. Le paramètre de chemin{number} est le numéro Allo au format E.164.
Lisez-la avant toute écriture. Modifier la configuration remplace les collections entières : vous avez besoin de l’état actuel pour ne pas perdre une configuration que vous ne vouliez pas toucher.
Ce que contient la réponse
agentporte les réglages propres au réceptionniste, ainsi questatusetis_default, en lecture seule ici.promptcontient soitsections, soitcustom_prompt, jamais les deux.custom_promptcorrespond à une ligne plus ancienne dont le prompt a été écrit en texte libre.capabilitiesrenvoie toujours les trois interrupteurs :falsesignifie désactivé, pas indisponible.scheduling.calendarsne liste que les agendas sur lesquels ce réceptionniste réserve. Pour voir tous les agendas connectés à l’espace de travail, appelez Lister les agendas.knowledge.websitesrenvoie chaque entrée sans son texte analysé. Ce texte est ce que le réceptionniste lit, pas quelque chose que vous configurez.
Erreurs
403 API_KEY_INSUFFICIENT_SCOPE: la clé ne porte pas le scopeAGENTS_READ.404 PHONE_NUMBER_NOT_FOUND: ce numéro n’est pas un numéro auquel vous avez accès.
Cette page vous a-t-elle été utile ?
⌘I