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).
Path parameters
The agent ID.
The draft ID
Request body
Example request
{
"singlePromptConfig": {
"prompt": "You are a helpful AI assistant that can help users with various tasks.",
"tools": [
{
"name": "end_call",
"description": "End the conversation when the user is satisfied",
"transferNumber": "+1234567890",
"url": "https://api.example.com/orders",
"method": "GET",
"headers": {
"Authorization": "Bearer TOKEN",
"Content-Type": "application/json"
},
"headersArray": [
{
"key": "Authorization",
"value": "Bearer TOKEN"
}
],
"queryParams": [
{
"key": "id",
"value": "{{order_id}}"
}
],
"requestBody": "{\"customer_id\": \"{{customer_id}}\"}",
"responseVariables": [
{
"variableName": "orderStatus",
"jsonPath": "$.data.status"
}
],
"variablesExtractionSchema": [
{
"name": "customer_name",
"description": "The customer's full name",
"values": [
"satisfied",
"unsatisfied",
"neutral"
]
}
],
"knowledgeBaseId": "60d0fe4f5311236168a109ca",
"fillerPhrases": [
"Let me check that for you",
"One moment please"
]
}
]
},
"postCallAnalyticsConfig": {
"dispositionMetrics": [
{
"identifier": "call_resolved",
"dispositionMetricPrompt": "Was the customer issue resolved by the end of the call?",
"dispositionMetricType": "STRING",
"choices": [
"resolved",
"escalated",
"callback_scheduled",
"no_action"
]
}
]
}
}Response
Draft config updated successfully
Example response
{
"status": true
}