curl --request PATCH \
--url https://api.withallo.com/v2/api/numbers/{number}/agent \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Maya",
"business_name": "Acme Plumbing",
"business_address": "<string>",
"business_phone": "+14155551234",
"business_email": "<string>",
"business_website": "<string>",
"business_industry": "<string>",
"language": "en-US",
"voice_id": "maya",
"greeting_message": "<string>",
"closing_message": "<string>",
"capabilities": {
"SCHEDULING": true,
"CALL_TRANSFER": true,
"WARM_TRANSFER": false
},
"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": {}
},
"knowledge": {
"text": "We serve the Austin metro area and open at 7am."
}
}
'import requests
url = "https://api.withallo.com/v2/api/numbers/{number}/agent"
payload = {
"name": "Maya",
"business_name": "Acme Plumbing",
"business_address": "<string>",
"business_phone": "+14155551234",
"business_email": "<string>",
"business_website": "<string>",
"business_industry": "<string>",
"language": "en-US",
"voice_id": "maya",
"greeting_message": "<string>",
"closing_message": "<string>",
"capabilities": {
"SCHEDULING": True,
"CALL_TRANSFER": True,
"WARM_TRANSFER": False
},
"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": {} },
"knowledge": { "text": "We serve the Austin metro area and open at 7am." }
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Maya',
business_name: 'Acme Plumbing',
business_address: '<string>',
business_phone: '+14155551234',
business_email: '<string>',
business_website: '<string>',
business_industry: '<string>',
language: 'en-US',
voice_id: 'maya',
greeting_message: '<string>',
closing_message: '<string>',
capabilities: {SCHEDULING: true, CALL_TRANSFER: true, WARM_TRANSFER: false},
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: {}},
knowledge: {text: 'We serve the Austin metro area and open at 7am.'}
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Maya',
'business_name' => 'Acme Plumbing',
'business_address' => '<string>',
'business_phone' => '+14155551234',
'business_email' => '<string>',
'business_website' => '<string>',
'business_industry' => '<string>',
'language' => 'en-US',
'voice_id' => 'maya',
'greeting_message' => '<string>',
'closing_message' => '<string>',
'capabilities' => [
'SCHEDULING' => true,
'CALL_TRANSFER' => true,
'WARM_TRANSFER' => false
],
'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' => [
]
],
'knowledge' => [
'text' => 'We serve the Austin metro area and open at 7am.'
]
]),
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"
payload := strings.NewReader("{\n \"name\": \"Maya\",\n \"business_name\": \"Acme Plumbing\",\n \"business_address\": \"<string>\",\n \"business_phone\": \"+14155551234\",\n \"business_email\": \"<string>\",\n \"business_website\": \"<string>\",\n \"business_industry\": \"<string>\",\n \"language\": \"en-US\",\n \"voice_id\": \"maya\",\n \"greeting_message\": \"<string>\",\n \"closing_message\": \"<string>\",\n \"capabilities\": {\n \"SCHEDULING\": true,\n \"CALL_TRANSFER\": true,\n \"WARM_TRANSFER\": false\n },\n \"transfer_rules\": [\n {\n \"description\": \"Billing or invoice questions\",\n \"transfer_message\": \"Let me put you through to billing.\",\n \"target_number\": \"+14155551234\",\n \"target_member_id\": \"<string>\",\n \"target_line_number\": \"<string>\"\n }\n ],\n \"scheduling\": {\n \"calendars\": {}\n },\n \"knowledge\": {\n \"text\": \"We serve the Austin metro area and open at 7am.\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.withallo.com/v2/api/numbers/{number}/agent")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Maya\",\n \"business_name\": \"Acme Plumbing\",\n \"business_address\": \"<string>\",\n \"business_phone\": \"+14155551234\",\n \"business_email\": \"<string>\",\n \"business_website\": \"<string>\",\n \"business_industry\": \"<string>\",\n \"language\": \"en-US\",\n \"voice_id\": \"maya\",\n \"greeting_message\": \"<string>\",\n \"closing_message\": \"<string>\",\n \"capabilities\": {\n \"SCHEDULING\": true,\n \"CALL_TRANSFER\": true,\n \"WARM_TRANSFER\": false\n },\n \"transfer_rules\": [\n {\n \"description\": \"Billing or invoice questions\",\n \"transfer_message\": \"Let me put you through to billing.\",\n \"target_number\": \"+14155551234\",\n \"target_member_id\": \"<string>\",\n \"target_line_number\": \"<string>\"\n }\n ],\n \"scheduling\": {\n \"calendars\": {}\n },\n \"knowledge\": {\n \"text\": \"We serve the Austin metro area and open at 7am.\"\n }\n}")
.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::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Maya\",\n \"business_name\": \"Acme Plumbing\",\n \"business_address\": \"<string>\",\n \"business_phone\": \"+14155551234\",\n \"business_email\": \"<string>\",\n \"business_website\": \"<string>\",\n \"business_industry\": \"<string>\",\n \"language\": \"en-US\",\n \"voice_id\": \"maya\",\n \"greeting_message\": \"<string>\",\n \"closing_message\": \"<string>\",\n \"capabilities\": {\n \"SCHEDULING\": true,\n \"CALL_TRANSFER\": true,\n \"WARM_TRANSFER\": false\n },\n \"transfer_rules\": [\n {\n \"description\": \"Billing or invoice questions\",\n \"transfer_message\": \"Let me put you through to billing.\",\n \"target_number\": \"+14155551234\",\n \"target_member_id\": \"<string>\",\n \"target_line_number\": \"<string>\"\n }\n ],\n \"scheduling\": {\n \"calendars\": {}\n },\n \"knowledge\": {\n \"text\": \"We serve the Austin metro area and open at 7am.\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"agent": {
"id": "agt-abc123",
"status": "ACTIVE",
"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.",
"tone_of_voice": "FRIENDLY",
"answer_type": "CONCISE",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"prompt": {
"sections": [
{
"section": "objective",
"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": [
{
"day": "MO",
"schedule": [
{
"start_time": 32400,
"end_time": 61200
}
]
}
]
},
"transfer_rules": [
{
"description": "Billing or invoice questions",
"type": "EXTERNAL_NUMBER",
"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",
"provider": "GOOGLE_CALENDAR",
"status": "ACTIVE",
"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",
"status": "ACTIVE",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"files": [
{
"id": "fkb-abc123",
"file_name": "pricing.pdf",
"status": "ACTIVE",
"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
}
}Modifier la configuration
Updates any part of the configuration except the prompt and the on/off status. Single values are merged, collections are replaced. This does not put the receptionist on the line: that is PUT /v2/api/numbers/{number}/agent/status.
curl --request PATCH \
--url https://api.withallo.com/v2/api/numbers/{number}/agent \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Maya",
"business_name": "Acme Plumbing",
"business_address": "<string>",
"business_phone": "+14155551234",
"business_email": "<string>",
"business_website": "<string>",
"business_industry": "<string>",
"language": "en-US",
"voice_id": "maya",
"greeting_message": "<string>",
"closing_message": "<string>",
"capabilities": {
"SCHEDULING": true,
"CALL_TRANSFER": true,
"WARM_TRANSFER": false
},
"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": {}
},
"knowledge": {
"text": "We serve the Austin metro area and open at 7am."
}
}
'import requests
url = "https://api.withallo.com/v2/api/numbers/{number}/agent"
payload = {
"name": "Maya",
"business_name": "Acme Plumbing",
"business_address": "<string>",
"business_phone": "+14155551234",
"business_email": "<string>",
"business_website": "<string>",
"business_industry": "<string>",
"language": "en-US",
"voice_id": "maya",
"greeting_message": "<string>",
"closing_message": "<string>",
"capabilities": {
"SCHEDULING": True,
"CALL_TRANSFER": True,
"WARM_TRANSFER": False
},
"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": {} },
"knowledge": { "text": "We serve the Austin metro area and open at 7am." }
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Maya',
business_name: 'Acme Plumbing',
business_address: '<string>',
business_phone: '+14155551234',
business_email: '<string>',
business_website: '<string>',
business_industry: '<string>',
language: 'en-US',
voice_id: 'maya',
greeting_message: '<string>',
closing_message: '<string>',
capabilities: {SCHEDULING: true, CALL_TRANSFER: true, WARM_TRANSFER: false},
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: {}},
knowledge: {text: 'We serve the Austin metro area and open at 7am.'}
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Maya',
'business_name' => 'Acme Plumbing',
'business_address' => '<string>',
'business_phone' => '+14155551234',
'business_email' => '<string>',
'business_website' => '<string>',
'business_industry' => '<string>',
'language' => 'en-US',
'voice_id' => 'maya',
'greeting_message' => '<string>',
'closing_message' => '<string>',
'capabilities' => [
'SCHEDULING' => true,
'CALL_TRANSFER' => true,
'WARM_TRANSFER' => false
],
'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' => [
]
],
'knowledge' => [
'text' => 'We serve the Austin metro area and open at 7am.'
]
]),
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"
payload := strings.NewReader("{\n \"name\": \"Maya\",\n \"business_name\": \"Acme Plumbing\",\n \"business_address\": \"<string>\",\n \"business_phone\": \"+14155551234\",\n \"business_email\": \"<string>\",\n \"business_website\": \"<string>\",\n \"business_industry\": \"<string>\",\n \"language\": \"en-US\",\n \"voice_id\": \"maya\",\n \"greeting_message\": \"<string>\",\n \"closing_message\": \"<string>\",\n \"capabilities\": {\n \"SCHEDULING\": true,\n \"CALL_TRANSFER\": true,\n \"WARM_TRANSFER\": false\n },\n \"transfer_rules\": [\n {\n \"description\": \"Billing or invoice questions\",\n \"transfer_message\": \"Let me put you through to billing.\",\n \"target_number\": \"+14155551234\",\n \"target_member_id\": \"<string>\",\n \"target_line_number\": \"<string>\"\n }\n ],\n \"scheduling\": {\n \"calendars\": {}\n },\n \"knowledge\": {\n \"text\": \"We serve the Austin metro area and open at 7am.\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.withallo.com/v2/api/numbers/{number}/agent")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Maya\",\n \"business_name\": \"Acme Plumbing\",\n \"business_address\": \"<string>\",\n \"business_phone\": \"+14155551234\",\n \"business_email\": \"<string>\",\n \"business_website\": \"<string>\",\n \"business_industry\": \"<string>\",\n \"language\": \"en-US\",\n \"voice_id\": \"maya\",\n \"greeting_message\": \"<string>\",\n \"closing_message\": \"<string>\",\n \"capabilities\": {\n \"SCHEDULING\": true,\n \"CALL_TRANSFER\": true,\n \"WARM_TRANSFER\": false\n },\n \"transfer_rules\": [\n {\n \"description\": \"Billing or invoice questions\",\n \"transfer_message\": \"Let me put you through to billing.\",\n \"target_number\": \"+14155551234\",\n \"target_member_id\": \"<string>\",\n \"target_line_number\": \"<string>\"\n }\n ],\n \"scheduling\": {\n \"calendars\": {}\n },\n \"knowledge\": {\n \"text\": \"We serve the Austin metro area and open at 7am.\"\n }\n}")
.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::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Maya\",\n \"business_name\": \"Acme Plumbing\",\n \"business_address\": \"<string>\",\n \"business_phone\": \"+14155551234\",\n \"business_email\": \"<string>\",\n \"business_website\": \"<string>\",\n \"business_industry\": \"<string>\",\n \"language\": \"en-US\",\n \"voice_id\": \"maya\",\n \"greeting_message\": \"<string>\",\n \"closing_message\": \"<string>\",\n \"capabilities\": {\n \"SCHEDULING\": true,\n \"CALL_TRANSFER\": true,\n \"WARM_TRANSFER\": false\n },\n \"transfer_rules\": [\n {\n \"description\": \"Billing or invoice questions\",\n \"transfer_message\": \"Let me put you through to billing.\",\n \"target_number\": \"+14155551234\",\n \"target_member_id\": \"<string>\",\n \"target_line_number\": \"<string>\"\n }\n ],\n \"scheduling\": {\n \"calendars\": {}\n },\n \"knowledge\": {\n \"text\": \"We serve the Austin metro area and open at 7am.\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"agent": {
"id": "agt-abc123",
"status": "ACTIVE",
"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.",
"tone_of_voice": "FRIENDLY",
"answer_type": "CONCISE",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"prompt": {
"sections": [
{
"section": "objective",
"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": [
{
"day": "MO",
"schedule": [
{
"start_time": 32400,
"end_time": 61200
}
]
}
]
},
"transfer_rules": [
{
"description": "Billing or invoice questions",
"type": "EXTERNAL_NUMBER",
"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",
"provider": "GOOGLE_CALENDAR",
"status": "ACTIVE",
"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",
"status": "ACTIVE",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"files": [
{
"id": "fkb-abc123",
"file_name": "pricing.pdf",
"status": "ACTIVE",
"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
}
}AGENTS_WRITEComportement
Modifie toute partie de la configuration du réceptionniste, sauf le prompt et l’activation. Renvoie la configuration complète après l’écriture, dans la même forme que Lire la configuration. Deux règles de fusion s’appliquent :- Les valeurs simples sont fusionnées.
name, les informations sur l’activité,language,voice_id,greeting_message,closing_message,tone_of_voice,answer_typeetknowledge.textgardent leur valeur actuelle si vous les omettez. - Les collections sont remplacées.
capabilities,business_hours,transfer_rulesetscheduling.calendarssont des ensembles complets. Envoyez-en un et il remplace ce qui était configuré, omettez-le et il reste intact.
capabilities que vous envoyez.
Un champ que cet endpoint ne déclare pas est refusé avec 400 UNKNOWN_FIELD, y compris les champs en lecture seule comme custom_prompt, prompt_metadata et status. Rien n’est ignoré en silence.
Règles de transfert
description est le champ qui décide si un transfert fonctionne. Le réceptionniste compare ce que dit l’appelant à ce texte : écrivez-le comme le motif de l’appelant (« questions de facturation », « veut réserver une intervention »), pas comme une instruction adressée au réceptionniste.
Chaque règle a besoin de la cible qu’implique son type :
| Type | Champ requis | Destination |
|---|---|---|
EXTERNAL_NUMBER | target_number | N’importe quel numéro, au format E.164 |
MEMBER | target_member_id | Un membre de l’équipe, par son id issu de GET /v2/api/users |
INBOX | target_line_number | Une autre de vos lignes Allo |
transfer_rules[1].description.
Horaires d’ouverture
schedule est obligatoire dès que vous envoyez business_hours. Les heures sont exprimées en secondes depuis minuit : 9h à 17h s’écrit 32400 à 61200, et un jour absent de la liste est fermé.
Agendas de réservation
scheduling.calendars est une map dont les clés sont des id d’agenda issus de Lister les agendas. Un agenda que le réceptionniste n’a pas encore lui est rattaché, un agenda associé à [] reste rattaché sans type d’événement sélectionné, et un agenda absent de la map perd l’accès.
Les types d’événement viennent de Lire un agenda. Renvoyez id, slug, title et length_in_minutes tels quels, et ajoutez votre propre description pour indiquer quand le réceptionniste doit réserver celui-là plutôt qu’un autre.
Connecter un agenda à l’espace de travail est un flux OAuth, réalisé dans l’app Allo. Cet endpoint choisit parmi les connexions qui existent déjà.
Limites des champs
| Champ | Limite |
|---|---|
name, business_name, business_email, business_website, business_industry | 64 caractères |
business_address | 255 caractères |
greeting_message, closing_message | 1000 caractères |
transfer_rules[].description | 255 caractères |
transfer_rules[].transfer_message | 1000 caractères |
knowledge.text | 25000 caractères |
Erreurs
400 UNKNOWN_FIELD: un champ que cet endpoint n’accepte pas, nommé dansparam.400 INVALID_REQUEST_BODY: un champ déclaré n’a pas passé la validation. Le champ fautif est danserrors[].400 MISSING_FIELD: une partie obligatoire d’une collection manque, nommée dansparam.400 INVALID_AGENT_LANGUAGE/400 INVALID_AGENT_CAPABILITY: une valeur inconnue. Les valeurs acceptées sont listées dans le message.400 INVALID_TIMEZONE:business_hours.timezonen’est pas un identifiant IANA.400 INVALID_PHONE_NUMBER:business_phonen’est pas un numéro exploitable.400 AGENT_TRANSFER_RULE_TARGET_REQUIRED: une règle n’a pas la cible qu’exige son type.403 AGENT_TRANSFER_RULE_MEMBER_NO_LINE_ACCESS: le membre visé n’a pas accès à cette ligne.404 AGENT_VOICE_NOT_FOUND: aucune voix ne porte cevoice_id. Listez-les avec Lister les voix.404 AGENT_CALENDAR_NOT_FOUND: un id d’agenda de la map n’est pas visible pour vous.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
"+14155551234"
Corps
Two merge rules apply. Single values are merged: omit one and it keeps its current value. The collections capabilities, business_hours, transfer_rules and scheduling.calendars are complete sets: send one and it replaces what was configured, omit it and it is left alone. An undeclared field is rejected with 400 UNKNOWN_FIELD rather than ignored.
64"Maya"
64"Acme Plumbing"
255E.164 format.
64"+14155551234"
646464fr, fr-CA, en-US, en-GB, es, de, hr "en-US"
An id from GET /v2/api/voices, listed under the receptionist's language.
"maya"
10001000FRIENDLY, PROFESSIONAL, NEUTRAL, ENTHUSIASTIC CONCISE, STANDARD, DETAILED The complete set of toggles. A capability left out of the map is turned off, so read the current ones first and send them all back.
Show child attributes
Show child attributes
{ "SCHEDULING": true, "CALL_TRANSFER": true, "WARM_TRANSFER": false }
Replaces the whole week. schedule is required when this key is sent.
Show child attributes
Show child attributes
Replaces the whole rule set. Send [] to remove every rule.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Only the free-text knowledge is writable here. Websites and files have their own endpoints.
Show child attributes
Show child attributes
Réponse
The configuration after the write
The whole configuration of one line's AI receptionist.
Show child attributes
Show child attributes
Cette page vous a-t-elle été utile ?