Skip to main content

Cancelling Calls

HuskyVoice AI allows you to stop pending or scheduled calls before they are answered. This is essential for preventing redundant reach-outs if a customer has already completed an action elsewhere.


1. Using the REST API

Best for programmatic control within your backend.

  • Endpoint: POST https://api.huskyvoice.ai/v1/calls/{call_id}/cancel
  • Method: POST
curl -s -X POST https://api.huskyvoice.ai/v1/calls/call_abc_123/cancel \
-H "x-api-key: YOUR_API_KEY"

Sample Response:

{
"data": {
"call_id": "e95bd2f6-69e3-4918-856a-65f1197613de",
"status": "cancelled",
"cancelled_at": "2026-07-07T13:15:27.570Z"
}
}

Important Constraints

Call State Flow

A call progresses through these states in order:

queuedinitiatedringingin_progress

✅ Cancellation is only possible at the queued stage. ❌ Once a call moves past queued, it cannot be stopped via the cancel endpoint.

  • Timing: You can only cancel calls that are in the queued state.
  • Active Calls: Once a call moves to initiated, ringing, or in_progress, it cannot be cancelled via these endpoints.
  • Idempotency: Repeatedly sending a cancel request for the same call_id is safe and will not cause errors.