Update a tracking script
curl --request PATCH \
--url https://api.snitcher.com/radar/operator/v1/tracking-scripts/{trackingScriptId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"active": "false",
"domains": [
"example.com"
],
"spotter_enabled": true
}
'import requests
url = "https://api.snitcher.com/radar/operator/v1/tracking-scripts/{trackingScriptId}"
payload = {
"active": "false",
"domains": ["example.com"],
"spotter_enabled": 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({active: 'false', domains: ['example.com'], spotter_enabled: true})
};
fetch('https://api.snitcher.com/radar/operator/v1/tracking-scripts/{trackingScriptId}', 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.snitcher.com/radar/operator/v1/tracking-scripts/{trackingScriptId}",
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([
'active' => 'false',
'domains' => [
'example.com'
],
'spotter_enabled' => 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://api.snitcher.com/radar/operator/v1/tracking-scripts/{trackingScriptId}"
payload := strings.NewReader("{\n \"active\": \"false\",\n \"domains\": [\n \"example.com\"\n ],\n \"spotter_enabled\": true\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://api.snitcher.com/radar/operator/v1/tracking-scripts/{trackingScriptId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"active\": \"false\",\n \"domains\": [\n \"example.com\"\n ],\n \"spotter_enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snitcher.com/radar/operator/v1/tracking-scripts/{trackingScriptId}")
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 \"active\": \"false\",\n \"domains\": [\n \"example.com\"\n ],\n \"spotter_enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"tracking_script_id": "<string>",
"internal_identifier": "<string>",
"active": true,
"description": "<string>",
"domains": [
"example.com"
],
"spotter_enabled": true
}
]
}Tracking scripts
Update a tracking script
PATCH
/
radar
/
operator
/
v1
/
tracking-scripts
/
{trackingScriptId}
Update a tracking script
curl --request PATCH \
--url https://api.snitcher.com/radar/operator/v1/tracking-scripts/{trackingScriptId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"active": "false",
"domains": [
"example.com"
],
"spotter_enabled": true
}
'import requests
url = "https://api.snitcher.com/radar/operator/v1/tracking-scripts/{trackingScriptId}"
payload = {
"active": "false",
"domains": ["example.com"],
"spotter_enabled": 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({active: 'false', domains: ['example.com'], spotter_enabled: true})
};
fetch('https://api.snitcher.com/radar/operator/v1/tracking-scripts/{trackingScriptId}', 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.snitcher.com/radar/operator/v1/tracking-scripts/{trackingScriptId}",
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([
'active' => 'false',
'domains' => [
'example.com'
],
'spotter_enabled' => 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://api.snitcher.com/radar/operator/v1/tracking-scripts/{trackingScriptId}"
payload := strings.NewReader("{\n \"active\": \"false\",\n \"domains\": [\n \"example.com\"\n ],\n \"spotter_enabled\": true\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://api.snitcher.com/radar/operator/v1/tracking-scripts/{trackingScriptId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"active\": \"false\",\n \"domains\": [\n \"example.com\"\n ],\n \"spotter_enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snitcher.com/radar/operator/v1/tracking-scripts/{trackingScriptId}")
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 \"active\": \"false\",\n \"domains\": [\n \"example.com\"\n ],\n \"spotter_enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"tracking_script_id": "<string>",
"internal_identifier": "<string>",
"active": true,
"description": "<string>",
"domains": [
"example.com"
],
"spotter_enabled": true
}
]
}Authorizations
Body
application/json
Tracking script update parameters. Provide at least one of active, domains or spotter_enabled; omitted fields are left unchanged.
Whether browser Spotter calls are accepted for this tracking script, from its domains only. Enabling requires Spotter access on your account (contact support to enable it) and at least one domain, so domains cannot be emptied while this is true. Each identified visitor IP counts as one reveal per monthly window. A change can take up to 10 minutes to apply.
Example:
true