curl --request GET \
--url https://my.cloudtalk.io/api/calls/index.json \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://my.cloudtalk.io/api/calls/index.json"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://my.cloudtalk.io/api/calls/index.json', 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://my.cloudtalk.io/api/calls/index.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$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://my.cloudtalk.io/api/calls/index.json"
req, _ := http.NewRequest("GET", url, nil)
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.get("https://my.cloudtalk.io/api/calls/index.json")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://my.cloudtalk.io/api/calls/index.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"responseData": {
"itemsCount": 3,
"pageCount": 1,
"pageNumber": 1,
"limit": 3,
"data": [
{
"Cdr": {
"id": "27",
"billsec": "0",
"type": "outgoing",
"country_code": "421",
"public_external": 421904247371,
"public_internal": 421221291400,
"recorded": true,
"is_voicemail": false,
"fax_email": "0",
"is_redirected": "0",
"redirected_from": "",
"is_local": true,
"user_id": "1234",
"talking_time": "21",
"started_at": "2017-10-04T06:33:37.000Z",
"answered_at": "2017-10-04T06:33:37.000Z",
"ended_at": "2017-10-04T06:33:49.000Z",
"waiting_time": 2,
"wrapup_time": 5,
"recording_link": "https://analytics.cloudtalk.io/call-details/27"
},
"Contact": {
"id": "1234",
"name": "Jon Doe",
"title": "title",
"company": "First ltd.",
"industry": "IT",
"address": "8th Avenue",
"city": "London",
"zip": "838298",
"state": "England",
"type": "contact",
"tags": [
{
"id": "615",
"name": "VIP"
},
{
"id": "609",
"name": "Security"
}
],
"external_urls": [
{
"external_system": "CloudTalk",
"external_url": "https://my.cloudtalk.io/c/show/1234"
}
],
"contact_numbers": [
18884871675
],
"contact_emails": [
"jon.doe@first.com"
],
"custom_fields": [
{
"key": "age",
"value": "33"
}
],
"favorite_agent": {
"id": "1234",
"firstname": "Max",
"lastname": "Yellow",
"fullname": "Max Yellow",
"email": "max.yellow@cloudtalk.io",
"language": "en",
"role": "Admin",
"status": "online",
"default_outbound_number": 442012345678,
"associated_numbers": [
442012345678
],
"groups": [
"sales",
"support"
]
}
},
"CallNumber": {
"id": "12345",
"internal_name": "Sales support",
"caller_id_e164": 442012345678,
"country_code": "44",
"area_code": "20"
},
"BillingCall": {
"price": "0.000000"
},
"Agent": {
"id": "1234",
"firstname": "Max",
"lastname": "Yellow",
"fullname": "Max Yellow",
"email": "max.yellow@cloudtalk.io",
"language": "en",
"role": "Admin",
"status": "online",
"default_outbound_number": 442012345678,
"associated_numbers": [
442012345678
],
"groups": [
"sales",
"support"
]
},
"Notes": [
{
"id": "23",
"note": "Call later"
}
],
"Tags": [
{
"id": "123",
"name": "Missed"
},
{
"id": "124",
"name": "VIP"
}
]
}
]
}
}Call history
Returns call history. Filter by the numbers involved (public_internal, public_external), a date range (date_from, date_to), contact_id, user_id, agent_extension, call type or status, tag_id, or a specific call_id; page through the result with limit and page.
curl --request GET \
--url https://my.cloudtalk.io/api/calls/index.json \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://my.cloudtalk.io/api/calls/index.json"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://my.cloudtalk.io/api/calls/index.json', 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://my.cloudtalk.io/api/calls/index.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$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://my.cloudtalk.io/api/calls/index.json"
req, _ := http.NewRequest("GET", url, nil)
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.get("https://my.cloudtalk.io/api/calls/index.json")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://my.cloudtalk.io/api/calls/index.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"responseData": {
"itemsCount": 3,
"pageCount": 1,
"pageNumber": 1,
"limit": 3,
"data": [
{
"Cdr": {
"id": "27",
"billsec": "0",
"type": "outgoing",
"country_code": "421",
"public_external": 421904247371,
"public_internal": 421221291400,
"recorded": true,
"is_voicemail": false,
"fax_email": "0",
"is_redirected": "0",
"redirected_from": "",
"is_local": true,
"user_id": "1234",
"talking_time": "21",
"started_at": "2017-10-04T06:33:37.000Z",
"answered_at": "2017-10-04T06:33:37.000Z",
"ended_at": "2017-10-04T06:33:49.000Z",
"waiting_time": 2,
"wrapup_time": 5,
"recording_link": "https://analytics.cloudtalk.io/call-details/27"
},
"Contact": {
"id": "1234",
"name": "Jon Doe",
"title": "title",
"company": "First ltd.",
"industry": "IT",
"address": "8th Avenue",
"city": "London",
"zip": "838298",
"state": "England",
"type": "contact",
"tags": [
{
"id": "615",
"name": "VIP"
},
{
"id": "609",
"name": "Security"
}
],
"external_urls": [
{
"external_system": "CloudTalk",
"external_url": "https://my.cloudtalk.io/c/show/1234"
}
],
"contact_numbers": [
18884871675
],
"contact_emails": [
"jon.doe@first.com"
],
"custom_fields": [
{
"key": "age",
"value": "33"
}
],
"favorite_agent": {
"id": "1234",
"firstname": "Max",
"lastname": "Yellow",
"fullname": "Max Yellow",
"email": "max.yellow@cloudtalk.io",
"language": "en",
"role": "Admin",
"status": "online",
"default_outbound_number": 442012345678,
"associated_numbers": [
442012345678
],
"groups": [
"sales",
"support"
]
}
},
"CallNumber": {
"id": "12345",
"internal_name": "Sales support",
"caller_id_e164": 442012345678,
"country_code": "44",
"area_code": "20"
},
"BillingCall": {
"price": "0.000000"
},
"Agent": {
"id": "1234",
"firstname": "Max",
"lastname": "Yellow",
"fullname": "Max Yellow",
"email": "max.yellow@cloudtalk.io",
"language": "en",
"role": "Admin",
"status": "online",
"default_outbound_number": 442012345678,
"associated_numbers": [
442012345678
],
"groups": [
"sales",
"support"
]
},
"Notes": [
{
"id": "23",
"note": "Call later"
}
],
"Tags": [
{
"id": "123",
"name": "Missed"
},
{
"id": "124",
"name": "VIP"
}
]
}
]
}
}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).
Query Parameters
Filter by internal number of agent
Filter by number of caller
Filter by date from, e.g. 2017-12-24 12:22:00
Filter by date to, napríklad 2017-12-24 12:22:00
Filter by assigned contact ID
Filter by assigned agent ID
Filter by assigned agent's extension.
Filter by call type
incoming, outgoing, internal Filter by call status - 'missed' = for only missed calls, 'answered' = for all answered calls
missed, answered Filter by assigned call tag ID
Filter by call ID
Max. number of items in response data.
1 <= x <= 1000Number of page to return.
x >= 1Response
Calls data
Show child attributes
Show child attributes
Related topics
CloudTalk REST API v1.7 — Complete Developer ReferenceRequest a campaign data exportHow to Paginate CloudTalk API Collection Responses