Create an agent

Creates a new voice agent. Only name and systemPrompt are required - how to write a good prompt is covered on the Voice agent page. If you send numberE164, the agent is attached to that number right away. POST returns only the id; use a follow-up GET /v1/agents/{id} to read the actual provider. transferTo triggers a post-save attempt to move an ElevenLabs agent to the engine, but a paused attempt, unavailable engine or failure can leave it on ElevenLabs, where handoff does not work. voiceId picks the voice: explicit useForOutboundTasks: true replaces a recognized catalog voice unavailable on the engine, including katty, with the engine default. Outside this fallback, the engine accepts catalog voices except the ElevenLabs voices (katty, the older anet); a raw ElevenLabs ID or another incompatible voice returns 400. With false, the initial voice must be valid for ElevenLabs (katty or a raw ElevenLabs ID; ElevenLabs no longer assigns anet to new agents and volai rejects it with a 400); a successful later switch for transferTo may map it to the engine default. Without voiceId, the engine uses Milena and ElevenLabs uses the template's voice (Katty). The optional fields (toolIds, transferTo, transferCondition, dataFields, recordCalls, goal, knowledge, notifyEmail, useForOutboundTasks, voicemail) are described below.

post/v1/agents

Request

  • Base URL: https://volai.cz
  • URL: https://volai.cz/v1/agents
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Optional key for one logical request. Its scope is global to this API key, independent of the HTTP method, path, or body: use a new value for every distinct logical action across all endpoints and request bodies, and reuse it only to retry the exact same logical request. Reusing a non-blank key within 24 hours returns the stored response; a concurrent request with the same key returns 409 idempotency_in_progress. A missing or whitespace-only value disables idempotency.

Request body

namestring required

Display name of the agent. Leading and trailing whitespace is trimmed.

systemPromptstring required

Instructions governing every call. Describe the role, facts the agent may use and when to hand off; do not include secrets. Whitespace is trimmed.

firstMessagestring

Opening line spoken to the caller. Omit at creation to use the default greeting. Include a short AI disclosure; recording adds a notice automatically. A long greeting saves with a warning.

language'cs' | 'sk' | 'en' | 'de' | 'pl'

Language spoken by the agent: Czech, Slovak, English, German or Polish. Defaults to cs at creation, where it does not by itself select a voice provider. On PATCH, a change from en, de or pl to cs or sk moves an ElevenLabs agent to the volai engine with that language's default voice; read provider in the response.

voiceIdstring

Voice id from GET /v1/voices, compatible with the agent's provider. Omit when the provider is uncertain, read back the agent, then choose its voice. An empty string restores the provider's default voice.

numberE164string

Owned phone number to attach, in E.164 format. Omit at creation for an agent without a number. On PATCH, null detaches the number; omission leaves it unchanged.

toolIdsstring[]

Complete list of owned webhook tool ids from GET /v1/tools. Replaces the previous list on PATCH; [] removes all tools.

transferTostring

Human handoff destination in E.164 format. Must not point back to your own volai number. An empty string disables handoff. Setting a destination attempts an engine switch; read back provider to verify it succeeded.

transferConditionstring

When the agent should transfer to the human destination. An empty string restores the default condition.

recordCallsboolean

Whether to record calls. Defaults to true at creation and adds a short recording notice to the greeting. You remain responsible for appropriate disclosure.

goalstring

One sentence defining a successful call for post-call evaluation on engine agents. An empty string clears it; PATCH also accepts null.

knowledgestring

Additional reference text for the agent, separate from its instructions. An empty string clears it; PATCH also accepts null.

notifyEmailboolean

Whether to email the account owner a summary after each engine call. Defaults to true at creation.

useForOutboundTasksboolean

Creation only: true requests the volai engine, false starts on ElevenLabs, and omission uses the deployment default, subject to engine availability, enablement and configured languages. cs or sk alone does not guarantee the engine. An explicit false that overrides the language's engine default returns the elevenlabs_by_explicit_choice warning. transferTo may subsequently attempt an engine switch. REST creation returns only id; read GET /v1/agents/{id} to verify provider and voiceId.

firstMessageProtectSecsnumber nullable

Seconds of the first line protected from short reactions by the person who answered, outbound calls only, accepted for either provider though only heard once the agent runs on the volai engine. While the line plays, a reaction such as "Hello?" does not interrupt it. A reply without an interrupting word (for example stop, no, wait) is dropped in that window: it does not interrupt the line, is not in the transcript and the agent does not react to it; an interrupting word still interrupts it. The interrupting words follow the agent's language: an English agent is interrupted by stop, no, wait or hold. null or 0 turns it off. No default is applied: omission stores nothing at creation, or leaves the current setting unchanged on PATCH.

silencePromptTextstring nullable

Your own sentence for the silence reminder, spoken word for word instead of the default reminder for the agent's language, accepted for either provider though only heard once the agent runs on the volai engine. Surrounding whitespace is trimmed; null or an empty string restores the default text. No default is applied: omission stores nothing at creation, or leaves the current text unchanged on PATCH.

sttLanguageHintsStrictboolean nullable

Strict language lock for speech recognition on the volai engine (Soniox language_hints_strict): the transcript strongly prefers the agent's language, so a short reply such as "Ano" is not written as a foreign word or in another script. Best effort, not a guarantee. Meant only for agents on the engine with language cs and outbound calls; do not turn it on for sk (Czech callers would get Slovak spelling). Stored for either provider, read only by the engine; ElevenLabs ignores it. On PATCH, true turns it on, false or null turns it off and omission leaves it unchanged. At creation, omission stores nothing (off).

turnDigitTailFloorMsinteger nullable

Silence floor in milliseconds for a reply that ends with a group of 3 to 8 digits (a caller dictating a number group by group), on the volai engine: the engine waits at least this long after the caller stops before closing the reply, so the agent does not jump into the number. 0 turns it off; otherwise 400 to 2300 (1 to 399 is rejected). Recommended first step for Czech agents that take dictated numbers: 800. Dates, postcodes and years get the floor too. Stored for either provider, used only by the engine. On PATCH, null clears the stored value (the engine default 0 applies) and omission leaves it unchanged. At creation, omission stores nothing.

turnLongSpeechFloorMsinteger nullable

Silence floor in milliseconds after the caller spoke for longer than turnLongSpeechSecs, on the volai engine: after a long stretch of speech callers take a breath and continue. 0 turns it off; otherwise 400 to 2300 (1 to 399 is rejected), suggested 800. Stored for either provider, used only by the engine. On PATCH, null clears the stored value (the engine default 0 applies) and omission leaves it unchanged. At creation, omission stores nothing.

turnLongSpeechSecsnumber nullable

Speech length in seconds above which turnLongSpeechFloorMs applies, 1 to 30, decimals allowed. Has no effect while turnLongSpeechFloorMs is 0. On PATCH, null clears the stored value (the engine default 5 applies) and omission leaves it unchanged. At creation, omission stores nothing.

inboundVariablesobject nullable

Default values for {{variable}} placeholders on INBOUND calls, for example {"uvod": "How can I help you?"}. Merged into the call's dynamic variables only for names the inbound call does not supply itself; caller_number, called_number, attempt_id and the volai_, trial_ and system__ prefixes are reserved and rejected. Not used on outbound calls, where the variables of POST /v1/calls apply. Works for either provider. Keys are letters, digits or underscores (1 to 40 characters), values are trimmed and up to 200 characters, at most 10 keys. On PATCH the object replaces the stored values entirely; null or {} removes them all; omission leaves them unchanged. At creation, omission stores nothing.

laughter'auto' | 'on' | 'off'

Whether the agent may laugh during a call: auto follows sensitive-topic detection, on overrides that detection, off always suppresses it. on does not override everything else: the engine still needs a Cartesia voice in Czech and its own switch on. Has no effect on agents hosted on ElevenLabs. Omission stores auto explicitly at creation, or leaves the current setting unchanged on PATCH.

Response

Created agent id

idstring required

Changes

No recorded changes to this operation across all 1 revision of this API.