Allo

Lire la configuration

Renvoie toute la configuration du réceptionniste IA d'une ligne. Le paramètre de chemin est le numéro Allo au format E.164.

GET/v2/api/numbers/{number}/agent

Comportement

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

  • agent porte les réglages propres au réceptionniste, ainsi que status et is_default, en lecture seule ici.
  • prompt contient soit sections, soit custom_prompt, jamais les deux. custom_prompt correspond à une ligne plus ancienne dont le prompt a été écrit en texte libre.
  • capabilities renvoie toujours les trois interrupteurs : false signifie désactivé, pas indisponible.
  • scheduling.calendars ne 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.websites et knowledge.files listent toute la bibliothèque de connaissances de l'équipe, sans le texte extrait. status vaut ACTIVE quand le réceptionniste de cette ligne répond à partir de l'entrée, et DISABLED quand cette ligne ne l'utilise pas.
  • knowledge.text est déprécié. Il est toujours renvoyé, voir Modifier la configuration.

Erreurs

  • 403 API_KEY_INSUFFICIENT_SCOPE : la clé ne porte pas le scope AGENTS_READ.
  • 404 PHONE_NUMBER_NOT_FOUND : ce numéro n'est pas un numéro auquel vous avez accès.

Autorisation

Authorizationstring · headerrequis

Api-Key ak_live_…

Paramètres de chemin

numberstringrequis

Allo phone number in E.164 format

Réponses

200The line's receptionist configuration
dataobject

The whole configuration of one line's AI receptionist.

7 champs
agentobject

The AI receptionist's own settings. Everything here except id, status, is_default, created_at and updated_at is writable with PATCH /v2/api/numbers/{number}/agent.

18 champs
idstring | null
statusenum<string>

ACTIVE: the receptionist answers incoming calls. FORWARDING: it does not, and calls go to your business phone. Read-only here, change it with PUT /v2/api/numbers/{number}/agent/status.

ACTIVEFORWARDING

namestring | null

The name the receptionist gives itself on a call.

is_defaultboolean

True while the line still runs Allo's default receptionist, with no prompt, greeting, closing or knowledge of its own.

business_namestring | null
business_addressstring | null
business_phonestring | null

The business's own phone number, in E.164 format.

business_emailstring | null
business_websitestring | null
business_industrystring | null
languageenum<string>

The language the receptionist speaks. Pick a voice_id listed under the same language.

frfr-CAen-USen-GBesdehr

voice_idstring | null

Identifier of a voice from GET /v2/api/voices.

greeting_messagestring | null

What the receptionist says when it picks up.

closing_messagestring | null

What the receptionist says before hanging up.

tone_of_voiceenum<string>

FRIENDLYPROFESSIONALNEUTRALENTHUSIASTIC

answer_typeenum<string>

How long the receptionist's answers run.

CONCISESTANDARDDETAILED

created_atstring<date-time> | null
updated_atstring<date-time> | null
promptobject

The receptionist's prompt. Exactly one of the two keys is present: sections for a prompt written in the section format, custom_prompt for an older line whose prompt was written as freeform text. custom_prompt is the render of the sections, so it is never reported alongside them.

2 champs
sectionsobject[]
4 champs
sectionenum<string>

objectivepersonalitybehaviorsprohibitedrequired_fieldsobjective_completion

titlestring

Human-readable title, derived server-side from section.

contentstring | null
fieldsobject[]
custom_promptstring | null
capabilitiesobject

What the receptionist is allowed to do on a call. All three are always reported.

3 champs
SCHEDULINGboolean

Book appointments on the calendars in scheduling.calendars.

CALL_TRANSFERboolean

Transfer the call using the rules in transfer_rules.

WARM_TRANSFERboolean

Announce the caller to the person taking the transfer before connecting them.

business_hoursobject

When the business is open. A day left out of schedule is closed.

2 champs
timezonestring | null

IANA timezone identifier.

scheduleobject[]
2 champs
dayenum<string>requis

MOTUWETHFRSASU

scheduleobject[]requis

The open periods of that day. An empty array closes the day.

transfer_rulesobject[]
6 champs
descriptionstring

The caller's reason, in the caller's words. This is what the receptionist matches what it hears against, so phrase it as a reason ('billing or invoice questions'), not as an instruction.

typeenum<string>

EXTERNAL_NUMBER transfers to any phone number, MEMBER to a teammate, INBOX to another Allo line.

EXTERNAL_NUMBERMEMBERINBOX

transfer_messagestring | null

What the receptionist says before transferring.

target_numberstring | null

Required for EXTERNAL_NUMBER. E.164 format.

target_member_idstring | null

Required for MEMBER. A user id from GET /v2/api/users.

target_line_numberstring | null

Required for INBOX. Another of your Allo numbers, in E.164 format.

schedulingobject
1 champs
calendarsobject[]

The calendars this receptionist may book on. Empty when it has none, which is not the same as the workspace having none: list those with GET /v2/api/calendars.

7 champs
calendar_connection_idstring
namestring | null
providerenum<string>

GOOGLE_CALENDARCAL_COMCALENDLYOUTLOOK

statusenum<string>

ACTIVEDISCONNECTED

is_team_defaultboolean
ownerobject

The teammate who connected the calendar.

event_typesobject[]
knowledgeobject

What the receptionist knows about the business: facts, prices, policies, hours.

3 champs
textstring | null

Deprecated. Free-text knowledge, up to 25000 characters, stored as the line's "Business knowledge" text source.

websitesobject[]
5 champs
idstring
urlstring
statusenum<string>

ACTIVE when this line's receptionist answers from the website, DISABLED when this line does not use it.

ACTIVEDISABLED

created_atstring<date-time> | null
updated_atstring<date-time> | null
filesobject[]
5 champs
idstring
file_namestring
statusenum<string>

ACTIVEDISABLED

created_atstring<date-time> | null
updated_atstring<date-time> | null
401
403
404
429