curl -X PATCH https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/deployment \
-H "X-API-Key: vaani_<your_key>" \
-H "Content-Type: application/json" \
-d '{
"deployment": {
"phone": {
"call_type": {
"Inbound": "+911234567890",
"Outbound": ["+911234567890", "+919876543210"]
}
}
}
}'
const response = await fetch(
"https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/deployment",
{
method: "PATCH",
headers: {
"X-API-Key": "vaani_<your_key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
deployment: {
phone: {
call_type: {
Inbound: "+911234567890",
Outbound: ["+911234567890"],
},
},
},
}),
}
);
const data = await response.json();
console.log(data);
import requests
requests.patch(
"https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/deployment",
headers={"X-API-Key": "vaani_<your_key>", "Content-Type": "application/json"},
json={
"deployment": {
"phone": {
"call_type": {
"Inbound": "",
"Outbound": ["+911234567890"],
}
}
}
},
)
{
"success": true,
"message": "Deployment section updated successfully"
}
Agents
Update Deployment
Partially update the deployment section of an agent
PATCH
/
api
/
agent
/
{agent_id}
/
deployment
curl -X PATCH https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/deployment \
-H "X-API-Key: vaani_<your_key>" \
-H "Content-Type: application/json" \
-d '{
"deployment": {
"phone": {
"call_type": {
"Inbound": "+911234567890",
"Outbound": ["+911234567890", "+919876543210"]
}
}
}
}'
const response = await fetch(
"https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/deployment",
{
method: "PATCH",
headers: {
"X-API-Key": "vaani_<your_key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
deployment: {
phone: {
call_type: {
Inbound: "+911234567890",
Outbound: ["+911234567890"],
},
},
},
}),
}
);
const data = await response.json();
console.log(data);
import requests
requests.patch(
"https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/deployment",
headers={"X-API-Key": "vaani_<your_key>", "Content-Type": "application/json"},
json={
"deployment": {
"phone": {
"call_type": {
"Inbound": "",
"Outbound": ["+911234567890"],
}
}
}
},
)
{
"success": true,
"message": "Deployment section updated successfully"
}
Update Agent Deployment
Partially update the deployment section of an agent. Only the fields you include are merged into the existing config; omitted fields remain unchanged. The deployment section controls phone number routing — which numbers the agent handles for inbound calls and which numbers it dials from for outbound calls.Path Parameters
string
required
UUID of the agent to update.
Body Parameters
object
Deployment configuration wrapper.
Show deployment fields
Show deployment fields
Request Example
curl -X PATCH https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/deployment \
-H "X-API-Key: vaani_<your_key>" \
-H "Content-Type: application/json" \
-d '{
"deployment": {
"phone": {
"call_type": {
"Inbound": "+911234567890",
"Outbound": ["+911234567890", "+919876543210"]
}
}
}
}'
const response = await fetch(
"https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/deployment",
{
method: "PATCH",
headers: {
"X-API-Key": "vaani_<your_key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
deployment: {
phone: {
call_type: {
Inbound: "+911234567890",
Outbound: ["+911234567890"],
},
},
},
}),
}
);
const data = await response.json();
console.log(data);
import requests
requests.patch(
"https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/deployment",
headers={"X-API-Key": "vaani_<your_key>", "Content-Type": "application/json"},
json={
"deployment": {
"phone": {
"call_type": {
"Inbound": "",
"Outbound": ["+911234567890"],
}
}
}
},
)
Response
{
"success": true,
"message": "Deployment section updated successfully"
}
Phone numbers must be in E.164 format (e.g.
+911234567890). Pass an empty string "" for Inbound to remove inbound routing.⌘I

