curl --request POST \
--url https://api.cloudtalk.io/v1/dialer/campaigns/{campaignId}/exports \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "call_history",
"format": "csv",
"filters": {
"dateFrom": "2026-07-01T00:00:00.000Z",
"dateTo": "2026-08-01T00:00:00.000Z"
}
}
'import requests
url = "https://api.cloudtalk.io/v1/dialer/campaigns/{campaignId}/exports"
payload = {
"type": "call_history",
"format": "csv",
"filters": {
"dateFrom": "2026-07-01T00:00:00.000Z",
"dateTo": "2026-08-01T00:00:00.000Z"
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'call_history',
format: 'csv',
filters: {dateFrom: '2026-07-01T00:00:00.000Z', dateTo: '2026-08-01T00:00:00.000Z'}
})
};
fetch('https://api.cloudtalk.io/v1/dialer/campaigns/{campaignId}/exports', 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/dialer/campaigns/{campaignId}/exports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'call_history',
'format' => 'csv',
'filters' => [
'dateFrom' => '2026-07-01T00:00:00.000Z',
'dateTo' => '2026-08-01T00:00:00.000Z'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cloudtalk.io/v1/dialer/campaigns/{campaignId}/exports"
payload := strings.NewReader("{\n \"type\": \"call_history\",\n \"format\": \"csv\",\n \"filters\": {\n \"dateFrom\": \"2026-07-01T00:00:00.000Z\",\n \"dateTo\": \"2026-08-01T00:00:00.000Z\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cloudtalk.io/v1/dialer/campaigns/{campaignId}/exports")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"call_history\",\n \"format\": \"csv\",\n \"filters\": {\n \"dateFrom\": \"2026-07-01T00:00:00.000Z\",\n \"dateTo\": \"2026-08-01T00:00:00.000Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudtalk.io/v1/dialer/campaigns/{campaignId}/exports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"call_history\",\n \"format\": \"csv\",\n \"filters\": {\n \"dateFrom\": \"2026-07-01T00:00:00.000Z\",\n \"dateTo\": \"2026-08-01T00:00:00.000Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"jobId": "0197fbd1-6d0a-7e58-8f6f-1a2b3c4d5e6f",
"status": "queued"
}{
"statusCode": 400,
"message": "Validation error",
"error": "Bad Request",
"correlationId": "YevPQs",
"subErrors": [
"filters.contactId must not be less than 1"
]
}{
"code": "UNAUTHORIZED",
"message": "You are not authorized to access this resource."
}{
"statusCode": 404,
"message": "Not Found",
"error": "Not Found",
"correlationId": "YevPQs"
}{
"statusCode": 422,
"message": "dateTo must be after dateFrom",
"error": "Unprocessable Entity",
"correlationId": "YevPQs"
}{
"statusCode": 429,
"message": "Too Many Requests",
"error": "Too Many Requests",
"correlationId": "YevPQs"
}{
"statusCode": 500,
"message": "Internal Server Error",
"error": "Internal Server Error",
"correlationId": "YevPQs"
}Request a campaign data export
Queues an asynchronous export of the campaign’s call history or survey responses as CSV or XLSX and returns immediately with a job handle — nothing is generated during the request. Poll the job with the export-status call.
When the job completes, fetch the file through the export-download call, which mints a pre-signed link; the same link is also emailed to the requester. Optional filters narrow the export by contact, agent or date range — omit them to export everything for the campaign.
The call is not idempotent: every request enqueues a new job, so a retry after a timeout creates a second export and a second link. There is no deduplication window or idempotency key.
filters.contactId and filters.userId must be positive ids, and dateFrom / dateTo must be strict ISO 8601 — anything else is a 400 and no job is enqueued. Supplying only one bound is valid: a missing dateTo resolves to the time the job runs, a missing dateFrom to the campaign’s creation. Each bound you do supply must itself be parseable as a date-time — strict ISO 8601 admits forms such as the week date 2026-W33 that cannot be read, and such a bound returns 422 (dateFrom must be a parseable ISO 8601 date-time, or the dateTo equivalent) whether or not the other bound is present. Supplying both with a dateTo that is not after dateFrom returns 422 (dateTo must be after dateFrom), and again nothing is enqueued.
curl --request POST \
--url https://api.cloudtalk.io/v1/dialer/campaigns/{campaignId}/exports \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "call_history",
"format": "csv",
"filters": {
"dateFrom": "2026-07-01T00:00:00.000Z",
"dateTo": "2026-08-01T00:00:00.000Z"
}
}
'import requests
url = "https://api.cloudtalk.io/v1/dialer/campaigns/{campaignId}/exports"
payload = {
"type": "call_history",
"format": "csv",
"filters": {
"dateFrom": "2026-07-01T00:00:00.000Z",
"dateTo": "2026-08-01T00:00:00.000Z"
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'call_history',
format: 'csv',
filters: {dateFrom: '2026-07-01T00:00:00.000Z', dateTo: '2026-08-01T00:00:00.000Z'}
})
};
fetch('https://api.cloudtalk.io/v1/dialer/campaigns/{campaignId}/exports', 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/dialer/campaigns/{campaignId}/exports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'call_history',
'format' => 'csv',
'filters' => [
'dateFrom' => '2026-07-01T00:00:00.000Z',
'dateTo' => '2026-08-01T00:00:00.000Z'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cloudtalk.io/v1/dialer/campaigns/{campaignId}/exports"
payload := strings.NewReader("{\n \"type\": \"call_history\",\n \"format\": \"csv\",\n \"filters\": {\n \"dateFrom\": \"2026-07-01T00:00:00.000Z\",\n \"dateTo\": \"2026-08-01T00:00:00.000Z\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cloudtalk.io/v1/dialer/campaigns/{campaignId}/exports")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"call_history\",\n \"format\": \"csv\",\n \"filters\": {\n \"dateFrom\": \"2026-07-01T00:00:00.000Z\",\n \"dateTo\": \"2026-08-01T00:00:00.000Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudtalk.io/v1/dialer/campaigns/{campaignId}/exports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"call_history\",\n \"format\": \"csv\",\n \"filters\": {\n \"dateFrom\": \"2026-07-01T00:00:00.000Z\",\n \"dateTo\": \"2026-08-01T00:00:00.000Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"jobId": "0197fbd1-6d0a-7e58-8f6f-1a2b3c4d5e6f",
"status": "queued"
}{
"statusCode": 400,
"message": "Validation error",
"error": "Bad Request",
"correlationId": "YevPQs",
"subErrors": [
"filters.contactId must not be less than 1"
]
}{
"code": "UNAUTHORIZED",
"message": "You are not authorized to access this resource."
}{
"statusCode": 404,
"message": "Not Found",
"error": "Not Found",
"correlationId": "YevPQs"
}{
"statusCode": 422,
"message": "dateTo must be after dateFrom",
"error": "Unprocessable Entity",
"correlationId": "YevPQs"
}{
"statusCode": 429,
"message": "Too Many Requests",
"error": "Too Many Requests",
"correlationId": "YevPQs"
}{
"statusCode": 500,
"message": "Internal Server Error",
"error": "Internal Server Error",
"correlationId": "YevPQs"
}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).
Path Parameters
Dialer campaign ID.
^[1-9][0-9]*$Body
Body of the export enqueue call.
What to export. call_history exports the campaign's dial log; survey_responses exports answers collected by the campaign's survey.
call_history, survey_responses "call_history"
Serialisation format of the generated file.
csv, xlsx "csv"
Optional narrowing filters. Omitting the whole object exports everything for the campaign. Supplying only one of dateFrom / dateTo is valid — a missing end resolves to the time the job runs, a missing start to the campaign's creation.
Show child attributes
Show child attributes
Response
The export job was accepted and queued.