Cancel Call
curl --request DELETE \
--url https://client-backend.oktivo.com/api/v1/crm/calls/{contactUID} \
--header 'Authorization: Bearer <token>'import requests
url = "https://client-backend.oktivo.com/api/v1/crm/calls/{contactUID}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://client-backend.oktivo.com/api/v1/crm/calls/{contactUID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://client-backend.oktivo.com/api/v1/crm/calls/{contactUID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://client-backend.oktivo.com/api/v1/crm/calls/{contactUID}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://client-backend.oktivo.com/api/v1/crm/calls/{contactUID}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-backend.oktivo.com/api/v1/crm/calls/{contactUID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Call cancelled successfully"
}
{
"success": false,
"message": "Contact not found"
}
{
"success": false,
"message": "Cannot cancel contact with status \"completed\""
}
Calls
Cancel Call
Cancel a pending/in-progress call and any scheduled retries.
DELETE
/
api
/
v1
/
crm
/
calls
/
{contactUID}
Cancel Call
curl --request DELETE \
--url https://client-backend.oktivo.com/api/v1/crm/calls/{contactUID} \
--header 'Authorization: Bearer <token>'import requests
url = "https://client-backend.oktivo.com/api/v1/crm/calls/{contactUID}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://client-backend.oktivo.com/api/v1/crm/calls/{contactUID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://client-backend.oktivo.com/api/v1/crm/calls/{contactUID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://client-backend.oktivo.com/api/v1/crm/calls/{contactUID}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://client-backend.oktivo.com/api/v1/crm/calls/{contactUID}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-backend.oktivo.com/api/v1/crm/calls/{contactUID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Call cancelled successfully"
}
{
"success": false,
"message": "Contact not found"
}
{
"success": false,
"message": "Cannot cancel contact with status \"completed\""
}
Path Parameters
string
required
The unique identifier of the contact to cancel.
Response
boolean
Indicates if the cancellation was successful.
string
Confirmation message.
{
"success": true,
"message": "Call cancelled successfully"
}
{
"success": false,
"message": "Contact not found"
}
{
"success": false,
"message": "Cannot cancel contact with status \"completed\""
}
Behavior
- The contact’s status is set to
stopped - Any scheduled retries are cancelled immediately
- No further credits will be consumed for this contact
- If the call is currently active (ringing or connected), this does not hang up the call it only prevents future retry attempts
Cancellable Statuses
You can only cancel contacts in these statuses:| Status | Can Cancel? |
|---|---|
pending | ✅ Yes |
in_progress | ✅ Yes |
completed | ❌ No returns 409 |
failed | ❌ No returns 409 |
stopped | ❌ No already cancelled |
This endpoint accepts both API Token (
okt_...) and JWT authentication.