Batch calls
Start a recipient import
Starts a resumable import of expectedRows recipients under token, replacing the draft’s list. Send the rows with the recipients endpoint. Only a draft changes. A batch changed since updatedAt is refused with 409; read it again and retry. Needs a Full access key.
POST
/
api
/
v2
/
batch-calls
/
{batchId}
/
import
Start a recipient import
curl --request POST \
--url https://app.cntillion.com/api/v2/batch-calls/{batchId}/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"updatedAt": "2023-11-07T05:31:56Z",
"token": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fileName": "<string>",
"headers": [
"<string>"
],
"expectedRows": 25000
}
'import requests
url = "https://app.cntillion.com/api/v2/batch-calls/{batchId}/import"
payload = {
"updatedAt": "2023-11-07T05:31:56Z",
"token": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fileName": "<string>",
"headers": ["<string>"],
"expectedRows": 25000
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
updatedAt: '2023-11-07T05:31:56Z',
token: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
fileName: '<string>',
headers: ['<string>'],
expectedRows: 25000
})
};
fetch('https://app.cntillion.com/api/v2/batch-calls/{batchId}/import', 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://app.cntillion.com/api/v2/batch-calls/{batchId}/import",
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([
'updatedAt' => '2023-11-07T05:31:56Z',
'token' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'fileName' => '<string>',
'headers' => [
'<string>'
],
'expectedRows' => 25000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://app.cntillion.com/api/v2/batch-calls/{batchId}/import"
payload := strings.NewReader("{\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"token\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fileName\": \"<string>\",\n \"headers\": [\n \"<string>\"\n ],\n \"expectedRows\": 25000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
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://app.cntillion.com/api/v2/batch-calls/{batchId}/import")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"token\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fileName\": \"<string>\",\n \"headers\": [\n \"<string>\"\n ],\n \"expectedRows\": 25000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.cntillion.com/api/v2/batch-calls/{batchId}/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"token\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fileName\": \"<string>\",\n \"headers\": [\n \"<string>\"\n ],\n \"expectedRows\": 25000\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"agentId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"config": {
"branchId": "<string>",
"ringingTimeoutSeconds": 62,
"concurrencyLimit": 500,
"allowedOverrides": [
"prompt"
],
"phoneLineId": "<string>",
"version": 1,
"import": {
"kind": "empty"
},
"answeringMachineDetection": true,
"channel": "telephony",
"phoneLineIds": [
"<string>"
]
},
"recipientCount": 123,
"input": {
"name": "<string>",
"settings": {
"branchId": "<string>",
"ringingTimeoutSeconds": 62,
"concurrencyLimit": 500,
"allowedOverrides": [
"prompt"
],
"phoneLineId": "<string>",
"answeringMachineDetection": true,
"channel": "telephony",
"phoneLineIds": [
"<string>"
]
},
"timezone": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"consentConfirmed": true,
"sendRatePerMinute": 10
},
"status": "DRAFT",
"createdAt": "2023-11-07T05:31:56Z",
"launchedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"lastError": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}Authorizations
workspaceApiKeyworkspaceApiKeyHeader
Headers
Body
application/json
⌘I
Start a recipient import
curl --request POST \
--url https://app.cntillion.com/api/v2/batch-calls/{batchId}/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"updatedAt": "2023-11-07T05:31:56Z",
"token": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fileName": "<string>",
"headers": [
"<string>"
],
"expectedRows": 25000
}
'import requests
url = "https://app.cntillion.com/api/v2/batch-calls/{batchId}/import"
payload = {
"updatedAt": "2023-11-07T05:31:56Z",
"token": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fileName": "<string>",
"headers": ["<string>"],
"expectedRows": 25000
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
updatedAt: '2023-11-07T05:31:56Z',
token: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
fileName: '<string>',
headers: ['<string>'],
expectedRows: 25000
})
};
fetch('https://app.cntillion.com/api/v2/batch-calls/{batchId}/import', 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://app.cntillion.com/api/v2/batch-calls/{batchId}/import",
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([
'updatedAt' => '2023-11-07T05:31:56Z',
'token' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'fileName' => '<string>',
'headers' => [
'<string>'
],
'expectedRows' => 25000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://app.cntillion.com/api/v2/batch-calls/{batchId}/import"
payload := strings.NewReader("{\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"token\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fileName\": \"<string>\",\n \"headers\": [\n \"<string>\"\n ],\n \"expectedRows\": 25000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
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://app.cntillion.com/api/v2/batch-calls/{batchId}/import")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"token\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fileName\": \"<string>\",\n \"headers\": [\n \"<string>\"\n ],\n \"expectedRows\": 25000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.cntillion.com/api/v2/batch-calls/{batchId}/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"token\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fileName\": \"<string>\",\n \"headers\": [\n \"<string>\"\n ],\n \"expectedRows\": 25000\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"agentId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"config": {
"branchId": "<string>",
"ringingTimeoutSeconds": 62,
"concurrencyLimit": 500,
"allowedOverrides": [
"prompt"
],
"phoneLineId": "<string>",
"version": 1,
"import": {
"kind": "empty"
},
"answeringMachineDetection": true,
"channel": "telephony",
"phoneLineIds": [
"<string>"
]
},
"recipientCount": 123,
"input": {
"name": "<string>",
"settings": {
"branchId": "<string>",
"ringingTimeoutSeconds": 62,
"concurrencyLimit": 500,
"allowedOverrides": [
"prompt"
],
"phoneLineId": "<string>",
"answeringMachineDetection": true,
"channel": "telephony",
"phoneLineIds": [
"<string>"
]
},
"timezone": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"consentConfirmed": true,
"sendRatePerMinute": 10
},
"status": "DRAFT",
"createdAt": "2023-11-07T05:31:56Z",
"launchedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"lastError": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}