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 "Authorization: Bearer YOUR_API_KEY"

Sample Response:

{
"success": true,
"call_id": "call_abc_123",
"status": "cancelled",
"message": "Call has been successfully cancelled."
}

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.