curl --request POST \
--url https://api.usenotra.com/v1/geo/ingest/rotate-token \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usenotra.com/v1/geo/ingest/rotate-token"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.usenotra.com/v1/geo/ingest/rotate-token', 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.usenotra.com/v1/geo/ingest/rotate-token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.usenotra.com/v1/geo/ingest/rotate-token"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.usenotra.com/v1/geo/ingest/rotate-token")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenotra.com/v1/geo/ingest/rotate-token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ingestUrl": "<string>",
"snippet": "<string>",
"snippets": {
"next": "<string>",
"nuxt": "<string>",
"netlify": "<string>",
"tanstack": "<string>",
"astro": "<string>",
"sveltekit": "<string>",
"reactRouter": "<string>"
},
"drainUrls": {
"vercel": "<string>",
"cloudflare": "<string>"
},
"organization": {
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"logo": "<string>"
},
"token": "<string>",
"webKey": "<string>",
"webSnippet": "<string>",
"webScript": {
"url": "<string>",
"pinnedUrl": "<string>",
"integrity": "<string>",
"collectUrl": "<string>"
},
"webPlusScript": {
"url": "<string>",
"pinnedUrl": "<string>",
"integrity": "<string>",
"collectUrl": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}Rotate the tracking token
Invalidates every tracking token previously issued for this organization and returns a fresh one. Deployments still sending the old token stop being accepted immediately.
curl --request POST \
--url https://api.usenotra.com/v1/geo/ingest/rotate-token \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usenotra.com/v1/geo/ingest/rotate-token"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.usenotra.com/v1/geo/ingest/rotate-token', 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.usenotra.com/v1/geo/ingest/rotate-token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.usenotra.com/v1/geo/ingest/rotate-token"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.usenotra.com/v1/geo/ingest/rotate-token")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenotra.com/v1/geo/ingest/rotate-token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ingestUrl": "<string>",
"snippet": "<string>",
"snippets": {
"next": "<string>",
"nuxt": "<string>",
"netlify": "<string>",
"tanstack": "<string>",
"astro": "<string>",
"sveltekit": "<string>",
"reactRouter": "<string>"
},
"drainUrls": {
"vercel": "<string>",
"cloudflare": "<string>"
},
"organization": {
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"logo": "<string>"
},
"token": "<string>",
"webKey": "<string>",
"webSnippet": "<string>",
"webScript": {
"url": "<string>",
"pinnedUrl": "<string>",
"integrity": "<string>",
"collectUrl": "<string>"
},
"webPlusScript": {
"url": "<string>",
"pinnedUrl": "<string>",
"integrity": "<string>",
"collectUrl": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}Authorizations
Send your API key in the Authorization header as Bearer API_KEY. Account API keys work in every workspace you belong to: send X-Notra-Organization-Id with the workspace id or slug to choose one. Workspace endpoints require it when you belong to more than one workspace; GET /v1/me/workspaces works without it. Organization keys only accept their own workspace there.
Query Parameters
Response
Token rotated successfully
Script tag that installs notra.js with the public key, pinned to the current build with its Subresource Integrity hash and crossorigin="anonymous". Build an auto-updating tag from webScript.url instead if you want new builds without copying the tag again. Only present when web analytics is enabled for the workspace.
Was this page helpful?