Skip to navigation

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.

| 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 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
transcriberTypeenumOptional

STT engine to use for this draft. pulse is the current default. pulse-legacy is a legacy path retained for older integrations.

Allowed values:
customLLMWebSocketUrlstringOptional

Custom LLM WebSocket URL (overrides slmModel)

widgetConfigobjectOptional

Chat-widget configuration. Configure from the dashboard; safe to ignore for API-only integrations.

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
Allowed values:
smartTurnConfigobjectOptional
voiceDetectionConfigobjectOptional
voiceMailDetectionConfigobjectOptional
denoisingConfigobjectOptional
redactionConfigobjectOptional
pronunciationDictslist of objectsOptional
llmIdleTimeoutConfigobjectOptional
sessionTimeoutConfigobjectOptional
workflowTypeenumOptional

The type of workflow configuration.

  • single_prompt — simple prompt-based agent (default).
  • workflow_graph — node-based visual workflow. Restricted: requires the conversational-agents org flag. Requests without that flag receive HTTP 403 "Conversational Flow agents are no longer available for your organization." The Zod validator still accepts this enum value on any org, but the authorization middleware gates it.
  • multi_agents — multi-agent orchestration (restricted; requires slmModel to be one of [electron, gpt-5.2-azure]).
Allowed values:
timezoneobjectOptional
callDispositionConfigstringOptional
enableStyleGuidebooleanOptional
speechFormattingbooleanOptional

Response

Draft config updated successfully
statusbooleanOptional
dataobjectOptional
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