Skip to main content
Skip table of contents

Завершить звонoк

Завершить звонок

После того, как пользователь начал звонок и хочет его завершить нажатием на кнопку сброса, клиенты отсылают этот запрос

POST /api/v1/intercom/calls/{call}/end

Параметры метода

int call, Идентификатор звонка, который нужно завершить (статус должен быть answered)

204 No Content

Успешный ответ

401 Unauthorized

Токен авторизации не передан или не валидный

404 Not Found

Если звонок не принадлежит пользователю, не существует или не в статусе answered

cURL
BASH
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
}'
PHP
PHP
$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);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.