curl --request DELETE \
--url https://api.cloudtalk.io/v1/numbers/{numberId}/call-flow \
--header 'Authorization: Basic <encoded-value>' \
--header 'If-Match: <if-match>'import requests
url = "https://api.cloudtalk.io/v1/numbers/{numberId}/call-flow"
headers = {
"If-Match": "<if-match>",
"Authorization": "Basic <encoded-value>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'If-Match': '<if-match>', Authorization: 'Basic <encoded-value>'}
};
fetch('https://api.cloudtalk.io/v1/numbers/{numberId}/call-flow', 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://api.cloudtalk.io/v1/numbers/{numberId}/call-flow",
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: Basic <encoded-value>",
"If-Match: <if-match>"
],
]);
$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://api.cloudtalk.io/v1/numbers/{numberId}/call-flow"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("If-Match", "<if-match>")
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.cloudtalk.io/v1/numbers/{numberId}/call-flow")
.header("If-Match", "<if-match>")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudtalk.io/v1/numbers/{numberId}/call-flow")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"target": "<string>"
}
],
"target": "<string>"
},
"requestId": "<string>"
}{
"code": "UNAUTHORIZED",
"message": "You are not authorized to access this resource."
}{
"error": {
"code": "FORBIDDEN",
"message": "This account is not active."
},
"requestId": "3b0e51c7a9"
}{
"error": {
"code": "CALL_FLOWS.NUMBER_NOT_FOUND",
"message": "No number with this id in your account."
},
"requestId": "c41f0a9e2b"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"target": "<string>"
}
],
"target": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "CALL_FLOWS.ETAG_MISMATCH",
"message": "The flow changed since your read. Read it again, reapply your change and retry.",
"target": "If-Match"
},
"requestId": "c41f0a9e2b"
}{
"error": {
"code": "CALL_FLOWS.IF_MATCH_REQUIRED",
"message": "Send If-Match with the ETag of your last read of the flow.",
"target": "If-Match"
},
"requestId": "c41f0a9e2b"
}<string>{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"target": "<string>"
}
],
"target": "<string>"
},
"requestId": "<string>"
}Delete a number's call flow
Removes every step of the number’s flow. From the next call, calls to the number are hung up straight away: the caller hears no greeting and reaches nobody. Business hours still apply when closed: outside opening hours the closed action plays as before. Jump to steps in other numbers that pointed into this flow are deleted.
The number stays yours and keeps its versions. Undo with Restore a call flow version: the deletion is a version with source: delete. Deleting an empty flow again is also 204, when If-Match matches.
curl --request DELETE \
--url https://api.cloudtalk.io/v1/numbers/{numberId}/call-flow \
--header 'Authorization: Basic <encoded-value>' \
--header 'If-Match: <if-match>'import requests
url = "https://api.cloudtalk.io/v1/numbers/{numberId}/call-flow"
headers = {
"If-Match": "<if-match>",
"Authorization": "Basic <encoded-value>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'If-Match': '<if-match>', Authorization: 'Basic <encoded-value>'}
};
fetch('https://api.cloudtalk.io/v1/numbers/{numberId}/call-flow', 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://api.cloudtalk.io/v1/numbers/{numberId}/call-flow",
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: Basic <encoded-value>",
"If-Match: <if-match>"
],
]);
$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://api.cloudtalk.io/v1/numbers/{numberId}/call-flow"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("If-Match", "<if-match>")
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.cloudtalk.io/v1/numbers/{numberId}/call-flow")
.header("If-Match", "<if-match>")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudtalk.io/v1/numbers/{numberId}/call-flow")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"target": "<string>"
}
],
"target": "<string>"
},
"requestId": "<string>"
}{
"code": "UNAUTHORIZED",
"message": "You are not authorized to access this resource."
}{
"error": {
"code": "FORBIDDEN",
"message": "This account is not active."
},
"requestId": "3b0e51c7a9"
}{
"error": {
"code": "CALL_FLOWS.NUMBER_NOT_FOUND",
"message": "No number with this id in your account."
},
"requestId": "c41f0a9e2b"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"target": "<string>"
}
],
"target": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "CALL_FLOWS.ETAG_MISMATCH",
"message": "The flow changed since your read. Read it again, reapply your change and retry.",
"target": "If-Match"
},
"requestId": "c41f0a9e2b"
}{
"error": {
"code": "CALL_FLOWS.IF_MATCH_REQUIRED",
"message": "Send If-Match with the ETag of your last read of the flow.",
"target": "If-Match"
},
"requestId": "c41f0a9e2b"
}<string>{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"target": "<string>"
}
],
"target": "<string>"
},
"requestId": "<string>"
}Authorizations
HTTP Basic Authentication. Use your API Access Key ID as the username and your API Access Key Secret as the password. Generate keys in the CloudTalk Dashboard under Account -> Settings -> API Keys (https://dashboard.cloudtalk.io/menu/account/settings/API-keys).
Headers
Path Parameters
The number id, as List and search numbers returns it.
"600"
Query Parameters
Response
Deleted. No body.