v3

latestOpenAPI 3.1.02026-08-0755220214.3 KB
agents

Create

Creates a new agent in a project.

post/agents

Query parameters

projectstring

The name of the project to create the agent in.

Headers

Authorizationstring required

Bearer authentication header of the form Bearer <PHONIC_API_KEY>. Manage your API keys here.

Request body

namestring required

The name of the agent. Can only contain lowercase letters, numbers and hyphens. Must be unique within the project.

slugstring

URL-friendly agent slug. Can only contain lowercase letters, numbers and hyphens. Must be unique within the project.

phone_number'assign-automatically' | 'custom'

When set to null, the agent will not be associated with a phone number. When set to "assign-automatically", the agent will be assigned a random phone number. When set to "custom", you must provide custom_phone_numbers.

custom_phone_numberstring nullable

The custom phone number to use for the agent in E.164 format (e.g., +1234567890). This field is deprecated. Use custom_phone_numbers instead.

custom_phone_numbersstring[]

Array of custom phone numbers in E.164 format (e.g., ["+1234567890", "+0987654321"]). The agent will be able to receive phone calls on any of these numbers. Required when phone_number is set to "custom". All phone numbers must be unique.

timezonestring

The timezone of the agent. Used to format system variables like {{system_time}}.

voice_idstring

The voice ID to use.

audio_format'pcm_44100' | 'pcm_24000' | 'pcm_16000' | 'pcm_8000' | 'mulaw_8000'

The audio format of the agent.

audio_speednumber double

The audio speed of the agent.

background_noise_levelnumber double

The background noise level of the agent.

background_noise'office' | 'call-center' | 'coffee-shop'

The background noise type. Can be "office", "call-center", "coffee-shop", or null.

generate_welcome_messageboolean

When true, the welcome message will be automatically generated and the welcome_message field will be ignored.

is_welcome_message_interruptibleboolean

When false, the welcome message will not be interruptible by the user.

websocket_timeout_secinteger

Number of seconds of inactivity before the conversation WebSocket is closed.

welcome_messagestring nullable

Message to play when the conversation starts. Can contain template variables like {{customer_name}}. Ignored when generate_welcome_message is true.

system_promptstring

Instructions for the conversation. Can contain template variables like {{subject}}.

template_variablesobject

Variables that can be used in the welcome message and the system prompt.

built_in_tool_configsBuiltInToolConfigs

Per-tool configuration overrides for built-in tools, keyed by built-in tool ID (e.g. tool_natural_conversation_ending). A built-in tool referenced in tools but absent from this map uses its default configuration.

generate_no_input_poke_textboolean

Whether to have the no-input poke text be generated by AI.

no_input_poke_secinteger nullable

Number of seconds of silence before sending a poke message. null disables the poke message.

no_input_poke_textstring

The message to send after the specified silence. Ignored when generate_no_input_poke_text is true.

no_input_end_conversation_secinteger

Seconds of silence before ending the conversation.

enable_assistant_backchannelboolean

When true, the assistant will produce backchannel responses (e.g. "mm-hmm") while the user is speaking.

assistant_backchannel_aggressivenessnumber double

How aggressively the assistant produces backchannel responses. Only relevant when enable_assistant_backchannel is true.

default_language'ar' | 'az' | 'bg' | 'bn' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'es' | 'fa' | 'fi' | 'fil' | 'fr' | 'gu' | 'he' | 'hi' | 'hu' | 'id' | 'it' | 'ja' | 'ka' | 'km' | 'kn' | 'ko' | 'lt' | 'lv' | 'ml' | 'mr' | 'ms' | 'ne' | 'nl' | 'no' | 'pa' | 'pl' | 'pt' | 'ro' | 'ru' | 'si' | 'sk' | 'sq' | 'sv' | 'sw' | 'ta' | 'te' | 'th' | 'tr' | 'uk' | 'ur' | 'vi' | 'yue' | 'zh'

ISO 639-1 language codes supported by the agent

additional_languagesLanguageCode[]

Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include default_language. When multilingual_mode is "auto", a maximum of 2 additional languages is allowed.

languagesLanguageCode[]

Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use default_language and additional_languages instead.

multilingual_mode'auto' | 'request' | 'initial'

If "auto", each user audio is automatically identified for the language to respond in. If "request", user must request to change language (recommended). If "initial" the first turn user audio determines the language for the rest of the conversation.

push_to_talkboolean

Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false.

intelligence_level'standard' | 'high'

The intelligence level of the agent. high uses a more capable model for more complex reasoning, while standard is optimized for lower latency.

boosted_keywordsstring[]

These words, or short phrases, will be more accurately recognized by the agent.

min_words_to_interruptinteger

Minimum number of words required to interrupt the assistant.

inbound_rolloutnumber double

Float between 0.0 and 1.0 representing the percentage of inbound calls handled by Agent. Defaults to 1.0. Requires phone_number to be set when less than 1.0.

inbound_rollout_forward_phone_numberstring nullable

E.164 formatted phone number where non-agent calls will be forwarded. Required when inbound_rollout < 1.0, must be null when inbound_rollout = 1.0. Defaults to null.

vad_prebuffer_duration_msinteger

Voice activity detection prebuffer duration in milliseconds.

vad_min_speech_duration_msinteger

Minimum speech duration for voice activity detection in milliseconds.

vad_min_silence_duration_msinteger

Minimum silence duration for voice activity detection in milliseconds.

vad_thresholdnumber double

Voice activity detection threshold.

enable_redactionboolean

When true, PII and PHI are redacted from text transcripts (e.g. replaced with tags like [PHONE]) and bleeped from audio recordings after the conversation ends.

mcp_server_idsstring[]

Array of MCP server IDs to make available to the agent.

observability_integrationsCreateAgentRequestObservabilityIntegrationsItems[]

Names of observability integrations to enable for the agent. Each must be one of the supported providers.

external_storage_policystring nullable

Name of an external storage policy in the same project that conversation artifacts are delivered to. Requires zero data retention and cannot be combined with enable_redaction.

Response

Success response

idstring required

The ID of the created agent.

namestring required

The name of the created agent.