curl --request GET \
--url https://api.talqing.com/v1/email/batches/{batch_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.talqing.com/v1/email/batches/{batch_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.talqing.com/v1/email/batches/{batch_id}', 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.talqing.com/v1/email/batches/{batch_id}",
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: 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://api.talqing.com/v1/email/batches/{batch_id}"
req, _ := http.NewRequest("GET", 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.get("https://api.talqing.com/v1/email/batches/{batch_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.talqing.com/v1/email/batches/{batch_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"body_format": "text",
"counts": {
"canceled": 123,
"draft": 123,
"draft_failed": 123,
"drafting": 123,
"pending": 123,
"queued": 123,
"send_failed": 123,
"sending": 123,
"sent": 123,
"skipped": 123,
"total": 123
},
"created_at": "2023-11-07T05:31:56Z",
"draft_attempts": 123,
"draft_concurrency": 123,
"draft_failures": [
{
"count": 123,
"reason": "<string>"
}
],
"draft_gap_seconds": 123,
"draft_retry_after_minutes": 123,
"drafted_at": "2023-11-07T05:31:56Z",
"drafted_versions": [
{
"count": 123,
"version": 123
}
],
"failure_reason": "<string>",
"field_map": {
"body": "<string>",
"subject": "<string>",
"to": "<string>"
},
"from_email": "<string>",
"from_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"input_columns": [
"<string>"
],
"integration_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"integration_name": "<string>",
"name": "<string>",
"next_draft_at": "2023-11-07T05:31:56Z",
"next_draft_reason": "start",
"output_columns": [
"<string>"
],
"provider_cost": 123,
"published_task_version": 123,
"reply_to": "<string>",
"send_attempts": 123,
"send_daily_cap": {
"kind": "fixed",
"limit": 2
},
"send_daily_cap_today": 123,
"send_gap_seconds": 123,
"send_retry_after_minutes": 123,
"sent_today": 123,
"skips": {
"duplicate_recipient": 123,
"operator": 123,
"unfillable": 123
},
"stale_redraftable": 123,
"stale_sent": 123,
"start_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"status": "scheduled",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_name": "<string>",
"template": {
"body": "<string>",
"subject": "<string>",
"to": "<string>"
},
"timezone": "<string>",
"window": {
"end": "<string>",
"start": "<string>",
"days": [
1,
2,
3,
4,
5,
6,
7
]
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}Get Email Batch
One batch: its policy, its per-status counts and what drafting has cost.
drafted_versions says which published version of the task wrote how many
rows, and sent_today how much of send_daily_cap_today is left.
curl --request GET \
--url https://api.talqing.com/v1/email/batches/{batch_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.talqing.com/v1/email/batches/{batch_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.talqing.com/v1/email/batches/{batch_id}', 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.talqing.com/v1/email/batches/{batch_id}",
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: 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://api.talqing.com/v1/email/batches/{batch_id}"
req, _ := http.NewRequest("GET", 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.get("https://api.talqing.com/v1/email/batches/{batch_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.talqing.com/v1/email/batches/{batch_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"body_format": "text",
"counts": {
"canceled": 123,
"draft": 123,
"draft_failed": 123,
"drafting": 123,
"pending": 123,
"queued": 123,
"send_failed": 123,
"sending": 123,
"sent": 123,
"skipped": 123,
"total": 123
},
"created_at": "2023-11-07T05:31:56Z",
"draft_attempts": 123,
"draft_concurrency": 123,
"draft_failures": [
{
"count": 123,
"reason": "<string>"
}
],
"draft_gap_seconds": 123,
"draft_retry_after_minutes": 123,
"drafted_at": "2023-11-07T05:31:56Z",
"drafted_versions": [
{
"count": 123,
"version": 123
}
],
"failure_reason": "<string>",
"field_map": {
"body": "<string>",
"subject": "<string>",
"to": "<string>"
},
"from_email": "<string>",
"from_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"input_columns": [
"<string>"
],
"integration_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"integration_name": "<string>",
"name": "<string>",
"next_draft_at": "2023-11-07T05:31:56Z",
"next_draft_reason": "start",
"output_columns": [
"<string>"
],
"provider_cost": 123,
"published_task_version": 123,
"reply_to": "<string>",
"send_attempts": 123,
"send_daily_cap": {
"kind": "fixed",
"limit": 2
},
"send_daily_cap_today": 123,
"send_gap_seconds": 123,
"send_retry_after_minutes": 123,
"sent_today": 123,
"skips": {
"duplicate_recipient": 123,
"operator": 123,
"unfillable": 123
},
"stale_redraftable": 123,
"stale_sent": 123,
"start_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"status": "scheduled",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_name": "<string>",
"template": {
"body": "<string>",
"subject": "<string>",
"to": "<string>"
},
"timezone": "<string>",
"window": {
"end": "<string>",
"start": "<string>",
"days": [
1,
2,
3,
4,
5,
6,
7
]
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
text, html Rows by the status a reader sees. draft is drafts no live send covers
yet; queued is drafts one does.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Which column in the merged space carries each of the three sent fields.
A value may name a CSV header or an output field of the task — that is the whole point of the merged space, and it is what makes "the CSV has emails" and "feed it a phone number and let the task find the email" the same feature.
Show child attributes
Show child attributes
start, retry The same limit every day.
- FixedDailyCap
- RampDailyCap
Show child attributes
Show child attributes
counts.skipped, by who decided it.
Show child attributes
Show child attributes
scheduled, drafting, paused, drafted, canceled, failed A fixed email, filled per row: {{column}} in subject or body takes that row's cell.
Show child attributes
Show child attributes
The hours a list may run in, on the list's own clock.
Shared rather than duplicated, for the same reason window_state is: a
call batch and an email send run store the same three values under the same
names and must not each get their own copy of the rules. The field that
carries one is named for what it gates — calling_window on a campaign,
window on an email batch and its runs.
A window that crosses midnight (21:00-06:00) is valid and means
exactly what an evening consumer-calling window means: the day check applies
to the start side, so 21:00-06:00 on days: [5] runs Friday
21:00 through Saturday 06:00.
Show child attributes
Show child attributes