Two things do all the work: the API lets your system start AI calls, and a webhook brings the result of every call back to your system. This page shows when to use each, where to set them up in your dashboard, and exactly what to paste where.
Your system and TaskVox talk in both directions. The API is the request you send; the webhook is the reply TaskVox sends back when the call is over.
If the action starts on your side, use the API. If you want to know when something has happened on TaskVox, use a webhook.
| I want to… | Use | How |
|---|---|---|
| Call every new website / ad lead automatically | API | POST /api/campaigns with the lead’s number and "autoStart": true |
| Send today’s list from my CRM for calling | API | One POST /api/campaigns with all the numbers |
| Update the lead in my CRM after every call | Webhook | Subscribe to call.completed |
| Know when a whole campaign has finished | Webhook | Subscribe to campaign.completed |
| Alert my team when a call fails | Webhook | Subscribe to call.failed |
| Pull call history into a report or BI tool | API | GET /api/calls (with campaignId and limit) |
| Check a number against my do-not-call list first | API | Do Not Call endpoints in the API reference |
| Upload a CSV by hand and see results on screen | Dashboard | No API needed — use Campaigns and Leads in the dashboard |
402).https://) that can receive a POST request — your server, or a URL from a tool like Zapier or Make.tvx_.Store it on your server or in your no-code tool’s secret settings. Never put it in website JavaScript or a mobile app: anyone who sees it can place calls on your credits. You can Revoke a key on the same page at any time.
Every call is made by one of your agents. Copy the value in the ID column for the agent that should call (for example sales-agent-01). You can also list them with the API:
curl https://taskvox.in/api/agents \
-H "X-API-Key: tvx_your_key_here"
Send the agent ID and the numbers. Add "autoStart": true so calling begins immediately — without it the campaign is only created and nothing is dialled.
curl -X POST https://taskvox.in/api/campaigns \
-H "X-API-Key: tvx_your_key_here" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: lead-48213" \
-d '{
"name": "Website lead 48213",
"agentId": "sales-agent-01",
"numbers": [{ "number": "9198XXXXXXXX", "variables": { "name": "Rahul" } }],
"autoStart": true
}'
numbers can be plain numbers ("9198XXXXXXXX") or objects with variables — such as the lead’s name — that your agent’s script can use.Idempotency-Key (optional, recommended): use your lead ID, so if your system retries the request the person is not called twice.id and "started": true. If it says "started": false, read startError — see Troubleshooting.POST /api/campaigns/{id}/start.https://) where you want results delivered (your server route, or the URL your Zapier / Make step gives you).call.completed (ticked by default), call.failed, campaign.started, campaign.completed."event": "test") to your URL and shows whether it got through.Each delivery is a JSON POST like this:
{
"event": "call.completed",
"timestamp": "2026-10-09T09:57:09.405Z",
"data": {
"call_id": "564a5b3e-95db-4e2c-8f73-5a8c35dcf39d",
"agent_id": "sales-agent-01",
"campaign_id": "a1b2c3d4",
"from": "07447154662",
"to": "9198XXXXXXXX",
"duration_seconds": 75,
"turns": 6,
"status": "answered",
"transcript": [ { "role": "assistant", "text": "Namaste! …" }, { "role": "user", "text": "…" } ],
"lead": {
"label": "hot",
"score": 82,
"summary": "Interested in a 2 BHK, budget ₹80 lakh, wants a site visit on Saturday.",
"collected_fields": { "budget": "₹80 lakh", "timeline": "2–3 months" }
},
"recording_url": "https://taskvox.in/api/calls/564a5b3e-95db-4e2c-8f73-5a8c35dcf39d/recording"
}
}
Before trusting it, check the X-TaskVox-Signature header: it is an HMAC-SHA256 of the raw request body, made with your webhook secret. Then reply 200 quickly and update the CRM:
// Node.js + Express
const crypto = require('crypto');
app.post('/taskvox/webhook', express.raw({ type: 'application/json' }), (req, res) => {
const expected = crypto.createHmac('sha256', process.env.TASKVOX_WEBHOOK_SECRET)
.update(req.body).digest('hex');
const got = req.get('X-TaskVox-Signature') || '';
if (got.length !== expected.length ||
!crypto.timingSafeEqual(Buffer.from(got), Buffer.from(expected))) {
return res.status(401).send('bad signature');
}
res.sendStatus(200); // reply first…
const evt = JSON.parse(req.body); // …then do the work
if (evt.event === 'call.completed') {
// find the lead by evt.data.to or by your own ID, save the transcript,
// and create a follow-up task
}
});
lead carries the lead label (hot, warm, cold or not_a_lead), score, summary and the answers collected; recording_url downloads the recording with your API key. Its values are null when there was no conversation to analyse, and recording_url is null when no recording exists. The same labels and summaries are on the Leads page in your dashboard, where you can also download them as CSV.
200 within a few seconds. A failed delivery is retried after about 1, 5 and 15 minutes; after that it is dropped.X-TaskVox-Delivery header or data.call_id.GET /api/calls on a schedule.You do not need a developer to connect TaskVox to Google Sheets, a CRM or WhatsApp alerts. Any automation tool with webhook and HTTP steps works.
call.completed, create it.data.to and data.status into your sheet or CRM.https://taskvox.in/api/campaigns, method POST, header X-API-Key with your key, body type JSON.name, agentId, numbers (the lead’s phone) and autoStart = true.| What you see | Why | Fix |
|---|---|---|
| Campaign created, no calls | Created without autoStart | Send "autoStart": true, or call POST /api/campaigns/{id}/start |
"started": false at night | Outside 8 am – 8 pm IST | Start it after 8 am |
startError mentions KYC | KYC not approved yet | Complete KYC in the dashboard |
401 | Missing or wrong API key | Send X-API-Key with a key that is not revoked |
402 | Credit balance is empty | Recharge, then retry |
403 | Read-only key, or an agent from another account | Use a read-write key and your own agent ID |
429 | More than 200 requests a minute on one key | Slow down; retry after RateLimit-Reset seconds |
| Webhook never arrives | URL not reachable from the internet (private or local addresses are blocked), or your server did not answer within 10 seconds | Use the Test button; reply 200 first, process after. Failed events are retried after about 1, 5 and 15 minutes |
| Signature does not match | Body was parsed before checking | Compute the HMAC on the raw body bytes |
The API is how your system talks to TaskVox — for example “call this number now”. A webhook is how TaskVox talks back to your system — “that call just finished, here is what was said”. Most integrations use both: the API to start calls, a webhook to receive results.
Not necessarily. You can start calls and receive results with no-code tools such as Zapier or Make, using their webhook and HTTP steps. For a custom CRM or website, a developer can connect it in a few hours using the examples on this page.
In the TaskVox dashboard: Account → API Keys → type a name → Generate Key. The key is shown only once, so copy it straight away and keep it on your server, never in website or app code.
In the TaskVox dashboard: Account → Webhooks → + Add Webhook. Enter a name, paste your endpoint URL (a public web address — https:// strongly recommended), choose the events, and click Create Webhook. Copy the secret shown after creation.
The usual reasons: the campaign was created without "autoStart": true; it is outside 8 am – 8 pm IST; your credit balance is empty (error 402); or your account’s KYC is not approved yet. The API response tells you which.
Yes, within limits. If your endpoint does not answer with a 2xx within 10 seconds, TaskVox sends the same event again after about 1, 5 and 15 minutes — 4 attempts in total. Every attempt carries the same X-TaskVox-Delivery ID, so you can ignore repeats. Reply quickly with a 2xx status; for a longer outage, also check GET /api/calls to fill any gaps.
Create a key in your dashboard, or read the full endpoint reference.
India’s lowest-priced AI voice agent with a built-in lead CRM. From ₹2/min, telecom included. Hindi + 9 Indian languages.
📱 +91 99671 60616 (WhatsApp) 📧 hello@taskvox.in 🛟 support@taskvox.in