Creates the agent in the tenant together with a default widget configuration whose settings are all
unset (the widget's defaults apply; change them with PUT /v1/tenants/{tenantId}/agents/{agentId}/widget-configs/{id}). Omitted voice settings get
defaults (server_vad turn detection, gpt-4o-transcribe transcription, far_field noise reduction).
Assign tools with PUT /v1/tenants/{tenantId}/agents/{id}/tools and a phone number with
POST /v1/tenants/{tenantId}/agents/{agentId}/phone-numbers/{phoneNumberId}.
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.
The new agent.
A new agent. Omitted optional fields get defaults.
name*stringDisplay name.
description?stringInternal description; not given to the AI.
instructions?stringSystem prompt. May reference prompt variables as {{name}} and system variables such as {{system_caller_number}}.
variableDefinitionsJson?stringPrompt variables as a JSON-encoded string: an array of {"name", "jsonType", "placeholder", "description", "required"}.
status?stringLifecycle status. Default draft.
"draft""active""archived"model?stringRealtime model, e.g. gpt-realtime. Omit for the platform default.
voice?stringVoice for speech output.
"alloy""ash""ballad""coral""echo""sage""shimmer""verse""marin""cedar"knowledgeBaseIds?array<string>Knowledge bases to link; they must belong to tenantId.
allowFollowUpEmail?booleanGive the AI a send_email tool for follow-up emails. Default false.
followUpEmailAddress?stringFollow-up email recipient; required when allowFollowUpEmail is true.
allowCallTransfer?booleanGive the AI a transfer_call tool on phone calls. Default true.
callTransferType?stringHow calls are transferred. Default direct.
"direct""semi_attended"isTemplate?booleanMake this agent a template for this tenant and its sub-tenants. Default false.
type?stringOptional free-text label; not used by the platform.
allowEndCall?booleanGive the AI an end_call tool. Default false.
turnDetectionType?stringserver_vad (default), semantic_vad or none.
"server_vad""semantic_vad""none"turnDetectionEagerness?stringsemantic_vad only. Default auto.
"auto""low""medium""high"turnDetectionThreshold?numberserver_vad only, 0.0–1.0. Default 0.5.
doubleturnDetectionPrefixPadding?integerserver_vad only, milliseconds. Default 300.
int32turnDetectionSilenceDuration?integerserver_vad only, milliseconds. Default 500.
int32turnDetectionTimeout?booleanserver_vad only: speak up after a period of user silence. Default false.
turnDetectionTimeoutTime?integerIdle timeout in milliseconds; required when turnDetectionTimeout is true.
int32turnDetectionInterruptResponse?booleanLet the user interrupt the AI. Default true.
transcriptionModel?stringgpt-4o-transcribe (default), gpt-4o-mini-transcribe or off.
transcriptionLanguage?stringISO 639-1 code or auto (default).
transcriptionInstructions?stringOptional hints for the transcriber.
noiseReductionType?stringnear_field, far_field (default) or none.
"none""near_field""far_field"toolAssignments?Ignored; assign tools with PUT /v1/tenants/{tenantId}/agents/{id}/tools after creating the 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/agents' \ -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/agents' \
-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"
]
}
}