Vapi Support Bot
09/18/2025, 12:48 PMjs
app.post("/webhooks/vapi", (req, res) => {
const spamNumbers = new Set(["+11234567890"]);
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." });
}
// ...proceed with call
});
Note: This still incurs Twilio costs, as the call is accepted before rejection.
[See full example in Vapi docs](https://docs.vapi.ai/server-url/spam-call-rejection)
Source:
- [Spam call rejection](https://docs.vapi.ai/server-url/spam-call-rejection)yanyan
09/18/2025, 12:49 PMChiranjeet Mishra
09/22/2025, 1:10 PM