Edit draft config (prompt, tools, post-call metrics, voice, etc.)

Deprecated
View as Markdown
**Deprecated on the v2 branch model.** Migrate to `PUT /agent/{id}/branches/{branchId}/draft`. When `ENABLE_BRANCH_MODEL` is on, this endpoint returns `409 versioning_v2_migration_required` with the `Deprecation: true` header. See the [migration guide](/voice-agents/deprecations/agent-versioning-migration). | Update the configuration of a draft. This single endpoint is how every agent-level config field is changed: prompt, tools, voice, language, **post-call analytics (disposition metrics)**, and more. There is no standalone post-call-analytics endpoint — it lives here as the `postCallAnalyticsConfig` body field. ## Post-Call Analytics Pass a `postCallAnalyticsConfig` object to configure disposition metrics (STRING, BOOLEAN, INTEGER, ENUM, DATETIME) that are automatically extracted from each completed call, along with the `useInternalAnalyticsModel` and `useReasoningModel` flags. See the [Post-Call Metrics guide](/atoms/atoms-platform/features/post-call-metrics) for a full Python walkthrough and disposition metric schema reference. ## Full payload Accepts the full agent-shaped config payload (language, synthesizer, slmModel, defaultVariables, preCallAPI, etc.) plus two draft-specific fields: - `singlePromptConfig` — prompt and tools (end_call, transfer_call, api_call, extract_dynamic_variables, knowledge_base_search). - `postCallAnalyticsConfig` — disposition metrics + analytics/ reasoning model flags. Each PATCH increments the draft's revision counter. Config is not live until the draft is published and activated (see `/drafts/{draftId}/publish` and `/versions/{versionId}/activate`).

Authentication

AuthorizationBearer

API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.

Path parameters

idstringRequiredformat: "^[a-f\d]{24}$"
The agent ID.
draftIdstringRequired
The draft ID

Request

This endpoint expects an object.
singlePromptConfigobjectOptional
Configuration for single prompt workflow type
postCallAnalyticsConfigobjectOptional

Per-agent post-call analytics configuration. Evaluated after each call ends and surfaced in call logs under the postCallAnalytics field.

languageobjectOptional
Language configuration. See CreateAgentRequest for full shape.
synthesizerobjectOptional

Synthesizer (TTS) configuration. See CreateAgentRequest for full shape.

slmModelenumOptional
LLM model for this draft
transcriberTypestringOptional
STT engine to use for this draft
customLLMWebSocketUrlstringOptional

Custom LLM WebSocket URL (overrides slmModel)

widgetConfigobjectOptional

Widget configuration for chat-mode agents

defaultVariablesobjectOptional
Default prompt variables
preCallAPIobjectOptional

Pre-call API configuration. See CreateAgentRequest for full shape.

globalPromptstringOptional<=4000 characters

Global prompt for workflow_graph agents (max 4000 characters)

globalKnowledgeBaseIdstringOptional
Knowledge base ID to attach to this draft
firstMessagestringOptional
Opening message for this draft
allowInterruptionsbooleanOptional
waitForUserToSpeakFirstbooleanOptional
muteUserUntilFirstBotResponsebooleanOptional
interruptionBackoffTimerdoubleOptional0-10
backgroundSoundenumOptional
smartTurnConfigobjectOptional
voiceDetectionConfigobjectOptional
voiceMailDetectionConfigobjectOptional
denoisingConfigobjectOptional
redactionConfigobjectOptional
pronunciationDictslist of objectsOptional
llmIdleTimeoutConfigobjectOptional
sessionTimeoutConfigobjectOptional
workflowTypeenumOptional

The type of workflow configuration. workflow_graph uses a node-based visual workflow, single_prompt uses a simple prompt-based configuration.

timezoneobjectOptional
callDispositionConfigstringOptional
enableStyleGuidebooleanOptional
speechFormattingbooleanOptional

Response

Draft config updated successfully
statusboolean
dataobject
Represents either a draft revision or a published version of an agent's configuration.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
500
Internal Server Error