Web Tracking Keys
Update Web Tracking Key
Rename a key, replace its allowed origins, or revoke it
PATCH
/
api
/
v1
/
web-tracking-keys
/
{id}
Update Web Tracking Key
curl --request PATCH \
--url https://api.sequenzy.com/api/v1/web-tracking-keys/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"allowedOrigins": [
{}
],
"allowedAppIds": [
{}
],
"isActive": true
}
'import requests
url = "https://api.sequenzy.com/api/v1/web-tracking-keys/{id}"
payload = {
"name": "<string>",
"allowedOrigins": [{}],
"allowedAppIds": [{}],
"isActive": 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({name: '<string>', allowedOrigins: [{}], allowedAppIds: [{}], isActive: true})
};
fetch('https://api.sequenzy.com/api/v1/web-tracking-keys/{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.sequenzy.com/api/v1/web-tracking-keys/{id}",
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([
'name' => '<string>',
'allowedOrigins' => [
[
]
],
'allowedAppIds' => [
[
]
],
'isActive' => 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.sequenzy.com/api/v1/web-tracking-keys/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"allowedOrigins\": [\n {}\n ],\n \"allowedAppIds\": [\n {}\n ],\n \"isActive\": 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.sequenzy.com/api/v1/web-tracking-keys/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"allowedOrigins\": [\n {}\n ],\n \"allowedAppIds\": [\n {}\n ],\n \"isActive\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/web-tracking-keys/{id}")
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 \"name\": \"<string>\",\n \"allowedOrigins\": [\n {}\n ],\n \"allowedAppIds\": [\n {}\n ],\n \"isActive\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"key": {
"id": "wtk_abc123",
"name": "Storefront",
"publicKey": "seq_pk_hR8xQ2mK9vL4nP7wT1yZ6cB3dF5gJ0sA",
"allowedOrigins": ["https://example.com"],
"allowedAppIds": [],
"isActive": true,
"unrestricted": false,
"lastUsedAt": "2026-08-17T09:12:00.000Z",
"createdAt": "2026-08-01T10:00:00.000Z",
"updatedAt": "2026-08-17T10:30:00.000Z",
"installSnippet": "<script>(function(w){var q=w.sequenzy=w.sequenzy||[];[\"identify\",\"track\",\"viewedProduct\",\"addedToCart\",\"removedFromCart\",\"viewedCart\",\"viewedCollection\",\"searched\",\"page\",\"reset\"].forEach(function(m){q[m]=q[m]||function(){q.push([m].concat(Array.prototype.slice.call(arguments)));};});})(window);</script><script async src=\"https://api.sequenzy.com/sequenzy.js\" data-sequenzy-key=\"seq_pk_hR8xQ2mK9vL4nP7wT1yZ6cB3dF5gJ0sA\" data-sequenzy-company=\"comp_123\" data-sequenzy-endpoint=\"https://api.sequenzy.com\"></script>",
"endpoint": "https://api.sequenzy.com/api/webhooks/commerce/api/comp_123/customer-events"
}
}
{
"error": "allowedOrigins contains entries that are not valid origins: ftp://example.com. Use a scheme and host such as https://example.com, or https://*.example.com for subdomains."
}
{
"error": "Missing API key. Provide via x-api-key header or Authorization: Bearer <key>"
}
{
"error": "API key is missing required scope: integrations:manage"
}
{
"error": "Web tracking key not found"
}
Rename a web tracking key, replace its allowed origins, or revoke it.
Requires an API key with the
integrations:manage scope.
Request
Replacement allowlist. This replaces the whole list rather than appending
to it, so include the origins you want to keep. The key becomes unrestricted
when both this and
allowedAppIds are empty.Replacement list of iOS bundle IDs and Android package names. Like
allowedOrigins, it replaces the whole list.curl -X PATCH "https://api.sequenzy.com/api/v1/web-tracking-keys/wtk_abc123" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"allowedOrigins": ["https://example.com"]}'
Behavior
Revoking takes effect within about a minute and does not rotate the key value, so you can still find and remove the matching snippet from your site. Use Delete Web Tracking Key once the snippet is gone. Fields you do not send are left unchanged. Send at least one ofname,
allowedOrigins, allowedAppIds, or isActive.
Responses
{
"success": true,
"key": {
"id": "wtk_abc123",
"name": "Storefront",
"publicKey": "seq_pk_hR8xQ2mK9vL4nP7wT1yZ6cB3dF5gJ0sA",
"allowedOrigins": ["https://example.com"],
"allowedAppIds": [],
"isActive": true,
"unrestricted": false,
"lastUsedAt": "2026-08-17T09:12:00.000Z",
"createdAt": "2026-08-01T10:00:00.000Z",
"updatedAt": "2026-08-17T10:30:00.000Z",
"installSnippet": "<script>(function(w){var q=w.sequenzy=w.sequenzy||[];[\"identify\",\"track\",\"viewedProduct\",\"addedToCart\",\"removedFromCart\",\"viewedCart\",\"viewedCollection\",\"searched\",\"page\",\"reset\"].forEach(function(m){q[m]=q[m]||function(){q.push([m].concat(Array.prototype.slice.call(arguments)));};});})(window);</script><script async src=\"https://api.sequenzy.com/sequenzy.js\" data-sequenzy-key=\"seq_pk_hR8xQ2mK9vL4nP7wT1yZ6cB3dF5gJ0sA\" data-sequenzy-company=\"comp_123\" data-sequenzy-endpoint=\"https://api.sequenzy.com\"></script>",
"endpoint": "https://api.sequenzy.com/api/webhooks/commerce/api/comp_123/customer-events"
}
}
{
"error": "allowedOrigins contains entries that are not valid origins: ftp://example.com. Use a scheme and host such as https://example.com, or https://*.example.com for subdomains."
}
{
"error": "Missing API key. Provide via x-api-key header or Authorization: Bearer <key>"
}
{
"error": "API key is missing required scope: integrations:manage"
}
{
"error": "Web tracking key not found"
}
⌘I
Update Web Tracking Key
curl --request PATCH \
--url https://api.sequenzy.com/api/v1/web-tracking-keys/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"allowedOrigins": [
{}
],
"allowedAppIds": [
{}
],
"isActive": true
}
'import requests
url = "https://api.sequenzy.com/api/v1/web-tracking-keys/{id}"
payload = {
"name": "<string>",
"allowedOrigins": [{}],
"allowedAppIds": [{}],
"isActive": 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({name: '<string>', allowedOrigins: [{}], allowedAppIds: [{}], isActive: true})
};
fetch('https://api.sequenzy.com/api/v1/web-tracking-keys/{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.sequenzy.com/api/v1/web-tracking-keys/{id}",
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([
'name' => '<string>',
'allowedOrigins' => [
[
]
],
'allowedAppIds' => [
[
]
],
'isActive' => 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.sequenzy.com/api/v1/web-tracking-keys/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"allowedOrigins\": [\n {}\n ],\n \"allowedAppIds\": [\n {}\n ],\n \"isActive\": 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.sequenzy.com/api/v1/web-tracking-keys/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"allowedOrigins\": [\n {}\n ],\n \"allowedAppIds\": [\n {}\n ],\n \"isActive\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/web-tracking-keys/{id}")
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 \"name\": \"<string>\",\n \"allowedOrigins\": [\n {}\n ],\n \"allowedAppIds\": [\n {}\n ],\n \"isActive\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"key": {
"id": "wtk_abc123",
"name": "Storefront",
"publicKey": "seq_pk_hR8xQ2mK9vL4nP7wT1yZ6cB3dF5gJ0sA",
"allowedOrigins": ["https://example.com"],
"allowedAppIds": [],
"isActive": true,
"unrestricted": false,
"lastUsedAt": "2026-08-17T09:12:00.000Z",
"createdAt": "2026-08-01T10:00:00.000Z",
"updatedAt": "2026-08-17T10:30:00.000Z",
"installSnippet": "<script>(function(w){var q=w.sequenzy=w.sequenzy||[];[\"identify\",\"track\",\"viewedProduct\",\"addedToCart\",\"removedFromCart\",\"viewedCart\",\"viewedCollection\",\"searched\",\"page\",\"reset\"].forEach(function(m){q[m]=q[m]||function(){q.push([m].concat(Array.prototype.slice.call(arguments)));};});})(window);</script><script async src=\"https://api.sequenzy.com/sequenzy.js\" data-sequenzy-key=\"seq_pk_hR8xQ2mK9vL4nP7wT1yZ6cB3dF5gJ0sA\" data-sequenzy-company=\"comp_123\" data-sequenzy-endpoint=\"https://api.sequenzy.com\"></script>",
"endpoint": "https://api.sequenzy.com/api/webhooks/commerce/api/comp_123/customer-events"
}
}
{
"error": "allowedOrigins contains entries that are not valid origins: ftp://example.com. Use a scheme and host such as https://example.com, or https://*.example.com for subdomains."
}
{
"error": "Missing API key. Provide via x-api-key header or Authorization: Bearer <key>"
}
{
"error": "API key is missing required scope: integrations:manage"
}
{
"error": "Web tracking key not found"
}