curl --request GET \
--url https://api.usenotra.com/v1/geo/ingest/setup \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usenotra.com/v1/geo/ingest/setup"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.usenotra.com/v1/geo/ingest/setup', 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/setup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/setup"
req, _ := http.NewRequest("GET", 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.get("https://api.usenotra.com/v1/geo/ingest/setup")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenotra.com/v1/geo/ingest/setup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.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>"
},
"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>"
}Get the install snippets
The endpoint and framework snippets needed to send AI traffic to Notra, plus, when web analytics is enabled for the workspace, the notra.js install: the public web key, the script tag and the pinned script URLs with their Subresource Integrity values. Web keys always belong to one project: pass projectId for that project’s key, or omit it for the organization’s oldest project. The snippets read the tracking token from an environment variable; the token itself is issued by POST /geo/ingest/token, which requires a write scope.
curl --request GET \
--url https://api.usenotra.com/v1/geo/ingest/setup \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usenotra.com/v1/geo/ingest/setup"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.usenotra.com/v1/geo/ingest/setup', 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/setup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/setup"
req, _ := http.NewRequest("GET", 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.get("https://api.usenotra.com/v1/geo/ingest/setup")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenotra.com/v1/geo/ingest/setup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.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>"
},
"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
Setup fetched 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?