Set prompt
Replaces the receptionist’s prompt: what it is trying to achieve, who it is, how it handles the call. A prompt is only valid whole, so read the current sections with GET /v2/api/numbers/{number}/agent and send them all back, including the ones you are not changing. Facts about the business belong in knowledge, not here.
AGENTS_WRITEBehavior
Replaces the receptionist’s prompt: what it is trying to achieve, who it is, and how it handles the call. A prompt is only valid whole, and every write re-renders what the receptionist answers with, so read the current sections with Get configuration and send them all back, including the ones you are not changing. The response echoes the prompt with atitle derived server-side from each section key.
Sections
required_fields is the one section that carries fields instead of content, one entry per piece of information the receptionist has to collect. Every other section carries non-blank content and no fields. Each section may appear at most once, and content holds up to 3000 characters.
The three required sections are the minimum the API enforces, not the prompt a business needs. A receptionist with no prohibited section was never told what it must not say.
What belongs elsewhere
Facts about the business go inknowledge on Update configuration, not here. Prices, opening hours, policies and FAQs change often, and the receptionist looks them up rather than reciting them from the prompt.
The greeting and the closing message are their own fields too. Allo already handles greeting, closing, language switching, contact confirmation, transfer and booking mechanics, so restating them in the prompt makes the call worse, not better.
Errors
400 PROMPT_SECTIONS_REQUIRED:sectionswas missing or empty. It replaces the whole prompt, so it has to carry every section you want to keep.400 INVALID_AGENT_PROMPT_SECTION: an unknown section key. The allowed ones are listed in the message.400 DUPLICATE_AGENT_PROMPT_SECTION: a section appears more than once.400 INVALID_AGENT_PROMPT_SECTION_BODY: a section carries the wrong body, for examplefieldsonobjective.400 MISSING_AGENT_PROMPT_SECTION: one ofobjective,personalityorbehaviorsis missing or blank.400 AGENT_PROMPT_SECTION_TOO_LONG: a section’scontentis over 3000 characters.400 AGENT_PROMPT_TOO_LONG: the prompt rendered from all sections is over 25000 characters.404 PHONE_NUMBER_NOT_FOUND: the number is not one you have access to.
Authorizations
Path Parameters
Allo phone number in E.164 format
"+14155551234"
Body
Replaces the whole prompt. objective, personality and behaviors are required; each section may appear once; a content section holds at most 3000 characters.
Response
The prompt after the write, with server-derived titles
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.