Update template tracking
Change the UTM tags a WhatsApp template adds to its URL buttons, e.g. { "id": "…", "tracking": { "utm": { "campaign": "black_friday" } } }, or { "utm": false } to stop tagging. Works on approved templates with no new review: tags are added when each message is sent. Tracking can only be added to a template that has not been sent for review yet; for an approved template without it, create a new one with tracking.
curl --request PATCH \
--url https://www.useboom.ai/api/v1/templates/{id}/tracking \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tracking": {
"utm": false,
"clicks": true
}
}
'import requests
url = "https://www.useboom.ai/api/v1/templates/{id}/tracking"
payload = { "tracking": {
"utm": False,
"clicks": True
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tracking: {utm: false, clicks: true}})
};
fetch('https://www.useboom.ai/api/v1/templates/{id}/tracking', 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://www.useboom.ai/api/v1/templates/{id}/tracking",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'tracking' => [
'utm' => false,
'clicks' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://www.useboom.ai/api/v1/templates/{id}/tracking"
payload := strings.NewReader("{\n \"tracking\": {\n \"utm\": false,\n \"clicks\": true\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://www.useboom.ai/api/v1/templates/{id}/tracking")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tracking\": {\n \"utm\": false,\n \"clicks\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.useboom.ai/api/v1/templates/{id}/tracking")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tracking\": {\n \"utm\": false,\n \"clicks\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"language": "<string>",
"category": "UTILITY",
"contentType": "TEXT",
"content": "<unknown>",
"variables": {},
"phoneNumbers": [
"<string>"
],
"whatsappAccount": {
"id": "<string>",
"name": "<string>",
"alias": "<string>",
"phoneNumbers": [
"<string>"
]
},
"status": "DRAFT",
"rejectionReason": "<string>",
"tracking": {
"utm": {
"source": "<string>",
"medium": "<string>",
"campaign": "<string>"
},
"clicks": true
},
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Organization API key, sent as Authorization: Bearer boom_org_....
Path Parameters
Template id.
1Body
Show child attributes
Show child attributes
Response
Success
Template id.
Template name (unique per WhatsApp account, i.e. across all its numbers).
WhatsApp language code the template was created for, e.g. es_MX.
UTILITY, MARKETING, AUTHENTICATION TEXT, MEDIA, QUICK_REPLY, CALL_TO_ACTION, CARD The message content (shape per contentType).
Example values for {{1}}-style placeholders.
Show child attributes
Show child attributes
WhatsApp numbers this template can be sent from: every number on the WhatsApp account it was created on.
The WhatsApp account (WABA) the template belongs to. Only its numbers can send it. Null if that account is no longer connected.
Show child attributes
Show child attributes
DRAFT (not yet submitted), PENDING (in WhatsApp review, typically 24-48h), APPROVED, or REJECTED (see rejectionReason).
DRAFT, PENDING, APPROVED, REJECTED Button tracking, or null for an untracked template. content shows the button URLs as you typed them; the tags are added when each message is sent.
Show child attributes
Show child attributes
ISO 8601 timestamp.
ISO 8601 timestamp.
Was this page helpful?
curl --request PATCH \
--url https://www.useboom.ai/api/v1/templates/{id}/tracking \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tracking": {
"utm": false,
"clicks": true
}
}
'import requests
url = "https://www.useboom.ai/api/v1/templates/{id}/tracking"
payload = { "tracking": {
"utm": False,
"clicks": True
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tracking: {utm: false, clicks: true}})
};
fetch('https://www.useboom.ai/api/v1/templates/{id}/tracking', 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://www.useboom.ai/api/v1/templates/{id}/tracking",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'tracking' => [
'utm' => false,
'clicks' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://www.useboom.ai/api/v1/templates/{id}/tracking"
payload := strings.NewReader("{\n \"tracking\": {\n \"utm\": false,\n \"clicks\": true\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://www.useboom.ai/api/v1/templates/{id}/tracking")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tracking\": {\n \"utm\": false,\n \"clicks\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.useboom.ai/api/v1/templates/{id}/tracking")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tracking\": {\n \"utm\": false,\n \"clicks\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"language": "<string>",
"category": "UTILITY",
"contentType": "TEXT",
"content": "<unknown>",
"variables": {},
"phoneNumbers": [
"<string>"
],
"whatsappAccount": {
"id": "<string>",
"name": "<string>",
"alias": "<string>",
"phoneNumbers": [
"<string>"
]
},
"status": "DRAFT",
"rejectionReason": "<string>",
"tracking": {
"utm": {
"source": "<string>",
"medium": "<string>",
"campaign": "<string>"
},
"clicks": true
},
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}