Edit draft config (prompt, tools, post-call metrics, voice, etc.)
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
API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.
Path parameters
Request
Per-agent post-call analytics configuration. Evaluated after each call ends
and surfaced in call logs under the postCallAnalytics field.
Synthesizer (TTS) configuration. See CreateAgentRequest for full shape.
STT engine to use for this draft. pulse is the current default. pulse-legacy is a legacy path retained for older integrations.
Custom LLM WebSocket URL (overrides slmModel)
Chat-widget configuration. Configure from the dashboard; safe to ignore for API-only integrations.
Pre-call API configuration. See CreateAgentRequest for full shape.
Global prompt for workflow_graph agents (max 4000 characters)
The type of workflow configuration.
single_prompt— simple prompt-based agent (default).workflow_graph— node-based visual workflow. Restricted: requires theconversational-agentsorg 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; requiresslmModelto be one of[electron, gpt-5.2-azure]).