curl -X PATCH https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/analysis \
-H "X-API-Key: vaani_<your_key>" \
-H "Content-Type: application/json" \
-d '{
"evaluations": {
"dispositions": {
"enabled": true,
"prompt_based": [
{
"name": "purchase_intent",
"type": "bool",
"prompt": "Did the user express interest in purchasing?",
"list_of_tags": {"Yes": "user showed clear buying intent", "No": "no purchase intent detected"}
}
]
},
"conversation_evaluation": {
"enabled": true,
"prompt": "Rate the quality of this customer service call on a scale of 1-10 and explain why."
}
},
"extraction": {
"data_collection": {
"enabled": true,
"data_points": [
{
"name": "customer_name",
"prompt": "Extract the customer name from the transcript.",
"nullable": true
}
]
}
}
}'
const response = await fetch(
"https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/analysis",
{
method: "PATCH",
headers: {
"X-API-Key": "vaani_<your_key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
evaluations: {
dispositions: {
enabled: true,
prompt_based: [
{
name: "purchase_intent",
type: "bool",
prompt: "Did the user express interest in purchasing?",
},
],
},
},
}),
}
);
const data = await response.json();
console.log(data);
import requests
requests.patch(
"https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/analysis",
headers={"X-API-Key": "vaani_<your_key>", "Content-Type": "application/json"},
json={
"extraction": {
"data_collection": {
"enabled": True,
"data_points": [
{
"name": "callback_requested",
"prompt": "Did the customer ask for a callback?",
"nullable": False,
}
],
},
"collect_concerns": {"enabled": True},
}
},
)
{
"success": true,
"message": "Analysis section updated successfully"
}
Agents
Update Analysis
Partially update the analysis section of an agent
PATCH
/
api
/
agent
/
{agent_id}
/
analysis
curl -X PATCH https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/analysis \
-H "X-API-Key: vaani_<your_key>" \
-H "Content-Type: application/json" \
-d '{
"evaluations": {
"dispositions": {
"enabled": true,
"prompt_based": [
{
"name": "purchase_intent",
"type": "bool",
"prompt": "Did the user express interest in purchasing?",
"list_of_tags": {"Yes": "user showed clear buying intent", "No": "no purchase intent detected"}
}
]
},
"conversation_evaluation": {
"enabled": true,
"prompt": "Rate the quality of this customer service call on a scale of 1-10 and explain why."
}
},
"extraction": {
"data_collection": {
"enabled": true,
"data_points": [
{
"name": "customer_name",
"prompt": "Extract the customer name from the transcript.",
"nullable": true
}
]
}
}
}'
const response = await fetch(
"https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/analysis",
{
method: "PATCH",
headers: {
"X-API-Key": "vaani_<your_key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
evaluations: {
dispositions: {
enabled: true,
prompt_based: [
{
name: "purchase_intent",
type: "bool",
prompt: "Did the user express interest in purchasing?",
},
],
},
},
}),
}
);
const data = await response.json();
console.log(data);
import requests
requests.patch(
"https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/analysis",
headers={"X-API-Key": "vaani_<your_key>", "Content-Type": "application/json"},
json={
"extraction": {
"data_collection": {
"enabled": True,
"data_points": [
{
"name": "callback_requested",
"prompt": "Did the customer ask for a callback?",
"nullable": False,
}
],
},
"collect_concerns": {"enabled": True},
}
},
)
{
"success": true,
"message": "Analysis section updated successfully"
}
Update Agent Analysis
Partially update the analysis section of an agent. Only the fields you include are merged into the existing config; omitted fields remain unchanged. The analysis section controls post-call evaluations (dispositions, conversation scoring) and extraction (structured data collection, concern tracking).Path Parameters
string
required
UUID of the agent to update.
Body Parameters
object
Post-call evaluation configuration.
Show evaluations fields
Show evaluations fields
object
Call disposition tagging.
Show dispositions fields
Show dispositions fields
boolean
Enable disposition tagging.
array
List of prompt-driven disposition items. Each item has:
Show disposition item fields
Show disposition item fields
string
required
Disposition name (max 30 chars, e.g.
"purchase_intent").string
required
Value type:
"bool" | "string" | "number".string
required
Prompt instruction for the LLM to evaluate this disposition.
object
Optional tag-to-description map (e.g.
{"Yes": "user showed interest", "No": "no interest"}).array
System-defined dispositions (provider-specific shape).
object
Structured data extraction from call transcripts.
Show extraction fields
Show extraction fields
object
Extract specific data points from each call.
Show data_collection fields
Show data_collection fields
boolean
Enable data extraction.
array
List of data-point definitions. Each item has:
Request Example
curl -X PATCH https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/analysis \
-H "X-API-Key: vaani_<your_key>" \
-H "Content-Type: application/json" \
-d '{
"evaluations": {
"dispositions": {
"enabled": true,
"prompt_based": [
{
"name": "purchase_intent",
"type": "bool",
"prompt": "Did the user express interest in purchasing?",
"list_of_tags": {"Yes": "user showed clear buying intent", "No": "no purchase intent detected"}
}
]
},
"conversation_evaluation": {
"enabled": true,
"prompt": "Rate the quality of this customer service call on a scale of 1-10 and explain why."
}
},
"extraction": {
"data_collection": {
"enabled": true,
"data_points": [
{
"name": "customer_name",
"prompt": "Extract the customer name from the transcript.",
"nullable": true
}
]
}
}
}'
const response = await fetch(
"https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/analysis",
{
method: "PATCH",
headers: {
"X-API-Key": "vaani_<your_key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
evaluations: {
dispositions: {
enabled: true,
prompt_based: [
{
name: "purchase_intent",
type: "bool",
prompt: "Did the user express interest in purchasing?",
},
],
},
},
}),
}
);
const data = await response.json();
console.log(data);
import requests
requests.patch(
"https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/analysis",
headers={"X-API-Key": "vaani_<your_key>", "Content-Type": "application/json"},
json={
"extraction": {
"data_collection": {
"enabled": True,
"data_points": [
{
"name": "callback_requested",
"prompt": "Did the customer ask for a callback?",
"nullable": False,
}
],
},
"collect_concerns": {"enabled": True},
}
},
)
Response
{
"success": true,
"message": "Analysis section updated successfully"
}
⌘I

