Submit a template
curl --request POST \
--url https://truecaller.udchowdhury.me/v1/templates/{id}/submit \
--header 'x-api-key: <api-key>'import requests
url = "https://truecaller.udchowdhury.me/v1/templates/{id}/submit"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://truecaller.udchowdhury.me/v1/templates/{id}/submit', 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/templates/{id}/submit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://truecaller.udchowdhury.me/v1/templates/{id}/submit"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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/templates/{id}/submit")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://truecaller.udchowdhury.me/v1/templates/{id}/submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"name": "<string>",
"category": "promotional",
"body": "<string>",
"variable_defaults": {},
"media": {
"url": "<string>",
"mime_type": "image/jpeg",
"file_name": "<string>"
},
"buttons": [
{
"type": "link",
"text": "Track order",
"url": "https://example.com/t/{{order_id}}"
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"variables": [
"name",
"order_id"
],
"status": "draft",
"reject_reason": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "not found"
}{
"error": "<string>",
"details": [
{}
]
}Templates
Submit a template
Submit a draft template so it can be sent.
POST
/
v1
/
templates
/
{id}
/
submit
Submit a template
curl --request POST \
--url https://truecaller.udchowdhury.me/v1/templates/{id}/submit \
--header 'x-api-key: <api-key>'import requests
url = "https://truecaller.udchowdhury.me/v1/templates/{id}/submit"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://truecaller.udchowdhury.me/v1/templates/{id}/submit', 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/templates/{id}/submit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://truecaller.udchowdhury.me/v1/templates/{id}/submit"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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/templates/{id}/submit")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://truecaller.udchowdhury.me/v1/templates/{id}/submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"name": "<string>",
"category": "promotional",
"body": "<string>",
"variable_defaults": {},
"media": {
"url": "<string>",
"mime_type": "image/jpeg",
"file_name": "<string>"
},
"buttons": [
{
"type": "link",
"text": "Track order",
"url": "https://example.com/t/{{order_id}}"
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"variables": [
"name",
"order_id"
],
"status": "draft",
"reject_reason": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "not found"
}{
"error": "<string>",
"details": [
{}
]
}Truecaller Business Chat has no separate template review, so a submitted template is approved
straight away.
Authorizations
Workspace API key from Developers → API keys. It starts with tc_live_.
Path Parameters
Response
The template, now approved.
Maximum string length:
100Available options:
promotional, transactional, service Message text with {{variable}} placeholders and Truecaller text styling.
Maximum string length:
1000Used when a contact's value is empty.
Show child attributes
Show child attributes
One attachment. Upload with Upload media, or give any public https URL.
Show child attributes
Show child attributes
Maximum array length:
3Up to 3 per message. Labels and URLs can use {{variables}}.
- Link button
- Quick reply
Show child attributes
Show child attributes
Example:
["name", "order_id"]
Available options:
draft, submitted, approved, rejected Was this page helpful?

