Create a campaign
curl --request POST \
--url https://truecaller.udchowdhury.me/v1/campaigns \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Diwali sale, wave 1",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"list_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sender_id": "<string>",
"launch": false,
"scheduled_at": "2023-11-07T05:31:56Z",
"variable_defaults": {},
"track_links": true
}
'import requests
url = "https://truecaller.udchowdhury.me/v1/campaigns"
payload = {
"name": "Diwali sale, wave 1",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"list_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sender_id": "<string>",
"launch": False,
"scheduled_at": "2023-11-07T05:31:56Z",
"variable_defaults": {},
"track_links": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Diwali sale, wave 1',
template_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
list_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sender_id: '<string>',
launch: false,
scheduled_at: '2023-11-07T05:31:56Z',
variable_defaults: {},
track_links: true
})
};
fetch('https://truecaller.udchowdhury.me/v1/campaigns', 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://truecaller.udchowdhury.me/v1/campaigns",
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([
'name' => 'Diwali sale, wave 1',
'template_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'list_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sender_id' => '<string>',
'launch' => false,
'scheduled_at' => '2023-11-07T05:31:56Z',
'variable_defaults' => [
],
'track_links' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-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://truecaller.udchowdhury.me/v1/campaigns"
payload := strings.NewReader("{\n \"name\": \"Diwali sale, wave 1\",\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"list_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sender_id\": \"<string>\",\n \"launch\": false,\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"variable_defaults\": {},\n \"track_links\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://truecaller.udchowdhury.me/v1/campaigns")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Diwali sale, wave 1\",\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"list_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sender_id\": \"<string>\",\n \"launch\": false,\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"variable_defaults\": {},\n \"track_links\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://truecaller.udchowdhury.me/v1/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Diwali sale, wave 1\",\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"list_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sender_id\": \"<string>\",\n \"launch\": false,\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"variable_defaults\": {},\n \"track_links\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "draft",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_name": "<string>",
"list_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"list_name": "<string>",
"sender_id": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"note": "<string>",
"recipients": 123,
"processed": 123,
"sent": 123,
"delivered": 123,
"read": 123,
"failed": 123,
"blocked": 123,
"queued": 123
}{
"error": "invalid body",
"details": [
{
"path": [
"to"
],
"message": "Required"
}
]
}Campaigns
Create a campaign
Send an approved template to a contact list, now, later or as a draft.
POST
/
v1
/
campaigns
Create a campaign
curl --request POST \
--url https://truecaller.udchowdhury.me/v1/campaigns \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Diwali sale, wave 1",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"list_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sender_id": "<string>",
"launch": false,
"scheduled_at": "2023-11-07T05:31:56Z",
"variable_defaults": {},
"track_links": true
}
'import requests
url = "https://truecaller.udchowdhury.me/v1/campaigns"
payload = {
"name": "Diwali sale, wave 1",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"list_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sender_id": "<string>",
"launch": False,
"scheduled_at": "2023-11-07T05:31:56Z",
"variable_defaults": {},
"track_links": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Diwali sale, wave 1',
template_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
list_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sender_id: '<string>',
launch: false,
scheduled_at: '2023-11-07T05:31:56Z',
variable_defaults: {},
track_links: true
})
};
fetch('https://truecaller.udchowdhury.me/v1/campaigns', 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://truecaller.udchowdhury.me/v1/campaigns",
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([
'name' => 'Diwali sale, wave 1',
'template_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'list_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sender_id' => '<string>',
'launch' => false,
'scheduled_at' => '2023-11-07T05:31:56Z',
'variable_defaults' => [
],
'track_links' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-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://truecaller.udchowdhury.me/v1/campaigns"
payload := strings.NewReader("{\n \"name\": \"Diwali sale, wave 1\",\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"list_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sender_id\": \"<string>\",\n \"launch\": false,\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"variable_defaults\": {},\n \"track_links\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://truecaller.udchowdhury.me/v1/campaigns")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Diwali sale, wave 1\",\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"list_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sender_id\": \"<string>\",\n \"launch\": false,\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"variable_defaults\": {},\n \"track_links\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://truecaller.udchowdhury.me/v1/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Diwali sale, wave 1\",\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"list_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sender_id\": \"<string>\",\n \"launch\": false,\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"variable_defaults\": {},\n \"track_links\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "draft",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_name": "<string>",
"list_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"list_name": "<string>",
"sender_id": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"note": "<string>",
"recipients": 123,
"processed": 123,
"sent": 123,
"delivered": 123,
"read": 123,
"failed": 123,
"blocked": 123,
"queued": 123
}{
"error": "invalid body",
"details": [
{
"path": [
"to"
],
"message": "Required"
}
]
}The quickest path is one call with
Leave out
launch: true:
{
"name": "Diwali sale, wave 1",
"template_id": "TEMPLATE_ID",
"list_id": "LIST_ID",
"launch": true,
"scheduled_at": "2026-11-02T10:00:00+05:30"
}
scheduled_at to start now, or leave out launch to keep a draft.
While it runs, OneXtel skips opted-out numbers and applies Truecaller’s promotional limits:
at most 3 promotional messages per person per day, 4 per person from one sender in 28 days, and
the sender’s daily limit. Skipped contacts show as blocked with the reason.Authorizations
Workspace API key from Developers → API keys. It starts with tc_live_.
Body
application/json
Maximum string length:
100Example:
"Diwali sale, wave 1"
One of the workspace's active senders. Defaults to the first active sender.
Start sending now (or at scheduled_at).
ISO 8601 with offset, e.g. 2026-11-02T10:00:00+05:30.
Fallbacks for empty contact columns, on top of the template's own defaults.
Show child attributes
Show child attributes
Rewrite links and link buttons through a short redirect so clicks are counted.
Response
Created (and launched, if asked).
Available options:
draft, scheduled, running, completed, cancelled Why a running campaign is waiting
Was this page helpful?

