Copies the template's instructions, variables and voice settings into a new draft agent in the tenant, with a
default widget configuration whose settings are all unset (the widget's defaults apply). Phone number,
knowledge bases and tools are not copied.
Required permission: agents:write
BearerAuthorizationBearer <token>Tenant API key (evk_…), created in Studio → Vault → API keys.
tenantId*stringTenant id, or current for the key's own tenant. Must be the key's tenant or one of its sub-tenants.
templateId*stringTemplate id (from the template list).
Name of the new agent.
Options for creating an agent from a template.
name*stringName of the new agent.
Created. The Location header points to the new agent.
An AI voice/chat agent.
id*stringAgent id.
version?integerConcurrency version. Send it back when updating; it increases on every update.
int32name*stringDisplay name.
description?stringInternal description for people; not given to the AI.
instructions?stringSystem prompt for the AI. May reference prompt variables as {{name}} (see variableDefinitionsJson) and system variables such as {{system_caller_number}}.
variableDefinitionsJson?stringPrompt variables as a JSON-encoded string: an array of {"name", "jsonType", "placeholder", "description", "required"}. Referenced as {{name}} in the instructions and filled at conversation time (e.g. from tool output); placeholder is used when no value is available.
status?stringLifecycle status.
"draft""active""archived"model?stringRealtime model, e.g. gpt-realtime or gpt-realtime-1.5. Empty means the platform default.
voice?stringVoice used for speech output.
"alloy""ash""ballad""coral""echo""sage""shimmer""verse""marin""cedar"knowledgeBaseIds?array<string>Ids of linked knowledge bases.
phoneNumberId?stringId of the assigned phone number, if any. Change it with the agent phone-number endpoints.
phoneNumber?stringThe assigned phone number in E.164 format (read only).
allowFollowUpEmail?booleanGive the AI a send_email tool that emails conversation details to followUpEmailAddress.
followUpEmailAddress?stringRecipient of follow-up emails (e.g. a team inbox). Required when allowFollowUpEmail is true.
allowCallTransfer?booleanGive the AI a transfer_call tool on phone calls.
callTransferType?stringHow phone calls are transferred.
"direct""semi_attended"isTemplate?booleanWhen true the agent is a template that this tenant and its sub-tenants can create agents from.
type?stringOptional free-text label for your own classification; not used by the platform.
allowEndCall?booleanGive the AI an end_call tool to end the conversation after saying goodbye.
tenantId*stringTenant the agent belongs to (cannot be changed).
turnDetectionType?stringHow the AI decides the user finished speaking: server_vad (silence based), semantic_vad (meaning based) or none (no automatic turn taking).
"server_vad""semantic_vad""none"turnDetectionEagerness?stringsemantic_vad only: how quickly the AI responds.
"auto""low""medium""high"turnDetectionThreshold?numberserver_vad only: speech detection sensitivity, 0.0–1.0 (higher needs louder speech). Default 0.5.
doubleturnDetectionPrefixPadding?integerserver_vad only: milliseconds of audio kept before detected speech. Default 300.
int32turnDetectionSilenceDuration?integerserver_vad only: milliseconds of silence that end the user's turn. Default 500.
int32turnDetectionTimeout?booleanserver_vad only: when true, the AI speaks up after turnDetectionTimeoutTime of user silence.
turnDetectionTimeoutTime?integerIdle timeout in milliseconds; required when turnDetectionTimeout is true.
int32turnDetectionInterruptResponse?booleanWhether the user can interrupt the AI while it is speaking. Default true.
transcriptionModel?stringSpeech-to-text model for transcripts: gpt-4o-transcribe (precision) or gpt-4o-mini-transcribe (speed). off disables transcription.
transcriptionLanguage?stringExpected language as an ISO 639-1 code (e.g. sv, en), or auto to detect.
transcriptionInstructions?stringOptional hints for the transcriber, e.g. product names or spelling.
noiseReductionType?stringInput noise reduction: near_field (headsets, phones), far_field (laptops, rooms) or none.
"none""near_field""far_field"toolAssignments?Not filled here; use GET /v1/tenants/{tenantId}/agents/{id}/tools.
curl -X POST 'https://api.envocal.ai/v1/tenants/string/agent-templates/string/instantiate' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'{ "id": "string", "version": 0, "name": "string", "description": "string", "instructions": "string", "variableDefinitionsJson": "string", "status": "draft", "model": "string", "voice": "alloy", "knowledgeBaseIds": [ "string" ], "phoneNumberId": "string", "phoneNumber": "string", "allowFollowUpEmail": true, "followUpEmailAddress": "string", "allowCallTransfer": true, "callTransferType": "direct", "isTemplate": true, "type": "string", "allowEndCall": true, "tenantId": "string", "turnDetectionType": "server_vad", "turnDetectionEagerness": "auto", "turnDetectionThreshold": 0.1, "turnDetectionPrefixPadding": 0, "turnDetectionSilenceDuration": 0, "turnDetectionTimeout": true, "turnDetectionTimeoutTime": 0, "turnDetectionInterruptResponse": true, "transcriptionModel": "string", "transcriptionLanguage": "string", "transcriptionInstructions": "string", "noiseReductionType": "none", "toolAssignments": { "before": [ "8e6267db-32ed-454a-a2cc-6beef2f6f00e" ], "during": [ "e3ae3f0a-5397-4416-b273-f7833a7fddc8" ], "after": [ "3f00dd4a-56f2-49c5-940c-69eed8a9fb5b" ] }}curl -X POST 'https://api.envocal.ai/v1/tenants/string/agent-templates/string/instantiate' \
-H 'Content-Type: application/json' \
-d '{
"name": "string"
}'{
"id": "string",
"version": 0,
"name": "string",
"description": "string",
"instructions": "string",
"variableDefinitionsJson": "string",
"status": "draft",
"model": "string",
"voice": "alloy",
"knowledgeBaseIds": [
"string"
],
"phoneNumberId": "string",
"phoneNumber": "string",
"allowFollowUpEmail": true,
"followUpEmailAddress": "string",
"allowCallTransfer": true,
"callTransferType": "direct",
"isTemplate": true,
"type": "string",
"allowEndCall": true,
"tenantId": "string",
"turnDetectionType": "server_vad",
"turnDetectionEagerness": "auto",
"turnDetectionThreshold": 0.1,
"turnDetectionPrefixPadding": 0,
"turnDetectionSilenceDuration": 0,
"turnDetectionTimeout": true,
"turnDetectionTimeoutTime": 0,
"turnDetectionInterruptResponse": true,
"transcriptionModel": "string",
"transcriptionLanguage": "string",
"transcriptionInstructions": "string",
"noiseReductionType": "none",
"toolAssignments": {
"before": [
"8e6267db-32ed-454a-a2cc-6beef2f6f00e"
],
"during": [
"e3ae3f0a-5397-4416-b273-f7833a7fddc8"
],
"after": [
"3f00dd4a-56f2-49c5-940c-69eed8a9fb5b"
]
}
}