Skip to content
Get started

Cancel a call

client.call.cancel(stringid, RequestOptionsoptions?): CallCancelResponse { success }
POST/call/{id}/cancel

Stop a call’s future attempts. A call that has not started dialing yet is cancelled right away. A call whose attempt is already in progress is not hung up: that attempt finishes, and no retry or callback is scheduled after it. Returns 409 when the call is already in a terminal status.

ParametersExpand Collapse
id: string
ReturnsExpand Collapse
CallCancelResponse { success }
success: boolean

Cancel a call

import Revox from '@revoxai/sdk';

const client = new Revox({
  apiKey: process.env['REVOX_API_KEY'], // This is the default and can be omitted
});

const response = await client.call.cancel('id');

console.log(response.success);
{
  "success": true
}
Returns Examples
{
  "success": true
}