Skip to navigation

Stop a call

View as Markdown

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:

  • Queued or Ringing — the call is cancelled before anyone answers. It never connects, nothing is charged, and it ends with terminationType: "canceled".
  • In-Progress — the call is hung up. It ends with terminationType: "completed", and its status.label reads Completed (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

AuthorizationBearer

Your Dial API key, sent as Authorization: Bearer sk_live_...

Path parameters

idstringRequired

Response

The stop was accepted. The returned call has status.cancelPending: true until it reaches Terminated.

callobjectOptional

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
502
Bad Gateway Error