Stop a call
Ends a call that hasn’t finished yet, inbound or outbound. Takes no request body.
What happens depends on how far the call has got:
QueuedorRinging— the call is cancelled before anyone answers. It never connects, nothing is charged, and it ends withterminationType: "canceled".In-Progress— the call is hung up. It ends withterminationType: "completed", and itsstatus.labelreadsCompleted (Cancelled).
If the callee answers in the instant before the stop takes effect, the
call is hung up rather than cancelled, so it ends as completed and is
billed for the seconds it was connected.
The call isn’t over when this returns. The response carries the
call with status.cancelRequested and status.cancelPending set to
true; status.state still shows the state the call was in. The call
reaches Terminated a moment later, which emits
call.status_changed and
call.ended with canceled: true.
Wait on call.ended to know it’s done.
Once the call has ended, stopping it returns 400.
With Self-Hosted, Dial opens the
socket to your server only once an outbound call is answered, so
stopping a Queued or Ringing call means your server is never
contacted.
Authentication
Your Dial API key, sent as Authorization: Bearer sk_live_...
Path parameters
Response
The stop was accepted. The returned call has status.cancelPending: true until it reaches Terminated.