Turn the AI receptionist on or off
curl --request PUT \
--url https://api.withallo.com/v2/api/numbers/{number}/agent/status \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.withallo.com/v2/api/numbers/{number}/agent/status"
payload = {}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.withallo.com/v2/api/numbers/{number}/agent/status', 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/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.withallo.com/v2/api/numbers/{number}/agent/status"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<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.put("https://api.withallo.com/v2/api/numbers/{number}/agent/status")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/numbers/{number}/agent/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
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
}
}{
"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
Activer ou désactiver
Puts the receptionist on the line (ACTIVE) or takes it off (FORWARDING, which sends calls to your business phone instead). This reprograms how a live line routes real calls, so confirm with a person before calling it.
PUT
/
v2
/
api
/
numbers
/
{number}
/
agent
/
status
Turn the AI receptionist on or off
curl --request PUT \
--url https://api.withallo.com/v2/api/numbers/{number}/agent/status \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.withallo.com/v2/api/numbers/{number}/agent/status"
payload = {}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.withallo.com/v2/api/numbers/{number}/agent/status', 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/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.withallo.com/v2/api/numbers/{number}/agent/status"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<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.put("https://api.withallo.com/v2/api/numbers/{number}/agent/status")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/numbers/{number}/agent/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
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
}
}{
"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_WRITEComportement
Met le réceptionniste IA sur la ligne ou l’en retire, et renvoie la configuration complète avec le nouveau statut.ACTIVE: le réceptionniste répond aux appels entrants.FORWARDING: il ne répond pas, et les appels partent vers votre téléphone professionnel.
Cet appel reprogramme le routage d’une ligne en service, avec de vrais appels. Il a volontairement son propre endpoint pour qu’une écriture de configuration ne puisse jamais le déclencher par accident. Configurez entièrement le réceptionniste avant de l’activer, et faites confirmer par une personne avant d’appeler.
business_phone du réceptionniste et ne se modifie pas par cette API.
Erreurs
400 AGENT_NO_FORWARDING_NUMBER:FORWARDINGa été demandé alors qu’aucun numéro professionnel n’est renseigné sur l’espace de travail. Tant qu’il n’y en a pas, le réceptionniste ne peut rester qu’enACTIVE.409 AGENT_LINE_NOT_ASSIGNED: aucun numéro n’est attribué à la ligne, elle ne peut donc ni répondre ni transférer.404 PHONE_NUMBER_NOT_FOUND: ce numéro n’est pas un numéro auquel vous avez accès.
Autorisations
Paramètres de chemin
Allo phone number in E.164 format
Exemple:
"+14155551234"
Corps
application/json
ACTIVE puts the receptionist on the line. FORWARDING takes it off and sends calls to your business phone.
Options disponibles:
ACTIVE, FORWARDING Réponse
The configuration, with the new status
The whole configuration of one line's AI receptionist.
Show child attributes
Show child attributes
Cette page vous a-t-elle été utile ?
⌘I