---
title: Calls API
description: Initiate, list, inspect, cancel, and summarize direct calls.
---
import Endpoint from '../../../components/Endpoint.astro';
`agent_id` and `to_number` are required for a single call. `contact_name` and `custom_instruction` are optional.
```javascript
const response = await fetch(
"https://api.vaniagent.com/api/developer/v1/calls",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": process.env.VANIAGENT_API_KEY,
},
body: JSON.stringify({
agent_id: "agent_id_here",
to_number: "+919876543210",
contact_name: "Asha",
custom_instruction: "Ask which product category they enquired about.",
}),
},
);
const call = await response.json();
```
Treat initiation as asynchronous. Poll call detail or consume CRM webhooks for the terminal outcome. Cancellation only succeeds while the call remains cancellable.