When the user started a call and wants to end it by pressing the cancel button, the client sends this request
POST /api/v1/intercom/calls/{call}/end
int call, ID of the call to be terminated (status should be answered)
int
204 No Content
No Content
Successful response
401 Unauthorized
Unauthorized
Authorization token not sent or not valid
404 Not Found
Not Found
If the call does not belong to the user, does not exist or is not answered
curl -k --request POST \ --url 'https://your-domain/api/v1/intercom/calls/{call}/end' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --data '{ "call": 0 }'
$data = array ( 'call' => 0, ); $context = stream_context_create([ 'ssl'=>['verify_peer' => false], 'http' => [ 'method' => 'POST', 'header' => "Content-Type: application/json\r Accept: application/json", 'content'=>json_encode($data) ] ]); $result = file_get_contents('https://your-domain/api/v1/intercom/calls/{call}/end', false, $context);
Please note, these errors can depend on your browser setup.
If this problem persists, please contact our support.