nock
11/11/2025, 5:03 PMVapi Support Bot
11/11/2025, 5:03 PMjs
const spamNumbers = new Set(["+11234567890", "+15558675309"]);
app.post("/webhooks/vapi", (req, res) => {
const incomingNumber = req.body?.call?.from?.phoneNumber;
if (incomingNumber && spamNumbers.has(incomingNumber)) {
return res.json({ error: "Sorry, your number is blocked due to spam reports." });
}
// Allow call: return assistant config here
});
This will automatically reject calls from listed numbers before they reach your assistant, saving your credits. For more details, see the documentation I have found.
Source:
- [Spam call rejection](https://docs.vapi.ai/server-url/spam-call-rejection)nock
11/11/2025, 5:35 PMnock
11/11/2025, 5:39 PMnock
11/11/2025, 8:15 PM