Analytics REST API
The Privatus analytics REST API: add .json to any app URL and send a token. Read the conventions and a reference of every operation, generated from the code.
Every page and action in Privatus is also an API endpoint. There's no
separate /api/v1: add .json to a URL and send an API token.
curl https://privatusanalytics.com/sites/pa_7Q2K9XH3AB/stats/aggregate.json?period=7d \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"data": {
"period": { "from": "2026-09-23T00:00:00Z", "to": "2026-09-30T00:00:00Z" },
"metrics": {
"visitors": 1840, "visits": 2310, "pageviews": 5122,
"views_per_visit": 2.22, "bounce_rate": 41.3,
"visit_duration": 48000, "revenue": 129900
}
}
}
The reference below lists every operation with its method, path, permission, input schema and response schema. It's generated from the running code, as is the OpenAPI 3.1 document, so neither can drift from what the server does. The same operations are MCP tools.
Conventions#
| Base URL | https://privatusanalytics.com |
| Format | JSON. Add .json to the path (or send Accept: application/json) |
| Auth | Authorization: Bearer pat_… (Authentication) |
| Ids | Public ids with a prefix: ws_… workspaces, pa_… sites, seg_… segments, wh_… webhooks |
| Reads | GET with query parameters |
| Writes | POST, PATCH, DELETE with a JSON body of flat fields |
| Success | { "data": … }, plus "meta" for lists |
| Errors | { "error": { "code", "message", "details" } } (Errors) |
| Lists | page and per_page (max 100) (Pagination) |
| Times | ISO 8601 in UTC. Date parameters (from, to) are days in the site's timezone |
| Money | Minor units (cents) in the site currency, e.g. revenue: 129900 = 1,299.00 |
| Durations | Milliseconds |
Common tasks#
| Task | Operation |
|---|---|
| List workspaces | GET /workspaces.json |
| List sites | GET /workspaces/{workspace_id}/sites.json |
| Headline metrics | GET /sites/{site_id}/stats/aggregate.json |
| Chart data | GET /sites/{site_id}/stats/timeseries.json |
| Top pages, sources, countries… | GET /sites/{site_id}/breakdown/{dimension}.json |
| Everything on the Overview | GET /sites/{site_id}/overview.json |
| Live visitors | GET /sites/{site_id}/live.json |
| Add a note (e.g. a deploy) | POST /sites/{site_id}/notes.json |
See Stats endpoints and Examples.
In this section#
Authentication · Errors · Pagination · Rate limits · Filters · Stats endpoints · Examples · Webhooks · Changelog and deprecation
Sending data in is a different API: see Server-side ingest.
Tutte le operazioni
Invia Authorization: Bearer pat_…. Crea i token in Impostazioni del workspace, Token API. Guida all'autenticazione.
Aggiungi .json a qualsiasi percorso. Le risposte sono { "data": … } e gli errori sono { "error": { "code", "message" } }. Errori.
Invia una richiesta JSON-RPC in POST a https://privatusanalytics.com/mcp con lo stesso token. Ogni operazione qui sotto è uno strumento. Guida a MCP.
Scarica openapi.json · 279 operazioni
Account
GET
/account.json
Ottieni il tuo profilo e le tue preferenze
account_get
Permesso: member
curl https://privatusanalytics.com/account.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {},
"required": []
}
{
"type": "object",
"properties": {
"email": {
"type": "string"
},
"unconfirmed_email": {
"anyOf": [
{
"type": "string",
"description": "Nuova email in attesa di conferma"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"theme": {
"type": "string"
},
"default_landing": {
"type": "string"
},
"locale": {
"type": "string",
"description": "Codice lingua dell'app per questo account (en per impostazione predefinita)"
},
"timezone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"shortcuts_enabled": {
"type": "boolean"
},
"reduce_motion": {
"type": "boolean"
},
"product_emails": {
"type": "boolean"
},
"marketing_emails": {
"type": "boolean",
"description": "Indica se possono essere inviate email di marketing (campagne drip). false dopo l'annullamento dell'iscrizione"
},
"newsletter": {
"type": "boolean"
},
"two_factor": {
"type": "boolean"
},
"passkeys": {
"type": "integer"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/account.json
Aggiorna il tuo profilo e le tue preferenze
account_update
Permesso: member
curl -X PATCH https://privatusanalytics.com/account.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Il tuo nome"
},
"email": {
"type": "string",
"description": "Nuovo indirizzo email (prima confermato via email)"
},
"theme": {
"type": "string",
"description": "Tema colore",
"enum": [
"system",
"light",
"dark"
]
},
"default_landing": {
"type": "string",
"description": "Pagina dopo l'accesso: sites o last_site",
"enum": [
"sites",
"last_site"
]
},
"locale": {
"type": "string",
"description": "Lingua dell'app quando hai effettuato l'accesso, come codice lingua (en, de, fr e così via). Le pagine pubbliche e l'API restano invariate",
"enum": [
"en",
"de",
"es",
"fr",
"it",
"nl",
"pt",
"pl",
"sv",
"da",
"no",
"fi",
"ja",
"ko",
"zh-CN",
"zh-TW"
]
},
"timezone": {
"type": "string",
"description": "Il tuo fuso orario (nome IANA)"
},
"shortcuts_enabled": {
"type": "boolean",
"description": "Scorciatoie da tastiera"
},
"reduce_motion": {
"type": "boolean",
"description": "Riduci le animazioni"
},
"product_emails": {
"type": "boolean",
"description": "Email di aggiornamenti sul prodotto e consigli"
},
"marketing_emails": {
"type": "boolean",
"description": "Email di marketing come i consigli di onboarding. Per riattivarle dopo un annullamento serve un browser con accesso effettuato"
},
"newsletter": {
"type": "boolean",
"description": "Newsletter mensile"
}
},
"required": []
}
{
"type": "object",
"properties": {
"email": {
"type": "string"
},
"unconfirmed_email": {
"anyOf": [
{
"type": "string",
"description": "Nuova email in attesa di conferma"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"theme": {
"type": "string"
},
"default_landing": {
"type": "string"
},
"locale": {
"type": "string",
"description": "Codice lingua dell'app per questo account (en per impostazione predefinita)"
},
"timezone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"shortcuts_enabled": {
"type": "boolean"
},
"reduce_motion": {
"type": "boolean"
},
"product_emails": {
"type": "boolean"
},
"marketing_emails": {
"type": "boolean",
"description": "Indica se possono essere inviate email di marketing (campagne drip). false dopo l'annullamento dell'iscrizione"
},
"newsletter": {
"type": "boolean"
},
"two_factor": {
"type": "boolean"
},
"passkeys": {
"type": "integer"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
Analytics
GET
/sites/:site_id/overview.json
Panoramica del sito: metriche, serie del grafico, pannelli principali, visitatori live e note
stats_overview
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/overview.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "Intervallo di date predefinito. Usa custom con from/to",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "Inizio dell'intervallo personalizzato (fuso orario del sito)"
},
"to": {
"type": "string",
"format": "date",
"description": "Fine dell'intervallo personalizzato, inclusa"
},
"compare": {
"type": "string",
"description": "Periodo di confronto",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "Inizio del confronto personalizzato"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "Fine del confronto personalizzato"
},
"match_weekday": {
"type": "boolean",
"description": "Allinea i giorni della settimana del confronto",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri: [[\"dimension\",\"operator\",\"value\"], …]. Operatori: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Racchiudi le condizioni in {\"any\": [...]} per OR.",
"default": []
},
"segment_id": {
"type": "string",
"description": "Applica un segmento salvato (seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "Aggiungi i dati storici importati (date precedenti al primo evento nativo, ignorati quando sono applicati filtri o un segmento)",
"default": false
},
"interval": {
"type": "string",
"description": "Dimensione dell'intervallo del grafico",
"enum": [
"auto",
"minute",
"hour",
"day",
"week",
"month",
"quarter",
"year"
],
"default": "auto"
},
"panels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Dimensioni di cui includere i valori principali",
"default": [
"channel",
"referrer",
"page",
"entry_page",
"country",
"device",
"browser",
"os",
"utm_campaign",
"event",
"goal"
]
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/experiments.json
Report dell'esperimento: tasso di conversione per variante, miglioramento rispetto al controllo e significatività (z-test a due proporzioni)
experiments_report
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/experiments.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "Intervallo di date predefinito. Usa custom con from/to",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "Inizio dell'intervallo personalizzato (fuso orario del sito)"
},
"to": {
"type": "string",
"format": "date",
"description": "Fine dell'intervallo personalizzato, inclusa"
},
"compare": {
"type": "string",
"description": "Periodo di confronto",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "Inizio del confronto personalizzato"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "Fine del confronto personalizzato"
},
"match_weekday": {
"type": "boolean",
"description": "Allinea i giorni della settimana del confronto",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri: [[\"dimension\",\"operator\",\"value\"], …]. Operatori: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Racchiudi le condizioni in {\"any\": [...]} per OR.",
"default": []
},
"segment_id": {
"type": "string",
"description": "Applica un segmento salvato (seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "Aggiungi i dati storici importati (date precedenti al primo evento nativo, ignorati quando sono applicati filtri o un segmento)",
"default": false
},
"property": {
"type": "string",
"description": "Proprietà dell'evento che contiene la variante, ad esempio variant",
"examples": [
"variant"
]
},
"goal_id": {
"type": "string",
"description": "Obiettivo contato come conversione (goal_…)"
},
"control": {
"type": "string",
"description": "Variante di controllo (predefinita \"control\" se presente, altrimenti la variante con più visite)"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"property",
"goal_id",
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/insights.json
Cambiamenti rilevanti rispetto al periodo precedente, in linguaggio naturale (maggiori variazioni, cambiamenti nella conversione degli obiettivi)
insights_get
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/insights.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "Giorni completi fino a ieri, confrontati con lo stesso numero di giorni precedenti",
"enum": [
"7d",
"14d",
"28d",
"30d"
],
"default": "7d"
},
"limit": {
"type": "integer",
"description": "Numero massimo di approfondimenti (da 1 a 20)",
"default": 8
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/journeys.json
Percorsi: i primi percorsi di 3 passaggi dopo una pagina (o qualsiasi ingresso), oppure prima di una pagina o di un obiettivo
journeys_explore
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/journeys.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "Intervallo di date predefinito. Usa custom con from/to",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "Inizio dell'intervallo personalizzato (fuso orario del sito)"
},
"to": {
"type": "string",
"format": "date",
"description": "Fine dell'intervallo personalizzato, inclusa"
},
"compare": {
"type": "string",
"description": "Periodo di confronto",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "Inizio del confronto personalizzato"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "Fine del confronto personalizzato"
},
"match_weekday": {
"type": "boolean",
"description": "Allinea i giorni della settimana del confronto",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri: [[\"dimension\",\"operator\",\"value\"], …]. Operatori: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Racchiudi le condizioni in {\"any\": [...]} per OR.",
"default": []
},
"segment_id": {
"type": "string",
"description": "Applica un segmento salvato (seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "Aggiungi i dati storici importati (date precedenti al primo evento nativo, ignorati quando sono applicati filtri o un segmento)",
"default": false
},
"mode": {
"type": "string",
"description": "forward: pagine dopo la pagina iniziale, reverse: pagine che portano alla pagina finale o all'obiettivo",
"enum": [
"forward",
"reverse"
],
"default": "forward"
},
"path": {
"type": "string",
"description": "Pagina iniziale (forward) o pagina finale (reverse). Vuoto significa qualsiasi ingresso (solo forward)"
},
"goal_id": {
"type": "string",
"description": "Modalità reverse: termina a questo obiettivo (goal_…) invece che a una pagina"
},
"limit": {
"type": "integer",
"description": "Pagine mostrate per passaggio (massimo 12)",
"default": 6
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/pages/detail.json
Dettaglio pagina: metriche, pagine precedenti e successive, sorgenti, Web Vitals, eventi e mappa dei clic per un percorso
pages_detail
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/pages/detail.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "Intervallo di date predefinito. Usa custom con from/to",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "Inizio dell'intervallo personalizzato (fuso orario del sito)"
},
"to": {
"type": "string",
"format": "date",
"description": "Fine dell'intervallo personalizzato, inclusa"
},
"compare": {
"type": "string",
"description": "Periodo di confronto",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "Inizio del confronto personalizzato"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "Fine del confronto personalizzato"
},
"match_weekday": {
"type": "boolean",
"description": "Allinea i giorni della settimana del confronto",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri: [[\"dimension\",\"operator\",\"value\"], …]. Operatori: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Racchiudi le condizioni in {\"any\": [...]} per OR.",
"default": []
},
"segment_id": {
"type": "string",
"description": "Applica un segmento salvato (seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "Aggiungi i dati storici importati (date precedenti al primo evento nativo, ignorati quando sono applicati filtri o un segmento)",
"default": false
},
"path": {
"type": "string",
"description": "Percorso della pagina, ad esempio /pricing",
"examples": [
"/pricing"
]
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"path",
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/stats/aggregate.json
Metriche principali per un periodo (con confronto)
stats_aggregate
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/stats/aggregate.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "Intervallo di date predefinito. Usa custom con from/to",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "Inizio dell'intervallo personalizzato (fuso orario del sito)"
},
"to": {
"type": "string",
"format": "date",
"description": "Fine dell'intervallo personalizzato, inclusa"
},
"compare": {
"type": "string",
"description": "Periodo di confronto",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "Inizio del confronto personalizzato"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "Fine del confronto personalizzato"
},
"match_weekday": {
"type": "boolean",
"description": "Allinea i giorni della settimana del confronto",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri: [[\"dimension\",\"operator\",\"value\"], …]. Operatori: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Racchiudi le condizioni in {\"any\": [...]} per OR.",
"default": []
},
"segment_id": {
"type": "string",
"description": "Applica un segmento salvato (seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "Aggiungi i dati storici importati (date precedenti al primo evento nativo, ignorati quando sono applicati filtri o un segmento)",
"default": false
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/breakdown/:dimension.json
Valori principali di una dimensione (pagine, sorgenti, paesi…)
stats_breakdown
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/breakdown/:dimension.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "Intervallo di date predefinito. Usa custom con from/to",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "Inizio dell'intervallo personalizzato (fuso orario del sito)"
},
"to": {
"type": "string",
"format": "date",
"description": "Fine dell'intervallo personalizzato, inclusa"
},
"compare": {
"type": "string",
"description": "Periodo di confronto",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "Inizio del confronto personalizzato"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "Fine del confronto personalizzato"
},
"match_weekday": {
"type": "boolean",
"description": "Allinea i giorni della settimana del confronto",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri: [[\"dimension\",\"operator\",\"value\"], …]. Operatori: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Racchiudi le condizioni in {\"any\": [...]} per OR.",
"default": []
},
"segment_id": {
"type": "string",
"description": "Applica un segmento salvato (seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "Aggiungi i dati storici importati (date precedenti al primo evento nativo, ignorati quando sono applicati filtri o un segmento)",
"default": false
},
"dimension": {
"type": "string",
"description": "Dimension della risorsa"
},
"limit": {
"type": "integer",
"description": "Righe per pagina (massimo 1000)",
"default": 10
},
"page": {
"type": "integer",
"description": "Numero di pagina",
"default": 1
},
"sort": {
"type": "string",
"description": "Metrica di ordinamento",
"enum": [
"visitors",
"visits",
"pageviews",
"revenue"
]
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"dimension",
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/stats/timeseries.json
Metriche per intervallo di tempo per i grafici
stats_timeseries
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/stats/timeseries.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "Intervallo di date predefinito. Usa custom con from/to",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "Inizio dell'intervallo personalizzato (fuso orario del sito)"
},
"to": {
"type": "string",
"format": "date",
"description": "Fine dell'intervallo personalizzato, inclusa"
},
"compare": {
"type": "string",
"description": "Periodo di confronto",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "Inizio del confronto personalizzato"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "Fine del confronto personalizzato"
},
"match_weekday": {
"type": "boolean",
"description": "Allinea i giorni della settimana del confronto",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri: [[\"dimension\",\"operator\",\"value\"], …]. Operatori: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Racchiudi le condizioni in {\"any\": [...]} per OR.",
"default": []
},
"segment_id": {
"type": "string",
"description": "Applica un segmento salvato (seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "Aggiungi i dati storici importati (date precedenti al primo evento nativo, ignorati quando sono applicati filtri o un segmento)",
"default": false
},
"interval": {
"type": "string",
"description": "Dimensione dell'intervallo. auto ne sceglie una per il periodo",
"enum": [
"auto",
"minute",
"hour",
"day",
"week",
"month",
"quarter",
"year"
],
"default": "auto"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
Assistente
POST
/sites/:site_id/ask.json
Fai una domanda in una nuova conversazione (conta ai fini del limite mensile di domande IA)
assistant_ask
Permesso: analytics.read
curl -X POST https://privatusanalytics.com/sites/:site_id/ask.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"question": {
"type": "string",
"description": "La tua prima domanda in linguaggio naturale",
"examples": [
"How many visitors did we have last week?"
]
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"question",
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della conversazione, ad esempio ask_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Id del sito"
},
{
"type": "null"
}
]
},
"title": {
"anyOf": [
{
"type": "string",
"description": "La prima domanda, abbreviata"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "Ora dell'ultimo messaggio"
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "Eliminata automaticamente dopo questa data (30 giorni dopo l'ultimo messaggio)"
},
"messages": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id del messaggio all'interno della conversazione"
},
"role": {
"type": "string",
"description": "user (la domanda) o assistant (la risposta)"
},
"content": {
"type": "string",
"description": "La domanda, oppure la risposta in Markdown"
},
"queries": {
"type": "array",
"items": {
"type": "object"
},
"description": "Come ci sono arrivato: le query API esatte alla base della risposta, come [{tool, input, status, error}]"
},
"chart": {
"anyOf": [
{
"type": "object",
"description": "Grafico della risposta: {type: line, labels, series, comparison, metric, format} oppure {type: table, columns, rows}"
},
{
"type": "null"
}
]
},
"goal_draft": {
"anyOf": [
{
"type": "object",
"description": "Un obiettivo proposto dall'assistente, da confermare con goals_create"
},
{
"type": "null"
}
]
},
"input_tokens": {
"anyOf": [
{
"type": "integer",
"description": "Token di input del modello usati"
},
{
"type": "null"
}
]
},
"output_tokens": {
"anyOf": [
{
"type": "integer",
"description": "Token di output del modello usati"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
},
"description": "Domande e risposte, dalla più vecchia"
}
}
}
DELETE
/sites/:site_id/ask/:id.json
Elimina una conversazione con l'assistente e i suoi messaggi
assistant_conversations_delete
Permesso: analytics.read
curl -X DELETE https://privatusanalytics.com/sites/:site_id/ask/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della conversazione, ad esempio ask_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Id del sito"
},
{
"type": "null"
}
]
},
"title": {
"anyOf": [
{
"type": "string",
"description": "La prima domanda, abbreviata"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "Ora dell'ultimo messaggio"
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "Eliminata automaticamente dopo questa data (30 giorni dopo l'ultimo messaggio)"
}
}
}
GET
/sites/:site_id/ask.json
Elenca le tue conversazioni con l'assistente per un sito
assistant_conversations_list
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/ask.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della conversazione, ad esempio ask_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Id del sito"
},
{
"type": "null"
}
]
},
"title": {
"anyOf": [
{
"type": "string",
"description": "La prima domanda, abbreviata"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "Ora dell'ultimo messaggio"
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "Eliminata automaticamente dopo questa data (30 giorni dopo l'ultimo messaggio)"
}
}
}
}
GET
/sites/:site_id/ask/:id.json
Una conversazione con l'assistente: domande, risposte, le query alla base e i grafici
assistant_conversations_get
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/ask/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della conversazione, ad esempio ask_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Id del sito"
},
{
"type": "null"
}
]
},
"title": {
"anyOf": [
{
"type": "string",
"description": "La prima domanda, abbreviata"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "Ora dell'ultimo messaggio"
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "Eliminata automaticamente dopo questa data (30 giorni dopo l'ultimo messaggio)"
},
"messages": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id del messaggio all'interno della conversazione"
},
"role": {
"type": "string",
"description": "user (la domanda) o assistant (la risposta)"
},
"content": {
"type": "string",
"description": "La domanda, oppure la risposta in Markdown"
},
"queries": {
"type": "array",
"items": {
"type": "object"
},
"description": "Come ci sono arrivato: le query API esatte alla base della risposta, come [{tool, input, status, error}]"
},
"chart": {
"anyOf": [
{
"type": "object",
"description": "Grafico della risposta: {type: line, labels, series, comparison, metric, format} oppure {type: table, columns, rows}"
},
{
"type": "null"
}
]
},
"goal_draft": {
"anyOf": [
{
"type": "object",
"description": "Un obiettivo proposto dall'assistente, da confermare con goals_create"
},
{
"type": "null"
}
]
},
"input_tokens": {
"anyOf": [
{
"type": "integer",
"description": "Token di input del modello usati"
},
{
"type": "null"
}
]
},
"output_tokens": {
"anyOf": [
{
"type": "integer",
"description": "Token di output del modello usati"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
},
"description": "Domande e risposte, dalla più vecchia"
}
}
}
POST
/sites/:site_id/ask/:ask_conversation_id/messages.json
Fai una domanda di approfondimento in una conversazione (conta ai fini del limite mensile di domande IA). Restituisce la risposta.
assistant_ask_followup
Permesso: analytics.read
curl -X POST https://privatusanalytics.com/sites/:site_id/ask/:ask_conversation_id/messages.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"question": {
"type": "string",
"description": "La tua domanda in linguaggio naturale",
"examples": [
"Which pages had the most visitors last week?"
]
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"ask_conversation_id": {
"type": "string",
"description": "Ask conversation della risorsa"
}
},
"required": [
"question",
"site_id",
"ask_conversation_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id del messaggio all'interno della conversazione"
},
"role": {
"type": "string",
"description": "user (la domanda) o assistant (la risposta)"
},
"content": {
"type": "string",
"description": "La domanda, oppure la risposta in Markdown"
},
"queries": {
"type": "array",
"items": {
"type": "object"
},
"description": "Come ci sono arrivato: le query API esatte alla base della risposta, come [{tool, input, status, error}]"
},
"chart": {
"anyOf": [
{
"type": "object",
"description": "Grafico della risposta: {type: line, labels, series, comparison, metric, format} oppure {type: table, columns, rows}"
},
{
"type": "null"
}
]
},
"goal_draft": {
"anyOf": [
{
"type": "object",
"description": "Un obiettivo proposto dall'assistente, da confermare con goals_create"
},
{
"type": "null"
}
]
},
"input_tokens": {
"anyOf": [
{
"type": "integer",
"description": "Token di input del modello usati"
},
{
"type": "null"
}
]
},
"output_tokens": {
"anyOf": [
{
"type": "integer",
"description": "Token di output del modello usati"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
Avvisi
POST
/alerts/:id/acknowledge.json
Conferma la presa in carico dell'ultimo incidente
alerts_acknowledge
Permesso: analytics.read
curl -X POST https://privatusanalytics.com/alerts/:id/acknowledge.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'avviso, ad esempio alr_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Id del sito (null per gli avvisi di utilizzo)"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "threshold, anomaly, goal, no_data, usage, uptime, ssl o vitals"
},
"metric": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"operator": {
"anyOf": [
{
"type": "string",
"description": "gt, gte, lt o lte"
},
{
"type": "null"
}
]
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window_minutes": {
"type": "integer"
},
"sensitivity": {
"type": "string",
"description": "Sensibilità dell'anomalia"
},
"goal_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"channel_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei canali di notifica"
},
"state": {
"type": "string",
"description": "ok o triggered"
},
"enabled": {
"type": "boolean"
},
"muted_until": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_triggered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_evaluated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/workspaces/:workspace_id/alerts.json
Crea un avviso
alerts_create
Permesso: content.write
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/alerts.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito (pa_…). Obbligatorio tranne per gli avvisi di utilizzo"
},
"metric": {
"type": "string",
"description": "threshold/anomaly: visitors, visits, pageviews, bounce_rate o conversion. vitals: lcp, inp, cls, fcp o ttfb"
},
"operator": {
"type": "string",
"description": "Confronto (gt, gte, lt, lte). anomaly: lt solo cali, gt solo picchi, vuoto entrambi",
"enum": [
"gt",
"gte",
"lt",
"lte"
]
},
"threshold": {
"type": "number",
"description": "threshold: valore della metrica, goal: completamenti, no_data: ore, usage: percentuale, ssl: giorni, vitals: ms (CLS: punteggio)"
},
"window_minutes": {
"type": "integer",
"description": "Finestra di valutazione in minuti (da 5 a 10080)"
},
"sensitivity": {
"type": "string",
"description": "anomaly: low, medium o high",
"enum": [
"low",
"medium",
"high"
]
},
"goal_id": {
"type": "string",
"description": "avvisi goal e conversion: id dell'obiettivo (goal_…)"
},
"uptime_check_id": {
"type": "string",
"description": "uptime/ssl: id del controllo (predefinito: tutti i controlli del sito)"
},
"channel_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei canali di notifica (nch_…)"
},
"enabled": {
"type": "boolean",
"description": "Valuta questo avviso"
},
"name": {
"type": "string",
"description": "Nome dell'avviso",
"examples": [
"Traffic dropped"
]
},
"kind": {
"type": "string",
"description": "threshold, anomaly, goal, no_data, usage, uptime, ssl o vitals",
"enum": [
"threshold",
"anomaly",
"goal",
"no_data",
"usage",
"uptime",
"ssl",
"vitals"
]
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"name",
"kind",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'avviso, ad esempio alr_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Id del sito (null per gli avvisi di utilizzo)"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "threshold, anomaly, goal, no_data, usage, uptime, ssl o vitals"
},
"metric": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"operator": {
"anyOf": [
{
"type": "string",
"description": "gt, gte, lt o lte"
},
{
"type": "null"
}
]
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window_minutes": {
"type": "integer"
},
"sensitivity": {
"type": "string",
"description": "Sensibilità dell'anomalia"
},
"goal_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"channel_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei canali di notifica"
},
"state": {
"type": "string",
"description": "ok o triggered"
},
"enabled": {
"type": "boolean"
},
"muted_until": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_triggered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_evaluated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/alerts/:id.json
Elimina un avviso
alerts_delete
Permesso: content.write
curl -X DELETE https://privatusanalytics.com/alerts/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'avviso, ad esempio alr_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Id del sito (null per gli avvisi di utilizzo)"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "threshold, anomaly, goal, no_data, usage, uptime, ssl o vitals"
},
"metric": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"operator": {
"anyOf": [
{
"type": "string",
"description": "gt, gte, lt o lte"
},
{
"type": "null"
}
]
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window_minutes": {
"type": "integer"
},
"sensitivity": {
"type": "string",
"description": "Sensibilità dell'anomalia"
},
"goal_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"channel_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei canali di notifica"
},
"state": {
"type": "string",
"description": "ok o triggered"
},
"enabled": {
"type": "boolean"
},
"muted_until": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_triggered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_evaluated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/alerts/:id/history.json
Cronologia degli incidenti di un avviso
alerts_history
Permesso: analytics.read
curl https://privatusanalytics.com/alerts/:id/history.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"open": {
"type": "boolean",
"description": "Solo incidenti non risolti",
"default": false
},
"id": {
"type": "string",
"description": "Id della risorsa"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"triggered_at": {
"type": "string",
"format": "date-time"
},
"resolved_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"value": {
"anyOf": [
{
"type": "number",
"description": "Valore misurato all'attivazione"
},
{
"type": "null"
}
]
},
"message": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"acknowledged_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"acknowledged_by": {
"anyOf": [
{
"type": "string",
"description": "Nome del membro che ha preso in carico"
},
{
"type": "null"
}
]
}
}
}
}
GET
/workspaces/:workspace_id/alerts.json
Elenca gli avvisi
alerts_list
Permesso: analytics.read
curl https://privatusanalytics.com/workspaces/:workspace_id/alerts.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Solo avvisi di questo sito (pa_…)"
},
"state": {
"type": "string",
"description": "Solo avvisi ok o triggered",
"enum": [
"ok",
"triggered"
]
},
"kind": {
"type": "string",
"description": "Solo questo tipo",
"enum": [
"threshold",
"anomaly",
"goal",
"no_data",
"usage",
"uptime",
"ssl",
"vitals"
]
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'avviso, ad esempio alr_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Id del sito (null per gli avvisi di utilizzo)"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "threshold, anomaly, goal, no_data, usage, uptime, ssl o vitals"
},
"metric": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"operator": {
"anyOf": [
{
"type": "string",
"description": "gt, gte, lt o lte"
},
{
"type": "null"
}
]
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window_minutes": {
"type": "integer"
},
"sensitivity": {
"type": "string",
"description": "Sensibilità dell'anomalia"
},
"goal_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"channel_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei canali di notifica"
},
"state": {
"type": "string",
"description": "ok o triggered"
},
"enabled": {
"type": "boolean"
},
"muted_until": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_triggered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_evaluated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
POST
/alerts/:id/mute.json
Silenzia (o riattiva) le notifiche di un avviso
alerts_mute
Permesso: content.write
curl -X POST https://privatusanalytics.com/alerts/:id/mute.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"minutes": {
"type": "integer",
"description": "Silenzia per questo numero di minuti (0 riattiva, massimo 30 giorni)",
"default": 60
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'avviso, ad esempio alr_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Id del sito (null per gli avvisi di utilizzo)"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "threshold, anomaly, goal, no_data, usage, uptime, ssl o vitals"
},
"metric": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"operator": {
"anyOf": [
{
"type": "string",
"description": "gt, gte, lt o lte"
},
{
"type": "null"
}
]
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window_minutes": {
"type": "integer"
},
"sensitivity": {
"type": "string",
"description": "Sensibilità dell'anomalia"
},
"goal_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"channel_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei canali di notifica"
},
"state": {
"type": "string",
"description": "ok o triggered"
},
"enabled": {
"type": "boolean"
},
"muted_until": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_triggered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_evaluated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/alerts/:id.json
Ottieni un avviso
alerts_get
Permesso: analytics.read
curl https://privatusanalytics.com/alerts/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'avviso, ad esempio alr_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Id del sito (null per gli avvisi di utilizzo)"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "threshold, anomaly, goal, no_data, usage, uptime, ssl o vitals"
},
"metric": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"operator": {
"anyOf": [
{
"type": "string",
"description": "gt, gte, lt o lte"
},
{
"type": "null"
}
]
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window_minutes": {
"type": "integer"
},
"sensitivity": {
"type": "string",
"description": "Sensibilità dell'anomalia"
},
"goal_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"channel_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei canali di notifica"
},
"state": {
"type": "string",
"description": "ok o triggered"
},
"enabled": {
"type": "boolean"
},
"muted_until": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_triggered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_evaluated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/alerts/:id.json
Aggiorna un avviso
alerts_update
Permesso: content.write
curl -X PATCH https://privatusanalytics.com/alerts/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito (pa_…). Obbligatorio tranne per gli avvisi di utilizzo"
},
"metric": {
"type": "string",
"description": "threshold/anomaly: visitors, visits, pageviews, bounce_rate o conversion. vitals: lcp, inp, cls, fcp o ttfb"
},
"operator": {
"type": "string",
"description": "Confronto (gt, gte, lt, lte). anomaly: lt solo cali, gt solo picchi, vuoto entrambi",
"enum": [
"gt",
"gte",
"lt",
"lte"
]
},
"threshold": {
"type": "number",
"description": "threshold: valore della metrica, goal: completamenti, no_data: ore, usage: percentuale, ssl: giorni, vitals: ms (CLS: punteggio)"
},
"window_minutes": {
"type": "integer",
"description": "Finestra di valutazione in minuti (da 5 a 10080)"
},
"sensitivity": {
"type": "string",
"description": "anomaly: low, medium o high",
"enum": [
"low",
"medium",
"high"
]
},
"goal_id": {
"type": "string",
"description": "avvisi goal e conversion: id dell'obiettivo (goal_…)"
},
"uptime_check_id": {
"type": "string",
"description": "uptime/ssl: id del controllo (predefinito: tutti i controlli del sito)"
},
"channel_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei canali di notifica (nch_…)"
},
"enabled": {
"type": "boolean",
"description": "Valuta questo avviso"
},
"name": {
"type": "string",
"description": "Nome dell'avviso"
},
"kind": {
"type": "string",
"description": "Tipo di avviso",
"enum": [
"threshold",
"anomaly",
"goal",
"no_data",
"usage",
"uptime",
"ssl",
"vitals"
]
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'avviso, ad esempio alr_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Id del sito (null per gli avvisi di utilizzo)"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "threshold, anomaly, goal, no_data, usage, uptime, ssl o vitals"
},
"metric": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"operator": {
"anyOf": [
{
"type": "string",
"description": "gt, gte, lt o lte"
},
{
"type": "null"
}
]
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window_minutes": {
"type": "integer"
},
"sensitivity": {
"type": "string",
"description": "Sensibilità dell'anomalia"
},
"goal_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"channel_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei canali di notifica"
},
"state": {
"type": "string",
"description": "ok o triggered"
},
"enabled": {
"type": "boolean"
},
"muted_until": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_triggered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_evaluated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/alerts.json
Elenca gli avvisi di un sito
site_alerts_list
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/alerts.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"state": {
"type": "string",
"description": "Solo avvisi ok o triggered",
"enum": [
"ok",
"triggered"
]
},
"kind": {
"type": "string",
"description": "Solo questo tipo",
"enum": [
"threshold",
"anomaly",
"goal",
"no_data",
"usage",
"uptime",
"ssl",
"vitals"
]
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'avviso, ad esempio alr_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Id del sito (null per gli avvisi di utilizzo)"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "threshold, anomaly, goal, no_data, usage, uptime, ssl o vitals"
},
"metric": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"operator": {
"anyOf": [
{
"type": "string",
"description": "gt, gte, lt o lte"
},
{
"type": "null"
}
]
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window_minutes": {
"type": "integer"
},
"sensitivity": {
"type": "string",
"description": "Sensibilità dell'anomalia"
},
"goal_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"channel_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei canali di notifica"
},
"state": {
"type": "string",
"description": "ok o triggered"
},
"enabled": {
"type": "boolean"
},
"muted_until": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_triggered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_evaluated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
Campagne
POST
/sites/:site_id/campaigns/costs.json
Imposta la spesa di una campagna in un mese
campaign_costs_create
Permesso: content.write
curl -X POST https://privatusanalytics.com/sites/:site_id/campaigns/costs.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"campaign": {
"type": "string",
"description": "Valore utm_campaign a cui appartiene la spesa",
"examples": [
"spring_sale"
]
},
"month": {
"type": "string",
"description": "Mese, YYYY-MM",
"examples": [
"2026-09"
]
},
"amount": {
"type": "number",
"description": "Spesa in unità principali, ad esempio 1250.50"
},
"currency": {
"type": "string",
"description": "Valuta ISO 4217 (predefinita: la valuta del sito)"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"campaign",
"month",
"amount",
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id della voce di costo"
},
"campaign": {
"type": "string",
"description": "Valore utm_campaign"
},
"month": {
"type": "string",
"description": "Mese, YYYY-MM"
},
"amount_minor": {
"type": "integer",
"description": "Spesa in unità minori"
},
"currency": {
"type": "string",
"description": "Valuta ISO 4217 dell'importo"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/campaigns/costs/:id.json
Elimina una voce di costo della campagna
campaign_costs_delete
Permesso: content.write
curl -X DELETE https://privatusanalytics.com/sites/:site_id/campaigns/costs/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id della voce di costo"
},
"campaign": {
"type": "string",
"description": "Valore utm_campaign"
},
"month": {
"type": "string",
"description": "Mese, YYYY-MM"
},
"amount_minor": {
"type": "integer",
"description": "Spesa in unità minori"
},
"currency": {
"type": "string",
"description": "Valuta ISO 4217 dell'importo"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/sites/:site_id/campaigns/costs/import.json
Importa i costi delle campagne da CSV (campaign,month,amount[,currency])
campaign_costs_import
Permesso: content.write
curl -X POST https://privatusanalytics.com/sites/:site_id/campaigns/costs/import.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"file": {
"type": "string",
"format": "binary",
"description": "Caricamento di un file CSV (moduli multipart)"
},
"csv": {
"type": "string",
"description": "Testo CSV: campaign,month,amount[,currency]"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"imported": {
"type": "integer",
"description": "Righe salvate"
},
"failed": {
"type": "integer",
"description": "Righe saltate"
},
"errors": {
"type": "array",
"items": {
"type": "string"
},
"description": "Perché le righe sono state saltate (le prime 50)"
}
}
}
GET
/sites/:site_id/campaigns/costs.json
Elenca le voci di costo delle campagne
campaign_costs_list
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/campaigns/costs.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"campaign": {
"type": "string",
"description": "Solo questa campagna"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id della voce di costo"
},
"campaign": {
"type": "string",
"description": "Valore utm_campaign"
},
"month": {
"type": "string",
"description": "Mese, YYYY-MM"
},
"amount_minor": {
"type": "integer",
"description": "Spesa in unità minori"
},
"currency": {
"type": "string",
"description": "Valuta ISO 4217 dell'importo"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
}
PATCH
/sites/:site_id/campaigns/costs/:id.json
Modifica una voce di costo della campagna
campaign_costs_update
Permesso: content.write
curl -X PATCH https://privatusanalytics.com/sites/:site_id/campaigns/costs/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"campaign": {
"type": "string",
"description": "Valore utm_campaign"
},
"month": {
"type": "string",
"description": "Mese, YYYY-MM"
},
"amount": {
"type": "number",
"description": "Spesa in unità principali"
},
"currency": {
"type": "string",
"description": "Valuta ISO 4217"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id della voce di costo"
},
"campaign": {
"type": "string",
"description": "Valore utm_campaign"
},
"month": {
"type": "string",
"description": "Mese, YYYY-MM"
},
"amount_minor": {
"type": "integer",
"description": "Spesa in unità minori"
},
"currency": {
"type": "string",
"description": "Valuta ISO 4217 dell'importo"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/campaigns/builder.json
Crea e convalida un URL con tag UTM
campaigns_builder
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/campaigns/builder.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"destination": {
"type": "string",
"description": "URL della pagina di destinazione (https://…)",
"examples": [
"https://example.com/pricing"
]
},
"preset": {
"type": "string",
"description": "Compila utm_source/utm_medium per un canale se vuoti",
"enum": [
"newsletter",
"social",
"paid_search",
"paid_social",
"print",
"partner"
]
},
"utm_source": {
"type": "string",
"description": "Da dove proviene il traffico"
},
"utm_medium": {
"type": "string",
"description": "Mezzo di marketing, ad esempio email, cpc"
},
"utm_campaign": {
"type": "string",
"description": "Nome della campagna, ad esempio spring_sale"
},
"utm_content": {
"type": "string",
"description": "Variante, ad esempio header_button"
},
"utm_term": {
"type": "string",
"description": "Parola chiave della ricerca a pagamento"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"url": {
"anyOf": [
{
"type": "string",
"description": "URL con tag (null in presenza di errori)"
},
{
"type": "null"
}
]
},
"valid": {
"type": "boolean",
"description": "True quando non ci sono errori"
},
"destination": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"preset": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_source": {
"anyOf": [
{
"type": "string",
"description": "utm_source normalizzato"
},
{
"type": "null"
}
]
},
"utm_medium": {
"anyOf": [
{
"type": "string",
"description": "utm_medium normalizzato"
},
{
"type": "null"
}
]
},
"utm_campaign": {
"anyOf": [
{
"type": "string",
"description": "utm_campaign normalizzato"
},
{
"type": "null"
}
]
},
"utm_content": {
"anyOf": [
{
"type": "string",
"description": "utm_content normalizzato"
},
{
"type": "null"
}
]
},
"utm_term": {
"anyOf": [
{
"type": "string",
"description": "utm_term normalizzato"
},
{
"type": "null"
}
]
},
"issues": {
"type": "array",
"items": {
"type": "object"
},
"description": "field, level (error o warning) e message"
},
"presets": {
"type": "object",
"description": "Preset dei canali: utm_source/utm_medium per preset"
}
}
}
GET
/sites/:site_id/campaigns/hygiene.json
Qualità UTM: valori quasi duplicati, problemi di stile e sorgenti sconosciute
campaigns_hygiene
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/campaigns/hygiene.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "Intervallo di date predefinito. Usa custom con from/to",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "Inizio dell'intervallo personalizzato (fuso orario del sito)"
},
"to": {
"type": "string",
"format": "date",
"description": "Fine dell'intervallo personalizzato, inclusa"
},
"compare": {
"type": "string",
"description": "Periodo di confronto",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "Inizio del confronto personalizzato"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "Fine del confronto personalizzato"
},
"match_weekday": {
"type": "boolean",
"description": "Allinea i giorni della settimana del confronto",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri: [[\"dimension\",\"operator\",\"value\"], …]. Operatori: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Racchiudi le condizioni in {\"any\": [...]} per OR.",
"default": []
},
"segment_id": {
"type": "string",
"description": "Applica un segmento salvato (seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "Aggiungi i dati storici importati (date precedenti al primo evento nativo, ignorati quando sono applicati filtri o un segmento)",
"default": false
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"period": {
"type": "object",
"description": "from/to del periodo (UTC)"
},
"duplicates": {
"type": "array",
"items": {
"type": "object"
},
"description": "Valori quasi duplicati: campo, suggerimento e varianti [{value, visits}]"
},
"style_issues": {
"type": "array",
"items": {
"type": "object"
},
"description": "Valori che non sono in minuscolo con trattini bassi: campo, valore, visite, suggerimento"
},
"unknown_sources": {
"type": "array",
"items": {
"type": "object"
},
"description": "Valori utm_source che non riconosciamo: valore, visite"
}
}
}
GET
/sites/:site_id/campaigns.json
Riepilogo delle campagne con conversioni, ricavi, costo, CPA e ROAS
campaigns_list
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/campaigns.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "Intervallo di date predefinito. Usa custom con from/to",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "Inizio dell'intervallo personalizzato (fuso orario del sito)"
},
"to": {
"type": "string",
"format": "date",
"description": "Fine dell'intervallo personalizzato, inclusa"
},
"compare": {
"type": "string",
"description": "Periodo di confronto",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "Inizio del confronto personalizzato"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "Fine del confronto personalizzato"
},
"match_weekday": {
"type": "boolean",
"description": "Allinea i giorni della settimana del confronto",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri: [[\"dimension\",\"operator\",\"value\"], …]. Operatori: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Racchiudi le condizioni in {\"any\": [...]} per OR.",
"default": []
},
"segment_id": {
"type": "string",
"description": "Applica un segmento salvato (seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "Aggiungi i dati storici importati (date precedenti al primo evento nativo, ignorati quando sono applicati filtri o un segmento)",
"default": false
},
"goal_id": {
"type": "string",
"description": "Obiettivo (goal_…) di cui contare le conversioni. Predefinito: il primo obiettivo attivo"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"period": {
"type": "object",
"description": "from/to del periodo (UTC)"
},
"currency": {
"type": "string",
"description": "Valuta del sito per ricavi e costo"
},
"goal_id": {
"anyOf": [
{
"type": "string",
"description": "Obiettivo contato come conversione"
},
{
"type": "null"
}
]
},
"goal_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"campaigns": {
"type": "array",
"items": {
"type": "object"
},
"description": "Per utm_campaign: visitors, visits, conversions, conversion_rate, revenue, cost, cpa (unità minori), roas (ricavi ÷ costo) e sources [{source, medium, visitors, visits, conversions, conversion_rate, revenue}]"
},
"totals": {
"type": "object",
"description": "Somme su tutte le campagne elencate"
}
}
}
POST
/sites/:site_id/campaigns/links.json
Salva un link con tag UTM nella libreria
links_create
Permesso: content.write
curl -X POST https://privatusanalytics.com/sites/:site_id/campaigns/links.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome del link",
"examples": [
"Spring newsletter"
]
},
"destination": {
"type": "string",
"description": "URL della pagina di destinazione (https://…)",
"examples": [
"https://example.com/pricing"
]
},
"utm_source": {
"type": "string",
"description": "Valore utm_source (in minuscolo, gli spazi diventano trattini bassi)"
},
"utm_medium": {
"type": "string",
"description": "Valore utm_medium (in minuscolo, gli spazi diventano trattini bassi)"
},
"utm_campaign": {
"type": "string",
"description": "Valore utm_campaign (in minuscolo, gli spazi diventano trattini bassi)"
},
"utm_content": {
"type": "string",
"description": "Valore utm_content (in minuscolo, gli spazi diventano trattini bassi)"
},
"utm_term": {
"type": "string",
"description": "Valore utm_term (in minuscolo, gli spazi diventano trattini bassi)"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "Tag. I valori separati da virgola vengono divisi",
"default": []
},
"notes": {
"type": "string",
"description": "Note in testo libero"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"name",
"destination",
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del link, ad esempio lnk_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"destination": {
"type": "string",
"description": "URL della pagina di destinazione"
},
"utm_source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_medium": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_campaign": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_term": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"type": "string",
"description": "URL completo con tag da condividere"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/campaigns/links/:id.json
Elimina un link salvato
links_delete
Permesso: content.write
curl -X DELETE https://privatusanalytics.com/sites/:site_id/campaigns/links/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del link, ad esempio lnk_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"destination": {
"type": "string",
"description": "URL della pagina di destinazione"
},
"utm_source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_medium": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_campaign": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_term": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"type": "string",
"description": "URL completo con tag da condividere"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/campaigns/links.json
Elenca i link di campagna salvati
links_list
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/campaigns/links.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Cerca per nome, destinazione o campagna"
},
"tag": {
"type": "string",
"description": "Solo link con questo tag"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del link, ad esempio lnk_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"destination": {
"type": "string",
"description": "URL della pagina di destinazione"
},
"utm_source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_medium": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_campaign": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_term": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"type": "string",
"description": "URL completo con tag da condividere"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/sites/:site_id/campaigns/links/:id/qr.json
Codice QR (SVG) per un link salvato
links_qr
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/campaigns/links/:id/qr.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"size": {
"type": "integer",
"description": "Dimensione del modulo in pixel (da 2 a 20)",
"default": 6
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"link_id": {
"type": "string",
"description": "Id del link"
},
"url": {
"type": "string",
"description": "L'URL codificato (con tag)"
},
"svg": {
"type": "string",
"description": "Documento SVG autonomo del codice QR"
}
}
}
GET
/sites/:site_id/campaigns/links/:id.json
Ottieni un link di campagna salvato
links_get
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/campaigns/links/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del link, ad esempio lnk_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"destination": {
"type": "string",
"description": "URL della pagina di destinazione"
},
"utm_source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_medium": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_campaign": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_term": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"type": "string",
"description": "URL completo con tag da condividere"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/sites/:site_id/campaigns/links/:id.json
Modifica un link salvato
links_update
Permesso: content.write
curl -X PATCH https://privatusanalytics.com/sites/:site_id/campaigns/links/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome del link",
"examples": [
"Spring newsletter"
]
},
"destination": {
"type": "string",
"description": "URL della pagina di destinazione (https://…)",
"examples": [
"https://example.com/pricing"
]
},
"utm_source": {
"type": "string",
"description": "Valore utm_source (in minuscolo, gli spazi diventano trattini bassi)"
},
"utm_medium": {
"type": "string",
"description": "Valore utm_medium (in minuscolo, gli spazi diventano trattini bassi)"
},
"utm_campaign": {
"type": "string",
"description": "Valore utm_campaign (in minuscolo, gli spazi diventano trattini bassi)"
},
"utm_content": {
"type": "string",
"description": "Valore utm_content (in minuscolo, gli spazi diventano trattini bassi)"
},
"utm_term": {
"type": "string",
"description": "Valore utm_term (in minuscolo, gli spazi diventano trattini bassi)"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "Tag. I valori separati da virgola vengono divisi"
},
"notes": {
"type": "string",
"description": "Note in testo libero"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del link, ad esempio lnk_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"destination": {
"type": "string",
"description": "URL della pagina di destinazione"
},
"utm_source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_medium": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_campaign": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_term": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"type": "string",
"description": "URL completo con tag da condividere"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
Canali di notifica
POST
/workspaces/:workspace_id/channels.json
Aggiungi un canale di notifica
notification_channels_create
Permesso: content.write
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/channels.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "URL del webhook (slack, teams, discord, webhook), HTTPS"
},
"secret": {
"type": "string",
"description": "webhook: segreto HMAC per X-Privatus-Signature"
},
"emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "email: indirizzi dei destinatari (massimo 20)"
},
"routing_key": {
"type": "string",
"description": "pagerduty: chiave di integrazione Events API v2"
},
"api_key": {
"type": "string",
"description": "opsgenie: chiave di integrazione API"
},
"region": {
"type": "string",
"description": "opsgenie: regione dell'account",
"enum": [
"us",
"eu"
]
},
"kind": {
"type": "string",
"description": "email, slack, teams, discord, webhook, pagerduty, opsgenie o push",
"enum": [
"email",
"slack",
"teams",
"discord",
"webhook",
"pagerduty",
"opsgenie",
"push"
]
},
"name": {
"type": "string",
"description": "Nome visualizzato",
"examples": [
"#alerts"
]
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"kind",
"name",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del canale, ad esempio nch_7Q2K9XH3AB"
},
"kind": {
"type": "string",
"description": "email, slack, teams, discord, webhook, pagerduty, opsgenie o push"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "Destinazione mascherata"
},
"last_used_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/channels/:id.json
Elimina un canale di notifica
notification_channels_delete
Permesso: content.write
curl -X DELETE https://privatusanalytics.com/channels/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del canale, ad esempio nch_7Q2K9XH3AB"
},
"kind": {
"type": "string",
"description": "email, slack, teams, discord, webhook, pagerduty, opsgenie o push"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "Destinazione mascherata"
},
"last_used_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/channels.json
Elenca i canali di notifica
notification_channels_list
Permesso: analytics.read
curl https://privatusanalytics.com/workspaces/:workspace_id/channels.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "Solo canali di questo tipo",
"enum": [
"email",
"slack",
"teams",
"discord",
"webhook",
"pagerduty",
"opsgenie",
"push"
]
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del canale, ad esempio nch_7Q2K9XH3AB"
},
"kind": {
"type": "string",
"description": "email, slack, teams, discord, webhook, pagerduty, opsgenie o push"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "Destinazione mascherata"
},
"last_used_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
POST
/channels/:id/send_test.json
Invia un messaggio di prova tramite un canale
notification_channels_send_test
Permesso: content.write
curl -X POST https://privatusanalytics.com/channels/:id/send_test.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del canale, ad esempio nch_7Q2K9XH3AB"
},
"kind": {
"type": "string",
"description": "email, slack, teams, discord, webhook, pagerduty, opsgenie o push"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "Destinazione mascherata"
},
"last_used_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/channels/:id.json
Ottieni un canale di notifica
notification_channels_get
Permesso: analytics.read
curl https://privatusanalytics.com/channels/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del canale, ad esempio nch_7Q2K9XH3AB"
},
"kind": {
"type": "string",
"description": "email, slack, teams, discord, webhook, pagerduty, opsgenie o push"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "Destinazione mascherata"
},
"last_used_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/channels/:id.json
Aggiorna un canale di notifica
notification_channels_update
Permesso: content.write
curl -X PATCH https://privatusanalytics.com/channels/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "URL del webhook (slack, teams, discord, webhook), HTTPS"
},
"secret": {
"type": "string",
"description": "webhook: segreto HMAC per X-Privatus-Signature"
},
"emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "email: indirizzi dei destinatari (massimo 20)"
},
"routing_key": {
"type": "string",
"description": "pagerduty: chiave di integrazione Events API v2"
},
"api_key": {
"type": "string",
"description": "opsgenie: chiave di integrazione API"
},
"region": {
"type": "string",
"description": "opsgenie: regione dell'account",
"enum": [
"us",
"eu"
]
},
"name": {
"type": "string",
"description": "Nome visualizzato"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del canale, ad esempio nch_7Q2K9XH3AB"
},
"kind": {
"type": "string",
"description": "email, slack, teams, discord, webhook, pagerduty, opsgenie o push"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "Destinazione mascherata"
},
"last_used_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/push_subscription.json
Registra un browser per le notifiche push
push_subscriptions_create
Permesso: member
curl -X POST https://privatusanalytics.com/push_subscription.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"endpoint": {
"type": "string",
"description": "PushSubscription.endpoint dal browser"
},
"p256dh": {
"type": "string",
"description": "PushSubscription keys.p256dh (base64url)"
},
"auth": {
"type": "string",
"description": "PushSubscription keys.auth (base64url)"
}
},
"required": [
"endpoint",
"p256dh",
"auth"
]
}
{
"type": "object",
"properties": {
"endpoint_host": {
"type": "string",
"description": "Host del servizio push"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/push_subscription.json
Rimuovi la registrazione push di un browser
push_subscriptions_delete
Permesso: member
curl -X DELETE https://privatusanalytics.com/push_subscription.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"endpoint": {
"type": "string",
"description": "PushSubscription.endpoint da rimuovere"
}
},
"required": [
"endpoint"
]
}
{
"type": "object",
"properties": {
"endpoint_host": {
"type": "string",
"description": "Host del servizio push"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
Condivisione
GET
/badge/:site_id.json
Badge contatore dei visitatori (SVG) per un sito pubblico
badges_get
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl https://privatusanalytics.com/badge/:site_id.json
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
Crawler
GET
/sites/:site_id/crawlers.json
Report sui crawler IA: visite per crawler nel tempo, percorsi principali per crawler, per categoria
crawlers_report
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/crawlers.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "Intervallo di date predefinito. Usa custom con from/to",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "Inizio dell'intervallo personalizzato (fuso orario del sito)"
},
"to": {
"type": "string",
"format": "date",
"description": "Fine dell'intervallo personalizzato, inclusa"
},
"category": {
"type": "string",
"description": "ai, search, seo, other o all",
"enum": [
"all",
"ai",
"search",
"seo",
"other"
],
"default": "ai"
},
"crawler": {
"type": "string",
"description": "Solo questo crawler, ad esempio GPTBot"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
Dashboard
GET
/workspaces/:workspace_id/dashboards/:id/cards/:index.json
Dati di una scheda di una dashboard personalizzata
dashboards_card
Permesso: analytics.read
curl https://privatusanalytics.com/workspaces/:workspace_id/dashboards/:id/cards/:index.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
},
"index": {
"type": "string",
"description": "Index della risorsa"
}
},
"required": [
"workspace_id",
"id",
"index"
]
}
{
"type": "object"
}
POST
/workspaces/:workspace_id/dashboards.json
Crea una dashboard personalizzata
dashboards_create
Permesso: content.write
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/dashboards.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome della dashboard",
"examples": [
"Client: Acme"
]
},
"cards": {
"type": "array",
"items": {},
"description": "Schede in ordine (massimo 40): [{\"type\": \"metric|chart|breakdown|goal|live|funnel|uptime|vitals\", \"site_id\": \"pa_…\", \"title\": \"facoltativo\", \"params\": {\"period\": \"30d\", \"metric\": \"visitors\", \"dimension\": \"page\", \"funnel_id\": \"fun_…\"}}]. I parametri che un tipo non usa vengono ignorati",
"default": []
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"name",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della dashboard, ad esempio dash_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"cards": {
"type": "array",
"items": {
"type": "object"
},
"description": "Schede in ordine: [{type, site_id, title, params}]"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/workspaces/:workspace_id/dashboards/:id.json
Elimina una dashboard personalizzata
dashboards_delete
Permesso: content.write
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/dashboards/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della dashboard, ad esempio dash_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"cards": {
"type": "array",
"items": {
"type": "object"
},
"description": "Schede in ordine: [{type, site_id, title, params}]"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/dashboards.json
Elenca le dashboard personalizzate
dashboards_list
Permesso: analytics.read
curl https://privatusanalytics.com/workspaces/:workspace_id/dashboards.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della dashboard, ad esempio dash_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"cards": {
"type": "array",
"items": {
"type": "object"
},
"description": "Schede in ordine: [{type, site_id, title, params}]"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/workspaces/:workspace_id/dashboards/:id.json
Ottieni una dashboard personalizzata e le sue schede
dashboards_get
Permesso: analytics.read
curl https://privatusanalytics.com/workspaces/:workspace_id/dashboards/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della dashboard, ad esempio dash_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"cards": {
"type": "array",
"items": {
"type": "object"
},
"description": "Schede in ordine: [{type, site_id, title, params}]"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/workspaces/:workspace_id/dashboards/:id.json
Rinomina una dashboard personalizzata o sostituisci le sue schede
dashboards_update
Permesso: content.write
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/dashboards/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nuovo nome (invariato se vuoto)"
},
"cards": {
"type": "array",
"items": {},
"description": "Sostituisce tutte le schede. Schede in ordine (massimo 40): [{\"type\": \"metric|chart|breakdown|goal|live|funnel|uptime|vitals\", \"site_id\": \"pa_…\", \"title\": \"facoltativo\", \"params\": {\"period\": \"30d\", \"metric\": \"visitors\", \"dimension\": \"page\", \"funnel_id\": \"fun_…\"}}]. I parametri che un tipo non usa vengono ignorati"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della dashboard, ad esempio dash_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"cards": {
"type": "array",
"items": {
"type": "object"
},
"description": "Schede in ordine: [{type, site_id, title, params}]"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
Documentazione
GET
/docs/api.json
Elenca tutte le operazioni API e gli strumenti MCP
docs_api
Permesso: public
curl https://privatusanalytics.com/docs/api.json
{
"type": "object",
"properties": {
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": []
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"tool_name": {
"type": "string",
"description": "Nome dello strumento MCP e operationId di OpenAPI"
},
"summary": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"group": {
"type": "string"
},
"verb": {
"type": "string",
"description": "Metodo HTTP"
},
"path": {
"type": "string",
"description": "Modello del percorso. Aggiungi .json per JSON"
},
"permission": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"input_schema": {
"type": "object",
"description": "JSON Schema degli input"
},
"response_schema": {
"type": "object",
"description": "JSON Schema di `data`"
}
}
}
}
GET
/docs.json
Elenca le pagine della documentazione
docs_list
Permesso: public
curl https://privatusanalytics.com/docs.json
{
"type": "object",
"properties": {
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": []
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Titolo della pagina"
},
"description": {
"type": "string",
"description": "Riepilogo in una riga"
},
"path": {
"type": "string",
"description": "Percorso della pagina. Aggiungi .md per Markdown o .json per JSON"
},
"section": {
"type": "string",
"description": "Slug della sezione, ad esempio tracker"
}
}
}
}
GET
/openapi.json
Documento OpenAPI 3.1 dell'intera API
docs_openapi
Permesso: public
curl https://privatusanalytics.com/openapi.json
{
"type": "object",
"properties": {},
"required": []
}
{
"type": "object"
}
GET
/docs/search.json
Cerca nella documentazione
docs_search
Permesso: public
curl https://privatusanalytics.com/docs/search.json
{
"type": "object",
"properties": {
"q": {
"type": "string",
"description": "Testo da cercare. Se vuoto restituisce tutte le pagine.",
"examples": [
"content security policy"
]
},
"limit": {
"type": "integer",
"description": "Risultati massimi (predefinito: 20 con q, tutti senza)"
}
},
"required": []
}
{
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Titolo della pagina"
},
"path": {
"type": "string",
"description": "Percorso della pagina"
},
"section": {
"type": "string",
"description": "Titolo della sezione"
},
"headings": {
"type": "array",
"items": {
"type": "object"
},
"description": "Intestazioni della pagina: { id, text }"
},
"excerpt": {
"type": "string",
"description": "Descrizione o prime frasi"
},
"score": {
"anyOf": [
{
"type": "integer",
"description": "Rilevanza (solo quando si cerca con q)"
},
{
"type": "null"
}
]
}
}
}
GET
/docs/:section/:page.json
Leggi una pagina della documentazione (Markdown e HTML)
docs_get
section e page derivano dal percorso della pagina /docs/<section>/<page>. Usa la pagina "index" per la panoramica di una sezione.
Permesso: public
curl https://privatusanalytics.com/docs/:section/:page.json
{
"type": "object",
"properties": {
"section": {
"type": "string",
"description": "Section della risorsa"
},
"page": {
"type": "string",
"description": "Page della risorsa"
}
},
"required": [
"section",
"page"
]
}
{
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Titolo della pagina"
},
"description": {
"type": "string",
"description": "Riepilogo in una riga"
},
"path": {
"type": "string",
"description": "Percorso della pagina. Aggiungi .md per Markdown o .json per JSON"
},
"section": {
"type": "string",
"description": "Slug della sezione, ad esempio tracker"
},
"headings": {
"type": "array",
"items": {
"type": "object"
},
"description": "Sezioni della pagina (id e testo)"
},
"full_markdown": {
"type": "string",
"description": "La pagina in Markdown (titolo incluso)"
},
"html": {
"type": "string",
"description": "Il corpo della pagina reso in HTML"
}
}
}
Esportazioni
POST
/workspaces/:workspace_id/exports.json
Metti in coda un'esportazione (creata in background)
exports_create
Permesso: analytics.export
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/exports.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Sito da esportare (pa_…)",
"examples": [
"pa_7Q2K9XH3AB"
]
},
"kind": {
"type": "string",
"description": "aggregated: metriche per intervallo di tempo e dimensioni. pageviews/events/raw: una riga per visita (Pro e superiori). imported: statistiche giornaliere importate. dashboard: ZIP dei pannelli della panoramica",
"enum": [
"aggregated",
"pageviews",
"events",
"imported",
"raw",
"dashboard"
],
"default": "aggregated"
},
"file_format": {
"type": "string",
"description": "csv, json o xlsx (aggregated, pageviews, events, imported), csv o ndjson (raw), zip (dashboard)",
"enum": [
"csv",
"json",
"xlsx",
"ndjson",
"zip"
],
"default": "csv"
},
"from": {
"type": "string",
"format": "date",
"description": "Primo giorno, nel fuso orario dell'esportazione",
"examples": [
"2026-09-01"
]
},
"to": {
"type": "string",
"format": "date",
"description": "Ultimo giorno, incluso (massimo 400 giorni, raw 93 giorni)",
"examples": [
"2026-09-28"
]
},
"timezone": {
"type": "string",
"description": "Fuso orario per date e raggruppamento, ad esempio America/New_York (predefinito: il fuso orario del sito)"
},
"grouping": {
"type": "string",
"description": "Intervallo di tempo per le esportazioni aggregate",
"enum": [
"hour",
"day",
"week",
"month",
"quarter",
"year"
],
"default": "day"
},
"dimensions": {
"type": "array",
"items": {
"type": "string"
},
"description": "Dimensioni delle visite per cui raggruppare le esportazioni aggregate (fino a 6), ad esempio country, channel, entry_page. Per le esportazioni importate: le dimensioni importate da includere",
"default": []
},
"metrics": {
"type": "array",
"items": {
"type": "string"
},
"description": "Metriche per le esportazioni aggregate (predefinito tutte): visitors, visits, pageviews, bounce_rate, visit_duration, views_per_visit, revenue",
"default": []
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "Colonne per le esportazioni pageviews/events/raw (predefinito tutte tranne visit_id, vital_value, selector): occurred_at, kind, name, visit_id, hostname, path, referrer_host, referrer_path, channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, ref, paid_click, country, language, device, browser, browser_major, os, os_major, screen_bucket, engaged_ms, scroll_depth, revenue_minor, currency, vital_value, selector, props",
"default": []
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri, stesso formato dell'API delle statistiche: [[\"dimension\",\"operator\",\"value\"], …]",
"default": []
},
"segment_id": {
"type": "string",
"description": "Applica un segmento salvato (seg_…)"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"site_id",
"from",
"to",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'esportazione, ad esempio exp_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito esportato (pa_…)"
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"description": "aggregated, pageviews, events, imported, raw o dashboard"
},
"format": {
"type": "string",
"description": "csv, json, xlsx, ndjson o zip"
},
"status": {
"type": "string",
"description": "queued, running, complete, failed o expired"
},
"params": {
"type": "object",
"description": "La definizione dell'esportazione (date, fuso orario, raggruppamento, dimensioni, metriche, campi, filtri)"
},
"row_count": {
"anyOf": [
{
"type": "integer",
"description": "Righe scritte"
},
{
"type": "null"
}
]
},
"error": {
"anyOf": [
{
"type": "string",
"description": "Perché l'esportazione è fallita"
},
{
"type": "null"
}
]
},
"completed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando il file viene eliminato"
},
{
"type": "null"
}
]
},
"download_url": {
"anyOf": [
{
"type": "string",
"description": "Percorso che restituisce un link firmato di breve durata al file (exports_download)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/exports/:id.json
Elimina un'esportazione e il suo file
exports_delete
Permesso: analytics.export
curl -X DELETE https://privatusanalytics.com/exports/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'esportazione, ad esempio exp_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito esportato (pa_…)"
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"description": "aggregated, pageviews, events, imported, raw o dashboard"
},
"format": {
"type": "string",
"description": "csv, json, xlsx, ndjson o zip"
},
"status": {
"type": "string",
"description": "queued, running, complete, failed o expired"
},
"params": {
"type": "object",
"description": "La definizione dell'esportazione (date, fuso orario, raggruppamento, dimensioni, metriche, campi, filtri)"
},
"row_count": {
"anyOf": [
{
"type": "integer",
"description": "Righe scritte"
},
{
"type": "null"
}
]
},
"error": {
"anyOf": [
{
"type": "string",
"description": "Perché l'esportazione è fallita"
},
{
"type": "null"
}
]
},
"completed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando il file viene eliminato"
},
{
"type": "null"
}
]
},
"download_url": {
"anyOf": [
{
"type": "string",
"description": "Percorso che restituisce un link firmato di breve durata al file (exports_download)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/exports/:id/download.json
Ottieni un link firmato al file (valido 10 minuti)
exports_download
Permesso: analytics.export
curl https://privatusanalytics.com/exports/:id/download.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object"
}
GET
/workspaces/:workspace_id/exports.json
Elenca le esportazioni (la coda dei job)
exports_list
Permesso: analytics.export
curl https://privatusanalytics.com/workspaces/:workspace_id/exports.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Solo esportazioni di questo sito (pa_…)"
},
"status": {
"type": "string",
"description": "Solo esportazioni con questo stato",
"enum": [
"queued",
"running",
"complete",
"failed",
"expired"
]
},
"kind": {
"type": "string",
"description": "Solo esportazioni di questo tipo",
"enum": [
"aggregated",
"pageviews",
"events",
"imported",
"raw",
"dashboard"
]
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'esportazione, ad esempio exp_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito esportato (pa_…)"
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"description": "aggregated, pageviews, events, imported, raw o dashboard"
},
"format": {
"type": "string",
"description": "csv, json, xlsx, ndjson o zip"
},
"status": {
"type": "string",
"description": "queued, running, complete, failed o expired"
},
"params": {
"type": "object",
"description": "La definizione dell'esportazione (date, fuso orario, raggruppamento, dimensioni, metriche, campi, filtri)"
},
"row_count": {
"anyOf": [
{
"type": "integer",
"description": "Righe scritte"
},
{
"type": "null"
}
]
},
"error": {
"anyOf": [
{
"type": "string",
"description": "Perché l'esportazione è fallita"
},
{
"type": "null"
}
]
},
"completed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando il file viene eliminato"
},
{
"type": "null"
}
]
},
"download_url": {
"anyOf": [
{
"type": "string",
"description": "Percorso che restituisce un link firmato di breve durata al file (exports_download)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
POST
/workspaces/:workspace_id/exports/preview.json
Anteprima di un'esportazione: le prime 20 righe e il numero stimato di righe
exports_preview
Permesso: analytics.export
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/exports/preview.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Sito da esportare (pa_…)",
"examples": [
"pa_7Q2K9XH3AB"
]
},
"kind": {
"type": "string",
"description": "aggregated: metriche per intervallo di tempo e dimensioni. pageviews/events/raw: una riga per visita (Pro e superiori). imported: statistiche giornaliere importate. dashboard: ZIP dei pannelli della panoramica",
"enum": [
"aggregated",
"pageviews",
"events",
"imported",
"raw",
"dashboard"
],
"default": "aggregated"
},
"file_format": {
"type": "string",
"description": "csv, json o xlsx (aggregated, pageviews, events, imported), csv o ndjson (raw), zip (dashboard)",
"enum": [
"csv",
"json",
"xlsx",
"ndjson",
"zip"
],
"default": "csv"
},
"from": {
"type": "string",
"format": "date",
"description": "Primo giorno, nel fuso orario dell'esportazione",
"examples": [
"2026-09-01"
]
},
"to": {
"type": "string",
"format": "date",
"description": "Ultimo giorno, incluso (massimo 400 giorni, raw 93 giorni)",
"examples": [
"2026-09-28"
]
},
"timezone": {
"type": "string",
"description": "Fuso orario per date e raggruppamento, ad esempio America/New_York (predefinito: il fuso orario del sito)"
},
"grouping": {
"type": "string",
"description": "Intervallo di tempo per le esportazioni aggregate",
"enum": [
"hour",
"day",
"week",
"month",
"quarter",
"year"
],
"default": "day"
},
"dimensions": {
"type": "array",
"items": {
"type": "string"
},
"description": "Dimensioni delle visite per cui raggruppare le esportazioni aggregate (fino a 6), ad esempio country, channel, entry_page. Per le esportazioni importate: le dimensioni importate da includere",
"default": []
},
"metrics": {
"type": "array",
"items": {
"type": "string"
},
"description": "Metriche per le esportazioni aggregate (predefinito tutte): visitors, visits, pageviews, bounce_rate, visit_duration, views_per_visit, revenue",
"default": []
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "Colonne per le esportazioni pageviews/events/raw (predefinito tutte tranne visit_id, vital_value, selector): occurred_at, kind, name, visit_id, hostname, path, referrer_host, referrer_path, channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, ref, paid_click, country, language, device, browser, browser_major, os, os_major, screen_bucket, engaged_ms, scroll_depth, revenue_minor, currency, vital_value, selector, props",
"default": []
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri, stesso formato dell'API delle statistiche: [[\"dimension\",\"operator\",\"value\"], …]",
"default": []
},
"segment_id": {
"type": "string",
"description": "Applica un segmento salvato (seg_…)"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"site_id",
"from",
"to",
"workspace_id"
]
}
{
"type": "object"
}
GET
/exports/:id.json
Ottieni un'esportazione e il suo stato
exports_get
Permesso: analytics.export
curl https://privatusanalytics.com/exports/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'esportazione, ad esempio exp_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito esportato (pa_…)"
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"description": "aggregated, pageviews, events, imported, raw o dashboard"
},
"format": {
"type": "string",
"description": "csv, json, xlsx, ndjson o zip"
},
"status": {
"type": "string",
"description": "queued, running, complete, failed o expired"
},
"params": {
"type": "object",
"description": "La definizione dell'esportazione (date, fuso orario, raggruppamento, dimensioni, metriche, campi, filtri)"
},
"row_count": {
"anyOf": [
{
"type": "integer",
"description": "Righe scritte"
},
{
"type": "null"
}
]
},
"error": {
"anyOf": [
{
"type": "string",
"description": "Perché l'esportazione è fallita"
},
{
"type": "null"
}
]
},
"completed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando il file viene eliminato"
},
{
"type": "null"
}
]
},
"download_url": {
"anyOf": [
{
"type": "string",
"description": "Percorso che restituisce un link firmato di breve durata al file (exports_download)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
Eventi
GET
/sites/:site_id/events/properties.json
Elenca le chiavi delle proprietà degli eventi viste negli ultimi 30 giorni
event_properties_list
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/events/properties.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"event": {
"type": "string",
"description": "Solo chiavi viste su questo nome di evento grezzo"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
PATCH
/sites/:site_id/events/properties.json
Rinomina o nascondi la chiave di una proprietà di un evento
event_properties_update
Permesso: sites.manage
curl -X PATCH https://privatusanalytics.com/sites/:site_id/events/properties.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "Chiave della proprietà come memorizzata, ad esempio plan"
},
"display_name": {
"type": "string",
"description": "Etichetta da mostrare al suo posto (vuoto la rimuove)"
},
"hidden": {
"type": "boolean",
"description": "Nascondi questa chiave dai report"
},
"export_safe": {
"type": "boolean",
"description": "La chiave non contiene dati personali, quindi è inclusa nelle esportazioni grezze e nelle sincronizzazioni warehouse"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"key",
"site_id"
]
}
{
"type": "object"
}
DELETE
/sites/:site_id/events.json
Elimina un evento e la sua cronologia (viene eseguito in background, conferma digitando il nome)
events_delete
Permesso: sites.manage
curl -X DELETE https://privatusanalytics.com/sites/:site_id/events.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome dell'evento grezzo da eliminare"
},
"confirm": {
"type": "string",
"description": "Digita di nuovo il nome dell'evento per confermare"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"name",
"confirm",
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/events.json
Elenca gli eventi con completamenti, visite, tasso di conversione e prima/ultima occorrenza
events_list
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/events.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "Intervallo di date predefinito. Usa custom con from/to",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "Inizio dell'intervallo personalizzato (fuso orario del sito)"
},
"to": {
"type": "string",
"format": "date",
"description": "Fine dell'intervallo personalizzato, inclusa"
},
"compare": {
"type": "string",
"description": "Periodo di confronto",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "Inizio del confronto personalizzato"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "Fine del confronto personalizzato"
},
"match_weekday": {
"type": "boolean",
"description": "Allinea i giorni della settimana del confronto",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri: [[\"dimension\",\"operator\",\"value\"], …]. Operatori: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Racchiudi le condizioni in {\"any\": [...]} per OR.",
"default": []
},
"segment_id": {
"type": "string",
"description": "Applica un segmento salvato (seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "Aggiungi i dati storici importati (date precedenti al primo evento nativo, ignorati quando sono applicati filtri o un segmento)",
"default": false
},
"search": {
"type": "string",
"description": "Solo eventi il cui nome contiene questo testo"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
POST
/sites/:site_id/events/merge.json
Unisci più eventi in un unico nome visualizzato
events_merge
Permesso: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/events/merge.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"names": {
"type": "array",
"items": {
"type": "string"
},
"description": "Nomi degli eventi grezzi da unire"
},
"into": {
"type": "string",
"description": "Nome visualizzato per l'evento unito",
"examples": [
"Signup"
]
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"names",
"into",
"site_id"
]
}
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome dell'evento grezzo come inviato dal tracker"
},
"display_name": {
"anyOf": [
{
"type": "string",
"description": "Nome mostrato nei report"
},
{
"type": "null"
}
]
},
"hidden": {
"type": "boolean",
"description": "Nascosto dai report"
},
"currency": {
"anyOf": [
{
"type": "string",
"description": "Valuta dei ricavi"
},
{
"type": "null"
}
]
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/events/detail.json
Un evento: grafico, pivot delle proprietà, aggregati delle proprietà numeriche, pagine e sorgenti
events_get
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/events/detail.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "Intervallo di date predefinito. Usa custom con from/to",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "Inizio dell'intervallo personalizzato (fuso orario del sito)"
},
"to": {
"type": "string",
"format": "date",
"description": "Fine dell'intervallo personalizzato, inclusa"
},
"compare": {
"type": "string",
"description": "Periodo di confronto",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "Inizio del confronto personalizzato"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "Fine del confronto personalizzato"
},
"match_weekday": {
"type": "boolean",
"description": "Allinea i giorni della settimana del confronto",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri: [[\"dimension\",\"operator\",\"value\"], …]. Operatori: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Racchiudi le condizioni in {\"any\": [...]} per OR.",
"default": []
},
"segment_id": {
"type": "string",
"description": "Applica un segmento salvato (seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "Aggiungi i dati storici importati (date precedenti al primo evento nativo, ignorati quando sono applicati filtri o un segmento)",
"default": false
},
"name": {
"type": "string",
"description": "Nome dell'evento come mostrato (dopo le ridenominazioni)",
"examples": [
"Signup"
]
},
"properties": {
"type": "array",
"items": {
"type": "string"
},
"description": "Fino a 3 chiavi di proprietà per il pivot",
"default": []
},
"interval": {
"type": "string",
"description": "Dimensione dell'intervallo del grafico",
"enum": [
"auto",
"minute",
"hour",
"day",
"week",
"month",
"quarter",
"year"
],
"default": "auto"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"name",
"site_id"
]
}
{
"type": "object"
}
PATCH
/sites/:site_id/events/settings.json
Rinomina, nascondi o mostra un evento, oppure imposta la sua valuta
events_update
Permesso: sites.manage
curl -X PATCH https://privatusanalytics.com/sites/:site_id/events/settings.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome dell'evento grezzo come inviato dal tracker",
"examples": [
"signup_click"
]
},
"display_name": {
"type": "string",
"description": "Nome da mostrare al suo posto (vuoto rimuove la ridenominazione)"
},
"hidden": {
"type": "boolean",
"description": "Nascondi dai report (i dati vengono conservati)"
},
"currency": {
"type": "string",
"description": "Valuta dei ricavi di questo evento (ISO 4217)"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"name",
"site_id"
]
}
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome dell'evento grezzo come inviato dal tracker"
},
"display_name": {
"anyOf": [
{
"type": "string",
"description": "Nome mostrato nei report"
},
{
"type": "null"
}
]
},
"hidden": {
"type": "boolean",
"description": "Nascosto dai report"
},
"currency": {
"anyOf": [
{
"type": "string",
"description": "Valuta dei ricavi"
},
{
"type": "null"
}
]
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
Fatturazione
POST
/workspaces/:workspace_id/billing/badge.json
Attiva o disattiva il bonus del badge (piano gratuito)
billing_badge
Permesso: billing.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/badge.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "true per verificare il badge e ottenere il bonus"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"enabled",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string"
},
"plan": {
"type": "string",
"description": "free, pro, business o enterprise"
},
"plan_events": {
"type": "integer",
"description": "Eventi mensili del livello a pagamento"
},
"allowance": {
"type": "integer",
"description": "Eventi mensili incluso l'eventuale bonus del badge"
},
"billing_interval": {
"anyOf": [
{
"type": "string",
"description": "month o year"
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "integer",
"description": "USD per intervallo di fatturazione"
},
{
"type": "null"
}
]
},
"subscription_status": {
"type": "string",
"description": "none, trialing, active, past_due, paused o canceled"
},
"current_period_ends_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Si rinnova o termina il"
},
{
"type": "null"
}
]
},
"cancel_at_period_end": {
"type": "boolean"
},
"canceled_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"auto_upgrade": {
"type": "boolean"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"program": {
"type": "string",
"description": "nonprofit, education, open_source, open_source_free o agency"
},
"status": {
"type": "string",
"description": "pending, approved (non ancora sull'abbonamento), active, rejected o revoked"
},
"percent": {
"anyOf": [
{
"type": "integer",
"description": "Percentuale di sconto su Pro e Business (null per il programma open source gratuito)"
},
{
"type": "null"
}
]
},
"comp_events": {
"anyOf": [
{
"type": "integer",
"description": "Eventi gratuiti al mese (solo programma open source gratuito)"
},
{
"type": "null"
}
]
},
"organization_name": {
"type": "string",
"description": "Nome dell'organizzazione, della scuola, del progetto o dell'agenzia"
},
"website": {
"anyOf": [
{
"type": "string",
"description": "Sito web"
},
{
"type": "null"
}
]
},
"proof_url": {
"anyOf": [
{
"type": "string",
"description": "Link di prova o URL del repository"
},
{
"type": "null"
}
]
},
"license": {
"anyOf": [
{
"type": "string",
"description": "Licenza OSI (open source)"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"description": "Nota per la revisione"
},
{
"type": "null"
}
]
},
"rejection_reason": {
"anyOf": [
{
"type": "string",
"description": "Perché la richiesta non è stata approvata"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Data della richiesta"
},
"reviewed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Data della revisione"
},
{
"type": "null"
}
]
},
"applied_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Sconto attivo dal"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Programma terminato il"
},
{
"type": "null"
}
]
}
},
"description": "L'ultima richiesta di programma di sconto, oppure null"
},
{
"type": "null"
}
]
},
"discount_percent": {
"anyOf": [
{
"type": "integer",
"description": "Percentuale di sconto su Pro e Business da un programma approvato, oppure null"
},
{
"type": "null"
}
]
},
"billing_emails": {
"type": "array",
"items": {
"type": "string"
}
},
"tax_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"badge": {
"type": "object",
"description": "Bonus del badge (piano gratuito)"
},
"usage": {
"type": "object",
"properties": {
"month": {
"type": "string",
"format": "date",
"description": "Primo giorno del mese di riferimento"
},
"events": {
"type": "integer",
"description": "Eventi fatturabili (visualizzazioni di pagina ed eventi personalizzati)"
},
"bots": {
"type": "integer",
"description": "Hit di bot filtrati (non fatturati)"
},
"allowance": {
"type": "integer",
"description": "Eventi inclusi, con l'eventuale bonus del badge"
},
"percent": {
"type": "number",
"description": "Eventi in percentuale sulla quota"
},
"forecast": {
"anyOf": [
{
"type": "integer",
"description": "Eventi previsti a fine mese"
},
{
"type": "null"
}
]
},
"forecast_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"days_left": {
"type": "integer",
"description": "Giorni rimanenti nel mese"
},
"status": {
"type": "string",
"description": "ok, warning (80%+), over (un mese passato pari o superiore alla quota), locked o paused"
},
"sites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"events": {
"type": "integer",
"description": "Visualizzazioni di pagina ed eventi personalizzati di questo mese"
},
"share": {
"type": "number",
"description": "Percentuale del totale del workspace"
}
}
},
"description": "Eventi per sito"
},
"history": {
"type": "array",
"description": "Mesi precedenti, dal più recente"
},
"access_locked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Dashboard bloccate dallo staff di Privatus dal"
},
{
"type": "null"
}
]
},
"collection_paused": {
"type": "boolean",
"description": "True mentre i nuovi eventi vengono scartati (è stato raggiunto il limite mensile, oppure lo staff ha messo in pausa la raccolta)"
},
"pause_reason": {
"anyOf": [
{
"type": "string",
"description": "Perché la raccolta è in pausa: limit (è stata raggiunta la quota mensile) o staff. null durante la raccolta"
},
{
"type": "null"
}
]
},
"collection_paused_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando lo staff ha messo in pausa la raccolta"
},
{
"type": "null"
}
]
},
"resumes_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando termina una pausa per limite: l'inizio del mese successivo (UTC), o prima in caso di upgrade. null negli altri casi"
},
{
"type": "null"
}
]
}
},
"description": "Questo mese finora"
}
}
}
POST
/workspaces/:workspace_id/billing/cancel.json
Annulla al termine del periodo di fatturazione
billing_cancel
Permesso: billing.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/cancel.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "Motivo principale della cancellazione (sondaggio facoltativo)",
"enum": [
"too_expensive",
"missing_features",
"switching_tool",
"not_using",
"temporary",
"other"
]
},
"comment": {
"type": "string",
"description": "Qualcosa che potremmo migliorare"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string"
},
"plan": {
"type": "string",
"description": "free, pro, business o enterprise"
},
"plan_events": {
"type": "integer",
"description": "Eventi mensili del livello a pagamento"
},
"allowance": {
"type": "integer",
"description": "Eventi mensili incluso l'eventuale bonus del badge"
},
"billing_interval": {
"anyOf": [
{
"type": "string",
"description": "month o year"
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "integer",
"description": "USD per intervallo di fatturazione"
},
{
"type": "null"
}
]
},
"subscription_status": {
"type": "string",
"description": "none, trialing, active, past_due, paused o canceled"
},
"current_period_ends_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Si rinnova o termina il"
},
{
"type": "null"
}
]
},
"cancel_at_period_end": {
"type": "boolean"
},
"canceled_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"auto_upgrade": {
"type": "boolean"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"program": {
"type": "string",
"description": "nonprofit, education, open_source, open_source_free o agency"
},
"status": {
"type": "string",
"description": "pending, approved (non ancora sull'abbonamento), active, rejected o revoked"
},
"percent": {
"anyOf": [
{
"type": "integer",
"description": "Percentuale di sconto su Pro e Business (null per il programma open source gratuito)"
},
{
"type": "null"
}
]
},
"comp_events": {
"anyOf": [
{
"type": "integer",
"description": "Eventi gratuiti al mese (solo programma open source gratuito)"
},
{
"type": "null"
}
]
},
"organization_name": {
"type": "string",
"description": "Nome dell'organizzazione, della scuola, del progetto o dell'agenzia"
},
"website": {
"anyOf": [
{
"type": "string",
"description": "Sito web"
},
{
"type": "null"
}
]
},
"proof_url": {
"anyOf": [
{
"type": "string",
"description": "Link di prova o URL del repository"
},
{
"type": "null"
}
]
},
"license": {
"anyOf": [
{
"type": "string",
"description": "Licenza OSI (open source)"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"description": "Nota per la revisione"
},
{
"type": "null"
}
]
},
"rejection_reason": {
"anyOf": [
{
"type": "string",
"description": "Perché la richiesta non è stata approvata"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Data della richiesta"
},
"reviewed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Data della revisione"
},
{
"type": "null"
}
]
},
"applied_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Sconto attivo dal"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Programma terminato il"
},
{
"type": "null"
}
]
}
},
"description": "L'ultima richiesta di programma di sconto, oppure null"
},
{
"type": "null"
}
]
},
"discount_percent": {
"anyOf": [
{
"type": "integer",
"description": "Percentuale di sconto su Pro e Business da un programma approvato, oppure null"
},
{
"type": "null"
}
]
},
"billing_emails": {
"type": "array",
"items": {
"type": "string"
}
},
"tax_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"badge": {
"type": "object",
"description": "Bonus del badge (piano gratuito)"
},
"usage": {
"type": "object",
"properties": {
"month": {
"type": "string",
"format": "date",
"description": "Primo giorno del mese di riferimento"
},
"events": {
"type": "integer",
"description": "Eventi fatturabili (visualizzazioni di pagina ed eventi personalizzati)"
},
"bots": {
"type": "integer",
"description": "Hit di bot filtrati (non fatturati)"
},
"allowance": {
"type": "integer",
"description": "Eventi inclusi, con l'eventuale bonus del badge"
},
"percent": {
"type": "number",
"description": "Eventi in percentuale sulla quota"
},
"forecast": {
"anyOf": [
{
"type": "integer",
"description": "Eventi previsti a fine mese"
},
{
"type": "null"
}
]
},
"forecast_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"days_left": {
"type": "integer",
"description": "Giorni rimanenti nel mese"
},
"status": {
"type": "string",
"description": "ok, warning (80%+), over (un mese passato pari o superiore alla quota), locked o paused"
},
"sites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"events": {
"type": "integer",
"description": "Visualizzazioni di pagina ed eventi personalizzati di questo mese"
},
"share": {
"type": "number",
"description": "Percentuale del totale del workspace"
}
}
},
"description": "Eventi per sito"
},
"history": {
"type": "array",
"description": "Mesi precedenti, dal più recente"
},
"access_locked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Dashboard bloccate dallo staff di Privatus dal"
},
{
"type": "null"
}
]
},
"collection_paused": {
"type": "boolean",
"description": "True mentre i nuovi eventi vengono scartati (è stato raggiunto il limite mensile, oppure lo staff ha messo in pausa la raccolta)"
},
"pause_reason": {
"anyOf": [
{
"type": "string",
"description": "Perché la raccolta è in pausa: limit (è stata raggiunta la quota mensile) o staff. null durante la raccolta"
},
{
"type": "null"
}
]
},
"collection_paused_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando lo staff ha messo in pausa la raccolta"
},
{
"type": "null"
}
]
},
"resumes_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando termina una pausa per limite: l'inizio del mese successivo (UTC), o prima in caso di upgrade. null negli altri casi"
},
{
"type": "null"
}
]
}
},
"description": "Questo mese finora"
}
}
}
POST
/workspaces/:workspace_id/billing/change_plan.json
Cambia piano, livello o intervallo (con calcolo proporzionale)
billing_change_plan
Permesso: billing.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/change_plan.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"plan": {
"type": "string",
"description": "Piano a cui passare: pro o business",
"enum": [
"pro",
"business"
]
},
"events": {
"type": "integer",
"description": "Eventi mensili del livello, da GET /plans",
"examples": [
1000000
]
},
"interval": {
"type": "string",
"description": "Intervallo di fatturazione. Con quello annuale hai 2 mesi gratis",
"enum": [
"month",
"year"
],
"default": "month"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"plan",
"events",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string"
},
"plan": {
"type": "string",
"description": "free, pro, business o enterprise"
},
"plan_events": {
"type": "integer",
"description": "Eventi mensili del livello a pagamento"
},
"allowance": {
"type": "integer",
"description": "Eventi mensili incluso l'eventuale bonus del badge"
},
"billing_interval": {
"anyOf": [
{
"type": "string",
"description": "month o year"
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "integer",
"description": "USD per intervallo di fatturazione"
},
{
"type": "null"
}
]
},
"subscription_status": {
"type": "string",
"description": "none, trialing, active, past_due, paused o canceled"
},
"current_period_ends_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Si rinnova o termina il"
},
{
"type": "null"
}
]
},
"cancel_at_period_end": {
"type": "boolean"
},
"canceled_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"auto_upgrade": {
"type": "boolean"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"program": {
"type": "string",
"description": "nonprofit, education, open_source, open_source_free o agency"
},
"status": {
"type": "string",
"description": "pending, approved (non ancora sull'abbonamento), active, rejected o revoked"
},
"percent": {
"anyOf": [
{
"type": "integer",
"description": "Percentuale di sconto su Pro e Business (null per il programma open source gratuito)"
},
{
"type": "null"
}
]
},
"comp_events": {
"anyOf": [
{
"type": "integer",
"description": "Eventi gratuiti al mese (solo programma open source gratuito)"
},
{
"type": "null"
}
]
},
"organization_name": {
"type": "string",
"description": "Nome dell'organizzazione, della scuola, del progetto o dell'agenzia"
},
"website": {
"anyOf": [
{
"type": "string",
"description": "Sito web"
},
{
"type": "null"
}
]
},
"proof_url": {
"anyOf": [
{
"type": "string",
"description": "Link di prova o URL del repository"
},
{
"type": "null"
}
]
},
"license": {
"anyOf": [
{
"type": "string",
"description": "Licenza OSI (open source)"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"description": "Nota per la revisione"
},
{
"type": "null"
}
]
},
"rejection_reason": {
"anyOf": [
{
"type": "string",
"description": "Perché la richiesta non è stata approvata"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Data della richiesta"
},
"reviewed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Data della revisione"
},
{
"type": "null"
}
]
},
"applied_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Sconto attivo dal"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Programma terminato il"
},
{
"type": "null"
}
]
}
},
"description": "L'ultima richiesta di programma di sconto, oppure null"
},
{
"type": "null"
}
]
},
"discount_percent": {
"anyOf": [
{
"type": "integer",
"description": "Percentuale di sconto su Pro e Business da un programma approvato, oppure null"
},
{
"type": "null"
}
]
},
"billing_emails": {
"type": "array",
"items": {
"type": "string"
}
},
"tax_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"badge": {
"type": "object",
"description": "Bonus del badge (piano gratuito)"
},
"usage": {
"type": "object",
"properties": {
"month": {
"type": "string",
"format": "date",
"description": "Primo giorno del mese di riferimento"
},
"events": {
"type": "integer",
"description": "Eventi fatturabili (visualizzazioni di pagina ed eventi personalizzati)"
},
"bots": {
"type": "integer",
"description": "Hit di bot filtrati (non fatturati)"
},
"allowance": {
"type": "integer",
"description": "Eventi inclusi, con l'eventuale bonus del badge"
},
"percent": {
"type": "number",
"description": "Eventi in percentuale sulla quota"
},
"forecast": {
"anyOf": [
{
"type": "integer",
"description": "Eventi previsti a fine mese"
},
{
"type": "null"
}
]
},
"forecast_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"days_left": {
"type": "integer",
"description": "Giorni rimanenti nel mese"
},
"status": {
"type": "string",
"description": "ok, warning (80%+), over (un mese passato pari o superiore alla quota), locked o paused"
},
"sites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"events": {
"type": "integer",
"description": "Visualizzazioni di pagina ed eventi personalizzati di questo mese"
},
"share": {
"type": "number",
"description": "Percentuale del totale del workspace"
}
}
},
"description": "Eventi per sito"
},
"history": {
"type": "array",
"description": "Mesi precedenti, dal più recente"
},
"access_locked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Dashboard bloccate dallo staff di Privatus dal"
},
{
"type": "null"
}
]
},
"collection_paused": {
"type": "boolean",
"description": "True mentre i nuovi eventi vengono scartati (è stato raggiunto il limite mensile, oppure lo staff ha messo in pausa la raccolta)"
},
"pause_reason": {
"anyOf": [
{
"type": "string",
"description": "Perché la raccolta è in pausa: limit (è stata raggiunta la quota mensile) o staff. null durante la raccolta"
},
{
"type": "null"
}
]
},
"collection_paused_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando lo staff ha messo in pausa la raccolta"
},
{
"type": "null"
}
]
},
"resumes_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando termina una pausa per limite: l'inizio del mese successivo (UTC), o prima in caso di upgrade. null negli altri casi"
},
{
"type": "null"
}
]
}
},
"description": "Questo mese finora"
}
}
}
POST
/workspaces/:workspace_id/billing/checkout.json
Avvia un checkout Paddle per un piano a pagamento
billing_checkout
Permesso: billing.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/checkout.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"plan": {
"type": "string",
"description": "Piano a cui passare: pro o business",
"enum": [
"pro",
"business"
]
},
"events": {
"type": "integer",
"description": "Eventi mensili del livello, da GET /plans",
"examples": [
1000000
]
},
"interval": {
"type": "string",
"description": "Intervallo di fatturazione. Con quello annuale hai 2 mesi gratis",
"enum": [
"month",
"year"
],
"default": "month"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"plan",
"events",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"transaction_id": {
"type": "string",
"description": "Id della transazione Paddle (txn_...)"
},
"url": {
"anyOf": [
{
"type": "string",
"description": "URL del checkout ospitato"
},
{
"type": "null"
}
]
},
"price_id": {
"type": "string"
},
"plan": {
"type": "string"
},
"events": {
"type": "integer"
},
"interval": {
"type": "string"
},
"amount": {
"type": "integer",
"description": "USD per intervallo"
},
"client_token": {
"anyOf": [
{
"type": "string",
"description": "Token lato client di Paddle.js"
},
{
"type": "null"
}
]
},
"environment": {
"type": "string",
"description": "sandbox o production"
},
"custom_data": {
"type": "object",
"description": "Passati a Paddle per collegare l'abbonamento"
},
"discount_id": {
"anyOf": [
{
"type": "string",
"description": "Id dello sconto Paddle di un programma approvato, applicato a questo checkout"
},
{
"type": "null"
}
]
}
}
}
POST
/workspaces/:workspace_id/billing/discount.json
Richiedi uno sconto per organizzazioni non profit, istruzione o open source
billing_discount
Permesso: billing.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/discount.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"program": {
"type": "string",
"description": "nonprofit, education, open_source (50% di sconto), open_source_free (Pro gratis fino a 1M di eventi al mese) o agency (20% di sconto su ogni workspace di tua proprietà)",
"enum": [
"nonprofit",
"education",
"open_source",
"open_source_free",
"agency"
]
},
"organization_name": {
"type": "string",
"description": "Nome dell'organizzazione, della scuola, del progetto o dell'agenzia"
},
"website": {
"type": "string",
"description": "Il relativo sito web"
},
"proof_url": {
"type": "string",
"description": "Link di prova. Per l'open source, l'URL del repository"
},
"license": {
"type": "string",
"description": "Licenza OSI del progetto (solo open source)"
},
"note": {
"type": "string",
"description": "Qualsiasi informazione utile alla revisione, fino a 1.000 caratteri"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"program",
"organization_name",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"program": {
"type": "string",
"description": "nonprofit, education, open_source, open_source_free o agency"
},
"status": {
"type": "string",
"description": "pending, approved (non ancora sull'abbonamento), active, rejected o revoked"
},
"percent": {
"anyOf": [
{
"type": "integer",
"description": "Percentuale di sconto su Pro e Business (null per il programma open source gratuito)"
},
{
"type": "null"
}
]
},
"comp_events": {
"anyOf": [
{
"type": "integer",
"description": "Eventi gratuiti al mese (solo programma open source gratuito)"
},
{
"type": "null"
}
]
},
"organization_name": {
"type": "string",
"description": "Nome dell'organizzazione, della scuola, del progetto o dell'agenzia"
},
"website": {
"anyOf": [
{
"type": "string",
"description": "Sito web"
},
{
"type": "null"
}
]
},
"proof_url": {
"anyOf": [
{
"type": "string",
"description": "Link di prova o URL del repository"
},
{
"type": "null"
}
]
},
"license": {
"anyOf": [
{
"type": "string",
"description": "Licenza OSI (open source)"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"description": "Nota per la revisione"
},
{
"type": "null"
}
]
},
"rejection_reason": {
"anyOf": [
{
"type": "string",
"description": "Perché la richiesta non è stata approvata"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Data della richiesta"
},
"reviewed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Data della revisione"
},
{
"type": "null"
}
]
},
"applied_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Sconto attivo dal"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Programma terminato il"
},
{
"type": "null"
}
]
}
}
}
POST
/workspaces/:workspace_id/billing/payment_method.json
Ottieni un link per aggiornare il metodo di pagamento
billing_payment_method
Permesso: billing.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/payment_method.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "portal, payment_method o invoice"
},
"url": {
"anyOf": [
{
"type": "string",
"description": "URL Paddle di breve durata"
},
{
"type": "null"
}
]
}
}
}
POST
/workspaces/:workspace_id/billing/portal.json
Ottieni un link al portale clienti Paddle
billing_portal
Permesso: billing.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/portal.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "portal, payment_method o invoice"
},
"url": {
"anyOf": [
{
"type": "string",
"description": "URL Paddle di breve durata"
},
{
"type": "null"
}
]
}
}
}
GET
/workspaces/:workspace_id/billing/preview.json
Anteprima di un cambio di piano con calcolo proporzionale
billing_preview
Permesso: billing.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/billing/preview.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"plan": {
"type": "string",
"description": "Piano a cui passare: pro o business",
"enum": [
"pro",
"business"
]
},
"events": {
"type": "integer",
"description": "Eventi mensili del livello, da GET /plans",
"examples": [
1000000
]
},
"interval": {
"type": "string",
"description": "Intervallo di fatturazione. Con quello annuale hai 2 mesi gratis",
"enum": [
"month",
"year"
],
"default": "month"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"plan",
"events",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"plan": {
"type": "string"
},
"events": {
"type": "integer"
},
"interval": {
"type": "string"
},
"price_id": {
"type": "string"
},
"amount": {
"type": "integer",
"description": "Nuovo prezzo in USD per intervallo"
},
"currency": {
"type": "string"
},
"charge_minor": {
"type": "integer",
"description": "Addebitato ora, in unità minori"
},
"credit_minor": {
"type": "integer",
"description": "Credito per il tempo non utilizzato, unità minori"
},
"result_action": {
"anyOf": [
{
"type": "string",
"description": "charge o credit"
},
{
"type": "null"
}
]
},
"result_minor": {
"type": "integer",
"description": "Addebito o credito netto, unità minori"
},
"next_billed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"warnings": {
"type": "array",
"items": {
"type": "string"
},
"description": "Utilizzo o limiti che il nuovo piano non coprirebbe"
}
}
}
POST
/workspaces/:workspace_id/billing/resume.json
Annulla una cancellazione programmata o riprendi una pausa
billing_resume
Permesso: billing.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/resume.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string"
},
"plan": {
"type": "string",
"description": "free, pro, business o enterprise"
},
"plan_events": {
"type": "integer",
"description": "Eventi mensili del livello a pagamento"
},
"allowance": {
"type": "integer",
"description": "Eventi mensili incluso l'eventuale bonus del badge"
},
"billing_interval": {
"anyOf": [
{
"type": "string",
"description": "month o year"
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "integer",
"description": "USD per intervallo di fatturazione"
},
{
"type": "null"
}
]
},
"subscription_status": {
"type": "string",
"description": "none, trialing, active, past_due, paused o canceled"
},
"current_period_ends_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Si rinnova o termina il"
},
{
"type": "null"
}
]
},
"cancel_at_period_end": {
"type": "boolean"
},
"canceled_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"auto_upgrade": {
"type": "boolean"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"program": {
"type": "string",
"description": "nonprofit, education, open_source, open_source_free o agency"
},
"status": {
"type": "string",
"description": "pending, approved (non ancora sull'abbonamento), active, rejected o revoked"
},
"percent": {
"anyOf": [
{
"type": "integer",
"description": "Percentuale di sconto su Pro e Business (null per il programma open source gratuito)"
},
{
"type": "null"
}
]
},
"comp_events": {
"anyOf": [
{
"type": "integer",
"description": "Eventi gratuiti al mese (solo programma open source gratuito)"
},
{
"type": "null"
}
]
},
"organization_name": {
"type": "string",
"description": "Nome dell'organizzazione, della scuola, del progetto o dell'agenzia"
},
"website": {
"anyOf": [
{
"type": "string",
"description": "Sito web"
},
{
"type": "null"
}
]
},
"proof_url": {
"anyOf": [
{
"type": "string",
"description": "Link di prova o URL del repository"
},
{
"type": "null"
}
]
},
"license": {
"anyOf": [
{
"type": "string",
"description": "Licenza OSI (open source)"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"description": "Nota per la revisione"
},
{
"type": "null"
}
]
},
"rejection_reason": {
"anyOf": [
{
"type": "string",
"description": "Perché la richiesta non è stata approvata"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Data della richiesta"
},
"reviewed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Data della revisione"
},
{
"type": "null"
}
]
},
"applied_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Sconto attivo dal"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Programma terminato il"
},
{
"type": "null"
}
]
}
},
"description": "L'ultima richiesta di programma di sconto, oppure null"
},
{
"type": "null"
}
]
},
"discount_percent": {
"anyOf": [
{
"type": "integer",
"description": "Percentuale di sconto su Pro e Business da un programma approvato, oppure null"
},
{
"type": "null"
}
]
},
"billing_emails": {
"type": "array",
"items": {
"type": "string"
}
},
"tax_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"badge": {
"type": "object",
"description": "Bonus del badge (piano gratuito)"
},
"usage": {
"type": "object",
"properties": {
"month": {
"type": "string",
"format": "date",
"description": "Primo giorno del mese di riferimento"
},
"events": {
"type": "integer",
"description": "Eventi fatturabili (visualizzazioni di pagina ed eventi personalizzati)"
},
"bots": {
"type": "integer",
"description": "Hit di bot filtrati (non fatturati)"
},
"allowance": {
"type": "integer",
"description": "Eventi inclusi, con l'eventuale bonus del badge"
},
"percent": {
"type": "number",
"description": "Eventi in percentuale sulla quota"
},
"forecast": {
"anyOf": [
{
"type": "integer",
"description": "Eventi previsti a fine mese"
},
{
"type": "null"
}
]
},
"forecast_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"days_left": {
"type": "integer",
"description": "Giorni rimanenti nel mese"
},
"status": {
"type": "string",
"description": "ok, warning (80%+), over (un mese passato pari o superiore alla quota), locked o paused"
},
"sites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"events": {
"type": "integer",
"description": "Visualizzazioni di pagina ed eventi personalizzati di questo mese"
},
"share": {
"type": "number",
"description": "Percentuale del totale del workspace"
}
}
},
"description": "Eventi per sito"
},
"history": {
"type": "array",
"description": "Mesi precedenti, dal più recente"
},
"access_locked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Dashboard bloccate dallo staff di Privatus dal"
},
{
"type": "null"
}
]
},
"collection_paused": {
"type": "boolean",
"description": "True mentre i nuovi eventi vengono scartati (è stato raggiunto il limite mensile, oppure lo staff ha messo in pausa la raccolta)"
},
"pause_reason": {
"anyOf": [
{
"type": "string",
"description": "Perché la raccolta è in pausa: limit (è stata raggiunta la quota mensile) o staff. null durante la raccolta"
},
{
"type": "null"
}
]
},
"collection_paused_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando lo staff ha messo in pausa la raccolta"
},
{
"type": "null"
}
]
},
"resumes_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando termina una pausa per limite: l'inizio del mese successivo (UTC), o prima in caso di upgrade. null negli altri casi"
},
{
"type": "null"
}
]
}
},
"description": "Questo mese finora"
}
}
}
GET
/workspaces/:workspace_id/billing.json
Ottieni il piano, l'abbonamento e l'utilizzo
billing_get
Permesso: billing.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/billing.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string"
},
"plan": {
"type": "string",
"description": "free, pro, business o enterprise"
},
"plan_events": {
"type": "integer",
"description": "Eventi mensili del livello a pagamento"
},
"allowance": {
"type": "integer",
"description": "Eventi mensili incluso l'eventuale bonus del badge"
},
"billing_interval": {
"anyOf": [
{
"type": "string",
"description": "month o year"
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "integer",
"description": "USD per intervallo di fatturazione"
},
{
"type": "null"
}
]
},
"subscription_status": {
"type": "string",
"description": "none, trialing, active, past_due, paused o canceled"
},
"current_period_ends_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Si rinnova o termina il"
},
{
"type": "null"
}
]
},
"cancel_at_period_end": {
"type": "boolean"
},
"canceled_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"auto_upgrade": {
"type": "boolean"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"program": {
"type": "string",
"description": "nonprofit, education, open_source, open_source_free o agency"
},
"status": {
"type": "string",
"description": "pending, approved (non ancora sull'abbonamento), active, rejected o revoked"
},
"percent": {
"anyOf": [
{
"type": "integer",
"description": "Percentuale di sconto su Pro e Business (null per il programma open source gratuito)"
},
{
"type": "null"
}
]
},
"comp_events": {
"anyOf": [
{
"type": "integer",
"description": "Eventi gratuiti al mese (solo programma open source gratuito)"
},
{
"type": "null"
}
]
},
"organization_name": {
"type": "string",
"description": "Nome dell'organizzazione, della scuola, del progetto o dell'agenzia"
},
"website": {
"anyOf": [
{
"type": "string",
"description": "Sito web"
},
{
"type": "null"
}
]
},
"proof_url": {
"anyOf": [
{
"type": "string",
"description": "Link di prova o URL del repository"
},
{
"type": "null"
}
]
},
"license": {
"anyOf": [
{
"type": "string",
"description": "Licenza OSI (open source)"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"description": "Nota per la revisione"
},
{
"type": "null"
}
]
},
"rejection_reason": {
"anyOf": [
{
"type": "string",
"description": "Perché la richiesta non è stata approvata"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Data della richiesta"
},
"reviewed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Data della revisione"
},
{
"type": "null"
}
]
},
"applied_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Sconto attivo dal"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Programma terminato il"
},
{
"type": "null"
}
]
}
},
"description": "L'ultima richiesta di programma di sconto, oppure null"
},
{
"type": "null"
}
]
},
"discount_percent": {
"anyOf": [
{
"type": "integer",
"description": "Percentuale di sconto su Pro e Business da un programma approvato, oppure null"
},
{
"type": "null"
}
]
},
"billing_emails": {
"type": "array",
"items": {
"type": "string"
}
},
"tax_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"badge": {
"type": "object",
"description": "Bonus del badge (piano gratuito)"
},
"usage": {
"type": "object",
"properties": {
"month": {
"type": "string",
"format": "date",
"description": "Primo giorno del mese di riferimento"
},
"events": {
"type": "integer",
"description": "Eventi fatturabili (visualizzazioni di pagina ed eventi personalizzati)"
},
"bots": {
"type": "integer",
"description": "Hit di bot filtrati (non fatturati)"
},
"allowance": {
"type": "integer",
"description": "Eventi inclusi, con l'eventuale bonus del badge"
},
"percent": {
"type": "number",
"description": "Eventi in percentuale sulla quota"
},
"forecast": {
"anyOf": [
{
"type": "integer",
"description": "Eventi previsti a fine mese"
},
{
"type": "null"
}
]
},
"forecast_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"days_left": {
"type": "integer",
"description": "Giorni rimanenti nel mese"
},
"status": {
"type": "string",
"description": "ok, warning (80%+), over (un mese passato pari o superiore alla quota), locked o paused"
},
"sites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"events": {
"type": "integer",
"description": "Visualizzazioni di pagina ed eventi personalizzati di questo mese"
},
"share": {
"type": "number",
"description": "Percentuale del totale del workspace"
}
}
},
"description": "Eventi per sito"
},
"history": {
"type": "array",
"description": "Mesi precedenti, dal più recente"
},
"access_locked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Dashboard bloccate dallo staff di Privatus dal"
},
{
"type": "null"
}
]
},
"collection_paused": {
"type": "boolean",
"description": "True mentre i nuovi eventi vengono scartati (è stato raggiunto il limite mensile, oppure lo staff ha messo in pausa la raccolta)"
},
"pause_reason": {
"anyOf": [
{
"type": "string",
"description": "Perché la raccolta è in pausa: limit (è stata raggiunta la quota mensile) o staff. null durante la raccolta"
},
{
"type": "null"
}
]
},
"collection_paused_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando lo staff ha messo in pausa la raccolta"
},
{
"type": "null"
}
]
},
"resumes_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando termina una pausa per limite: l'inizio del mese successivo (UTC), o prima in caso di upgrade. null negli altri casi"
},
{
"type": "null"
}
]
}
},
"description": "Questo mese finora"
}
}
}
PATCH
/workspaces/:workspace_id/billing.json
Aggiorna le email di fatturazione, la partita IVA e l'upgrade automatico
billing_update
Permesso: billing.manage
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/billing.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"billing_emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "Indirizzi aggiuntivi per fatture e avvisi di fatturazione (fino a 5)"
},
"tax_id": {
"type": "string",
"description": "Partita IVA o codice fiscale mostrato nelle fatture"
},
"auto_upgrade": {
"type": "boolean",
"description": "true per passare al livello successivo e addebitare la differenza quando si raggiunge il limite mensile, invece di mettere in pausa la raccolta. Disattivato per impostazione predefinita"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string"
},
"plan": {
"type": "string",
"description": "free, pro, business o enterprise"
},
"plan_events": {
"type": "integer",
"description": "Eventi mensili del livello a pagamento"
},
"allowance": {
"type": "integer",
"description": "Eventi mensili incluso l'eventuale bonus del badge"
},
"billing_interval": {
"anyOf": [
{
"type": "string",
"description": "month o year"
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "integer",
"description": "USD per intervallo di fatturazione"
},
{
"type": "null"
}
]
},
"subscription_status": {
"type": "string",
"description": "none, trialing, active, past_due, paused o canceled"
},
"current_period_ends_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Si rinnova o termina il"
},
{
"type": "null"
}
]
},
"cancel_at_period_end": {
"type": "boolean"
},
"canceled_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"auto_upgrade": {
"type": "boolean"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"program": {
"type": "string",
"description": "nonprofit, education, open_source, open_source_free o agency"
},
"status": {
"type": "string",
"description": "pending, approved (non ancora sull'abbonamento), active, rejected o revoked"
},
"percent": {
"anyOf": [
{
"type": "integer",
"description": "Percentuale di sconto su Pro e Business (null per il programma open source gratuito)"
},
{
"type": "null"
}
]
},
"comp_events": {
"anyOf": [
{
"type": "integer",
"description": "Eventi gratuiti al mese (solo programma open source gratuito)"
},
{
"type": "null"
}
]
},
"organization_name": {
"type": "string",
"description": "Nome dell'organizzazione, della scuola, del progetto o dell'agenzia"
},
"website": {
"anyOf": [
{
"type": "string",
"description": "Sito web"
},
{
"type": "null"
}
]
},
"proof_url": {
"anyOf": [
{
"type": "string",
"description": "Link di prova o URL del repository"
},
{
"type": "null"
}
]
},
"license": {
"anyOf": [
{
"type": "string",
"description": "Licenza OSI (open source)"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"description": "Nota per la revisione"
},
{
"type": "null"
}
]
},
"rejection_reason": {
"anyOf": [
{
"type": "string",
"description": "Perché la richiesta non è stata approvata"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Data della richiesta"
},
"reviewed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Data della revisione"
},
{
"type": "null"
}
]
},
"applied_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Sconto attivo dal"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Programma terminato il"
},
{
"type": "null"
}
]
}
},
"description": "L'ultima richiesta di programma di sconto, oppure null"
},
{
"type": "null"
}
]
},
"discount_percent": {
"anyOf": [
{
"type": "integer",
"description": "Percentuale di sconto su Pro e Business da un programma approvato, oppure null"
},
{
"type": "null"
}
]
},
"billing_emails": {
"type": "array",
"items": {
"type": "string"
}
},
"tax_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"badge": {
"type": "object",
"description": "Bonus del badge (piano gratuito)"
},
"usage": {
"type": "object",
"properties": {
"month": {
"type": "string",
"format": "date",
"description": "Primo giorno del mese di riferimento"
},
"events": {
"type": "integer",
"description": "Eventi fatturabili (visualizzazioni di pagina ed eventi personalizzati)"
},
"bots": {
"type": "integer",
"description": "Hit di bot filtrati (non fatturati)"
},
"allowance": {
"type": "integer",
"description": "Eventi inclusi, con l'eventuale bonus del badge"
},
"percent": {
"type": "number",
"description": "Eventi in percentuale sulla quota"
},
"forecast": {
"anyOf": [
{
"type": "integer",
"description": "Eventi previsti a fine mese"
},
{
"type": "null"
}
]
},
"forecast_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"days_left": {
"type": "integer",
"description": "Giorni rimanenti nel mese"
},
"status": {
"type": "string",
"description": "ok, warning (80%+), over (un mese passato pari o superiore alla quota), locked o paused"
},
"sites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"events": {
"type": "integer",
"description": "Visualizzazioni di pagina ed eventi personalizzati di questo mese"
},
"share": {
"type": "number",
"description": "Percentuale del totale del workspace"
}
}
},
"description": "Eventi per sito"
},
"history": {
"type": "array",
"description": "Mesi precedenti, dal più recente"
},
"access_locked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Dashboard bloccate dallo staff di Privatus dal"
},
{
"type": "null"
}
]
},
"collection_paused": {
"type": "boolean",
"description": "True mentre i nuovi eventi vengono scartati (è stato raggiunto il limite mensile, oppure lo staff ha messo in pausa la raccolta)"
},
"pause_reason": {
"anyOf": [
{
"type": "string",
"description": "Perché la raccolta è in pausa: limit (è stata raggiunta la quota mensile) o staff. null durante la raccolta"
},
{
"type": "null"
}
]
},
"collection_paused_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando lo staff ha messo in pausa la raccolta"
},
{
"type": "null"
}
]
},
"resumes_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando termina una pausa per limite: l'inizio del mese successivo (UTC), o prima in caso di upgrade. null negli altri casi"
},
{
"type": "null"
}
]
}
},
"description": "Questo mese finora"
}
}
}
GET
/workspaces/:workspace_id/billing/usage.json
Ottieni l'utilizzo di questo mese, la previsione e la suddivisione per sito
billing_usage
Permesso: billing.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/billing/usage.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"month": {
"type": "string",
"format": "date",
"description": "Un giorno qualsiasi del mese da riportare (predefinito: questo mese)",
"examples": [
"2026-09-01"
]
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"month": {
"type": "string",
"format": "date",
"description": "Primo giorno del mese di riferimento"
},
"events": {
"type": "integer",
"description": "Eventi fatturabili (visualizzazioni di pagina ed eventi personalizzati)"
},
"bots": {
"type": "integer",
"description": "Hit di bot filtrati (non fatturati)"
},
"allowance": {
"type": "integer",
"description": "Eventi inclusi, con l'eventuale bonus del badge"
},
"percent": {
"type": "number",
"description": "Eventi in percentuale sulla quota"
},
"forecast": {
"anyOf": [
{
"type": "integer",
"description": "Eventi previsti a fine mese"
},
{
"type": "null"
}
]
},
"forecast_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"days_left": {
"type": "integer",
"description": "Giorni rimanenti nel mese"
},
"status": {
"type": "string",
"description": "ok, warning (80%+), over (un mese passato pari o superiore alla quota), locked o paused"
},
"sites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"events": {
"type": "integer",
"description": "Visualizzazioni di pagina ed eventi personalizzati di questo mese"
},
"share": {
"type": "number",
"description": "Percentuale del totale del workspace"
}
}
},
"description": "Eventi per sito"
},
"history": {
"type": "array",
"description": "Mesi precedenti, dal più recente"
},
"access_locked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Dashboard bloccate dallo staff di Privatus dal"
},
{
"type": "null"
}
]
},
"collection_paused": {
"type": "boolean",
"description": "True mentre i nuovi eventi vengono scartati (è stato raggiunto il limite mensile, oppure lo staff ha messo in pausa la raccolta)"
},
"pause_reason": {
"anyOf": [
{
"type": "string",
"description": "Perché la raccolta è in pausa: limit (è stata raggiunta la quota mensile) o staff. null durante la raccolta"
},
{
"type": "null"
}
]
},
"collection_paused_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando lo staff ha messo in pausa la raccolta"
},
{
"type": "null"
}
]
},
"resumes_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando termina una pausa per limite: l'inizio del mese successivo (UTC), o prima in caso di upgrade. null negli altri casi"
},
{
"type": "null"
}
]
}
}
}
GET
/workspaces/:workspace_id/billing/invoices.json
Elenca le fatture
billing_invoices_list
Permesso: billing.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/billing/invoices.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della transazione Paddle"
},
"invoice_number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"description": "paid, completed, payment_failed, ..."
},
"amount_minor": {
"type": "integer",
"description": "Totale in unità minori (centesimi)"
},
"currency": {
"type": "string"
},
"billed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
}
}
}
}
GET
/workspaces/:workspace_id/billing/invoices/:id.json
Ottieni il link al PDF di una fattura
billing_invoices_get
Permesso: billing.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/billing/invoices/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "portal, payment_method o invoice"
},
"url": {
"anyOf": [
{
"type": "string",
"description": "URL Paddle di breve durata"
},
{
"type": "null"
}
]
}
}
}
Funnel
POST
/sites/:site_id/funnels.json
Crea un funnel
funnels_create
Permesso: content.write
curl -X POST https://privatusanalytics.com/sites/:site_id/funnels.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome del funnel",
"examples": [
"Signup flow"
]
},
"steps": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
},
"description": "Passaggi in ordine (da 2 al limite del tuo piano): [{\"type\": \"page|event|goal\", \"value\": \"/pricing | Signup | goal_…\", \"match\": \"exact|prefix|glob|regex\" (passaggi di pagina), \"name\": \"etichetta facoltativa\"}]"
},
"order_mode": {
"type": "string",
"description": "strict: passaggi in questo ordine, any: in qualsiasi ordine",
"enum": [
"strict",
"any"
],
"default": "strict"
},
"window": {
"type": "string",
"description": "Finestra di conversione: visit, oppure day (misurata all'interno di una visita, che non si estende mai su un giorno UTC)",
"enum": [
"visit",
"day"
],
"default": "visit"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"name",
"steps",
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del funnel, ad esempio fun_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"steps": {
"type": "array",
"items": {
"type": "object"
},
"description": "Passaggi: {type: page|event|goal, value, match, name}"
},
"order_mode": {
"type": "string",
"description": "strict o any"
},
"window": {
"type": "string",
"description": "visit o day"
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"entered": {
"type": "integer",
"description": "Visite che hanno raggiunto il passaggio 1"
},
"completed": {
"type": "integer",
"description": "Visite che hanno raggiunto l'ultimo passaggio"
},
"conversion_rate": {
"type": "number",
"description": "Completate ÷ entrate, %"
}
},
"description": "Statistiche del periodo (solo nell'elenco)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/funnels/:id.json
Elimina un funnel
funnels_delete
Permesso: content.write
curl -X DELETE https://privatusanalytics.com/sites/:site_id/funnels/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del funnel, ad esempio fun_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"steps": {
"type": "array",
"items": {
"type": "object"
},
"description": "Passaggi: {type: page|event|goal, value, match, name}"
},
"order_mode": {
"type": "string",
"description": "strict o any"
},
"window": {
"type": "string",
"description": "visit o day"
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"entered": {
"type": "integer",
"description": "Visite che hanno raggiunto il passaggio 1"
},
"completed": {
"type": "integer",
"description": "Visite che hanno raggiunto l'ultimo passaggio"
},
"conversion_rate": {
"type": "number",
"description": "Completate ÷ entrate, %"
}
},
"description": "Statistiche del periodo (solo nell'elenco)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/funnels.json
Elenca i funnel con ingressi, completamenti e tasso
funnels_list
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/funnels.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "Intervallo di date predefinito. Usa custom con from/to",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "Inizio dell'intervallo personalizzato (fuso orario del sito)"
},
"to": {
"type": "string",
"format": "date",
"description": "Fine dell'intervallo personalizzato, inclusa"
},
"compare": {
"type": "string",
"description": "Periodo di confronto",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "Inizio del confronto personalizzato"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "Fine del confronto personalizzato"
},
"match_weekday": {
"type": "boolean",
"description": "Allinea i giorni della settimana del confronto",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri: [[\"dimension\",\"operator\",\"value\"], …]. Operatori: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Racchiudi le condizioni in {\"any\": [...]} per OR.",
"default": []
},
"segment_id": {
"type": "string",
"description": "Applica un segmento salvato (seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "Aggiungi i dati storici importati (date precedenti al primo evento nativo, ignorati quando sono applicati filtri o un segmento)",
"default": false
},
"page": {
"type": "integer",
"description": "Numero di pagina",
"default": 1
},
"per_page": {
"type": "integer",
"description": "Funnel per pagina (massimo 100)",
"default": 25
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del funnel, ad esempio fun_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"steps": {
"type": "array",
"items": {
"type": "object"
},
"description": "Passaggi: {type: page|event|goal, value, match, name}"
},
"order_mode": {
"type": "string",
"description": "strict o any"
},
"window": {
"type": "string",
"description": "visit o day"
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"entered": {
"type": "integer",
"description": "Visite che hanno raggiunto il passaggio 1"
},
"completed": {
"type": "integer",
"description": "Visite che hanno raggiunto l'ultimo passaggio"
},
"conversion_rate": {
"type": "number",
"description": "Completate ÷ entrate, %"
}
},
"description": "Statistiche del periodo (solo nell'elenco)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/sites/:site_id/funnels/:id.json
Report del funnel: conteggi dei passaggi, conversione, abbandoni, tempo tra i passaggi e dove sono andate le visite invece
funnels_get
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/funnels/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "Intervallo di date predefinito. Usa custom con from/to",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "Inizio dell'intervallo personalizzato (fuso orario del sito)"
},
"to": {
"type": "string",
"format": "date",
"description": "Fine dell'intervallo personalizzato, inclusa"
},
"compare": {
"type": "string",
"description": "Periodo di confronto",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "Inizio del confronto personalizzato"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "Fine del confronto personalizzato"
},
"match_weekday": {
"type": "boolean",
"description": "Allinea i giorni della settimana del confronto",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri: [[\"dimension\",\"operator\",\"value\"], …]. Operatori: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Racchiudi le condizioni in {\"any\": [...]} per OR.",
"default": []
},
"segment_id": {
"type": "string",
"description": "Applica un segmento salvato (seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "Aggiungi i dati storici importati (date precedenti al primo evento nativo, ignorati quando sono applicati filtri o un segmento)",
"default": false
},
"breakdown": {
"type": "string",
"description": "Suddividi i conteggi dei passaggi per una dimensione della visita",
"enum": [
"channel",
"device",
"country",
"utm_campaign",
"utm_source",
"browser",
"os"
]
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"period": {
"type": "object",
"description": "from/to del periodo (UTC)"
},
"funnel": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del funnel, ad esempio fun_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"steps": {
"type": "array",
"items": {
"type": "object"
},
"description": "Passaggi: {type: page|event|goal, value, match, name}"
},
"order_mode": {
"type": "string",
"description": "strict o any"
},
"window": {
"type": "string",
"description": "visit o day"
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"entered": {
"type": "integer",
"description": "Visite che hanno raggiunto il passaggio 1"
},
"completed": {
"type": "integer",
"description": "Visite che hanno raggiunto l'ultimo passaggio"
},
"conversion_rate": {
"type": "number",
"description": "Completate ÷ entrate, %"
}
},
"description": "Statistiche del periodo (solo nell'elenco)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"description": "La definizione del funnel"
},
"order_mode": {
"type": "string",
"description": "strict o any"
},
"window": {
"type": "string",
"description": "visit o day (day è misurato all'interno di una visita)"
},
"steps": {
"type": "array",
"items": {
"type": "object"
},
"description": "Per passaggio: index, name, type, value, count, step_conversion_rate, overall_conversion_rate, dropoff, dropoff_rate, median_seconds_from_previous, next_pages [{value, count}]"
},
"overall_conversion_rate": {
"type": "number",
"description": "Ultimo passaggio ÷ primo passaggio, %"
},
"breakdown": {
"anyOf": [
{
"type": "object",
"description": "dimension, label e rows [{value, counts, overall_conversion_rate}]"
},
{
"type": "null"
}
]
},
"comparison": {
"anyOf": [
{
"type": "object",
"description": "period, conteggi per passaggio, overall_conversion_rate e change (%)"
},
{
"type": "null"
}
]
}
}
}
PATCH
/sites/:site_id/funnels/:id.json
Aggiorna un funnel
funnels_update
Permesso: content.write
curl -X PATCH https://privatusanalytics.com/sites/:site_id/funnels/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome del funnel",
"examples": [
"Signup flow"
]
},
"steps": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
},
"description": "Passaggi in ordine (da 2 al limite del tuo piano): [{\"type\": \"page|event|goal\", \"value\": \"/pricing | Signup | goal_…\", \"match\": \"exact|prefix|glob|regex\" (passaggi di pagina), \"name\": \"etichetta facoltativa\"}]"
},
"order_mode": {
"type": "string",
"description": "strict: passaggi in questo ordine, any: in qualsiasi ordine",
"enum": [
"strict",
"any"
]
},
"window": {
"type": "string",
"description": "Finestra di conversione: visit, oppure day (misurata all'interno di una visita, che non si estende mai su un giorno UTC)",
"enum": [
"visit",
"day"
]
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del funnel, ad esempio fun_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"steps": {
"type": "array",
"items": {
"type": "object"
},
"description": "Passaggi: {type: page|event|goal, value, match, name}"
},
"order_mode": {
"type": "string",
"description": "strict o any"
},
"window": {
"type": "string",
"description": "visit o day"
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"entered": {
"type": "integer",
"description": "Visite che hanno raggiunto il passaggio 1"
},
"completed": {
"type": "integer",
"description": "Visite che hanno raggiunto l'ultimo passaggio"
},
"conversion_rate": {
"type": "number",
"description": "Completate ÷ entrate, %"
}
},
"description": "Statistiche del periodo (solo nell'elenco)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
Importazioni
GET
/sites/:site_id/imports/google/properties.json
Elenca le proprietà di Google Analytics 4 da importare
imports_google_properties
Permesso: sites.manage
curl https://privatusanalytics.com/sites/:site_id/imports/google/properties.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
POST
/sites/:site_id/imports.json
Avvia un'importazione (proprietà GA4 o caricamento CSV)
imports_create
Permesso: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/imports.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "ga4 (API di Google Analytics 4) oppure lo strumento di cui carichi l'esportazione CSV",
"enum": [
"ga4",
"universal_analytics",
"fathom",
"simple_analytics",
"plausible",
"matomo",
"umami",
"clicky"
]
},
"property_id": {
"type": "string",
"description": "Proprietà GA4, ad esempio properties/123 (vedi imports_google_properties). Obbligatorio per ga4",
"examples": [
"properties/123456789"
]
},
"date_from": {
"type": "string",
"format": "date",
"description": "Primo giorno da importare. Obbligatorio per ga4. Per i file CSV senza colonna data ogni riga riceve questa data"
},
"date_to": {
"type": "string",
"format": "date",
"description": "Ultimo giorno da importare (ga4 usa per impostazione predefinita il giorno prima del tuo primo evento tracciato, oppure ieri)"
},
"file": {
"type": "string",
"format": "binary",
"description": "Esportazione CSV (caricamento multipart, massimo 50 MB). Obbligatorio per le sorgenti CSV"
},
"dimension": {
"type": "string",
"description": "Cosa suddividono le righe del CSV (sostituisce il rilevamento, necessario per le esportazioni \"Label\" di Matomo)",
"enum": [
"total",
"page",
"source",
"country",
"device",
"browser",
"os"
]
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"source",
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'importazione"
},
"site_id": {
"type": "string"
},
"source": {
"type": "string",
"description": "ga4, universal_analytics, fathom, simple_analytics, plausible, matomo, umami o clicky"
},
"status": {
"type": "string",
"description": "queued, running, complete o failed"
},
"date_from": {
"anyOf": [
{
"type": "string",
"format": "date",
"description": "Primo giorno importato"
},
{
"type": "null"
}
]
},
"date_to": {
"anyOf": [
{
"type": "string",
"format": "date",
"description": "Ultimo giorno importato"
},
{
"type": "null"
}
]
},
"rows_imported": {
"type": "integer",
"description": "Righe giornaliere memorizzate"
},
"error": {
"anyOf": [
{
"type": "string",
"description": "Perché l'importazione è fallita"
},
{
"type": "null"
}
]
},
"completed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/imports/:id.json
Elimina un'importazione e tutti i suoi dati importati
imports_delete
Permesso: sites.manage
curl -X DELETE https://privatusanalytics.com/sites/:site_id/imports/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'importazione"
},
"site_id": {
"type": "string"
},
"source": {
"type": "string",
"description": "ga4, universal_analytics, fathom, simple_analytics, plausible, matomo, umami o clicky"
},
"status": {
"type": "string",
"description": "queued, running, complete o failed"
},
"date_from": {
"anyOf": [
{
"type": "string",
"format": "date",
"description": "Primo giorno importato"
},
{
"type": "null"
}
]
},
"date_to": {
"anyOf": [
{
"type": "string",
"format": "date",
"description": "Ultimo giorno importato"
},
{
"type": "null"
}
]
},
"rows_imported": {
"type": "integer",
"description": "Righe giornaliere memorizzate"
},
"error": {
"anyOf": [
{
"type": "string",
"description": "Perché l'importazione è fallita"
},
{
"type": "null"
}
]
},
"completed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/imports.json
Elenca le importazioni di un sito
imports_list
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/imports.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "Solo importazioni con questo stato",
"enum": [
"queued",
"running",
"complete",
"failed"
]
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'importazione"
},
"site_id": {
"type": "string"
},
"source": {
"type": "string",
"description": "ga4, universal_analytics, fathom, simple_analytics, plausible, matomo, umami o clicky"
},
"status": {
"type": "string",
"description": "queued, running, complete o failed"
},
"date_from": {
"anyOf": [
{
"type": "string",
"format": "date",
"description": "Primo giorno importato"
},
{
"type": "null"
}
]
},
"date_to": {
"anyOf": [
{
"type": "string",
"format": "date",
"description": "Ultimo giorno importato"
},
{
"type": "null"
}
]
},
"rows_imported": {
"type": "integer",
"description": "Righe giornaliere memorizzate"
},
"error": {
"anyOf": [
{
"type": "string",
"description": "Perché l'importazione è fallita"
},
{
"type": "null"
}
]
},
"completed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/sites/:site_id/imports/:id.json
Ottieni un'importazione e il suo stato
imports_get
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/imports/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'importazione"
},
"site_id": {
"type": "string"
},
"source": {
"type": "string",
"description": "ga4, universal_analytics, fathom, simple_analytics, plausible, matomo, umami o clicky"
},
"status": {
"type": "string",
"description": "queued, running, complete o failed"
},
"date_from": {
"anyOf": [
{
"type": "string",
"format": "date",
"description": "Primo giorno importato"
},
{
"type": "null"
}
]
},
"date_to": {
"anyOf": [
{
"type": "string",
"format": "date",
"description": "Ultimo giorno importato"
},
{
"type": "null"
}
]
},
"rows_imported": {
"type": "integer",
"description": "Righe giornaliere memorizzate"
},
"error": {
"anyOf": [
{
"type": "string",
"description": "Perché l'importazione è fallita"
},
{
"type": "null"
}
]
},
"completed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
Live
GET
/sites/:site_id/live.json
Visitatori live, flusso di attività e cosa è popolare in questo momento (ultimi 30 minuti)
live_get
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/live.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"feed": {
"type": "string",
"description": "Flusso di attività: tutte le visite, visualizzazioni di pagina o eventi personalizzati",
"enum": [
"all",
"pageviews",
"events"
],
"default": "all"
},
"limit": {
"type": "integer",
"description": "Voci del flusso di attività (massimo 100)",
"default": 50
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/live/wallboard.json
Schede della wallboard (live e oggi) per uno o più siti
live_wallboard
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/live/wallboard.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei siti da alternare (predefinito: questo sito)",
"default": []
},
"rotate_seconds": {
"type": "integer",
"description": "Secondi in cui ogni sito resta sullo schermo (5-300)",
"default": 20
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
GET
/wallboard/:token.json
Wallboard per un token di wallboard (nessun accesso richiesto)
live_public_wallboard
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl https://privatusanalytics.com/wallboard/:token.json
{
"type": "object",
"properties": {
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei siti da alternare (predefinito: questo sito)",
"default": []
},
"rotate_seconds": {
"type": "integer",
"description": "Secondi in cui ogni sito resta sullo schermo (5-300)",
"default": 20
},
"token": {
"type": "string",
"description": "Token della risorsa"
}
},
"required": [
"token"
]
}
{
"type": "object"
}
POST
/sites/:site_id/live/wallboard/links.json
Crea un link alla wallboard (sola lettura, revocabile)
wallboard_links_create
Permesso: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/live/wallboard/links.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Etichetta, ad esempio TV dell'ufficio"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Siti aggiuntivi da alternare (questo sito è sempre incluso)",
"default": []
},
"rotate_seconds": {
"type": "integer",
"description": "Secondi per sito durante l'alternanza (5-300)",
"default": 20
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "Smette di funzionare dopo questa data"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del link, ad esempio shr_7Q2K9XH3AB"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"type": "string",
"description": "Aprilo su una TV. Non serve accedere"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Siti mostrati, in rotazione"
},
"rotate_seconds": {
"type": "integer"
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/live/wallboard/links/:id.json
Revoca un link alla wallboard
wallboard_links_delete
Permesso: sites.manage
curl -X DELETE https://privatusanalytics.com/sites/:site_id/live/wallboard/links/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del link, ad esempio shr_7Q2K9XH3AB"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"type": "string",
"description": "Aprilo su una TV. Non serve accedere"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Siti mostrati, in rotazione"
},
"rotate_seconds": {
"type": "integer"
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/live/wallboard/links.json
Elenca i link alla wallboard di un sito
wallboard_links_list
Permesso: sites.manage
curl https://privatusanalytics.com/sites/:site_id/live/wallboard/links.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del link, ad esempio shr_7Q2K9XH3AB"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"type": "string",
"description": "Aprilo su una TV. Non serve accedere"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Siti mostrati, in rotazione"
},
"rotate_seconds": {
"type": "integer"
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
Membri
POST
/workspaces/:workspace_id/invitations.json
Invita persone via email
invitations_create
Permesso: members.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/invitations.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "Indirizzi email da invitare"
},
"role": {
"type": "string",
"description": "Ruolo per i nuovi membri (custom richiede custom_role_id)",
"enum": [
"admin",
"editor",
"analyst",
"viewer",
"billing",
"custom"
],
"default": "viewer"
},
"custom_role_id": {
"type": "string",
"description": "Id del ruolo personalizzato (Business)"
},
"all_sites": {
"type": "boolean",
"description": "Accesso a tutti i siti, compresi quelli futuri",
"default": true
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei siti (pa_…) quando all_sites è false",
"default": []
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"emails",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"email": {
"type": "string"
},
"role": {
"type": "string"
},
"custom_role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"all_sites": {
"type": "boolean"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"invited_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/workspaces/:workspace_id/invitations/:id.json
Revoca un invito in sospeso
invitations_delete
Permesso: members.manage
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/invitations/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"email": {
"type": "string"
},
"role": {
"type": "string"
},
"custom_role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"all_sites": {
"type": "boolean"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"invited_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/invitations.json
Elenca gli inviti in sospeso
invitations_list
Permesso: members.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/invitations.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"email": {
"type": "string"
},
"role": {
"type": "string"
},
"custom_role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"all_sites": {
"type": "boolean"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"invited_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
DELETE
/workspaces/:workspace_id/members/:id.json
Rimuovi un membro (o lascia il workspace)
members_delete
Permesso: member
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/members/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id del membro (usalo per aggiornare o rimuovere il membro)"
},
"email": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"description": "owner, admin, editor, analyst, viewer, billing o custom"
},
"custom_role": {
"anyOf": [
{
"type": "string",
"description": "Nome del ruolo personalizzato"
},
{
"type": "null"
}
]
},
"custom_role_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
},
"all_sites": {
"type": "boolean",
"description": "Accesso a tutti i siti"
},
"include_future_sites": {
"type": "boolean"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei siti quando all_sites è false"
},
"two_factor": {
"type": "boolean",
"description": "Ha la 2FA o una passkey"
},
"last_active_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Iscritto dal"
}
}
}
GET
/workspaces/:workspace_id/members.json
Elenca i membri del workspace
members_list
Permesso: member
curl https://privatusanalytics.com/workspaces/:workspace_id/members.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Filtra per nome o email"
},
"role": {
"type": "string",
"description": "Solo membri con questo ruolo",
"enum": [
"owner",
"admin",
"editor",
"analyst",
"viewer",
"billing",
"custom"
]
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id del membro (usalo per aggiornare o rimuovere il membro)"
},
"email": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"description": "owner, admin, editor, analyst, viewer, billing o custom"
},
"custom_role": {
"anyOf": [
{
"type": "string",
"description": "Nome del ruolo personalizzato"
},
{
"type": "null"
}
]
},
"custom_role_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
},
"all_sites": {
"type": "boolean",
"description": "Accesso a tutti i siti"
},
"include_future_sites": {
"type": "boolean"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei siti quando all_sites è false"
},
"two_factor": {
"type": "boolean",
"description": "Ha la 2FA o una passkey"
},
"last_active_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Iscritto dal"
}
}
}
}
PATCH
/workspaces/:workspace_id/members/:id.json
Cambia il ruolo o l'accesso ai siti di un membro
members_update
Permesso: members.manage
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/members/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"role": {
"type": "string",
"description": "Nuovo ruolo (custom richiede custom_role_id)",
"enum": [
"admin",
"editor",
"analyst",
"viewer",
"billing",
"custom"
]
},
"custom_role_id": {
"type": "string",
"description": "Id del ruolo personalizzato (Business)"
},
"all_sites": {
"type": "boolean",
"description": "Accesso a tutti i siti, compresi quelli futuri"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei siti (pa_…) quando all_sites è false"
},
"include_future_sites": {
"type": "boolean",
"description": "Concedi anche i siti aggiunti in seguito"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id del membro (usalo per aggiornare o rimuovere il membro)"
},
"email": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"description": "owner, admin, editor, analyst, viewer, billing o custom"
},
"custom_role": {
"anyOf": [
{
"type": "string",
"description": "Nome del ruolo personalizzato"
},
{
"type": "null"
}
]
},
"custom_role_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
},
"all_sites": {
"type": "boolean",
"description": "Accesso a tutti i siti"
},
"include_future_sites": {
"type": "boolean"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei siti quando all_sites è false"
},
"two_factor": {
"type": "boolean",
"description": "Ha la 2FA o una passkey"
},
"last_active_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Iscritto dal"
}
}
}
POST
/workspaces/:workspace_id/ownership_transfer.json
Trasferisci la proprietà del workspace a un altro membro (solo il proprietario, tu diventi amministratore)
ownership_transfers_create
Permesso: member
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/ownership_transfer.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"membership_id": {
"type": "string",
"description": "Id del membro del nuovo proprietario"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"membership_id",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id del membro (usalo per aggiornare o rimuovere il membro)"
},
"email": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"description": "owner, admin, editor, analyst, viewer, billing o custom"
},
"custom_role": {
"anyOf": [
{
"type": "string",
"description": "Nome del ruolo personalizzato"
},
{
"type": "null"
}
]
},
"custom_role_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
},
"all_sites": {
"type": "boolean",
"description": "Accesso a tutti i siti"
},
"include_future_sites": {
"type": "boolean"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei siti quando all_sites è false"
},
"two_factor": {
"type": "boolean",
"description": "Ha la 2FA o una passkey"
},
"last_active_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Iscritto dal"
}
}
}
Note
POST
/sites/:site_id/notes.json
Aggiungi una nota a un sito (usa la sorgente "deploy" per i webhook di rilascio)
notes_create
Permesso: content.write
curl -X POST https://privatusanalytics.com/sites/:site_id/notes.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Giorno della nota (fuso orario del sito). Predefinito: oggi"
},
"end_date": {
"type": "string",
"format": "date",
"description": "Ultimo giorno, per un intervallo di date"
},
"title": {
"type": "string",
"description": "Titolo breve mostrato nei grafici",
"examples": [
"Launched new pricing"
]
},
"body": {
"type": "string",
"description": "Dettagli (Markdown)"
},
"url": {
"type": "string",
"description": "Link, ad esempio una PR o il changelog"
},
"color": {
"type": "string",
"description": "Colore del segnaposto",
"enum": [
"neutral",
"brand",
"blue",
"amber",
"red",
"violet"
]
},
"source": {
"type": "string",
"description": "manual, oppure deploy per i webhook di rilascio",
"enum": [
"manual",
"deploy",
"system",
"import",
"incident"
],
"default": "manual"
},
"version": {
"type": "string",
"description": "Deploy: versione di rilascio o commit, usato per il titolo predefinito"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della nota, ad esempio note_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito, oppure null per le note valide per tutto il workspace"
},
{
"type": "null"
}
]
},
"date": {
"type": "string",
"format": "date"
},
"end_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string",
"description": "Markdown"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"color": {
"type": "string",
"description": "neutral, brand, blue, amber, red, violet"
},
"source": {
"type": "string",
"description": "manual, deploy, system, import, incident"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/notes/:id.json
Elimina una nota
notes_delete
Permesso: content.write
curl -X DELETE https://privatusanalytics.com/sites/:site_id/notes/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della nota, ad esempio note_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito, oppure null per le note valide per tutto il workspace"
},
{
"type": "null"
}
]
},
"date": {
"type": "string",
"format": "date"
},
"end_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string",
"description": "Markdown"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"color": {
"type": "string",
"description": "neutral, brand, blue, amber, red, violet"
},
"source": {
"type": "string",
"description": "manual, deploy, system, import, incident"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/notes.json
Elenca le note di un sito (comprese quelle valide per tutto il workspace)
notes_list
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/notes.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"from": {
"type": "string",
"format": "date",
"description": "Solo note dalla data indicata in poi"
},
"to": {
"type": "string",
"format": "date",
"description": "Solo note fino alla data indicata"
},
"source": {
"type": "string",
"description": "Solo note di questa sorgente",
"enum": [
"manual",
"deploy",
"system",
"import",
"incident"
]
},
"query": {
"type": "string",
"description": "Cerca nel titolo, nel testo e nel link"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della nota, ad esempio note_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito, oppure null per le note valide per tutto il workspace"
},
{
"type": "null"
}
]
},
"date": {
"type": "string",
"format": "date"
},
"end_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string",
"description": "Markdown"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"color": {
"type": "string",
"description": "neutral, brand, blue, amber, red, violet"
},
"source": {
"type": "string",
"description": "manual, deploy, system, import, incident"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/sites/:site_id/notes/:id.json
Ottieni una nota
notes_get
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/notes/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della nota, ad esempio note_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito, oppure null per le note valide per tutto il workspace"
},
{
"type": "null"
}
]
},
"date": {
"type": "string",
"format": "date"
},
"end_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string",
"description": "Markdown"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"color": {
"type": "string",
"description": "neutral, brand, blue, amber, red, violet"
},
"source": {
"type": "string",
"description": "manual, deploy, system, import, incident"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/sites/:site_id/notes/:id.json
Modifica una nota
notes_update
Permesso: content.write
curl -X PATCH https://privatusanalytics.com/sites/:site_id/notes/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Giorno della nota"
},
"end_date": {
"type": "string",
"format": "date",
"description": "Ultimo giorno, per un intervallo di date"
},
"title": {
"type": "string",
"description": "Titolo breve mostrato nei grafici"
},
"body": {
"type": "string",
"description": "Dettagli (Markdown)"
},
"url": {
"type": "string",
"description": "Link"
},
"color": {
"type": "string",
"description": "Colore del segnaposto",
"enum": [
"neutral",
"brand",
"blue",
"amber",
"red",
"violet"
]
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della nota, ad esempio note_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito, oppure null per le note valide per tutto il workspace"
},
{
"type": "null"
}
]
},
"date": {
"type": "string",
"format": "date"
},
"end_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string",
"description": "Markdown"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"color": {
"type": "string",
"description": "neutral, brand, blue, amber, red, violet"
},
"source": {
"type": "string",
"description": "manual, deploy, system, import, incident"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/workspaces/:workspace_id/notes.json
Aggiungi una nota valida per tutto il workspace (mostrata su ogni sito)
workspace_notes_create
Permesso: content.write
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/notes.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Giorno della nota (fuso orario del sito). Predefinito: oggi"
},
"end_date": {
"type": "string",
"format": "date",
"description": "Ultimo giorno, per un intervallo di date"
},
"title": {
"type": "string",
"description": "Titolo breve mostrato nei grafici",
"examples": [
"Launched new pricing"
]
},
"body": {
"type": "string",
"description": "Dettagli (Markdown)"
},
"url": {
"type": "string",
"description": "Link, ad esempio una PR o il changelog"
},
"color": {
"type": "string",
"description": "Colore del segnaposto",
"enum": [
"neutral",
"brand",
"blue",
"amber",
"red",
"violet"
]
},
"source": {
"type": "string",
"description": "manual, oppure deploy per i webhook di rilascio",
"enum": [
"manual",
"deploy",
"system",
"import",
"incident"
],
"default": "manual"
},
"version": {
"type": "string",
"description": "Deploy: versione di rilascio o commit, usato per il titolo predefinito"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della nota, ad esempio note_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito, oppure null per le note valide per tutto il workspace"
},
{
"type": "null"
}
]
},
"date": {
"type": "string",
"format": "date"
},
"end_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string",
"description": "Markdown"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"color": {
"type": "string",
"description": "neutral, brand, blue, amber, red, violet"
},
"source": {
"type": "string",
"description": "manual, deploy, system, import, incident"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/workspaces/:workspace_id/notes/:id.json
Elimina una nota del workspace
workspace_notes_delete
Permesso: content.write
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/notes/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della nota, ad esempio note_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito, oppure null per le note valide per tutto il workspace"
},
{
"type": "null"
}
]
},
"date": {
"type": "string",
"format": "date"
},
"end_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string",
"description": "Markdown"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"color": {
"type": "string",
"description": "neutral, brand, blue, amber, red, violet"
},
"source": {
"type": "string",
"description": "manual, deploy, system, import, incident"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/notes.json
Elenca le note di un workspace
workspace_notes_list
Permesso: analytics.read
curl https://privatusanalytics.com/workspaces/:workspace_id/notes.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"from": {
"type": "string",
"format": "date",
"description": "Solo note dalla data indicata in poi"
},
"to": {
"type": "string",
"format": "date",
"description": "Solo note fino alla data indicata"
},
"source": {
"type": "string",
"description": "Solo note di questa sorgente",
"enum": [
"manual",
"deploy",
"system",
"import",
"incident"
]
},
"query": {
"type": "string",
"description": "Cerca nel titolo, nel testo e nel link"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della nota, ad esempio note_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito, oppure null per le note valide per tutto il workspace"
},
{
"type": "null"
}
]
},
"date": {
"type": "string",
"format": "date"
},
"end_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string",
"description": "Markdown"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"color": {
"type": "string",
"description": "neutral, brand, blue, amber, red, violet"
},
"source": {
"type": "string",
"description": "manual, deploy, system, import, incident"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
PATCH
/workspaces/:workspace_id/notes/:id.json
Modifica una nota del workspace
workspace_notes_update
Permesso: content.write
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/notes/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Giorno della nota"
},
"end_date": {
"type": "string",
"format": "date",
"description": "Ultimo giorno, per un intervallo di date"
},
"title": {
"type": "string",
"description": "Titolo breve mostrato nei grafici"
},
"body": {
"type": "string",
"description": "Dettagli (Markdown)"
},
"url": {
"type": "string",
"description": "Link"
},
"color": {
"type": "string",
"description": "Colore del segnaposto",
"enum": [
"neutral",
"brand",
"blue",
"amber",
"red",
"violet"
]
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della nota, ad esempio note_7Q2K9XH3AB"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito, oppure null per le note valide per tutto il workspace"
},
{
"type": "null"
}
]
},
"date": {
"type": "string",
"format": "date"
},
"end_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string",
"description": "Markdown"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"color": {
"type": "string",
"description": "neutral, brand, blue, amber, red, violet"
},
"source": {
"type": "string",
"description": "manual, deploy, system, import, incident"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
Obiettivi
POST
/sites/:site_id/goals/:id/archive.json
Archivia un obiettivo (nascosto dai report)
goals_archive
Permesso: content.write
curl -X POST https://privatusanalytics.com/sites/:site_id/goals/:id/archive.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'obiettivo, ad esempio goal_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "page, event, engagement, outbound o download"
},
"match_type": {
"type": "string",
"description": "exact, prefix, glob o regex"
},
"pattern": {
"anyOf": [
{
"type": "string",
"description": "Pattern di percorso, dominio o file"
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string",
"description": "Limitazione per hostname (obiettivi page)"
},
{
"type": "null"
}
]
},
"event_name": {
"anyOf": [
{
"type": "string",
"description": "Nome dell'evento personalizzato (obiettivi event)"
},
{
"type": "null"
}
]
},
"conditions": {
"type": "array",
"items": {
"type": "object"
},
"description": "Condizioni sulle proprietà dell'evento"
},
"scroll_threshold": {
"anyOf": [
{
"type": "integer",
"description": "Engagement: % di scorrimento"
},
{
"type": "null"
}
]
},
"time_threshold_seconds": {
"anyOf": [
{
"type": "integer",
"description": "Engagement: secondi sulla pagina"
},
{
"type": "null"
}
]
},
"value_mode": {
"type": "string",
"description": "none, fixed o revenue"
},
"fixed_value_minor": {
"anyOf": [
{
"type": "integer",
"description": "Valore fisso in unità minori"
},
{
"type": "null"
}
]
},
"count_mode": {
"type": "string",
"description": "once_per_visit o every"
},
"archived": {
"type": "boolean"
},
"archived_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"completions": {
"type": "integer",
"description": "Eventi corrispondenti, ripetizioni incluse"
},
"conversions": {
"type": "integer",
"description": "Visite con almeno un completamento"
},
"conversion_rate": {
"type": "number",
"description": "Conversioni ÷ visite (o ÷ visitatori, secondo l'impostazione del sito), %"
},
"value": {
"type": "integer",
"description": "Valore dell'obiettivo in unità minori della valuta del sito"
},
"change": {
"anyOf": [
{
"type": "number",
"description": "Variazione delle conversioni rispetto al periodo precedente, %"
},
{
"type": "null"
}
]
}
},
"description": "Statistiche del periodo (solo nell'elenco)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/sites/:site_id/goals.json
Crea un obiettivo
goals_create
Permesso: content.write
curl -X POST https://privatusanalytics.com/sites/:site_id/goals.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome dell'obiettivo",
"examples": [
"Signed up"
]
},
"kind": {
"type": "string",
"description": "page (visita di una pagina), event (evento personalizzato), engagement (scorrimento o tempo sulla pagina), outbound (clic su un link in uscita) o download (download di un file)",
"enum": [
"page",
"event",
"engagement",
"outbound",
"download"
]
},
"match_type": {
"type": "string",
"description": "Come pattern corrisponde al percorso (page, engagement), al dominio del link (outbound) o al file (download): exact, prefix, glob (*) o regex",
"enum": [
"exact",
"prefix",
"glob",
"regex"
],
"default": "exact"
},
"pattern": {
"type": "string",
"description": "Pattern di percorso, dominio o file, ad esempio /pricing, /blog/*, stripe.com o *.pdf"
},
"hostname": {
"type": "string",
"description": "Conta solo le pagine di questo hostname (obiettivi page)"
},
"event_name": {
"type": "string",
"description": "Nome dell'evento personalizzato (obiettivi event)"
},
"conditions": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
},
"description": "Condizioni sulle proprietà dell'evento: [{\"key\": \"plan\", \"operator\": \"is|is_not|contains|gt|lt\", \"value\": \"pro\"}]",
"default": []
},
"scroll_threshold": {
"type": "integer",
"description": "Engagement: % di profondità di scorrimento da raggiungere"
},
"time_threshold_seconds": {
"type": "integer",
"description": "Engagement: secondi sulla pagina"
},
"value_mode": {
"type": "string",
"description": "none, fixed (fixed_value per conversione) o revenue (i ricavi dell'evento)",
"enum": [
"none",
"fixed",
"revenue"
],
"default": "none"
},
"fixed_value": {
"type": "number",
"description": "Valore fisso per conversione nella valuta del sito, ad esempio 50.0"
},
"count_mode": {
"type": "string",
"description": "Il valore conta once_per_visit o every completion",
"enum": [
"once_per_visit",
"every"
],
"default": "once_per_visit"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"name",
"kind",
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'obiettivo, ad esempio goal_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "page, event, engagement, outbound o download"
},
"match_type": {
"type": "string",
"description": "exact, prefix, glob o regex"
},
"pattern": {
"anyOf": [
{
"type": "string",
"description": "Pattern di percorso, dominio o file"
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string",
"description": "Limitazione per hostname (obiettivi page)"
},
{
"type": "null"
}
]
},
"event_name": {
"anyOf": [
{
"type": "string",
"description": "Nome dell'evento personalizzato (obiettivi event)"
},
{
"type": "null"
}
]
},
"conditions": {
"type": "array",
"items": {
"type": "object"
},
"description": "Condizioni sulle proprietà dell'evento"
},
"scroll_threshold": {
"anyOf": [
{
"type": "integer",
"description": "Engagement: % di scorrimento"
},
{
"type": "null"
}
]
},
"time_threshold_seconds": {
"anyOf": [
{
"type": "integer",
"description": "Engagement: secondi sulla pagina"
},
{
"type": "null"
}
]
},
"value_mode": {
"type": "string",
"description": "none, fixed o revenue"
},
"fixed_value_minor": {
"anyOf": [
{
"type": "integer",
"description": "Valore fisso in unità minori"
},
{
"type": "null"
}
]
},
"count_mode": {
"type": "string",
"description": "once_per_visit o every"
},
"archived": {
"type": "boolean"
},
"archived_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"completions": {
"type": "integer",
"description": "Eventi corrispondenti, ripetizioni incluse"
},
"conversions": {
"type": "integer",
"description": "Visite con almeno un completamento"
},
"conversion_rate": {
"type": "number",
"description": "Conversioni ÷ visite (o ÷ visitatori, secondo l'impostazione del sito), %"
},
"value": {
"type": "integer",
"description": "Valore dell'obiettivo in unità minori della valuta del sito"
},
"change": {
"anyOf": [
{
"type": "number",
"description": "Variazione delle conversioni rispetto al periodo precedente, %"
},
{
"type": "null"
}
]
}
},
"description": "Statistiche del periodo (solo nell'elenco)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/goals/:id.json
Elimina un obiettivo (i dati vengono conservati)
goals_delete
Permesso: content.write
curl -X DELETE https://privatusanalytics.com/sites/:site_id/goals/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'obiettivo, ad esempio goal_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "page, event, engagement, outbound o download"
},
"match_type": {
"type": "string",
"description": "exact, prefix, glob o regex"
},
"pattern": {
"anyOf": [
{
"type": "string",
"description": "Pattern di percorso, dominio o file"
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string",
"description": "Limitazione per hostname (obiettivi page)"
},
{
"type": "null"
}
]
},
"event_name": {
"anyOf": [
{
"type": "string",
"description": "Nome dell'evento personalizzato (obiettivi event)"
},
{
"type": "null"
}
]
},
"conditions": {
"type": "array",
"items": {
"type": "object"
},
"description": "Condizioni sulle proprietà dell'evento"
},
"scroll_threshold": {
"anyOf": [
{
"type": "integer",
"description": "Engagement: % di scorrimento"
},
{
"type": "null"
}
]
},
"time_threshold_seconds": {
"anyOf": [
{
"type": "integer",
"description": "Engagement: secondi sulla pagina"
},
{
"type": "null"
}
]
},
"value_mode": {
"type": "string",
"description": "none, fixed o revenue"
},
"fixed_value_minor": {
"anyOf": [
{
"type": "integer",
"description": "Valore fisso in unità minori"
},
{
"type": "null"
}
]
},
"count_mode": {
"type": "string",
"description": "once_per_visit o every"
},
"archived": {
"type": "boolean"
},
"archived_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"completions": {
"type": "integer",
"description": "Eventi corrispondenti, ripetizioni incluse"
},
"conversions": {
"type": "integer",
"description": "Visite con almeno un completamento"
},
"conversion_rate": {
"type": "number",
"description": "Conversioni ÷ visite (o ÷ visitatori, secondo l'impostazione del sito), %"
},
"value": {
"type": "integer",
"description": "Valore dell'obiettivo in unità minori della valuta del sito"
},
"change": {
"anyOf": [
{
"type": "number",
"description": "Variazione delle conversioni rispetto al periodo precedente, %"
},
{
"type": "null"
}
]
}
},
"description": "Statistiche del periodo (solo nell'elenco)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/sites/:site_id/goals/:id/duplicate.json
Copia un obiettivo
goals_duplicate
Permesso: content.write
curl -X POST https://privatusanalytics.com/sites/:site_id/goals/:id/duplicate.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome della copia"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'obiettivo, ad esempio goal_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "page, event, engagement, outbound o download"
},
"match_type": {
"type": "string",
"description": "exact, prefix, glob o regex"
},
"pattern": {
"anyOf": [
{
"type": "string",
"description": "Pattern di percorso, dominio o file"
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string",
"description": "Limitazione per hostname (obiettivi page)"
},
{
"type": "null"
}
]
},
"event_name": {
"anyOf": [
{
"type": "string",
"description": "Nome dell'evento personalizzato (obiettivi event)"
},
{
"type": "null"
}
]
},
"conditions": {
"type": "array",
"items": {
"type": "object"
},
"description": "Condizioni sulle proprietà dell'evento"
},
"scroll_threshold": {
"anyOf": [
{
"type": "integer",
"description": "Engagement: % di scorrimento"
},
{
"type": "null"
}
]
},
"time_threshold_seconds": {
"anyOf": [
{
"type": "integer",
"description": "Engagement: secondi sulla pagina"
},
{
"type": "null"
}
]
},
"value_mode": {
"type": "string",
"description": "none, fixed o revenue"
},
"fixed_value_minor": {
"anyOf": [
{
"type": "integer",
"description": "Valore fisso in unità minori"
},
{
"type": "null"
}
]
},
"count_mode": {
"type": "string",
"description": "once_per_visit o every"
},
"archived": {
"type": "boolean"
},
"archived_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"completions": {
"type": "integer",
"description": "Eventi corrispondenti, ripetizioni incluse"
},
"conversions": {
"type": "integer",
"description": "Visite con almeno un completamento"
},
"conversion_rate": {
"type": "number",
"description": "Conversioni ÷ visite (o ÷ visitatori, secondo l'impostazione del sito), %"
},
"value": {
"type": "integer",
"description": "Valore dell'obiettivo in unità minori della valuta del sito"
},
"change": {
"anyOf": [
{
"type": "number",
"description": "Variazione delle conversioni rispetto al periodo precedente, %"
},
{
"type": "null"
}
]
}
},
"description": "Statistiche del periodo (solo nell'elenco)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/goals.json
Elenca gli obiettivi con completamenti, conversioni, tasso e valore per un periodo
goals_list
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/goals.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "Intervallo di date predefinito. Usa custom con from/to",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "Inizio dell'intervallo personalizzato (fuso orario del sito)"
},
"to": {
"type": "string",
"format": "date",
"description": "Fine dell'intervallo personalizzato, inclusa"
},
"compare": {
"type": "string",
"description": "Periodo di confronto",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "Inizio del confronto personalizzato"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "Fine del confronto personalizzato"
},
"match_weekday": {
"type": "boolean",
"description": "Allinea i giorni della settimana del confronto",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri: [[\"dimension\",\"operator\",\"value\"], …]. Operatori: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Racchiudi le condizioni in {\"any\": [...]} per OR.",
"default": []
},
"segment_id": {
"type": "string",
"description": "Applica un segmento salvato (seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "Aggiungi i dati storici importati (date precedenti al primo evento nativo, ignorati quando sono applicati filtri o un segmento)",
"default": false
},
"status": {
"type": "string",
"description": "Obiettivi active, archived o all",
"enum": [
"active",
"archived",
"all"
],
"default": "active"
},
"page": {
"type": "integer",
"description": "Numero di pagina",
"default": 1
},
"per_page": {
"type": "integer",
"description": "Obiettivi per pagina (massimo 100)",
"default": 25
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'obiettivo, ad esempio goal_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "page, event, engagement, outbound o download"
},
"match_type": {
"type": "string",
"description": "exact, prefix, glob o regex"
},
"pattern": {
"anyOf": [
{
"type": "string",
"description": "Pattern di percorso, dominio o file"
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string",
"description": "Limitazione per hostname (obiettivi page)"
},
{
"type": "null"
}
]
},
"event_name": {
"anyOf": [
{
"type": "string",
"description": "Nome dell'evento personalizzato (obiettivi event)"
},
{
"type": "null"
}
]
},
"conditions": {
"type": "array",
"items": {
"type": "object"
},
"description": "Condizioni sulle proprietà dell'evento"
},
"scroll_threshold": {
"anyOf": [
{
"type": "integer",
"description": "Engagement: % di scorrimento"
},
{
"type": "null"
}
]
},
"time_threshold_seconds": {
"anyOf": [
{
"type": "integer",
"description": "Engagement: secondi sulla pagina"
},
{
"type": "null"
}
]
},
"value_mode": {
"type": "string",
"description": "none, fixed o revenue"
},
"fixed_value_minor": {
"anyOf": [
{
"type": "integer",
"description": "Valore fisso in unità minori"
},
{
"type": "null"
}
]
},
"count_mode": {
"type": "string",
"description": "once_per_visit o every"
},
"archived": {
"type": "boolean"
},
"archived_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"completions": {
"type": "integer",
"description": "Eventi corrispondenti, ripetizioni incluse"
},
"conversions": {
"type": "integer",
"description": "Visite con almeno un completamento"
},
"conversion_rate": {
"type": "number",
"description": "Conversioni ÷ visite (o ÷ visitatori, secondo l'impostazione del sito), %"
},
"value": {
"type": "integer",
"description": "Valore dell'obiettivo in unità minori della valuta del sito"
},
"change": {
"anyOf": [
{
"type": "number",
"description": "Variazione delle conversioni rispetto al periodo precedente, %"
},
{
"type": "null"
}
]
}
},
"description": "Statistiche del periodo (solo nell'elenco)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/sites/:site_id/goals/:id.json
Report dell'obiettivo: metriche, grafico, suddivisioni e il percorso verso la conversione
goals_get
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/goals/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "Intervallo di date predefinito. Usa custom con from/to",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "Inizio dell'intervallo personalizzato (fuso orario del sito)"
},
"to": {
"type": "string",
"format": "date",
"description": "Fine dell'intervallo personalizzato, inclusa"
},
"compare": {
"type": "string",
"description": "Periodo di confronto",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "Inizio del confronto personalizzato"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "Fine del confronto personalizzato"
},
"match_weekday": {
"type": "boolean",
"description": "Allinea i giorni della settimana del confronto",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri: [[\"dimension\",\"operator\",\"value\"], …]. Operatori: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Racchiudi le condizioni in {\"any\": [...]} per OR.",
"default": []
},
"segment_id": {
"type": "string",
"description": "Applica un segmento salvato (seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "Aggiungi i dati storici importati (date precedenti al primo evento nativo, ignorati quando sono applicati filtri o un segmento)",
"default": false
},
"interval": {
"type": "string",
"description": "Dimensione dell'intervallo del grafico",
"enum": [
"auto",
"minute",
"hour",
"day",
"week",
"month",
"quarter",
"year"
],
"default": "auto"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"period": {
"type": "object",
"description": "from/to del periodo (UTC)"
},
"goal": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'obiettivo, ad esempio goal_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "page, event, engagement, outbound o download"
},
"match_type": {
"type": "string",
"description": "exact, prefix, glob o regex"
},
"pattern": {
"anyOf": [
{
"type": "string",
"description": "Pattern di percorso, dominio o file"
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string",
"description": "Limitazione per hostname (obiettivi page)"
},
{
"type": "null"
}
]
},
"event_name": {
"anyOf": [
{
"type": "string",
"description": "Nome dell'evento personalizzato (obiettivi event)"
},
{
"type": "null"
}
]
},
"conditions": {
"type": "array",
"items": {
"type": "object"
},
"description": "Condizioni sulle proprietà dell'evento"
},
"scroll_threshold": {
"anyOf": [
{
"type": "integer",
"description": "Engagement: % di scorrimento"
},
{
"type": "null"
}
]
},
"time_threshold_seconds": {
"anyOf": [
{
"type": "integer",
"description": "Engagement: secondi sulla pagina"
},
{
"type": "null"
}
]
},
"value_mode": {
"type": "string",
"description": "none, fixed o revenue"
},
"fixed_value_minor": {
"anyOf": [
{
"type": "integer",
"description": "Valore fisso in unità minori"
},
{
"type": "null"
}
]
},
"count_mode": {
"type": "string",
"description": "once_per_visit o every"
},
"archived": {
"type": "boolean"
},
"archived_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"completions": {
"type": "integer",
"description": "Eventi corrispondenti, ripetizioni incluse"
},
"conversions": {
"type": "integer",
"description": "Visite con almeno un completamento"
},
"conversion_rate": {
"type": "number",
"description": "Conversioni ÷ visite (o ÷ visitatori, secondo l'impostazione del sito), %"
},
"value": {
"type": "integer",
"description": "Valore dell'obiettivo in unità minori della valuta del sito"
},
"change": {
"anyOf": [
{
"type": "number",
"description": "Variazione delle conversioni rispetto al periodo precedente, %"
},
{
"type": "null"
}
]
}
},
"description": "Statistiche del periodo (solo nell'elenco)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"description": "La definizione dell'obiettivo"
},
"metrics": {
"type": "object",
"description": "completions, conversions, conversion_rate (%), value (unità minori)"
},
"comparison_period": {
"anyOf": [
{
"type": "object",
"description": "from/to del confronto"
},
{
"type": "null"
}
]
},
"comparison": {
"anyOf": [
{
"type": "object",
"description": "Metriche del periodo di confronto"
},
{
"type": "null"
}
]
},
"change": {
"anyOf": [
{
"type": "object",
"description": "Variazione rispetto al confronto, % per metrica"
},
{
"type": "null"
}
]
},
"interval": {
"type": "string",
"description": "Dimensione dell'intervallo del grafico"
},
"series": {
"type": "array",
"items": {
"type": "object"
},
"description": "Per intervallo: date, completions, conversions, conversion_rate"
},
"breakdowns": {
"type": "object",
"description": "Valori principali per conversioni per channel, utm_campaign, entry_page, country e device: value, completions, conversions, conversion_rate"
},
"journey": {
"anyOf": [
{
"type": "object",
"description": "converting_visits, median_seconds_to_convert, median_pages_before e pages_before (pagine viste prima nella visita, per visite che convertono)"
},
{
"type": "null"
}
]
}
}
}
POST
/sites/:site_id/goals/:id/unarchive.json
Ripristina un obiettivo archiviato
goals_unarchive
Permesso: content.write
curl -X POST https://privatusanalytics.com/sites/:site_id/goals/:id/unarchive.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'obiettivo, ad esempio goal_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "page, event, engagement, outbound o download"
},
"match_type": {
"type": "string",
"description": "exact, prefix, glob o regex"
},
"pattern": {
"anyOf": [
{
"type": "string",
"description": "Pattern di percorso, dominio o file"
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string",
"description": "Limitazione per hostname (obiettivi page)"
},
{
"type": "null"
}
]
},
"event_name": {
"anyOf": [
{
"type": "string",
"description": "Nome dell'evento personalizzato (obiettivi event)"
},
{
"type": "null"
}
]
},
"conditions": {
"type": "array",
"items": {
"type": "object"
},
"description": "Condizioni sulle proprietà dell'evento"
},
"scroll_threshold": {
"anyOf": [
{
"type": "integer",
"description": "Engagement: % di scorrimento"
},
{
"type": "null"
}
]
},
"time_threshold_seconds": {
"anyOf": [
{
"type": "integer",
"description": "Engagement: secondi sulla pagina"
},
{
"type": "null"
}
]
},
"value_mode": {
"type": "string",
"description": "none, fixed o revenue"
},
"fixed_value_minor": {
"anyOf": [
{
"type": "integer",
"description": "Valore fisso in unità minori"
},
{
"type": "null"
}
]
},
"count_mode": {
"type": "string",
"description": "once_per_visit o every"
},
"archived": {
"type": "boolean"
},
"archived_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"completions": {
"type": "integer",
"description": "Eventi corrispondenti, ripetizioni incluse"
},
"conversions": {
"type": "integer",
"description": "Visite con almeno un completamento"
},
"conversion_rate": {
"type": "number",
"description": "Conversioni ÷ visite (o ÷ visitatori, secondo l'impostazione del sito), %"
},
"value": {
"type": "integer",
"description": "Valore dell'obiettivo in unità minori della valuta del sito"
},
"change": {
"anyOf": [
{
"type": "number",
"description": "Variazione delle conversioni rispetto al periodo precedente, %"
},
{
"type": "null"
}
]
}
},
"description": "Statistiche del periodo (solo nell'elenco)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/sites/:site_id/goals/:id.json
Aggiorna un obiettivo
goals_update
Permesso: content.write
curl -X PATCH https://privatusanalytics.com/sites/:site_id/goals/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome dell'obiettivo",
"examples": [
"Signed up"
]
},
"kind": {
"type": "string",
"description": "page (visita di una pagina), event (evento personalizzato), engagement (scorrimento o tempo sulla pagina), outbound (clic su un link in uscita) o download (download di un file)",
"enum": [
"page",
"event",
"engagement",
"outbound",
"download"
]
},
"match_type": {
"type": "string",
"description": "Come pattern corrisponde al percorso (page, engagement), al dominio del link (outbound) o al file (download): exact, prefix, glob (*) o regex",
"enum": [
"exact",
"prefix",
"glob",
"regex"
]
},
"pattern": {
"type": "string",
"description": "Pattern di percorso, dominio o file, ad esempio /pricing, /blog/*, stripe.com o *.pdf"
},
"hostname": {
"type": "string",
"description": "Conta solo le pagine di questo hostname (obiettivi page)"
},
"event_name": {
"type": "string",
"description": "Nome dell'evento personalizzato (obiettivi event)"
},
"conditions": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
},
"description": "Condizioni sulle proprietà dell'evento: [{\"key\": \"plan\", \"operator\": \"is|is_not|contains|gt|lt\", \"value\": \"pro\"}]"
},
"scroll_threshold": {
"type": "integer",
"description": "Engagement: % di profondità di scorrimento da raggiungere"
},
"time_threshold_seconds": {
"type": "integer",
"description": "Engagement: secondi sulla pagina"
},
"value_mode": {
"type": "string",
"description": "none, fixed (fixed_value per conversione) o revenue (i ricavi dell'evento)",
"enum": [
"none",
"fixed",
"revenue"
]
},
"fixed_value": {
"type": "number",
"description": "Valore fisso per conversione nella valuta del sito, ad esempio 50.0"
},
"count_mode": {
"type": "string",
"description": "Il valore conta once_per_visit o every completion",
"enum": [
"once_per_visit",
"every"
]
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id dell'obiettivo, ad esempio goal_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "page, event, engagement, outbound o download"
},
"match_type": {
"type": "string",
"description": "exact, prefix, glob o regex"
},
"pattern": {
"anyOf": [
{
"type": "string",
"description": "Pattern di percorso, dominio o file"
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string",
"description": "Limitazione per hostname (obiettivi page)"
},
{
"type": "null"
}
]
},
"event_name": {
"anyOf": [
{
"type": "string",
"description": "Nome dell'evento personalizzato (obiettivi event)"
},
{
"type": "null"
}
]
},
"conditions": {
"type": "array",
"items": {
"type": "object"
},
"description": "Condizioni sulle proprietà dell'evento"
},
"scroll_threshold": {
"anyOf": [
{
"type": "integer",
"description": "Engagement: % di scorrimento"
},
{
"type": "null"
}
]
},
"time_threshold_seconds": {
"anyOf": [
{
"type": "integer",
"description": "Engagement: secondi sulla pagina"
},
{
"type": "null"
}
]
},
"value_mode": {
"type": "string",
"description": "none, fixed o revenue"
},
"fixed_value_minor": {
"anyOf": [
{
"type": "integer",
"description": "Valore fisso in unità minori"
},
{
"type": "null"
}
]
},
"count_mode": {
"type": "string",
"description": "once_per_visit o every"
},
"archived": {
"type": "boolean"
},
"archived_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"completions": {
"type": "integer",
"description": "Eventi corrispondenti, ripetizioni incluse"
},
"conversions": {
"type": "integer",
"description": "Visite con almeno un completamento"
},
"conversion_rate": {
"type": "number",
"description": "Conversioni ÷ visite (o ÷ visitatori, secondo l'impostazione del sito), %"
},
"value": {
"type": "integer",
"description": "Valore dell'obiettivo in unità minori della valuta del sito"
},
"change": {
"anyOf": [
{
"type": "number",
"description": "Variazione delle conversioni rispetto al periodo precedente, %"
},
{
"type": "null"
}
]
}
},
"description": "Statistiche del periodo (solo nell'elenco)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
Pagine di stato
GET
/status/:slug/confirm/:token.json
Conferma un'iscrizione dal link ricevuto via email
public_status_pages_confirm
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl https://privatusanalytics.com/status/:slug/confirm/:token.json
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Token della risorsa"
},
"slug": {
"type": "string",
"description": "Slug della risorsa"
}
},
"required": [
"token",
"slug"
]
}
{
"type": "object"
}
GET
/status/:slug.json
Pagina di stato pubblica: stato attuale, barre di uptime a 90 giorni, incidenti e post
public_status_pages_get
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl https://privatusanalytics.com/status/:slug.json
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"description": "Slug della risorsa"
}
},
"required": [
"slug"
]
}
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"logo_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"brand_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"description": "operational, degraded o outage"
},
"checks": {
"type": "array",
"description": "Ciascuno: {name, status, uptime_90d, days: [{date, uptime, downtime_seconds}]}"
},
"posts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del post (spp_…)"
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"description": "investigating, identified, monitoring o resolved"
},
"posted_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
},
"incidents": {
"type": "array",
"description": "Incidenti recenti: {check, started_at, resolved_at, duration_seconds}"
}
}
}
POST
/status/:slug/subscribers.json
Iscrivi un indirizzo email (doppio opt-in)
public_status_pages_subscribe
I client browser inviano un token Cloudflare Turnstile come `cf-turnstile-response`. Le richieste con un token API non ne hanno bisogno.
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl -X POST https://privatusanalytics.com/status/:slug/subscribers.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "Indirizzo email da avvisare",
"examples": [
"[email protected]"
]
},
"slug": {
"type": "string",
"description": "Slug della risorsa"
}
},
"required": [
"email",
"slug"
]
}
{
"type": "object"
}
POST
/status/:slug/unsubscribe/:token.json
Annulla l'iscrizione con il token ricevuto via email
public_status_pages_unsubscribe
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl -X POST https://privatusanalytics.com/status/:slug/unsubscribe/:token.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Token della risorsa"
},
"slug": {
"type": "string",
"description": "Slug della risorsa"
}
},
"required": [
"token",
"slug"
]
}
{
"type": "object"
}
POST
/status_pages/:status_page_id/posts.json
Pubblica un aggiornamento su un incidente (invia un'email agli iscritti)
status_page_posts_create
Permesso: uptime.manage
curl -X POST https://privatusanalytics.com/status_pages/:status_page_id/posts.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Titolo, ad esempio \"Tassi di errore elevati\""
},
"body": {
"type": "string",
"description": "Testo dell'aggiornamento (testo semplice)"
},
"status": {
"type": "string",
"description": "investigating, identified, monitoring o resolved",
"enum": [
"investigating",
"identified",
"monitoring",
"resolved"
],
"default": "investigating"
},
"posted_at": {
"type": "string",
"format": "date-time",
"description": "Quando è successo (predefinito: adesso)"
},
"notify": {
"type": "boolean",
"description": "Invia un'email agli iscritti confermati",
"default": true
},
"status_page_id": {
"type": "string",
"description": "Status page della risorsa"
}
},
"required": [
"title",
"status_page_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del post (spp_…)"
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"description": "investigating, identified, monitoring o resolved"
},
"posted_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/status_pages/:status_page_id/posts/:id.json
Elimina un post della pagina di stato
status_page_posts_delete
Permesso: uptime.manage
curl -X DELETE https://privatusanalytics.com/status_pages/:status_page_id/posts/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"status_page_id": {
"type": "string",
"description": "Status page della risorsa"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"status_page_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del post (spp_…)"
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"description": "investigating, identified, monitoring o resolved"
},
"posted_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/status_pages/:status_page_id/posts.json
Elenca i post di una pagina di stato
status_page_posts_list
Permesso: analytics.read
curl https://privatusanalytics.com/status_pages/:status_page_id/posts.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "Solo post con questo stato",
"enum": [
"investigating",
"identified",
"monitoring",
"resolved"
]
},
"status_page_id": {
"type": "string",
"description": "Status page della risorsa"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"status_page_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del post (spp_…)"
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"description": "investigating, identified, monitoring o resolved"
},
"posted_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
}
PATCH
/status_pages/:status_page_id/posts/:id.json
Modifica un post della pagina di stato
status_page_posts_update
Permesso: uptime.manage
curl -X PATCH https://privatusanalytics.com/status_pages/:status_page_id/posts/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Titolo"
},
"body": {
"type": "string",
"description": "Testo dell'aggiornamento (testo semplice)"
},
"status": {
"type": "string",
"description": "investigating, identified, monitoring o resolved",
"enum": [
"investigating",
"identified",
"monitoring",
"resolved"
]
},
"notify": {
"type": "boolean",
"description": "Invia un'email agli iscritti confermati se lo stato cambia",
"default": true
},
"status_page_id": {
"type": "string",
"description": "Status page della risorsa"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"status_page_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del post (spp_…)"
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"description": "investigating, identified, monitoring o resolved"
},
"posted_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/status_pages/:status_page_id/subscribers/:id.json
Rimuovi un iscritto
status_page_subscribers_delete
Permesso: uptime.manage
curl -X DELETE https://privatusanalytics.com/status_pages/:status_page_id/subscribers/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"status_page_id": {
"type": "string",
"description": "Status page della risorsa"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"status_page_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"email": {
"type": "string"
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/status_pages/:status_page_id/subscribers.json
Elenca gli iscritti a una pagina di stato
status_page_subscribers_list
Permesso: uptime.manage
curl https://privatusanalytics.com/status_pages/:status_page_id/subscribers.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"confirmed": {
"type": "boolean",
"description": "true: solo confermati, false: solo in sospeso"
},
"status_page_id": {
"type": "string",
"description": "Status page della risorsa"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"status_page_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"email": {
"type": "string"
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
POST
/workspaces/:workspace_id/status_pages.json
Crea una pagina di stato
status_pages_create
Permesso: uptime.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/status_pages.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Titolo della pagina, ad esempio \"Stato di Acme\""
},
"slug": {
"type": "string",
"description": "Slug dell'URL pubblico: /status/<slug> (predefinito dal nome)"
},
"description": {
"type": "string",
"description": "Testo introduttivo sotto il titolo"
},
"logo_url": {
"type": "string",
"description": "URL HTTPS di un'immagine del logo"
},
"brand_color": {
"type": "string",
"description": "Colore di accento, ad esempio #06755b"
},
"custom_domain": {
"type": "string",
"description": "Dominio personalizzato (CNAME verso il nostro host), ad esempio status.example.com. Vuoto per rimuoverlo"
},
"check_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei controlli di uptime (upc_…) da mostrare"
},
"published": {
"type": "boolean",
"description": "Visibile al pubblico",
"default": true
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"name",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della pagina di stato (sp_…)"
},
"workspace_id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string",
"description": "URL pubblico: /status/<slug>"
},
"custom_domain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"logo_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"brand_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"published": {
"type": "boolean"
},
"check_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei controlli di uptime mostrati"
},
"subscribers": {
"type": "integer",
"description": "Iscritti confermati"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/status_pages/:id.json
Elimina una pagina di stato
status_pages_delete
Permesso: uptime.manage
curl -X DELETE https://privatusanalytics.com/status_pages/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della pagina di stato (sp_…)"
},
"workspace_id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string",
"description": "URL pubblico: /status/<slug>"
},
"custom_domain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"logo_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"brand_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"published": {
"type": "boolean"
},
"check_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei controlli di uptime mostrati"
},
"subscribers": {
"type": "integer",
"description": "Iscritti confermati"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/status_pages.json
Elenca le pagine di stato
status_pages_list
Permesso: analytics.read
curl https://privatusanalytics.com/workspaces/:workspace_id/status_pages.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Filtra per nome o slug"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della pagina di stato (sp_…)"
},
"workspace_id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string",
"description": "URL pubblico: /status/<slug>"
},
"custom_domain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"logo_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"brand_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"published": {
"type": "boolean"
},
"check_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei controlli di uptime mostrati"
},
"subscribers": {
"type": "integer",
"description": "Iscritti confermati"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/status_pages/:id.json
Ottieni una pagina di stato
status_pages_get
Permesso: analytics.read
curl https://privatusanalytics.com/status_pages/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della pagina di stato (sp_…)"
},
"workspace_id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string",
"description": "URL pubblico: /status/<slug>"
},
"custom_domain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"logo_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"brand_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"published": {
"type": "boolean"
},
"check_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei controlli di uptime mostrati"
},
"subscribers": {
"type": "integer",
"description": "Iscritti confermati"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/status_pages/:id.json
Modifica una pagina di stato
status_pages_update
Permesso: uptime.manage
curl -X PATCH https://privatusanalytics.com/status_pages/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Titolo della pagina, ad esempio \"Stato di Acme\""
},
"slug": {
"type": "string",
"description": "Slug dell'URL pubblico: /status/<slug> (predefinito dal nome)"
},
"description": {
"type": "string",
"description": "Testo introduttivo sotto il titolo"
},
"logo_url": {
"type": "string",
"description": "URL HTTPS di un'immagine del logo"
},
"brand_color": {
"type": "string",
"description": "Colore di accento, ad esempio #06755b"
},
"custom_domain": {
"type": "string",
"description": "Dominio personalizzato (CNAME verso il nostro host), ad esempio status.example.com. Vuoto per rimuoverlo"
},
"check_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei controlli di uptime (upc_…) da mostrare"
},
"published": {
"type": "boolean",
"description": "Visibile al pubblico"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della pagina di stato (sp_…)"
},
"workspace_id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string",
"description": "URL pubblico: /status/<slug>"
},
"custom_domain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"logo_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"brand_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"published": {
"type": "boolean"
},
"check_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei controlli di uptime mostrati"
},
"subscribers": {
"type": "integer",
"description": "Iscritti confermati"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
Piani
GET
/plans.json
Elenca piani, prezzi e limiti
plans_list
Permesso: public
curl https://privatusanalytics.com/plans.json
{
"type": "object",
"properties": {
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": []
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "free, pro, business o enterprise"
},
"events": {
"anyOf": [
{
"type": "integer",
"description": "Eventi inclusi al mese (solo piano gratuito)"
},
{
"type": "null"
}
]
},
"badge_bonus": {
"anyOf": [
{
"type": "integer",
"description": "Eventi extra al mese per la visualizzazione del badge (piano gratuito)"
},
{
"type": "null"
}
]
},
"limits": {
"type": "object",
"description": "Limiti del piano. Null significa illimitato"
},
"tiers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"events": {
"type": "integer",
"description": "Eventi mensili inclusi"
},
"monthly": {
"type": "integer",
"description": "USD al mese, fatturati mensilmente"
},
"yearly": {
"type": "integer",
"description": "USD all'anno, fatturati annualmente (2 mesi gratis)"
},
"monthly_price_id": {
"anyOf": [
{
"type": "string",
"description": "Id del prezzo Paddle (mensile)"
},
{
"type": "null"
}
]
},
"yearly_price_id": {
"anyOf": [
{
"type": "string",
"description": "Id del prezzo Paddle (annuale)"
},
{
"type": "null"
}
]
}
}
},
"description": "Scala dei prezzi per eventi mensili"
},
"contact_sales": {
"type": "boolean",
"description": "Prezzo a contratto"
}
}
}
}
Prestazioni
GET
/sites/:site_id/performance.json
Web Vitals: scheda p75, andamento giornaliero e suddivisioni per pagina, dispositivo, browser e paese
performance_report
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/performance.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "Intervallo di date predefinito. Usa custom con from/to",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "Inizio dell'intervallo personalizzato (fuso orario del sito)"
},
"to": {
"type": "string",
"format": "date",
"description": "Fine dell'intervallo personalizzato, inclusa"
},
"compare": {
"type": "string",
"description": "Periodo di confronto",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "Inizio del confronto personalizzato"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "Fine del confronto personalizzato"
},
"match_weekday": {
"type": "boolean",
"description": "Allinea i giorni della settimana del confronto",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri: [[\"dimension\",\"operator\",\"value\"], …]. Operatori: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Racchiudi le condizioni in {\"any\": [...]} per OR.",
"default": []
},
"segment_id": {
"type": "string",
"description": "Applica un segmento salvato (seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "Aggiungi i dati storici importati (date precedenti al primo evento nativo, ignorati quando sono applicati filtri o un segmento)",
"default": false
},
"metric": {
"type": "string",
"description": "Metrica per l'andamento e le suddivisioni",
"enum": [
"LCP",
"INP",
"CLS",
"FCP",
"TTFB"
],
"default": "LCP"
},
"limit": {
"type": "integer",
"description": "Righe per suddivisione (massimo 100)",
"default": 10
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
Programma di affiliazione
GET
/account/affiliate/commissions.json
Elenca le tue commissioni di affiliazione
affiliate_commissions_list
Commissioni, storni per rimborsi e chargeback e relativi annullamenti, dalla più recente. Gli importi sono in centesimi.
Permesso: member
curl https://privatusanalytics.com/account/affiliate/commissions.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "Solo le commissioni con questo stato",
"enum": [
"pending",
"approved",
"paid",
"void"
]
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": []
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id della commissione"
},
"kind": {
"type": "string",
"description": "commission, clawback (rimborso o chargeback) o reversal"
},
"status": {
"type": "string",
"description": "pending (in sospeso), approved (pagabile), paid o void"
},
"amount_cents": {
"type": "integer",
"description": "La tua quota in centesimi (negativa per uno storno)"
},
"basis_cents": {
"type": "integer",
"description": "Il pagamento netto (tasse escluse) su cui è stata calcolata, in centesimi"
},
"currency": {
"type": "string",
"description": "Codice ISO della valuta"
},
"earned_at": {
"type": "string",
"format": "date-time",
"description": "Quando è avvenuto il pagamento (o il rimborso)"
},
"approved_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando è diventata pagabile"
},
{
"type": "null"
}
]
},
"paid_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando è stata pagata"
},
{
"type": "null"
}
]
}
}
}
}
GET
/account/affiliate.json
Ottieni il tuo stato di affiliato, il link di segnalazione e le statistiche
affiliate_get
Lo stato della tua candidatura da affiliato, il link di segnalazione, le registrazioni e i clienti paganti che hai segnalato e i saldi per valuta (in sospeso, pagabile, pagato). status è none se non ti sei candidato.
Permesso: member
curl https://privatusanalytics.com/account/affiliate.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {},
"required": []
}
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "none (non candidato), pending, approved, rejected o suspended"
},
"code": {
"anyOf": [
{
"type": "string",
"description": "Il tuo codice di segnalazione"
},
{
"type": "null"
}
]
},
"referral_url": {
"anyOf": [
{
"type": "string",
"description": "Il link da condividere (solo affiliati approvati)"
},
{
"type": "null"
}
]
},
"payout_method": {
"anyOf": [
{
"type": "string",
"description": "wise o credit"
},
{
"type": "null"
}
]
},
"rejection_reason": {
"anyOf": [
{
"type": "string",
"description": "Perché l'ultima candidatura è stata rifiutata"
},
{
"type": "null"
}
]
},
"applied_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando ti sei candidato"
},
{
"type": "null"
}
]
},
"approved_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando la candidatura è stata approvata"
},
{
"type": "null"
}
]
},
"credit_blocked": {
"anyOf": [
{
"type": "string",
"description": "Perché il credito sull'account è in attesa: program (il workspace è in un programma di sconto), no_subscription o no_workspace. null quando nulla lo blocca"
},
{
"type": "null"
}
]
},
"signups": {
"type": "integer",
"description": "Account creati tramite il tuo link o codice"
},
"customers": {
"type": "integer",
"description": "Workspace segnalati che hanno pagato"
},
"balances": {
"type": "array",
"description": "Per valuta: pending_cents (in sospeso), approved_cents (pagabile) e paid_cents"
},
"payouts": {
"type": "array",
"description": "Pagamenti recenti con amount_cents, currency, payout_method, status (applied: credito sull'account in attesa del prossimo rinnovo, oppure paid), applied_at e paid_at"
},
"terms": {
"type": "object",
"description": "Percentuale di commissione, mesi, giorni di trattenuta e soglia di pagamento Wise in centesimi"
}
}
}
Raccolta
POST
/api/logs.json
Invia i log di accesso del server per i report sui crawler IA (JSON {lines: [...]} oppure testo di log combinato, con la chiave di ingest del sito come Bearer token)
crawler_logs_create
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl -X POST https://privatusanalytics.com/api/logs.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ts": {
"type": "string"
},
"path": {
"type": "string",
"default": "/"
},
"status": {
"type": "integer"
},
"user_agent": {
"type": "string",
"default": ""
}
}
},
"description": "Righe di log: [{ts, path, status, user_agent}] (massimo 1000)"
}
},
"required": [
"lines"
]
}
{
"type": "object"
}
POST
/api/event.json
Raccogli una visita dal browser (usato da /js/pa.js)
ingest_event
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl -X POST https://privatusanalytics.com/api/event.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site": {
"type": "string",
"description": "Id del sito (pa_…)"
},
"type": {
"type": "string",
"description": "Tipo di visita",
"enum": [
"pageview",
"event",
"engagement",
"vital",
"click"
]
},
"url": {
"type": "string",
"description": "URL completo della pagina"
},
"referrer": {
"type": "string",
"description": "document.referrer"
},
"name": {
"type": "string",
"description": "Nome dell'evento (type=event) o nome del vital"
},
"props": {
"type": "object",
"additionalProperties": true,
"description": "Proprietà dell'evento: fino a 30 valori stringa/numero/booleano",
"default": {}
},
"screen_width": {
"type": "integer",
"description": "Larghezza dello schermo in pixel"
},
"language": {
"type": "string",
"description": "navigator.language"
},
"engaged_ms": {
"type": "integer",
"description": "Tempo visibile sulla pagina (engagement)"
},
"scroll_depth": {
"type": "integer",
"description": "Profondità massima di scorrimento in % (engagement)"
},
"value": {
"type": "number",
"description": "Valore del Web Vital (type=vital)"
},
"selector": {
"type": "string",
"description": "Selettore dell'elemento cliccato (type=click)"
},
"hash_mode": {
"type": "boolean",
"description": "Mantieni il #fragment (siti con routing basato su hash)",
"default": false
},
"dnt": {
"type": "boolean",
"description": "Do Not Track è attivo",
"default": false
},
"gpc": {
"type": "boolean",
"description": "Global Privacy Control è attivo",
"default": false
},
"revenue": {
"type": "number",
"description": "Ricavi in unità principali, ad esempio 49.99"
},
"currency": {
"type": "string",
"description": "Valuta ISO 4217 dei ricavi"
}
},
"required": [
"site",
"type",
"url"
]
}
{
"type": "object"
}
POST
/api/events.json
Raccogli eventi lato server con una chiave di ingest del sito
ingest_events
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl -X POST https://privatusanalytics.com/api/events.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"events": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
},
"description": "Fino a 100 eventi"
}
},
"required": [
"events"
]
}
{
"type": "object"
}
GET
/api/pixel.json
Raccogli una visualizzazione di pagina senza JavaScript (GIF 1×1)
ingest_pixel
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl https://privatusanalytics.com/api/pixel.json
{
"type": "object",
"properties": {},
"required": []
}
{
"type": "object"
}
Registro di controllo
GET
/workspaces/:workspace_id/audit_log.json
Elenca le voci del registro di controllo (aggiungi .csv per esportare)
audit_logs_get
Permesso: workspace.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/audit_log.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"actor": {
"type": "string",
"description": "Solo modifiche di questo membro (email)"
},
"item_type": {
"type": "string",
"description": "Solo questo tipo di record, ad esempio Site"
},
"event": {
"type": "string",
"description": "Solo questa azione",
"enum": [
"create",
"update",
"destroy"
]
},
"from": {
"type": "string",
"format": "date",
"description": "Dalla data (inclusa)"
},
"to": {
"type": "string",
"format": "date",
"description": "Alla data (inclusa)"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Quando"
},
"event": {
"type": "string",
"description": "create, update o destroy"
},
"item_type": {
"type": "string",
"description": "Tipo di record, ad esempio Site"
},
"item_id": {
"type": "string",
"format": "uuid"
},
"target": {
"type": "string",
"description": "Il record, per nome quando noto"
},
"actor_email": {
"anyOf": [
{
"type": "string",
"description": "Membro che ha effettuato la modifica"
},
{
"type": "null"
}
]
},
"actor_name": {
"type": "string"
},
"token_name": {
"anyOf": [
{
"type": "string",
"description": "Token API usato, se presente"
},
{
"type": "null"
}
]
},
"changes": {
"type": "object",
"description": "Campi modificati: { field: [prima, dopo] }"
},
"ip": {
"anyOf": [
{
"type": "string",
"description": "L'indirizzo IP del membro"
},
{
"type": "null"
}
]
}
}
}
}
Regole dei canali
POST
/sites/:site_id/channel_rules.json
Aggiungi una regola del canale
channel_rules_create
Permesso: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/channel_rules.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"channel": {
"type": "string",
"description": "Nome del canale da assegnare, ad esempio Partners"
},
"conditions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"operator": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"description": "Condizioni che devono essere tutte soddisfatte: [{\"field\": \"utm_source\", \"operator\": \"is\", \"value\": \"newsletter\"}]. Campi: referrer_host, utm_source, utm_medium, utm_campaign, ref, path. Operatori: is, contains, starts_with, regex."
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"channel",
"conditions",
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id della regola"
},
"channel": {
"type": "string",
"description": "Canale assegnato quando tutte le condizioni sono soddisfatte"
},
"position": {
"type": "integer",
"description": "Ordine di valutazione (vince la prima corrispondenza)"
},
"conditions": {
"type": "array",
"description": "Condizioni: field, operator, value"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/channel_rules/:id.json
Elimina una regola del canale
channel_rules_delete
Permesso: sites.manage
curl -X DELETE https://privatusanalytics.com/sites/:site_id/channel_rules/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id della regola"
},
"channel": {
"type": "string",
"description": "Canale assegnato quando tutte le condizioni sono soddisfatte"
},
"position": {
"type": "integer",
"description": "Ordine di valutazione (vince la prima corrispondenza)"
},
"conditions": {
"type": "array",
"description": "Condizioni: field, operator, value"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/channel_rules.json
Elenca le regole dei canali in ordine
channel_rules_list
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/channel_rules.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id della regola"
},
"channel": {
"type": "string",
"description": "Canale assegnato quando tutte le condizioni sono soddisfatte"
},
"position": {
"type": "integer",
"description": "Ordine di valutazione (vince la prima corrispondenza)"
},
"conditions": {
"type": "array",
"description": "Condizioni: field, operator, value"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/sites/:site_id/channel_rules/:id/move.json
Sposta una regola del canale in su o in giù
channel_rules_move
Permesso: sites.manage
curl -X PATCH https://privatusanalytics.com/sites/:site_id/channel_rules/:id/move.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"direction": {
"type": "string",
"description": "Dove spostare la regola",
"enum": [
"up",
"down",
"top",
"bottom"
]
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"direction",
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id della regola"
},
"channel": {
"type": "string",
"description": "Canale assegnato quando tutte le condizioni sono soddisfatte"
},
"position": {
"type": "integer",
"description": "Ordine di valutazione (vince la prima corrispondenza)"
},
"conditions": {
"type": "array",
"description": "Condizioni: field, operator, value"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/sites/:site_id/channel_rules/preview.json
Anteprima del canale per un referrer e tag UTM di esempio
channel_rules_preview
Permesso: analytics.read
curl -X POST https://privatusanalytics.com/sites/:site_id/channel_rules/preview.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"referrer": {
"type": "string",
"description": "URL o hostname del referrer"
},
"utm_source": {
"type": "string",
"description": "Valore utm_source"
},
"utm_medium": {
"type": "string",
"description": "Valore utm_medium"
},
"utm_campaign": {
"type": "string",
"description": "Valore utm_campaign"
},
"ref": {
"type": "string",
"description": "Parametro ref / via / source"
},
"path": {
"type": "string",
"description": "Percorso della pagina di destinazione, ad esempio /pricing"
},
"paid_click": {
"type": "boolean",
"description": "L'URL aveva un id di clic come gclid",
"default": false
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
PATCH
/sites/:site_id/channel_rules/:id.json
Modifica una regola del canale
channel_rules_update
Permesso: sites.manage
curl -X PATCH https://privatusanalytics.com/sites/:site_id/channel_rules/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"channel": {
"type": "string",
"description": "Nome del canale da assegnare"
},
"conditions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"operator": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"description": "Condizioni che devono essere tutte soddisfatte: [{\"field\": \"utm_source\", \"operator\": \"is\", \"value\": \"newsletter\"}]. Campi: referrer_host, utm_source, utm_medium, utm_campaign, ref, path. Operatori: is, contains, starts_with, regex."
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id della regola"
},
"channel": {
"type": "string",
"description": "Canale assegnato quando tutte le condizioni sono soddisfatte"
},
"position": {
"type": "integer",
"description": "Ordine di valutazione (vince la prima corrispondenza)"
},
"conditions": {
"type": "array",
"description": "Condizioni: field, operator, value"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
Regole del traffico
POST
/sites/:site_id/traffic_rules.json
Aggiungi una regola del traffico
traffic_rules_create
Permesso: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/traffic_rules.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"list": {
"type": "string",
"description": "hostnames, paths, referrers, countries, ip_ranges, user_agents o events",
"enum": [
"hostnames",
"paths",
"referrers",
"countries",
"ip_ranges",
"user_agents",
"events"
]
},
"pattern": {
"type": "string",
"description": "Valore da far corrispondere. * è un carattere jolly. ip_ranges accetta un IP o CIDR (v4/v6), countries un codice ISO",
"examples": [
"/admin/*"
]
},
"label": {
"type": "string",
"description": "Nota facoltativa, ad esempio \"Ufficio\""
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"list",
"pattern",
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id della regola"
},
"list": {
"type": "string",
"description": "hostnames, paths, referrers, countries, ip_ranges, user_agents o events"
},
"pattern": {
"type": "string",
"description": "Pattern (caratteri jolly *, CIDR per ip_ranges)"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"mode": {
"type": "string",
"description": "block o allow (la modalità del suo elenco)"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/traffic_rules/:id.json
Elimina una regola del traffico
traffic_rules_delete
Permesso: sites.manage
curl -X DELETE https://privatusanalytics.com/sites/:site_id/traffic_rules/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id della regola"
},
"list": {
"type": "string",
"description": "hostnames, paths, referrers, countries, ip_ranges, user_agents o events"
},
"pattern": {
"type": "string",
"description": "Pattern (caratteri jolly *, CIDR per ip_ranges)"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"mode": {
"type": "string",
"description": "block o allow (la modalità del suo elenco)"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/traffic_rules.json
Elenca le regole del traffico
traffic_rules_list
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/traffic_rules.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"list": {
"type": "string",
"description": "Solo regole di questo elenco",
"enum": [
"hostnames",
"paths",
"referrers",
"countries",
"ip_ranges",
"user_agents",
"events"
]
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id della regola"
},
"list": {
"type": "string",
"description": "hostnames, paths, referrers, countries, ip_ranges, user_agents o events"
},
"pattern": {
"type": "string",
"description": "Pattern (caratteri jolly *, CIDR per ip_ranges)"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"mode": {
"type": "string",
"description": "block o allow (la modalità del suo elenco)"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/sites/:site_id/traffic_rules/test.json
Verifica se una visita verrebbe conteggiata con le regole attuali del sito
traffic_rules_test
Permesso: analytics.read
curl -X POST https://privatusanalytics.com/sites/:site_id/traffic_rules/test.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "URL della pagina, ad esempio https://example.com/a"
},
"referrer": {
"type": "string",
"description": "URL o hostname del referrer"
},
"country": {
"type": "string",
"description": "Codice paese ISO, ad esempio US"
},
"ip": {
"type": "string",
"description": "Indirizzo IP da verificare rispetto a ip_ranges (non memorizzato)"
},
"user_agent": {
"type": "string",
"description": "Stringa User-Agent (ridotta a browser e versione principale, come in fase di ingest)"
},
"event": {
"type": "string",
"description": "Nome dell'evento personalizzato"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
PATCH
/sites/:site_id/traffic_rules/:id.json
Modifica una regola del traffico
traffic_rules_update
Permesso: sites.manage
curl -X PATCH https://privatusanalytics.com/sites/:site_id/traffic_rules/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"pattern": {
"type": "string",
"description": "Nuovo pattern"
},
"label": {
"type": "string",
"description": "Nuova etichetta"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id della regola"
},
"list": {
"type": "string",
"description": "hostnames, paths, referrers, countries, ip_ranges, user_agents o events"
},
"pattern": {
"type": "string",
"description": "Pattern (caratteri jolly *, CIDR per ip_ranges)"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"mode": {
"type": "string",
"description": "block o allow (la modalità del suo elenco)"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
Report via email
DELETE
/recipients/:id.json
Rimuovi un destinatario da un report via email
email_report_recipients_delete
Permesso: content.write
curl -X DELETE https://privatusanalytics.com/recipients/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del destinatario, ad es. rcp_7Q2K9XH3AB"
},
"email": {
"type": "string",
"description": "L'indirizzo"
},
"status": {
"type": "string",
"description": "active, pending, declined o unsubscribed"
},
"invited_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando è stato inviato l'ultimo invito"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando scade un invito in sospeso"
},
{
"type": "null"
}
]
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando l'indirizzo è diventato attivo"
},
{
"type": "null"
}
]
}
}
}
GET
/reports/:report_id/recipients.json
Elenca i destinatari di un report via email con il loro stato
email_report_recipients_list
Stati: active (riceve i report), pending (invitato, non ha ancora accettato), declined o unsubscribed. Aggiungi o rimuovi indirizzi tramite l'elenco dei destinatari del report.
Permesso: analytics.read
curl https://privatusanalytics.com/reports/:report_id/recipients.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "Solo i destinatari con questo stato",
"enum": [
"pending",
"active",
"declined",
"unsubscribed"
]
},
"report_id": {
"type": "string",
"description": "Report della risorsa"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"report_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del destinatario, ad es. rcp_7Q2K9XH3AB"
},
"email": {
"type": "string",
"description": "L'indirizzo"
},
"status": {
"type": "string",
"description": "active, pending, declined o unsubscribed"
},
"invited_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando è stato inviato l'ultimo invito"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando scade un invito in sospeso"
},
{
"type": "null"
}
]
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando l'indirizzo è diventato attivo"
},
{
"type": "null"
}
]
}
}
}
}
POST
/recipients/:id/resend.json
Invia di nuovo un invito al report in sospeso
email_report_recipients_resend
Invia di nuovo l'invito con nuovi link. Consentito una volta ogni 7 giorni per indirizzo e per report.
Permesso: content.write
curl -X POST https://privatusanalytics.com/recipients/:id/resend.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del destinatario, ad es. rcp_7Q2K9XH3AB"
},
"email": {
"type": "string",
"description": "L'indirizzo"
},
"status": {
"type": "string",
"description": "active, pending, declined o unsubscribed"
},
"invited_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando è stato inviato l'ultimo invito"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando scade un invito in sospeso"
},
{
"type": "null"
}
]
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando l'indirizzo è diventato attivo"
},
{
"type": "null"
}
]
}
}
}
POST
/workspaces/:workspace_id/reports.json
Crea un report via email
email_reports_create
Permesso: content.write
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/reports.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei siti (pa_…) inclusi nel report"
},
"frequency": {
"type": "string",
"description": "daily, weekly (nel giorno della settimana) o monthly (il giorno 1)",
"enum": [
"daily",
"weekly",
"monthly"
]
},
"hour": {
"type": "integer",
"description": "Ora del giorno di invio (da 0 a 23, fuso orario del workspace)"
},
"weekday": {
"type": "integer",
"description": "Report settimanali: 0 = domenica … 6 = sabato"
},
"recipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "Indirizzi email (non serve un account). Le voci possono essere separate da virgole o da ritorni a capo. I membri del workspace vengono aggiunti subito. Tutti gli altri ricevono un invito e ricevono i report solo dopo averlo accettato. Gli indirizzi che hanno annullato l'iscrizione ai report vengono rifiutati"
},
"blocks": {
"type": "array",
"items": {
"type": "string"
},
"description": "Contenuto: kpis, chart, pages, sources, goals, campaigns, vitals, uptime"
},
"attach_pdf": {
"type": "boolean",
"description": "Allega una versione PDF"
},
"intro": {
"type": "string",
"description": "Testo introduttivo personalizzato (massimo 2000 caratteri)"
},
"enabled": {
"type": "boolean",
"description": "Invia secondo la programmazione"
},
"name": {
"type": "string",
"description": "Nome del report",
"examples": [
"Weekly traffic"
]
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"name",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del report, ad esempio rep_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei siti nel report"
},
"frequency": {
"type": "string",
"description": "daily, weekly o monthly"
},
"hour": {
"type": "integer",
"description": "Ora di invio (fuso orario del workspace)"
},
"weekday": {
"type": "integer",
"description": "Settimanale: 0 = domenica … 6 = sabato"
},
"recipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "Tutti gli indirizzi del report, qualunque sia il loro stato"
},
"recipient_details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del destinatario, ad es. rcp_7Q2K9XH3AB"
},
"email": {
"type": "string",
"description": "L'indirizzo"
},
"status": {
"type": "string",
"description": "active, pending, declined o unsubscribed"
},
"invited_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando è stato inviato l'ultimo invito"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando scade un invito in sospeso"
},
{
"type": "null"
}
]
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando l'indirizzo è diventato attivo"
},
{
"type": "null"
}
]
}
}
},
"description": "Ogni destinatario con il suo stato di adesione (solo i destinatari attivi ricevono i report)"
},
"blocks": {
"type": "array",
"items": {
"type": "string"
},
"description": "Blocchi di contenuto"
},
"attach_pdf": {
"type": "boolean"
},
"intro": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"enabled": {
"type": "boolean"
},
"last_sent_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/reports/:id/deliveries.json
Registro degli invii di un report via email
email_reports_deliveries
Permesso: analytics.read
curl https://privatusanalytics.com/reports/:id/deliveries.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "Solo invii con questo stato",
"enum": [
"sent",
"test",
"failed",
"skipped"
]
},
"id": {
"type": "string",
"description": "Id della risorsa"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "sent, test, failed o skipped"
},
"recipients_count": {
"type": "integer"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sent_at": {
"type": "string",
"format": "date-time"
}
}
}
}
DELETE
/reports/:id.json
Elimina un report via email
email_reports_delete
Permesso: content.write
curl -X DELETE https://privatusanalytics.com/reports/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del report, ad esempio rep_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei siti nel report"
},
"frequency": {
"type": "string",
"description": "daily, weekly o monthly"
},
"hour": {
"type": "integer",
"description": "Ora di invio (fuso orario del workspace)"
},
"weekday": {
"type": "integer",
"description": "Settimanale: 0 = domenica … 6 = sabato"
},
"recipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "Tutti gli indirizzi del report, qualunque sia il loro stato"
},
"recipient_details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del destinatario, ad es. rcp_7Q2K9XH3AB"
},
"email": {
"type": "string",
"description": "L'indirizzo"
},
"status": {
"type": "string",
"description": "active, pending, declined o unsubscribed"
},
"invited_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando è stato inviato l'ultimo invito"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando scade un invito in sospeso"
},
{
"type": "null"
}
]
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando l'indirizzo è diventato attivo"
},
{
"type": "null"
}
]
}
}
},
"description": "Ogni destinatario con il suo stato di adesione (solo i destinatari attivi ricevono i report)"
},
"blocks": {
"type": "array",
"items": {
"type": "string"
},
"description": "Blocchi di contenuto"
},
"attach_pdf": {
"type": "boolean"
},
"intro": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"enabled": {
"type": "boolean"
},
"last_sent_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/reports.json
Elenca i report via email
email_reports_list
Permesso: analytics.read
curl https://privatusanalytics.com/workspaces/:workspace_id/reports.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"frequency": {
"type": "string",
"description": "Solo report con questa frequenza",
"enum": [
"daily",
"weekly",
"monthly"
]
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del report, ad esempio rep_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei siti nel report"
},
"frequency": {
"type": "string",
"description": "daily, weekly o monthly"
},
"hour": {
"type": "integer",
"description": "Ora di invio (fuso orario del workspace)"
},
"weekday": {
"type": "integer",
"description": "Settimanale: 0 = domenica … 6 = sabato"
},
"recipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "Tutti gli indirizzi del report, qualunque sia il loro stato"
},
"recipient_details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del destinatario, ad es. rcp_7Q2K9XH3AB"
},
"email": {
"type": "string",
"description": "L'indirizzo"
},
"status": {
"type": "string",
"description": "active, pending, declined o unsubscribed"
},
"invited_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando è stato inviato l'ultimo invito"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando scade un invito in sospeso"
},
{
"type": "null"
}
]
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando l'indirizzo è diventato attivo"
},
{
"type": "null"
}
]
}
}
},
"description": "Ogni destinatario con il suo stato di adesione (solo i destinatari attivi ricevono i report)"
},
"blocks": {
"type": "array",
"items": {
"type": "string"
},
"description": "Blocchi di contenuto"
},
"attach_pdf": {
"type": "boolean"
},
"intro": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"enabled": {
"type": "boolean"
},
"last_sent_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
POST
/reports/:id/send_test.json
Invia subito un report via email come prova
email_reports_send_test
Permesso: content.write
curl -X POST https://privatusanalytics.com/reports/:id/send_test.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"recipient": {
"type": "string",
"description": "Invia la prova qui (predefinito: la tua email)"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "sent, test, failed o skipped"
},
"recipients_count": {
"type": "integer"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sent_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/reports/:id.json
Ottieni un report via email
email_reports_get
Permesso: analytics.read
curl https://privatusanalytics.com/reports/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del report, ad esempio rep_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei siti nel report"
},
"frequency": {
"type": "string",
"description": "daily, weekly o monthly"
},
"hour": {
"type": "integer",
"description": "Ora di invio (fuso orario del workspace)"
},
"weekday": {
"type": "integer",
"description": "Settimanale: 0 = domenica … 6 = sabato"
},
"recipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "Tutti gli indirizzi del report, qualunque sia il loro stato"
},
"recipient_details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del destinatario, ad es. rcp_7Q2K9XH3AB"
},
"email": {
"type": "string",
"description": "L'indirizzo"
},
"status": {
"type": "string",
"description": "active, pending, declined o unsubscribed"
},
"invited_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando è stato inviato l'ultimo invito"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando scade un invito in sospeso"
},
{
"type": "null"
}
]
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando l'indirizzo è diventato attivo"
},
{
"type": "null"
}
]
}
}
},
"description": "Ogni destinatario con il suo stato di adesione (solo i destinatari attivi ricevono i report)"
},
"blocks": {
"type": "array",
"items": {
"type": "string"
},
"description": "Blocchi di contenuto"
},
"attach_pdf": {
"type": "boolean"
},
"intro": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"enabled": {
"type": "boolean"
},
"last_sent_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/reports/:id.json
Aggiorna un report via email
email_reports_update
Permesso: content.write
curl -X PATCH https://privatusanalytics.com/reports/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei siti (pa_…) inclusi nel report"
},
"frequency": {
"type": "string",
"description": "daily, weekly (nel giorno della settimana) o monthly (il giorno 1)",
"enum": [
"daily",
"weekly",
"monthly"
]
},
"hour": {
"type": "integer",
"description": "Ora del giorno di invio (da 0 a 23, fuso orario del workspace)"
},
"weekday": {
"type": "integer",
"description": "Report settimanali: 0 = domenica … 6 = sabato"
},
"recipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "Indirizzi email (non serve un account). Le voci possono essere separate da virgole o da ritorni a capo. I membri del workspace vengono aggiunti subito. Tutti gli altri ricevono un invito e ricevono i report solo dopo averlo accettato. Gli indirizzi che hanno annullato l'iscrizione ai report vengono rifiutati"
},
"blocks": {
"type": "array",
"items": {
"type": "string"
},
"description": "Contenuto: kpis, chart, pages, sources, goals, campaigns, vitals, uptime"
},
"attach_pdf": {
"type": "boolean",
"description": "Allega una versione PDF"
},
"intro": {
"type": "string",
"description": "Testo introduttivo personalizzato (massimo 2000 caratteri)"
},
"enabled": {
"type": "boolean",
"description": "Invia secondo la programmazione"
},
"name": {
"type": "string",
"description": "Nome del report"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del report, ad esempio rep_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Id dei siti nel report"
},
"frequency": {
"type": "string",
"description": "daily, weekly o monthly"
},
"hour": {
"type": "integer",
"description": "Ora di invio (fuso orario del workspace)"
},
"weekday": {
"type": "integer",
"description": "Settimanale: 0 = domenica … 6 = sabato"
},
"recipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "Tutti gli indirizzi del report, qualunque sia il loro stato"
},
"recipient_details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del destinatario, ad es. rcp_7Q2K9XH3AB"
},
"email": {
"type": "string",
"description": "L'indirizzo"
},
"status": {
"type": "string",
"description": "active, pending, declined o unsubscribed"
},
"invited_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando è stato inviato l'ultimo invito"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando scade un invito in sospeso"
},
{
"type": "null"
}
]
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando l'indirizzo è diventato attivo"
},
{
"type": "null"
}
]
}
}
},
"description": "Ogni destinatario con il suo stato di adesione (solo i destinatari attivi ricevono i report)"
},
"blocks": {
"type": "array",
"items": {
"type": "string"
},
"description": "Blocchi di contenuto"
},
"attach_pdf": {
"type": "boolean"
},
"intro": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"enabled": {
"type": "boolean"
},
"last_sent_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/reports/invites/:token/accept.json
Accetta un invito a un report
report_invites_accept
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl -X POST https://privatusanalytics.com/reports/invites/:token/accept.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Token della risorsa"
}
},
"required": [
"token"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del destinatario, ad es. rcp_7Q2K9XH3AB"
},
"email": {
"type": "string",
"description": "L'indirizzo"
},
"status": {
"type": "string",
"description": "active, pending, declined o unsubscribed"
},
"invited_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando è stato inviato l'ultimo invito"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando scade un invito in sospeso"
},
{
"type": "null"
}
]
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando l'indirizzo è diventato attivo"
},
{
"type": "null"
}
]
}
}
}
POST
/reports/invites/:token/decline.json
Rifiuta un invito a un report
report_invites_decline
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl -X POST https://privatusanalytics.com/reports/invites/:token/decline.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Token della risorsa"
}
},
"required": [
"token"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del destinatario, ad es. rcp_7Q2K9XH3AB"
},
"email": {
"type": "string",
"description": "L'indirizzo"
},
"status": {
"type": "string",
"description": "active, pending, declined o unsubscribed"
},
"invited_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando è stato inviato l'ultimo invito"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando scade un invito in sospeso"
},
{
"type": "null"
}
]
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Quando l'indirizzo è diventato attivo"
},
{
"type": "null"
}
]
}
}
}
POST
/reports/resubscribe/:token.json
Ricevi di nuovo i report dopo aver annullato l'iscrizione
report_resubscribes_confirm
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl -X POST https://privatusanalytics.com/reports/resubscribe/:token.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Token della risorsa"
}
},
"required": [
"token"
]
}
{
"type": "object"
}
POST
/reports/unsubscribe/:token/resubscribe.json
Invia a un indirizzo un link per ricevere di nuovo i report
report_resubscribes_create
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl -X POST https://privatusanalytics.com/reports/unsubscribe/:token/resubscribe.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Token della risorsa"
}
},
"required": [
"token"
]
}
{
"type": "object"
}
POST
/reports/unsubscribe/:token.json
Annulla l'iscrizione di un indirizzo a un report via email
report_unsubscribes_create
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl -X POST https://privatusanalytics.com/reports/unsubscribe/:token.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Token della risorsa"
}
},
"required": [
"token"
]
}
{
"type": "object"
}
Ricerca
GET
/sites/:site_id/search.json
Report di ricerca: clic, impressioni, CTR, posizione, query/pagine principali, pagine di destinazione e opportunità
search_report
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/search.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "Intervallo di date predefinito. Usa custom con from/to",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "Inizio dell'intervallo personalizzato (fuso orario del sito)"
},
"to": {
"type": "string",
"format": "date",
"description": "Fine dell'intervallo personalizzato, inclusa"
},
"compare": {
"type": "string",
"description": "Periodo di confronto",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "Inizio del confronto personalizzato"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "Fine del confronto personalizzato"
},
"match_weekday": {
"type": "boolean",
"description": "Allinea i giorni della settimana del confronto",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri: [[\"dimension\",\"operator\",\"value\"], …]. Operatori: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Racchiudi le condizioni in {\"any\": [...]} per OR.",
"default": []
},
"segment_id": {
"type": "string",
"description": "Applica un segmento salvato (seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "Aggiungi i dati storici importati (date precedenti al primo evento nativo, ignorati quando sono applicati filtri o un segmento)",
"default": false
},
"provider": {
"type": "string",
"description": "google (Search Console) o bing",
"enum": [
"google",
"bing"
],
"default": "google"
},
"limit": {
"type": "integer",
"description": "Righe per tabella (massimo 100)",
"default": 25
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
POST
/sites/:site_id/search/connections.json
Collega una proprietà di Search Console o un sito Bing
search_connect
Permesso: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/search/connections.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"provider": {
"type": "string",
"description": "google o bing",
"enum": [
"google",
"bing"
],
"default": "google"
},
"property": {
"type": "string",
"description": "Proprietà di Search Console (ad esempio sc-domain:example.com) o URL del sito Bing",
"examples": [
"sc-domain:example.com"
]
},
"bing_api_key": {
"type": "string",
"description": "La tua chiave API di Bing Webmaster Tools (Settings > API access). Obbligatoria quando provider è bing. Viene memorizzata cifrata e non viene mai restituita."
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"property",
"site_id"
]
}
{
"type": "object",
"properties": {
"provider": {
"type": "string",
"description": "google o bing"
},
"property": {
"type": "string",
"description": "Proprietà di Search Console o URL del sito Bing"
},
"status": {
"type": "string",
"description": "active o error"
},
"last_synced_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/search/connections/:provider.json
Scollega Search Console o Bing ed elimina i suoi dati
search_disconnect
Permesso: sites.manage
curl -X DELETE https://privatusanalytics.com/sites/:site_id/search/connections/:provider.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"provider": {
"type": "string",
"description": "Provider della risorsa"
}
},
"required": [
"site_id",
"provider"
]
}
{
"type": "object",
"properties": {
"provider": {
"type": "string",
"description": "google o bing"
},
"property": {
"type": "string",
"description": "Proprietà di Search Console o URL del sito Bing"
},
"status": {
"type": "string",
"description": "active o error"
},
"last_synced_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/sites/:site_id/search/properties.json
Elenca le proprietà che puoi collegare (Search Console richiede un'autorizzazione Google dal browser)
search_properties
Permesso: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/search/properties.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"provider": {
"type": "string",
"description": "google o bing",
"enum": [
"google",
"bing"
],
"default": "google"
},
"bing_api_key": {
"type": "string",
"description": "La tua chiave API di Bing Webmaster Tools (Settings > API access). Obbligatoria quando provider è bing. Usata solo per elencare i siti che può vedere."
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
POST
/sites/:site_id/search/sync.json
Importa subito i dati di ricerca
search_sync
Permesso: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/search/sync.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"provider": {
"type": "string",
"description": "google o bing",
"enum": [
"google",
"bing"
],
"default": "google"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"provider": {
"type": "string",
"description": "google o bing"
},
"property": {
"type": "string",
"description": "Proprietà di Search Console o URL del sito Bing"
},
"status": {
"type": "string",
"description": "active o error"
},
"last_synced_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
Ruoli
POST
/workspaces/:workspace_id/roles.json
Crea un ruolo personalizzato
roles_create
Permesso: members.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/roles.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome del ruolo",
"examples": [
"Client reviewer"
]
},
"permissions": {
"type": "array",
"items": {
"type": "string",
"enum": [
"analytics.read",
"analytics.export",
"content.write",
"sites.manage",
"uptime.manage",
"members.manage",
"tokens.manage",
"billing.manage",
"workspace.manage"
]
},
"description": "Permessi concessi dal ruolo"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"name",
"permissions",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id del ruolo personalizzato (custom_role_id sui membri)"
},
"name": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
},
"description": "Permessi concessi"
},
"members": {
"type": "integer",
"description": "Membri con questo ruolo"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/workspaces/:workspace_id/roles/:id.json
Elimina un ruolo personalizzato (non deve essere in uso)
roles_delete
Permesso: members.manage
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/roles/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id del ruolo personalizzato (custom_role_id sui membri)"
},
"name": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
},
"description": "Permessi concessi"
},
"members": {
"type": "integer",
"description": "Membri con questo ruolo"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/roles.json
Elenca i ruoli personalizzati
roles_list
Permesso: member
curl https://privatusanalytics.com/workspaces/:workspace_id/roles.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id del ruolo personalizzato (custom_role_id sui membri)"
},
"name": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
},
"description": "Permessi concessi"
},
"members": {
"type": "integer",
"description": "Membri con questo ruolo"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
PATCH
/workspaces/:workspace_id/roles/:id.json
Aggiorna un ruolo personalizzato
roles_update
Permesso: members.manage
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/roles/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome del ruolo"
},
"permissions": {
"type": "array",
"items": {
"type": "string",
"enum": [
"analytics.read",
"analytics.export",
"content.write",
"sites.manage",
"uptime.manage",
"members.manage",
"tokens.manage",
"billing.manage",
"workspace.manage"
]
},
"description": "Permessi concessi dal ruolo"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Id del ruolo personalizzato (custom_role_id sui membri)"
},
"name": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
},
"description": "Permessi concessi"
},
"members": {
"type": "integer",
"description": "Membri con questo ruolo"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
SCIM
POST
/scim/v2/Users.json
Effettua il provisioning di un utente
scim_users_create
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl -X POST https://privatusanalytics.com/scim/v2/Users.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"userName": {
"type": "string",
"description": "Indirizzo email"
},
"name": {
"type": "object",
"additionalProperties": true,
"description": "givenName, familyName, formatted",
"default": {}
},
"active": {
"type": "boolean",
"description": "Membro del workspace",
"default": true
}
},
"required": [
"userName"
]
}
{
"type": "object"
}
DELETE
/scim/v2/Users/:id.json
Effettua il deprovisioning di un utente
scim_users_delete
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl -X DELETE https://privatusanalytics.com/scim/v2/Users/:id.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object"
}
GET
/scim/v2/Users.json
Elenca gli utenti di cui è stato effettuato il provisioning
scim_users_list
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl https://privatusanalytics.com/scim/v2/Users.json
{
"type": "object",
"properties": {
"scim_filter": {
"type": "string",
"description": "Filtro SCIM (parametro di query `filter`), ad esempio userName eq \"[email protected]\""
},
"startIndex": {
"type": "integer",
"description": "Indice del primo risultato, a partire da 1",
"default": 1
},
"count": {
"type": "integer",
"description": "Dimensione della pagina (massimo 200)",
"default": 100
}
},
"required": []
}
{
"type": "object"
}
GET
/scim/v2/Users/:id.json
Ottieni un utente di cui è stato effettuato il provisioning
scim_users_get
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl https://privatusanalytics.com/scim/v2/Users/:id.json
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object"
}
PATCH
/scim/v2/Users/:id.json
Aggiorna un utente (PATCH active, name)
scim_users_update
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl -X PATCH https://privatusanalytics.com/scim/v2/Users/:id.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"Operations": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
},
"description": "Operazioni SCIM PatchOp"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"Operations",
"id"
]
}
{
"type": "object"
}
SSO
POST
/workspaces/:workspace_id/sso/activate.json
Attiva una configurazione SSO testata
sso_activate
Permesso: workspace.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/sso/activate.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "saml o oidc"
},
"status": {
"type": "string",
"description": "draft, testing, tested o active"
},
"enforced": {
"type": "boolean",
"description": "SSO è l'unico modo di accedere (proprietario escluso)"
},
"domains": {
"type": "array",
"items": {
"type": "string"
},
"description": "Domini email verificati"
},
"idp_sso_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"idp_entity_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"idp_cert_present": {
"type": "boolean"
},
"oidc_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"oidc_client_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"oidc_client_secret_present": {
"type": "boolean"
},
"default_role": {
"type": "string"
},
"jit_provisioning": {
"type": "boolean"
},
"scim_enabled": {
"type": "boolean"
}
}
}
POST
/workspaces/:workspace_id/sso/deactivate.json
Disattiva SSO (torna a bozza)
sso_deactivate
Permesso: workspace.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/sso/deactivate.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "saml o oidc"
},
"status": {
"type": "string",
"description": "draft, testing, tested o active"
},
"enforced": {
"type": "boolean",
"description": "SSO è l'unico modo di accedere (proprietario escluso)"
},
"domains": {
"type": "array",
"items": {
"type": "string"
},
"description": "Domini email verificati"
},
"idp_sso_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"idp_entity_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"idp_cert_present": {
"type": "boolean"
},
"oidc_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"oidc_client_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"oidc_client_secret_present": {
"type": "boolean"
},
"default_role": {
"type": "string"
},
"jit_provisioning": {
"type": "boolean"
},
"scim_enabled": {
"type": "boolean"
}
}
}
POST
/workspaces/:workspace_id/sso/scim_token.json
Genera un nuovo token SCIM (mostrato una sola volta)
sso_scim_token
Permesso: workspace.manage
· Solo HTTP (non è uno strumento MCP)
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/sso/scim_token.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object"
}
GET
/workspaces/:workspace_id/sso.json
Ottieni le impostazioni SSO
sso_get
Permesso: workspace.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/sso.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "saml o oidc"
},
"status": {
"type": "string",
"description": "draft, testing, tested o active"
},
"enforced": {
"type": "boolean",
"description": "SSO è l'unico modo di accedere (proprietario escluso)"
},
"domains": {
"type": "array",
"items": {
"type": "string"
},
"description": "Domini email verificati"
},
"idp_sso_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"idp_entity_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"idp_cert_present": {
"type": "boolean"
},
"oidc_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"oidc_client_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"oidc_client_secret_present": {
"type": "boolean"
},
"default_role": {
"type": "string"
},
"jit_provisioning": {
"type": "boolean"
},
"scim_enabled": {
"type": "boolean"
}
}
}
PATCH
/workspaces/:workspace_id/sso.json
Crea o aggiorna le impostazioni SSO
sso_update
Permesso: workspace.manage
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/sso.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "saml o oidc",
"enum": [
"saml",
"oidc"
]
},
"idp_sso_url": {
"type": "string",
"description": "SAML: URL di single sign-on dell'IdP"
},
"idp_entity_id": {
"type": "string",
"description": "SAML: id entità dell'IdP (issuer)"
},
"idp_cert": {
"type": "string",
"description": "SAML: certificato di firma X.509 dell'IdP (PEM)"
},
"oidc_issuer": {
"type": "string",
"description": "OIDC: URL dell'issuer (discovery)"
},
"oidc_client_id": {
"type": "string",
"description": "OIDC: id del client"
},
"oidc_client_secret": {
"type": "string",
"description": "OIDC: segreto del client (sola scrittura)"
},
"domains": {
"type": "array",
"items": {
"type": "string"
},
"description": "Domini email verificati che usano questo SSO"
},
"default_role": {
"type": "string",
"description": "Ruolo per i membri creati tramite JIT o SCIM",
"enum": [
"admin",
"editor",
"analyst",
"viewer",
"billing"
]
},
"jit_provisioning": {
"type": "boolean",
"description": "Crea i membri al primo accesso SSO"
},
"enforced": {
"type": "boolean",
"description": "Consenti solo accessi SSO (richiede una configurazione attiva)"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "saml o oidc"
},
"status": {
"type": "string",
"description": "draft, testing, tested o active"
},
"enforced": {
"type": "boolean",
"description": "SSO è l'unico modo di accedere (proprietario escluso)"
},
"domains": {
"type": "array",
"items": {
"type": "string"
},
"description": "Domini email verificati"
},
"idp_sso_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"idp_entity_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"idp_cert_present": {
"type": "boolean"
},
"oidc_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"oidc_client_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"oidc_client_secret_present": {
"type": "boolean"
},
"default_role": {
"type": "string"
},
"jit_provisioning": {
"type": "boolean"
},
"scim_enabled": {
"type": "boolean"
}
}
}
Segmenti
POST
/sites/:site_id/segments.json
Salva i filtri come segmento
segments_create
Permesso: content.write
curl -X POST https://privatusanalytics.com/sites/:site_id/segments.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome del segmento, ad es. \"Visitatori da mobile provenienti dagli annunci\"",
"examples": [
"Mobile visitors from ads"
]
},
"description": {
"type": "string",
"description": "Nota facoltativa sullo scopo del segmento (massimo 300 caratteri)",
"examples": [
"People who might buy the Pro plan"
]
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri, che devono corrispondere tutti. Ogni elemento è una condizione [\"dimension\", \"operator\", \"value\"], oppure {\"any\": [condizioni]} quando basta che ne corrisponda una fra più. Dimensioni: page, entry_page, exit_page, hostname, channel, referrer, referrer_url, ref, utm_source, utm_medium, utm_campaign, utm_content, utm_term, country (codice ISO, ad es. US), language, device (desktop, mobile, tablet, tv, other), browser, browser_version, os, os_version, screen, goal (id dell'obiettivo), event (nome dell'evento personalizzato) e prop:<key> (proprietà dell'evento personalizzato). Operatori: is, is_not, contains, not_contains, starts_with, regex, not_regex, any_of e none_of (il valore è un elenco), gt e lt (un numero), between (un elenco di due numeri). Sono accettate anche le righe del modulo dei segmenti: {\"dimension\", \"operator\", \"value\", \"property\" (per la dimensione prop), \"join\": \"and\" o \"or\" (or combina la riga con quella precedente)}. Esempio: [[\"country\", \"is\", \"US\"], [\"device\", \"is\", \"mobile\"], {\"any\": [[\"page\", \"starts_with\", \"/pricing\"], [\"goal\", \"is\", \"goal_7Q2K9XH3AB\"]]}]",
"examples": [
[
[
"country",
"is",
"US"
],
[
"device",
"is",
"mobile"
],
{
"any": [
[
"page",
"starts_with",
"/pricing"
],
[
"goal",
"is",
"goal_7Q2K9XH3AB"
]
]
}
]
]
},
"shared": {
"type": "boolean",
"description": "Visibile a tutti coloro che hanno accesso al sito (false: solo tu)",
"default": true
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"name",
"filters",
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del segmento, ad esempio seg_7Q2K9XH3AB"
},
"site_id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string",
"description": "Lo scopo del segmento, oppure null"
},
{
"type": "null"
}
]
},
"filters": {
"type": "array",
"description": "Filtri nel formato dei filtri delle statistiche: condizioni [\"dimension\", \"operator\", \"value\"] che devono corrispondere tutte, e gruppi {\"any\": [condizioni]}"
},
"summary": {
"type": "string",
"description": "I filtri in linguaggio naturale, ad es. \"Visitatori dagli Stati Uniti su mobile che hanno visto /pricing\""
},
"shared": {
"type": "boolean",
"description": "Visibile a tutti coloro che hanno accesso al sito"
},
"mine": {
"type": "boolean",
"description": "Creato da te"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/segments/:id.json
Elimina un segmento
segments_delete
Permesso: content.write
curl -X DELETE https://privatusanalytics.com/sites/:site_id/segments/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del segmento, ad esempio seg_7Q2K9XH3AB"
},
"site_id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string",
"description": "Lo scopo del segmento, oppure null"
},
{
"type": "null"
}
]
},
"filters": {
"type": "array",
"description": "Filtri nel formato dei filtri delle statistiche: condizioni [\"dimension\", \"operator\", \"value\"] che devono corrispondere tutte, e gruppi {\"any\": [condizioni]}"
},
"summary": {
"type": "string",
"description": "I filtri in linguaggio naturale, ad es. \"Visitatori dagli Stati Uniti su mobile che hanno visto /pricing\""
},
"shared": {
"type": "boolean",
"description": "Visibile a tutti coloro che hanno accesso al sito"
},
"mine": {
"type": "boolean",
"description": "Creato da te"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/segments.json
Elenca i segmenti che puoi usare su un sito
segments_list
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/segments.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del segmento, ad esempio seg_7Q2K9XH3AB"
},
"site_id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string",
"description": "Lo scopo del segmento, oppure null"
},
{
"type": "null"
}
]
},
"filters": {
"type": "array",
"description": "Filtri nel formato dei filtri delle statistiche: condizioni [\"dimension\", \"operator\", \"value\"] che devono corrispondere tutte, e gruppi {\"any\": [condizioni]}"
},
"summary": {
"type": "string",
"description": "I filtri in linguaggio naturale, ad es. \"Visitatori dagli Stati Uniti su mobile che hanno visto /pricing\""
},
"shared": {
"type": "boolean",
"description": "Visibile a tutti coloro che hanno accesso al sito"
},
"mine": {
"type": "boolean",
"description": "Creato da te"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
}
POST
/sites/:site_id/segments/preview.json
Descrive i filtri in linguaggio naturale e conta i visitatori corrispondenti negli ultimi 30 giorni
segments_preview
Permesso: analytics.read
curl -X POST https://privatusanalytics.com/sites/:site_id/segments/preview.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"filters": {
"type": "array",
"items": {},
"description": "Filtri, che devono corrispondere tutti. Ogni elemento è una condizione [\"dimension\", \"operator\", \"value\"], oppure {\"any\": [condizioni]} quando basta che ne corrisponda una fra più. Dimensioni: page, entry_page, exit_page, hostname, channel, referrer, referrer_url, ref, utm_source, utm_medium, utm_campaign, utm_content, utm_term, country (codice ISO, ad es. US), language, device (desktop, mobile, tablet, tv, other), browser, browser_version, os, os_version, screen, goal (id dell'obiettivo), event (nome dell'evento personalizzato) e prop:<key> (proprietà dell'evento personalizzato). Operatori: is, is_not, contains, not_contains, starts_with, regex, not_regex, any_of e none_of (il valore è un elenco), gt e lt (un numero), between (un elenco di due numeri). Sono accettate anche le righe del modulo dei segmenti: {\"dimension\", \"operator\", \"value\", \"property\" (per la dimensione prop), \"join\": \"and\" o \"or\" (or combina la riga con quella precedente)}. Esempio: [[\"country\", \"is\", \"US\"], [\"device\", \"is\", \"mobile\"], {\"any\": [[\"page\", \"starts_with\", \"/pricing\"], [\"goal\", \"is\", \"goal_7Q2K9XH3AB\"]]}]",
"examples": [
[
[
"country",
"is",
"US"
],
[
"device",
"is",
"mobile"
],
{
"any": [
[
"page",
"starts_with",
"/pricing"
],
[
"goal",
"is",
"goal_7Q2K9XH3AB"
]
]
}
]
],
"default": []
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/segments/:id.json
Ottieni un segmento
segments_get
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/segments/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del segmento, ad esempio seg_7Q2K9XH3AB"
},
"site_id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string",
"description": "Lo scopo del segmento, oppure null"
},
{
"type": "null"
}
]
},
"filters": {
"type": "array",
"description": "Filtri nel formato dei filtri delle statistiche: condizioni [\"dimension\", \"operator\", \"value\"] che devono corrispondere tutte, e gruppi {\"any\": [condizioni]}"
},
"summary": {
"type": "string",
"description": "I filtri in linguaggio naturale, ad es. \"Visitatori dagli Stati Uniti su mobile che hanno visto /pricing\""
},
"shared": {
"type": "boolean",
"description": "Visibile a tutti coloro che hanno accesso al sito"
},
"mine": {
"type": "boolean",
"description": "Creato da te"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/sites/:site_id/segments/:id.json
Rinomina un segmento o cambia i suoi filtri o la condivisione
segments_update
Permesso: content.write
curl -X PATCH https://privatusanalytics.com/sites/:site_id/segments/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome del segmento"
},
"description": {
"type": "string",
"description": "Nota facoltativa sullo scopo del segmento (massimo 300 caratteri, vuota per cancellarla)"
},
"filters": {
"type": "array",
"items": {},
"description": "Filtri sostitutivi, nello stesso formato usato per la creazione. Filtri, che devono corrispondere tutti. Ogni elemento è una condizione [\"dimension\", \"operator\", \"value\"], oppure {\"any\": [condizioni]} quando basta che ne corrisponda una fra più. Dimensioni: page, entry_page, exit_page, hostname, channel, referrer, referrer_url, ref, utm_source, utm_medium, utm_campaign, utm_content, utm_term, country (codice ISO, ad es. US), language, device (desktop, mobile, tablet, tv, other), browser, browser_version, os, os_version, screen, goal (id dell'obiettivo), event (nome dell'evento personalizzato) e prop:<key> (proprietà dell'evento personalizzato). Operatori: is, is_not, contains, not_contains, starts_with, regex, not_regex, any_of e none_of (il valore è un elenco), gt e lt (un numero), between (un elenco di due numeri). Sono accettate anche le righe del modulo dei segmenti: {\"dimension\", \"operator\", \"value\", \"property\" (per la dimensione prop), \"join\": \"and\" o \"or\" (or combina la riga con quella precedente)}. Esempio: [[\"country\", \"is\", \"US\"], [\"device\", \"is\", \"mobile\"], {\"any\": [[\"page\", \"starts_with\", \"/pricing\"], [\"goal\", \"is\", \"goal_7Q2K9XH3AB\"]]}]",
"examples": [
[
[
"country",
"is",
"US"
],
[
"device",
"is",
"mobile"
],
{
"any": [
[
"page",
"starts_with",
"/pricing"
],
[
"goal",
"is",
"goal_7Q2K9XH3AB"
]
]
}
]
]
},
"shared": {
"type": "boolean",
"description": "Visibile a tutti sul sito"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del segmento, ad esempio seg_7Q2K9XH3AB"
},
"site_id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string",
"description": "Lo scopo del segmento, oppure null"
},
{
"type": "null"
}
]
},
"filters": {
"type": "array",
"description": "Filtri nel formato dei filtri delle statistiche: condizioni [\"dimension\", \"operator\", \"value\"] che devono corrispondere tutte, e gruppi {\"any\": [condizioni]}"
},
"summary": {
"type": "string",
"description": "I filtri in linguaggio naturale, ad es. \"Visitatori dagli Stati Uniti su mobile che hanno visto /pricing\""
},
"shared": {
"type": "boolean",
"description": "Visibile a tutti coloro che hanno accesso al sito"
},
"mine": {
"type": "boolean",
"description": "Creato da te"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
Sincronizzazione del warehouse
POST
/workspaces/:workspace_id/warehouses.json
Aggiungi una destinazione warehouse
warehouse_destinations_create
Permesso: workspace.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/warehouses.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome visualizzato, ad esempio Data lake"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Siti da inviare (pa_…). Vuoto invia tutti i siti"
},
"bucket": {
"type": "string",
"description": "s3: nome del bucket"
},
"region": {
"type": "string",
"description": "s3: regione, ad esempio us-east-1 (auto per R2)"
},
"prefix": {
"type": "string",
"description": "s3/azure: prefisso del percorso, ad esempio privatus/events"
},
"endpoint": {
"type": "string",
"description": "s3: endpoint https per storage compatibile con S3 (interoperabilità GCS, R2, MinIO)"
},
"access_key_id": {
"type": "string",
"description": "s3: id della chiave di accesso"
},
"secret_access_key": {
"type": "string",
"description": "s3: chiave di accesso segreta (sola scrittura)"
},
"service_account_json": {
"type": "string",
"description": "bigquery: chiave JSON dell'account di servizio con BigQuery Data Editor (sola scrittura)"
},
"project_id": {
"type": "string",
"description": "bigquery: id del progetto (predefinito: dalla chiave)"
},
"dataset": {
"type": "string",
"description": "bigquery: id del dataset"
},
"table": {
"type": "string",
"description": "bigquery/snowflake: nome della tabella (colonne: schema v1)"
},
"account": {
"type": "string",
"description": "snowflake: identificatore dell'account, ad esempio xy12345.us-east-1 o myorg-myaccount"
},
"user": {
"type": "string",
"description": "snowflake: utente con autenticazione a coppia di chiavi"
},
"private_key": {
"type": "string",
"description": "snowflake: chiave privata RSA PEM (sola scrittura)"
},
"database": {
"type": "string",
"description": "snowflake: database"
},
"schema": {
"type": "string",
"description": "snowflake: schema"
},
"warehouse": {
"type": "string",
"description": "snowflake: virtual warehouse"
},
"role": {
"type": "string",
"description": "snowflake: ruolo (facoltativo)"
},
"sas_url": {
"type": "string",
"description": "azure: URL SAS del container con permesso di creazione/scrittura (sola scrittura)"
},
"kind": {
"type": "string",
"description": "s3 (anche GCS/R2/MinIO), bigquery, snowflake o azure",
"enum": [
"s3",
"bigquery",
"snowflake",
"azure"
]
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"kind",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della destinazione, ad esempio whd_7Q2K9XH3AB"
},
"kind": {
"type": "string",
"description": "s3, bigquery, snowflake o azure"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "Dove vanno i dati: s3://bucket/prefix, project.dataset.table, account/database.schema.table oppure il container Azure"
},
"configured": {
"type": "array",
"items": {
"type": "string"
},
"description": "Nomi delle impostazioni compilate (i valori non vengono mai restituiti)"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Siti inviati (pa_…). Vuoto significa tutti i siti"
},
"schedule": {
"type": "string",
"description": "daily: 02:00 UTC, invia il giorno UTC precedente"
},
"schema_version": {
"type": "string",
"description": "Schema delle righe inviate"
},
"last_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/warehouses/:id.json
Elimina una destinazione warehouse
warehouse_destinations_delete
Permesso: workspace.manage
curl -X DELETE https://privatusanalytics.com/warehouses/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della destinazione, ad esempio whd_7Q2K9XH3AB"
},
"kind": {
"type": "string",
"description": "s3, bigquery, snowflake o azure"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "Dove vanno i dati: s3://bucket/prefix, project.dataset.table, account/database.schema.table oppure il container Azure"
},
"configured": {
"type": "array",
"items": {
"type": "string"
},
"description": "Nomi delle impostazioni compilate (i valori non vengono mai restituiti)"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Siti inviati (pa_…). Vuoto significa tutti i siti"
},
"schedule": {
"type": "string",
"description": "daily: 02:00 UTC, invia il giorno UTC precedente"
},
"schema_version": {
"type": "string",
"description": "Schema delle righe inviate"
},
"last_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/warehouses.json
Elenca le destinazioni warehouse
warehouse_destinations_list
Permesso: workspace.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/warehouses.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "Solo destinazioni di questo tipo",
"enum": [
"s3",
"bigquery",
"snowflake",
"azure"
]
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della destinazione, ad esempio whd_7Q2K9XH3AB"
},
"kind": {
"type": "string",
"description": "s3, bigquery, snowflake o azure"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "Dove vanno i dati: s3://bucket/prefix, project.dataset.table, account/database.schema.table oppure il container Azure"
},
"configured": {
"type": "array",
"items": {
"type": "string"
},
"description": "Nomi delle impostazioni compilate (i valori non vengono mai restituiti)"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Siti inviati (pa_…). Vuoto significa tutti i siti"
},
"schedule": {
"type": "string",
"description": "daily: 02:00 UTC, invia il giorno UTC precedente"
},
"schema_version": {
"type": "string",
"description": "Schema delle righe inviate"
},
"last_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/warehouses/:id.json
Ottieni una destinazione warehouse (senza segreti)
warehouse_destinations_get
Permesso: workspace.manage
curl https://privatusanalytics.com/warehouses/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della destinazione, ad esempio whd_7Q2K9XH3AB"
},
"kind": {
"type": "string",
"description": "s3, bigquery, snowflake o azure"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "Dove vanno i dati: s3://bucket/prefix, project.dataset.table, account/database.schema.table oppure il container Azure"
},
"configured": {
"type": "array",
"items": {
"type": "string"
},
"description": "Nomi delle impostazioni compilate (i valori non vengono mai restituiti)"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Siti inviati (pa_…). Vuoto significa tutti i siti"
},
"schedule": {
"type": "string",
"description": "daily: 02:00 UTC, invia il giorno UTC precedente"
},
"schema_version": {
"type": "string",
"description": "Schema delle righe inviate"
},
"last_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/warehouses/:id/sync.json
Metti in coda subito la sincronizzazione di un giorno
warehouse_destinations_sync
Permesso: workspace.manage
curl -X POST https://privatusanalytics.com/warehouses/:id/sync.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Giorno UTC da inviare, ad esempio 2026-09-28 (predefinito: ieri)"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della destinazione, ad esempio whd_7Q2K9XH3AB"
},
"kind": {
"type": "string",
"description": "s3, bigquery, snowflake o azure"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "Dove vanno i dati: s3://bucket/prefix, project.dataset.table, account/database.schema.table oppure il container Azure"
},
"configured": {
"type": "array",
"items": {
"type": "string"
},
"description": "Nomi delle impostazioni compilate (i valori non vengono mai restituiti)"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Siti inviati (pa_…). Vuoto significa tutti i siti"
},
"schedule": {
"type": "string",
"description": "daily: 02:00 UTC, invia il giorno UTC precedente"
},
"schema_version": {
"type": "string",
"description": "Schema delle righe inviate"
},
"last_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/warehouses/:id.json
Aggiorna una destinazione warehouse (i segreti lasciati vuoti vengono conservati)
warehouse_destinations_update
Permesso: workspace.manage
curl -X PATCH https://privatusanalytics.com/warehouses/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome visualizzato, ad esempio Data lake"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Siti da inviare (pa_…). Vuoto invia tutti i siti"
},
"bucket": {
"type": "string",
"description": "s3: nome del bucket"
},
"region": {
"type": "string",
"description": "s3: regione, ad esempio us-east-1 (auto per R2)"
},
"prefix": {
"type": "string",
"description": "s3/azure: prefisso del percorso, ad esempio privatus/events"
},
"endpoint": {
"type": "string",
"description": "s3: endpoint https per storage compatibile con S3 (interoperabilità GCS, R2, MinIO)"
},
"access_key_id": {
"type": "string",
"description": "s3: id della chiave di accesso"
},
"secret_access_key": {
"type": "string",
"description": "s3: chiave di accesso segreta (sola scrittura)"
},
"service_account_json": {
"type": "string",
"description": "bigquery: chiave JSON dell'account di servizio con BigQuery Data Editor (sola scrittura)"
},
"project_id": {
"type": "string",
"description": "bigquery: id del progetto (predefinito: dalla chiave)"
},
"dataset": {
"type": "string",
"description": "bigquery: id del dataset"
},
"table": {
"type": "string",
"description": "bigquery/snowflake: nome della tabella (colonne: schema v1)"
},
"account": {
"type": "string",
"description": "snowflake: identificatore dell'account, ad esempio xy12345.us-east-1 o myorg-myaccount"
},
"user": {
"type": "string",
"description": "snowflake: utente con autenticazione a coppia di chiavi"
},
"private_key": {
"type": "string",
"description": "snowflake: chiave privata RSA PEM (sola scrittura)"
},
"database": {
"type": "string",
"description": "snowflake: database"
},
"schema": {
"type": "string",
"description": "snowflake: schema"
},
"warehouse": {
"type": "string",
"description": "snowflake: virtual warehouse"
},
"role": {
"type": "string",
"description": "snowflake: ruolo (facoltativo)"
},
"sas_url": {
"type": "string",
"description": "azure: URL SAS del container con permesso di creazione/scrittura (sola scrittura)"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della destinazione, ad esempio whd_7Q2K9XH3AB"
},
"kind": {
"type": "string",
"description": "s3, bigquery, snowflake o azure"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "Dove vanno i dati: s3://bucket/prefix, project.dataset.table, account/database.schema.table oppure il container Azure"
},
"configured": {
"type": "array",
"items": {
"type": "string"
},
"description": "Nomi delle impostazioni compilate (i valori non vengono mai restituiti)"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Siti inviati (pa_…). Vuoto significa tutti i siti"
},
"schedule": {
"type": "string",
"description": "daily: 02:00 UTC, invia il giorno UTC precedente"
},
"schema_version": {
"type": "string",
"description": "Schema delle righe inviate"
},
"last_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
Siti
POST
/sites/:site_id/data_reset.json
Elimina tutti gli eventi e le visite in un intervallo di date (viene eseguito in background, non si può annullare)
sites_reset_data
Permesso: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/data_reset.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"from": {
"type": "string",
"format": "date",
"description": "Primo giorno da eliminare (fuso orario del sito)"
},
"to": {
"type": "string",
"format": "date",
"description": "Ultimo giorno da eliminare, incluso"
},
"confirm": {
"type": "string",
"description": "Digita il dominio per confermare"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"from",
"to",
"confirm",
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/filter_stats.json
Riepilogo del traffico filtrato: bot, regole del traffico o rimozioni di dati personali per motivo e paese (solo conteggi)
sites_filter_stats
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/filter_stats.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "bot (bot filtrati), rule (regole del traffico) o redaction (rimozione dei dati personali)",
"enum": [
"bot",
"rule",
"redaction"
],
"default": "bot"
},
"days": {
"type": "integer",
"description": "Giorni da considerare (1-395)",
"default": 30
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/access.json
Elenca i membri e se possono vedere questo sito
sites_access_list
Permesso: members.manage
curl https://privatusanalytics.com/sites/:site_id/access.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"membership_id": {
"type": "string",
"format": "uuid",
"description": "Id dell'appartenenza"
},
"email": {
"type": "string"
},
"name": {
"type": "string"
},
"role": {
"type": "string"
},
"access": {
"type": "boolean",
"description": "Può vedere questo sito"
},
"locked": {
"type": "boolean",
"description": "I proprietari e gli amministratori hanno sempre accesso"
}
}
}
PATCH
/sites/:site_id/access.json
Concedi o rimuovi l'accesso di un membro a questo sito
sites_access_update
Permesso: members.manage
curl -X PATCH https://privatusanalytics.com/sites/:site_id/access.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"membership_id": {
"type": "string",
"description": "Id dell'appartenenza da sites_access_list"
},
"access": {
"type": "boolean",
"description": "true per concedere l'accesso, false per rimuoverlo"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"membership_id",
"access",
"site_id"
]
}
{
"type": "object",
"properties": {
"membership_id": {
"type": "string",
"format": "uuid",
"description": "Id dell'appartenenza"
},
"email": {
"type": "string"
},
"name": {
"type": "string"
},
"role": {
"type": "string"
},
"access": {
"type": "boolean",
"description": "Può vedere questo sito"
},
"locked": {
"type": "boolean",
"description": "I proprietari e gli amministratori hanno sempre accesso"
}
}
}
POST
/sites/:site_id/favorite.json
Aggiungi un sito ai preferiti (fissato in alto in Tutti i siti)
sites_favorite
Permesso: analytics.read
curl -X POST https://privatusanalytics.com/sites/:site_id/favorite.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del sito usato nello snippet di tracciamento"
},
"workspace_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"extra_domains": {
"type": "array",
"items": {
"type": "string"
}
},
"multi_domain_mode": {
"type": "string"
},
"timezone": {
"type": "string"
},
"currency": {
"type": "string"
},
"week_start": {
"type": "integer"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"honor_dnt": {
"type": "boolean"
},
"honor_gpc": {
"type": "boolean"
},
"pii_scrubber": {
"type": "boolean"
},
"redaction_rules": {
"type": "array"
},
"allowed_params": {
"type": "array",
"items": {
"type": "string"
}
},
"path_masks": {
"type": "array"
},
"retention_months": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"bot_filtering": {
"type": "boolean"
},
"traffic_rule_modes": {
"type": "object"
},
"vitals_sample_rate": {
"type": "integer"
},
"conversion_denominator": {
"type": "string"
},
"public_dashboard": {
"type": "boolean"
},
"public_indexable": {
"type": "boolean"
},
"ingest_key_prefix": {
"anyOf": [
{
"type": "string",
"description": "Inizio della chiave di ingest del server"
},
{
"type": "null"
}
]
},
"verified_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"first_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"snippet": {
"type": "string",
"description": "Snippet di tracciamento HTML"
},
"favorite": {
"type": "boolean",
"description": "Nei tuoi preferiti"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/favorite.json
Rimuovi un sito dai preferiti
sites_unfavorite
Permesso: analytics.read
curl -X DELETE https://privatusanalytics.com/sites/:site_id/favorite.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del sito usato nello snippet di tracciamento"
},
"workspace_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"extra_domains": {
"type": "array",
"items": {
"type": "string"
}
},
"multi_domain_mode": {
"type": "string"
},
"timezone": {
"type": "string"
},
"currency": {
"type": "string"
},
"week_start": {
"type": "integer"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"honor_dnt": {
"type": "boolean"
},
"honor_gpc": {
"type": "boolean"
},
"pii_scrubber": {
"type": "boolean"
},
"redaction_rules": {
"type": "array"
},
"allowed_params": {
"type": "array",
"items": {
"type": "string"
}
},
"path_masks": {
"type": "array"
},
"retention_months": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"bot_filtering": {
"type": "boolean"
},
"traffic_rule_modes": {
"type": "object"
},
"vitals_sample_rate": {
"type": "integer"
},
"conversion_denominator": {
"type": "string"
},
"public_dashboard": {
"type": "boolean"
},
"public_indexable": {
"type": "boolean"
},
"ingest_key_prefix": {
"anyOf": [
{
"type": "string",
"description": "Inizio della chiave di ingest del server"
},
{
"type": "null"
}
]
},
"verified_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"first_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"snippet": {
"type": "string",
"description": "Snippet di tracciamento HTML"
},
"favorite": {
"type": "boolean",
"description": "Nei tuoi preferiti"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/setup.json
Stato dell'installazione e snippet per un sito
sites_setup_get
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/setup.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
POST
/transfers/:token/accept.json
Accetta il trasferimento di un sito in uno dei tuoi workspace
site_transfers_accept
Permesso: public
curl -X POST https://privatusanalytics.com/transfers/:token/accept.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Workspace in cui spostare il sito (ws_…)"
},
"token": {
"type": "string",
"description": "Token della risorsa"
}
},
"required": [
"workspace_id",
"token"
]
}
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Sito in corso di trasferimento"
},
"site_domain": {
"type": "string"
},
"from_workspace": {
"type": "string",
"description": "Nome del workspace attuale"
},
"to_workspace_id": {
"anyOf": [
{
"type": "string",
"description": "Workspace di destinazione"
},
{
"type": "null"
}
]
},
"to_email": {
"type": "string",
"description": "Email del destinatario"
},
"status": {
"type": "string",
"description": "pending, accepted o canceled"
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/sites/:site_id/transfer.json
Avvia il trasferimento di un sito a un altro workspace (invia un'email al destinatario)
sites_transfer_start
Permesso: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/transfer.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "Email della persona che riceverà il sito (sceglie uno dei suoi workspace)"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"email",
"site_id"
]
}
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Sito in corso di trasferimento"
},
"site_domain": {
"type": "string"
},
"from_workspace": {
"type": "string",
"description": "Nome del workspace attuale"
},
"to_workspace_id": {
"anyOf": [
{
"type": "string",
"description": "Workspace di destinazione"
},
{
"type": "null"
}
]
},
"to_email": {
"type": "string",
"description": "Email del destinatario"
},
"status": {
"type": "string",
"description": "pending, accepted o canceled"
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/transfer.json
Annulla un trasferimento di sito in sospeso
sites_transfer_cancel
Permesso: sites.manage
curl -X DELETE https://privatusanalytics.com/sites/:site_id/transfer.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Sito in corso di trasferimento"
},
"site_domain": {
"type": "string"
},
"from_workspace": {
"type": "string",
"description": "Nome del workspace attuale"
},
"to_workspace_id": {
"anyOf": [
{
"type": "string",
"description": "Workspace di destinazione"
},
{
"type": "null"
}
]
},
"to_email": {
"type": "string",
"description": "Email del destinatario"
},
"status": {
"type": "string",
"description": "pending, accepted o canceled"
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/transfers/:token.json
Ottieni un trasferimento in sospeso dal suo token ricevuto via email
site_transfers_get
Permesso: public
curl https://privatusanalytics.com/transfers/:token.json
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Token della risorsa"
}
},
"required": [
"token"
]
}
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Sito in corso di trasferimento"
},
"site_domain": {
"type": "string"
},
"from_workspace": {
"type": "string",
"description": "Nome del workspace attuale"
},
"to_workspace_id": {
"anyOf": [
{
"type": "string",
"description": "Workspace di destinazione"
},
{
"type": "null"
}
]
},
"to_email": {
"type": "string",
"description": "Email del destinatario"
},
"status": {
"type": "string",
"description": "pending, accepted o canceled"
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/workspaces/:workspace_id/sites.json
Aggiungi un sito
sites_create
Permesso: sites.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/sites.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"domain": {
"type": "string",
"description": "Dominio principale, ad esempio example.com",
"examples": [
"example.com"
]
},
"name": {
"type": "string",
"description": "Nome visualizzato (predefinito: il dominio)"
},
"timezone": {
"type": "string",
"description": "Fuso orario dei report"
},
"currency": {
"type": "string",
"description": "Valuta dei ricavi (ISO 4217)"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"domain",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del sito usato nello snippet di tracciamento"
},
"workspace_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"extra_domains": {
"type": "array",
"items": {
"type": "string"
}
},
"multi_domain_mode": {
"type": "string"
},
"timezone": {
"type": "string"
},
"currency": {
"type": "string"
},
"week_start": {
"type": "integer"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"honor_dnt": {
"type": "boolean"
},
"honor_gpc": {
"type": "boolean"
},
"pii_scrubber": {
"type": "boolean"
},
"redaction_rules": {
"type": "array"
},
"allowed_params": {
"type": "array",
"items": {
"type": "string"
}
},
"path_masks": {
"type": "array"
},
"retention_months": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"bot_filtering": {
"type": "boolean"
},
"traffic_rule_modes": {
"type": "object"
},
"vitals_sample_rate": {
"type": "integer"
},
"conversion_denominator": {
"type": "string"
},
"public_dashboard": {
"type": "boolean"
},
"public_indexable": {
"type": "boolean"
},
"ingest_key_prefix": {
"anyOf": [
{
"type": "string",
"description": "Inizio della chiave di ingest del server"
},
{
"type": "null"
}
]
},
"verified_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"first_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"snippet": {
"type": "string",
"description": "Snippet di tracciamento HTML"
},
"favorite": {
"type": "boolean",
"description": "Nei tuoi preferiti"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:id.json
Elimina un sito (rimosso definitivamente dopo 7 giorni)
sites_delete
Permesso: sites.manage
curl -X DELETE https://privatusanalytics.com/sites/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"confirm": {
"type": "string",
"description": "Digita il dominio per confermare"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"confirm",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del sito usato nello snippet di tracciamento"
},
"workspace_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"extra_domains": {
"type": "array",
"items": {
"type": "string"
}
},
"multi_domain_mode": {
"type": "string"
},
"timezone": {
"type": "string"
},
"currency": {
"type": "string"
},
"week_start": {
"type": "integer"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"honor_dnt": {
"type": "boolean"
},
"honor_gpc": {
"type": "boolean"
},
"pii_scrubber": {
"type": "boolean"
},
"redaction_rules": {
"type": "array"
},
"allowed_params": {
"type": "array",
"items": {
"type": "string"
}
},
"path_masks": {
"type": "array"
},
"retention_months": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"bot_filtering": {
"type": "boolean"
},
"traffic_rule_modes": {
"type": "object"
},
"vitals_sample_rate": {
"type": "integer"
},
"conversion_denominator": {
"type": "string"
},
"public_dashboard": {
"type": "boolean"
},
"public_indexable": {
"type": "boolean"
},
"ingest_key_prefix": {
"anyOf": [
{
"type": "string",
"description": "Inizio della chiave di ingest del server"
},
{
"type": "null"
}
]
},
"verified_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"first_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"snippet": {
"type": "string",
"description": "Snippet di tracciamento HTML"
},
"favorite": {
"type": "boolean",
"description": "Nei tuoi preferiti"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/sites.json
Elenca i siti di un workspace
sites_list
Permesso: analytics.read
curl https://privatusanalytics.com/workspaces/:workspace_id/sites.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Filtra per dominio o nome"
},
"label": {
"type": "string",
"description": "Solo siti con questa etichetta"
},
"sort": {
"type": "string",
"description": "position (il tuo ordine), name, oppure visitors negli ultimi 30 giorni (prima i più visitati)",
"enum": [
"position",
"name",
"visitors"
],
"default": "position"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del sito usato nello snippet di tracciamento"
},
"workspace_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"extra_domains": {
"type": "array",
"items": {
"type": "string"
}
},
"multi_domain_mode": {
"type": "string"
},
"timezone": {
"type": "string"
},
"currency": {
"type": "string"
},
"week_start": {
"type": "integer"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"honor_dnt": {
"type": "boolean"
},
"honor_gpc": {
"type": "boolean"
},
"pii_scrubber": {
"type": "boolean"
},
"redaction_rules": {
"type": "array"
},
"allowed_params": {
"type": "array",
"items": {
"type": "string"
}
},
"path_masks": {
"type": "array"
},
"retention_months": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"bot_filtering": {
"type": "boolean"
},
"traffic_rule_modes": {
"type": "object"
},
"vitals_sample_rate": {
"type": "integer"
},
"conversion_denominator": {
"type": "string"
},
"public_dashboard": {
"type": "boolean"
},
"public_indexable": {
"type": "boolean"
},
"ingest_key_prefix": {
"anyOf": [
{
"type": "string",
"description": "Inizio della chiave di ingest del server"
},
{
"type": "null"
}
]
},
"verified_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"first_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"snippet": {
"type": "string",
"description": "Snippet di tracciamento HTML"
},
"favorite": {
"type": "boolean",
"description": "Nei tuoi preferiti"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/sites/:id.json
Ottieni un sito e tutte le sue impostazioni
sites_get
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del sito usato nello snippet di tracciamento"
},
"workspace_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"extra_domains": {
"type": "array",
"items": {
"type": "string"
}
},
"multi_domain_mode": {
"type": "string"
},
"timezone": {
"type": "string"
},
"currency": {
"type": "string"
},
"week_start": {
"type": "integer"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"honor_dnt": {
"type": "boolean"
},
"honor_gpc": {
"type": "boolean"
},
"pii_scrubber": {
"type": "boolean"
},
"redaction_rules": {
"type": "array"
},
"allowed_params": {
"type": "array",
"items": {
"type": "string"
}
},
"path_masks": {
"type": "array"
},
"retention_months": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"bot_filtering": {
"type": "boolean"
},
"traffic_rule_modes": {
"type": "object"
},
"vitals_sample_rate": {
"type": "integer"
},
"conversion_denominator": {
"type": "string"
},
"public_dashboard": {
"type": "boolean"
},
"public_indexable": {
"type": "boolean"
},
"ingest_key_prefix": {
"anyOf": [
{
"type": "string",
"description": "Inizio della chiave di ingest del server"
},
{
"type": "null"
}
]
},
"verified_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"first_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"snippet": {
"type": "string",
"description": "Snippet di tracciamento HTML"
},
"favorite": {
"type": "boolean",
"description": "Nei tuoi preferiti"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/sites/:id.json
Aggiorna le impostazioni del sito
sites_update
Permesso: sites.manage
curl -X PATCH https://privatusanalytics.com/sites/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome visualizzato"
},
"domain": {
"type": "string",
"description": "Dominio principale"
},
"extra_domains": {
"type": "array",
"items": {
"type": "string"
},
"description": "Hostname aggiuntivi"
},
"multi_domain_mode": {
"type": "string",
"description": "combined: un solo visitatore tra i domini",
"enum": [
"combined",
"separate"
]
},
"timezone": {
"type": "string",
"description": "Fuso orario dei report"
},
"currency": {
"type": "string",
"description": "Valuta dei ricavi (ISO 4217)"
},
"week_start": {
"type": "integer",
"description": "0 = domenica, 1 = lunedì"
},
"labels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Etichette per raggruppare i siti"
},
"honor_dnt": {
"type": "boolean",
"description": "Salta i visitatori che inviano DNT"
},
"honor_gpc": {
"type": "boolean",
"description": "Salta i visitatori che inviano GPC"
},
"pii_scrubber": {
"type": "boolean",
"description": "Rimuovi email, token, id"
},
"redaction_rules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"pattern": {
"type": "string"
}
}
},
"description": "Espressioni regolari personalizzate di rimozione"
},
"allowed_params": {
"type": "array",
"items": {
"type": "string"
},
"description": "Parametri di query da mantenere nei percorsi"
},
"path_masks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"pattern": {
"type": "string"
},
"replacement": {
"type": "string"
}
}
},
"description": "Regole di mascheramento dei percorsi, ad esempio /u/* -> /u/:id"
},
"retention_months": {
"type": "integer",
"description": "Elimina i dati più vecchi di questo periodo"
},
"bot_filtering": {
"type": "boolean",
"description": "Filtra il traffico dei bot"
},
"traffic_rule_modes": {
"type": "object",
"additionalProperties": true,
"description": "block o allow per ogni elenco di regole del traffico"
},
"vitals_sample_rate": {
"type": "integer",
"description": "% di campionamento dei Web Vitals"
},
"conversion_denominator": {
"type": "string",
"description": "Tasso di conversione rispetto alle visite o ai visitatori",
"enum": [
"visits",
"visitors"
]
},
"public_dashboard": {
"type": "boolean",
"description": "Chiunque abbia il link può vedere le statistiche"
},
"public_indexable": {
"type": "boolean",
"description": "Consenti ai motori di ricerca di indicizzare la pagina pubblica"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del sito usato nello snippet di tracciamento"
},
"workspace_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"extra_domains": {
"type": "array",
"items": {
"type": "string"
}
},
"multi_domain_mode": {
"type": "string"
},
"timezone": {
"type": "string"
},
"currency": {
"type": "string"
},
"week_start": {
"type": "integer"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"honor_dnt": {
"type": "boolean"
},
"honor_gpc": {
"type": "boolean"
},
"pii_scrubber": {
"type": "boolean"
},
"redaction_rules": {
"type": "array"
},
"allowed_params": {
"type": "array",
"items": {
"type": "string"
}
},
"path_masks": {
"type": "array"
},
"retention_months": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"bot_filtering": {
"type": "boolean"
},
"traffic_rule_modes": {
"type": "object"
},
"vitals_sample_rate": {
"type": "integer"
},
"conversion_denominator": {
"type": "string"
},
"public_dashboard": {
"type": "boolean"
},
"public_indexable": {
"type": "boolean"
},
"ingest_key_prefix": {
"anyOf": [
{
"type": "string",
"description": "Inizio della chiave di ingest del server"
},
{
"type": "null"
}
]
},
"verified_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"first_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"snippet": {
"type": "string",
"description": "Snippet di tracciamento HTML"
},
"favorite": {
"type": "boolean",
"description": "Nei tuoi preferiti"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
Sito web
GET
/changelog.json
Elenca le voci del changelog
changelog_list
Aggiornamenti del prodotto pubblicati, dai più recenti. Disponibile anche come RSS su /changelog.rss.
Permesso: public
curl https://privatusanalytics.com/changelog.json
{
"type": "object",
"properties": {
"area": {
"type": "string",
"description": "Solo voci di questa area del prodotto",
"enum": [
"product",
"dashboard",
"tracker",
"privacy",
"api",
"integrations",
"billing",
"docs"
]
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": []
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della voce, ad esempio chg_7Q2K9XH3AB"
},
"title": {
"type": "string",
"description": "Titolo"
},
"area": {
"type": "string",
"description": "Area del prodotto, ad esempio dashboard, tracker, api"
},
"body": {
"type": "string",
"description": "Corpo in Markdown"
},
"published_at": {
"type": "string",
"format": "date-time",
"description": "Ora di pubblicazione"
},
"url": {
"type": "string",
"description": "Link permanente"
}
}
}
}
GET
/changelog/:id.json
Ottieni una voce del changelog
changelog_get
Permesso: public
curl https://privatusanalytics.com/changelog/:id.json
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della voce, ad esempio chg_7Q2K9XH3AB"
},
"title": {
"type": "string",
"description": "Titolo"
},
"area": {
"type": "string",
"description": "Area del prodotto, ad esempio dashboard, tracker, api"
},
"body": {
"type": "string",
"description": "Corpo in Markdown"
},
"published_at": {
"type": "string",
"format": "date-time",
"description": "Ora di pubblicazione"
},
"url": {
"type": "string",
"description": "Link permanente"
}
}
}
POST
/contact.json
Invia un messaggio al team di Privatus
contact_create
I client browser inviano un token Cloudflare Turnstile come `cf-turnstile-response`. Le richieste con un token API non ne hanno bisogno.
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl -X POST https://privatusanalytics.com/contact.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Il tuo nome",
"examples": [
"Ada Lovelace"
]
},
"email": {
"type": "string",
"description": "Dove dobbiamo risponderti",
"examples": [
"[email protected]"
]
},
"company": {
"type": "string",
"description": "Azienda o organizzazione (facoltativo)"
},
"topic": {
"type": "string",
"description": "L'argomento del messaggio",
"enum": [
"general",
"sales",
"support",
"privacy",
"security",
"partnerships",
"press"
],
"default": "general"
},
"message": {
"type": "string",
"description": "Il tuo messaggio (da 10 a 5.000 caratteri)"
},
"website": {
"type": "string",
"description": "Lascia vuoto. Trappola anti-spam per i bot. Gli invii compilati vengono scartati"
}
},
"required": [
"name",
"email",
"message"
]
}
{
"type": "object",
"properties": {
"received": {
"type": "boolean",
"description": "Sempre true quando l'invio è stato accettato"
},
"message": {
"type": "string",
"description": "Cosa succede dopo"
}
}
}
POST
/newsletter/confirm.json
Conferma l'iscrizione alla newsletter (token firmato)
newsletter_confirm
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl -X POST https://privatusanalytics.com/newsletter/confirm.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Token firmato dell'email di conferma"
}
},
"required": [
"token"
]
}
{
"type": "object",
"properties": {
"received": {
"type": "boolean",
"description": "Sempre true quando l'invio è stato accettato"
},
"message": {
"type": "string",
"description": "Cosa succede dopo"
}
}
}
POST
/newsletter.json
Iscrivi un indirizzo email alla newsletter
newsletter_subscribe
I client browser inviano un token Cloudflare Turnstile come `cf-turnstile-response`. Le richieste con un token API non ne hanno bisogno.
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl -X POST https://privatusanalytics.com/newsletter.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "Indirizzo email da iscrivere. Riceverà un link di conferma via email",
"examples": [
"[email protected]"
]
},
"website": {
"type": "string",
"description": "Lascia vuoto. Trappola anti-spam per i bot. Gli invii compilati vengono scartati"
}
},
"required": [
"email"
]
}
{
"type": "object",
"properties": {
"received": {
"type": "boolean",
"description": "Sempre true quando l'invio è stato accettato"
},
"message": {
"type": "string",
"description": "Cosa succede dopo"
}
}
}
POST
/newsletter/unsubscribe.json
Annulla l'iscrizione con il token di un link firmato
newsletter_unsubscribe
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl -X POST https://privatusanalytics.com/newsletter/unsubscribe.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Token firmato del link di annullamento iscrizione"
},
"list": {
"type": "string",
"description": "newsletter (predefinito: la lista a cui si riferiva il link) o marketing (tutte le email di marketing)",
"enum": [
"newsletter",
"marketing"
]
}
},
"required": [
"token"
]
}
{
"type": "object",
"properties": {
"received": {
"type": "boolean",
"description": "Sempre true quando l'invio è stato accettato"
},
"message": {
"type": "string",
"description": "Cosa succede dopo"
}
}
}
GET
/pricing.json
Ottieni piani, prezzi e limiti dei piani
pricing_get
Gli stessi dati della pagina dei prezzi: la scala degli eventi, ogni limite dei piani e cosa conta come evento. Passa events per ottenere il livello corrispondente.
Permesso: public
curl https://privatusanalytics.com/pricing.json
{
"type": "object",
"properties": {
"events": {
"type": "integer",
"description": "Visualizzazioni di pagina più eventi personalizzati previsti al mese. Restituisce il livello corrispondente come `recommendation`",
"examples": [
750000
]
},
"interval": {
"type": "string",
"description": "Intervallo di fatturazione per i prezzi mostrati: month, oppure year (10 volte il prezzo mensile)",
"enum": [
"month",
"year"
],
"default": "month"
}
},
"required": []
}
{
"type": "object",
"properties": {
"currency": {
"type": "string",
"description": "Valuta di ogni prezzo (USD)"
},
"tax_included": {
"type": "boolean",
"description": "Sempre true. I prezzi includono l'IVA o l'imposta sulle vendite, quindi il prezzo mostrato è il prezzo pagato"
},
"interval": {
"type": "string",
"description": "month o year. I prezzi si riferiscono a questo intervallo"
},
"annual_multiplier": {
"type": "integer",
"description": "Prezzo annuale = prezzo mensile x questo valore (due mesi gratis)"
},
"free_events": {
"type": "integer",
"description": "Eventi mensili inclusi nel piano Free"
},
"badge_bonus": {
"type": "integer",
"description": "Eventi gratuiti extra al mese quando viene mostrato il badge facoltativo"
},
"tiers": {
"type": "array",
"items": {
"type": "object"
},
"description": "Scala degli eventi: { events, pro, business } prezzi per l'intervallo (pro è null dove è offerto solo Business), più i prezzi mensili"
},
"plans": {
"type": "array",
"items": {
"type": "object"
},
"description": "Piani con { id, name, from_price, limits }. Limiti null significano illimitato"
},
"counted": {
"type": "array",
"items": {
"type": "string"
},
"description": "Cosa conta come evento fatturabile"
},
"not_counted": {
"type": "array",
"items": {
"type": "string"
},
"description": "Cosa non conta mai ai fini dell'utilizzo"
},
"recommendation": {
"anyOf": [
{
"type": "object",
"description": "{ events, plan, tier_events, price } per l'input `events`, oppure null quando non è stato indicato alcun volume"
},
{
"type": "null"
}
]
}
}
}
GET
/status.json
Ottieni lo stato attuale del sistema
status_get
Stato di database, Redis e job in background, controllato al massimo ogni 15 secondi.
Permesso: public
curl https://privatusanalytics.com/status.json
{
"type": "object",
"properties": {
"fresh": {
"type": "boolean",
"description": "Salta la cache di 15 secondi e controlla di nuovo adesso",
"default": false
}
},
"required": []
}
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "Complessivo: operational, degraded o outage"
},
"checked_at": {
"type": "string",
"format": "date-time",
"description": "Quando sono stati eseguiti i controlli (in cache fino a 15 s)"
},
"components": {
"type": "array",
"items": {
"type": "object"
},
"description": "Per componente: { id, name, status, detail, latency_ms }, più queue_latency_s e queue_depth per le code"
}
}
}
GET
/tools/consent-gap.json
Stima il traffico perso dagli analytics basati sul consenso
tools_consent_gap
Permesso: public
curl https://privatusanalytics.com/tools/consent-gap.json
{
"type": "object",
"properties": {
"monthly_visitors": {
"type": "integer",
"description": "Visitatori al mese (dai log del server o dagli analytics attuali)",
"examples": [
50000
]
},
"consent_rate": {
"type": "number",
"description": "Percentuale di visitatori che accettano i cookie di analytics nel tuo banner (0-100)",
"examples": [
55
]
},
"adblock_share": {
"type": "number",
"description": "Percentuale di visitatori i cui blocker fermano gli script di analytics (0-100)",
"default": 25.0
}
},
"required": [
"monthly_visitors",
"consent_rate"
]
}
{
"type": "object",
"properties": {
"monthly_visitors": {
"type": "integer",
"description": "Input: visitatori al mese"
},
"consent_rate": {
"type": "number",
"description": "Input: percentuale che accetta i cookie di analytics"
},
"adblock_share": {
"type": "number",
"description": "Input: percentuale i cui blocker fermano gli script"
},
"measured_with_consent": {
"type": "integer",
"description": "Visitatori che uno strumento basato sul consenso può misurare"
},
"missed": {
"type": "integer",
"description": "Visitatori che non rileva"
},
"missed_percent": {
"type": "number",
"description": "Quota di visitatori persi, in percentuale"
},
"measured_cookieless": {
"type": "integer",
"description": "Visitatori che uno strumento senza cookie e senza banner può misurare, se viene bloccato nella stessa misura"
},
"recovered_by_cookieless": {
"type": "integer",
"description": "Differenza tra le stime senza cookie e basate sul consenso"
}
}
}
GET
/tools/header-checker.json
Controlla Referrer-Policy e CSP di una pagina per gli analytics
tools_header_check
Permesso: public
curl https://privatusanalytics.com/tools/header-checker.json
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "Pagina pubblica da controllare (http o https)",
"examples": [
"https://example.com"
]
}
},
"required": [
"url"
]
}
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "URL finale dopo i reindirizzamenti"
},
"status": {
"type": "integer",
"description": "Stato HTTP della risposta finale"
},
"findings": {
"type": "array",
"items": {
"type": "object"
},
"description": "Controlli: { check, value, level (ok, warn, info), note }"
}
}
}
GET
/tools/privacy-policy-generator.json
Scrivi la bozza di un paragrafo di informativa sulla privacy per Privatus Analytics
tools_privacy_policy
Permesso: public
curl https://privatusanalytics.com/tools/privacy-policy-generator.json
{
"type": "object",
"properties": {
"site_name": {
"type": "string",
"description": "Il nome del tuo sito web o della tua azienda",
"examples": [
"Example Books"
]
},
"contact_email": {
"type": "string",
"description": "Contatto privacy da citare (facoltativo)"
},
"honors_gpc": {
"type": "boolean",
"description": "Se Do Not Track e Global Privacy Control sono rispettati (il valore predefinito)",
"default": true
}
},
"required": [
"site_name"
]
}
{
"type": "object",
"properties": {
"site_name": {
"type": "string",
"description": "Input: nome del sito o dell'azienda"
},
"paragraphs": {
"type": "array",
"items": {
"type": "string"
},
"description": "Il testo dell'informativa, un paragrafo per voce"
},
"text": {
"type": "string",
"description": "I paragrafi uniti da righe vuote"
}
}
}
GET
/tools/qr-code.json
Genera un codice QR in SVG
tools_qr_code
Permesso: public
curl https://privatusanalytics.com/tools/qr-code.json
{
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "URL o testo da codificare (fino a 1.000 caratteri)",
"examples": [
"https://example.com/?utm_source=poster"
]
},
"level": {
"type": "string",
"description": "Correzione degli errori: l (7%), m (15%), q (25%), h (30%)",
"enum": [
"l",
"m",
"q",
"h"
],
"default": "m"
}
},
"required": [
"text"
]
}
{
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "Il testo codificato"
},
"level": {
"type": "string",
"description": "Livello di correzione degli errori"
},
"size": {
"type": "integer",
"description": "Moduli per lato"
},
"svg": {
"type": "string",
"description": "Documento SVG autonomo"
}
}
}
GET
/tools/tracker-scanner.json
Elenca cookie e tracker noti su una pagina
tools_tracker_scan
Permesso: public
curl https://privatusanalytics.com/tools/tracker-scanner.json
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "Pagina pubblica da analizzare (http o https)",
"examples": [
"https://example.com"
]
}
},
"required": [
"url"
]
}
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "URL finale dopo i reindirizzamenti"
},
"status": {
"type": "integer",
"description": "Stato HTTP della risposta finale"
},
"truncated": {
"type": "boolean",
"description": "True quando la pagina superava 1 MB e solo il primo 1 MB è stato analizzato"
},
"cookies": {
"type": "array",
"items": {
"type": "object"
},
"description": "Cookie impostati dalla risposta HTTP: { name, domain, path, expires, secure, http_only, same_site }. I valori non vengono mai restituiti"
},
"trackers": {
"type": "array",
"items": {
"type": "object"
},
"description": "Strumenti noti a cui rimanda la pagina: { name, category, match, evidence }"
},
"third_party_hosts": {
"type": "array",
"items": {
"type": "string"
},
"description": "Altri domini da cui la pagina carica risorse"
}
}
}
GET
/tools/utm-builder.json
Crea un URL di campagna con parametri UTM
tools_utm_builder
Permesso: public
curl https://privatusanalytics.com/tools/utm-builder.json
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "URL della pagina di destinazione",
"examples": [
"https://example.com/pricing"
]
},
"source": {
"type": "string",
"description": "utm_source: da dove proviene il traffico",
"examples": [
"newsletter"
]
},
"medium": {
"type": "string",
"description": "utm_medium: il canale, ad esempio email, cpc, social",
"examples": [
"email"
]
},
"campaign": {
"type": "string",
"description": "utm_campaign: il nome della campagna",
"examples": [
"fall_launch"
]
},
"term": {
"type": "string",
"description": "utm_term: parola chiave della ricerca a pagamento (facoltativo)"
},
"content": {
"type": "string",
"description": "utm_content: quale link o creatività (facoltativo)"
}
},
"required": [
"url",
"source",
"medium",
"campaign"
]
}
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "L'URL della pagina di destinazione con parametri UTM"
},
"params": {
"type": "object",
"description": "I parametri UTM che sono stati aggiunti"
},
"warnings": {
"type": "array",
"items": {
"type": "string"
},
"description": "Problemi da correggere (maiuscole, spazi, dati personali)"
}
}
}
POST
/waitlist.json
Iscriviti a una lista d'attesa (hosting nell'UE)
waitlist_join
I client browser inviano un token Cloudflare Turnstile come `cf-turnstile-response`. Le richieste con un token API non ne hanno bisogno.
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl -X POST https://privatusanalytics.com/waitlist.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "Email da avvisare",
"examples": [
"[email protected]"
]
},
"list": {
"type": "string",
"description": "A quale lista d'attesa iscriversi",
"enum": [
"eu_hosting"
],
"default": "eu_hosting"
},
"website": {
"type": "string",
"description": "Lascia vuoto. Trappola anti-spam per i bot. Gli invii compilati vengono scartati"
}
},
"required": [
"email"
]
}
{
"type": "object",
"properties": {
"received": {
"type": "boolean",
"description": "Sempre true quando l'invio è stato accettato"
},
"message": {
"type": "string",
"description": "Cosa succede dopo"
}
}
}
Token API
POST
/workspaces/:workspace_id/api_tokens.json
Crea un token API (il token viene mostrato una sola volta)
api_tokens_create
Permesso: member
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/api_tokens.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Un nome per riconoscere il token",
"examples": [
"CI deploys"
]
},
"permissions": {
"type": "array",
"items": {
"type": "string",
"enum": [
"analytics.read",
"analytics.export",
"content.write",
"sites.manage",
"uptime.manage",
"members.manage",
"tokens.manage",
"billing.manage",
"workspace.manage"
]
},
"description": "Permessi (ometti per tutti i tuoi, un elenco vuoto viene rifiutato)"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Limita a questi id di sito (pa_…). Vuoto = tutti",
"default": []
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "Data di scadenza (ISO 8601). Vuoto = mai"
},
"allowed_ips": {
"type": "array",
"items": {
"type": "string"
},
"description": "Accetta solo richieste da questi IP/CIDR",
"default": []
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"name",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"token": {
"anyOf": [
{
"type": "string",
"description": "Il token stesso: restituito solo alla creazione"
},
{
"type": "null"
}
]
},
"token_prefix": {
"type": "string",
"description": "Primi caratteri, per riconoscere il token"
},
"owner": {
"type": "string",
"description": "Email del membro che lo possiede"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
}
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Limitato a questi siti (vuoto = tutti)"
},
"allowed_ips": {
"type": "array",
"items": {
"type": "string"
}
},
"oauth_client": {
"anyOf": [
{
"type": "string",
"description": "Client MCP che lo ha ricevuto"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"description": "active, expired o revoked"
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_used_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/workspaces/:workspace_id/api_tokens/:id.json
Revoca un token API
api_tokens_delete
Permesso: member
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/api_tokens/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"token": {
"anyOf": [
{
"type": "string",
"description": "Il token stesso: restituito solo alla creazione"
},
{
"type": "null"
}
]
},
"token_prefix": {
"type": "string",
"description": "Primi caratteri, per riconoscere il token"
},
"owner": {
"type": "string",
"description": "Email del membro che lo possiede"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
}
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Limitato a questi siti (vuoto = tutti)"
},
"allowed_ips": {
"type": "array",
"items": {
"type": "string"
}
},
"oauth_client": {
"anyOf": [
{
"type": "string",
"description": "Client MCP che lo ha ricevuto"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"description": "active, expired o revoked"
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_used_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/api_tokens.json
Elenca i token API
api_tokens_list
Permesso: member
curl https://privatusanalytics.com/workspaces/:workspace_id/api_tokens.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"include_revoked": {
"type": "boolean",
"description": "Elenca anche i token revocati e scaduti",
"default": false
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"token": {
"anyOf": [
{
"type": "string",
"description": "Il token stesso: restituito solo alla creazione"
},
{
"type": "null"
}
]
},
"token_prefix": {
"type": "string",
"description": "Primi caratteri, per riconoscere il token"
},
"owner": {
"type": "string",
"description": "Email del membro che lo possiede"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
}
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Limitato a questi siti (vuoto = tutti)"
},
"allowed_ips": {
"type": "array",
"items": {
"type": "string"
}
},
"oauth_client": {
"anyOf": [
{
"type": "string",
"description": "Client MCP che lo ha ricevuto"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"description": "active, expired o revoked"
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_used_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
Tracciamento
POST
/sites/:site_id/tracking/ingest_key.json
Crea o ruota la chiave di ingest del server (mostrata una sola volta)
tracking_ingest_key_rotate
Permesso: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/tracking/ingest_key.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito"
},
"key": {
"type": "string",
"description": "La chiave di ingest. Mostrata una sola volta: conservala ora. Inviala come Bearer token a POST /api/events"
},
"prefix": {
"type": "string",
"description": "Prefisso della chiave mostrato nelle impostazioni"
}
}
}
DELETE
/sites/:site_id/tracking/ingest_key.json
Revoca la chiave di ingest del server
tracking_ingest_key_revoke
Permesso: sites.manage
curl -X DELETE https://privatusanalytics.com/sites/:site_id/tracking/ingest_key.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del sito usato nello snippet di tracciamento"
},
"workspace_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"extra_domains": {
"type": "array",
"items": {
"type": "string"
}
},
"multi_domain_mode": {
"type": "string"
},
"timezone": {
"type": "string"
},
"currency": {
"type": "string"
},
"week_start": {
"type": "integer"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"honor_dnt": {
"type": "boolean"
},
"honor_gpc": {
"type": "boolean"
},
"pii_scrubber": {
"type": "boolean"
},
"redaction_rules": {
"type": "array"
},
"allowed_params": {
"type": "array",
"items": {
"type": "string"
}
},
"path_masks": {
"type": "array"
},
"retention_months": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"bot_filtering": {
"type": "boolean"
},
"traffic_rule_modes": {
"type": "object"
},
"vitals_sample_rate": {
"type": "integer"
},
"conversion_denominator": {
"type": "string"
},
"public_dashboard": {
"type": "boolean"
},
"public_indexable": {
"type": "boolean"
},
"ingest_key_prefix": {
"anyOf": [
{
"type": "string",
"description": "Inizio della chiave di ingest del server"
},
{
"type": "null"
}
]
},
"verified_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"first_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"snippet": {
"type": "string",
"description": "Snippet di tracciamento HTML"
},
"favorite": {
"type": "boolean",
"description": "Nei tuoi preferiti"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/sites/:site_id/tracking/verify.json
Controlla che il tracker sia installato sul sito (tag script, id del sito, CSP e referrer policy)
tracking_verify
Permesso: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/tracking/verify.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "Pagina da controllare (predefinito: https://<domain>/)"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/tracking/snippet.json
Crea lo snippet di tracciamento per le opzioni scelte
tracking_snippet
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/tracking/snippet.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"modules": {
"type": "array",
"items": {
"type": "string"
},
"description": "Moduli facoltativi: auto (link in uscita, download, moduli, 404), engage (tempo e scorrimento), vitals (Web Vitals), clicks",
"default": [
"engage"
]
},
"manual": {
"type": "boolean",
"description": "Disattiva la visualizzazione di pagina automatica",
"default": false
},
"spa": {
"type": "string",
"description": "Tracciamento della navigazione nelle single-page app",
"enum": [
"auto",
"history",
"hash",
"off"
],
"default": "auto"
},
"domains": {
"type": "array",
"items": {
"type": "string"
},
"description": "Traccia solo su questi hostname",
"default": []
},
"exclude": {
"type": "array",
"items": {
"type": "string"
},
"description": "Glob di percorsi da non tracciare, ad esempio /admin/*",
"default": []
},
"query_params": {
"type": "array",
"items": {
"type": "string"
},
"description": "Parametri di query aggiuntivi da mantenere, ad esempio page",
"default": []
},
"mask": {
"type": "array",
"items": {
"type": "string"
},
"description": "Maschere dei percorsi lato client, ad esempio /u/*->/u/:id",
"default": []
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
Uptime
POST
/sites/:site_id/uptime.json
Aggiungi un controllo di uptime per un sito
uptime_checks_create
Permesso: uptime.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/uptime.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome visualizzato (predefinito: la destinazione)"
},
"kind": {
"type": "string",
"description": "http (codice di stato), keyword (il corpo contiene), tcp (host:porta) o dns (il nome si risolve)",
"enum": [
"http",
"keyword",
"tcp",
"dns"
],
"default": "http"
},
"url": {
"type": "string",
"description": "URL per i controlli http/keyword",
"examples": [
"https://example.com/health"
]
},
"host": {
"type": "string",
"description": "Hostname per i controlli tcp/dns"
},
"port": {
"type": "integer",
"description": "Porta TCP per i controlli tcp"
},
"keyword": {
"type": "string",
"description": "Testo che il corpo della risposta deve contenere (keyword)"
},
"expected_status": {
"type": "integer",
"description": "Codice di stato HTTP atteso",
"default": 200
},
"http_method": {
"type": "string",
"description": "Metodo HTTP",
"enum": [
"GET",
"HEAD"
],
"default": "GET"
},
"interval_seconds": {
"type": "integer",
"description": "Secondi tra i controlli (si applica il minimo del piano, predefinito 300 o il minimo)"
},
"timeout_seconds": {
"type": "integer",
"description": "Secondi prima che una sonda scada (1-30)",
"default": 20
},
"public": {
"type": "boolean",
"description": "Può comparire nelle pagine di stato pubbliche",
"default": false
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del controllo (upc_…)"
},
"workspace_id": {
"type": "string"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito a cui appartiene il controllo"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "http, keyword, tcp o dns"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"keyword": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expected_status": {
"type": "integer"
},
"http_method": {
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"timeout_seconds": {
"type": "integer"
},
"status": {
"type": "string",
"description": "up, down, pending o paused"
},
"enabled": {
"type": "boolean"
},
"public": {
"type": "boolean",
"description": "Può comparire nelle pagine di stato"
},
"last_checked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_check_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_response_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"ssl_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"ssl_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"domain_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/uptime/checks/:id.json
Elimina un controllo di uptime e la sua cronologia
uptime_checks_delete
Permesso: uptime.manage
curl -X DELETE https://privatusanalytics.com/uptime/checks/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del controllo (upc_…)"
},
"workspace_id": {
"type": "string"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito a cui appartiene il controllo"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "http, keyword, tcp o dns"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"keyword": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expected_status": {
"type": "integer"
},
"http_method": {
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"timeout_seconds": {
"type": "integer"
},
"status": {
"type": "string",
"description": "up, down, pending o paused"
},
"enabled": {
"type": "boolean"
},
"public": {
"type": "boolean",
"description": "Può comparire nelle pagine di stato"
},
"last_checked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_check_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_response_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"ssl_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"ssl_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"domain_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/uptime.json
Elenca i controlli di uptime di un sito
uptime_checks_list
Permesso: analytics.read
curl https://privatusanalytics.com/sites/:site_id/uptime.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "Solo controlli in questo stato",
"enum": [
"up",
"down",
"pending",
"paused"
]
},
"query": {
"type": "string",
"description": "Filtra per nome o destinazione"
},
"site_id": {
"type": "string",
"description": "Id del sito, ad esempio pa_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del controllo (upc_…)"
},
"workspace_id": {
"type": "string"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito a cui appartiene il controllo"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "http, keyword, tcp o dns"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"keyword": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expected_status": {
"type": "integer"
},
"http_method": {
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"timeout_seconds": {
"type": "integer"
},
"status": {
"type": "string",
"description": "up, down, pending o paused"
},
"enabled": {
"type": "boolean"
},
"public": {
"type": "boolean",
"description": "Può comparire nelle pagine di stato"
},
"last_checked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_check_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_response_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"ssl_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"ssl_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"domain_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
POST
/uptime/checks/:id/pause.json
Metti in pausa un controllo di uptime
uptime_checks_pause
Permesso: uptime.manage
curl -X POST https://privatusanalytics.com/uptime/checks/:id/pause.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del controllo (upc_…)"
},
"workspace_id": {
"type": "string"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito a cui appartiene il controllo"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "http, keyword, tcp o dns"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"keyword": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expected_status": {
"type": "integer"
},
"http_method": {
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"timeout_seconds": {
"type": "integer"
},
"status": {
"type": "string",
"description": "up, down, pending o paused"
},
"enabled": {
"type": "boolean"
},
"public": {
"type": "boolean",
"description": "Può comparire nelle pagine di stato"
},
"last_checked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_check_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_response_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"ssl_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"ssl_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"domain_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/uptime/checks/:id/resume.json
Riprendi un controllo di uptime in pausa
uptime_checks_resume
Permesso: uptime.manage
curl -X POST https://privatusanalytics.com/uptime/checks/:id/resume.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del controllo (upc_…)"
},
"workspace_id": {
"type": "string"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito a cui appartiene il controllo"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "http, keyword, tcp o dns"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"keyword": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expected_status": {
"type": "integer"
},
"http_method": {
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"timeout_seconds": {
"type": "integer"
},
"status": {
"type": "string",
"description": "up, down, pending o paused"
},
"enabled": {
"type": "boolean"
},
"public": {
"type": "boolean",
"description": "Può comparire nelle pagine di stato"
},
"last_checked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_check_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_response_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"ssl_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"ssl_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"domain_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/uptime/checks/:id.json
Ottieni un controllo di uptime: uptime a 24h/7g/30g, tempi di risposta e incidenti
uptime_checks_get
Permesso: analytics.read
curl https://privatusanalytics.com/uptime/checks/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"range": {
"type": "string",
"description": "Finestra per il grafico dei tempi di risposta",
"enum": [
"24h",
"7d",
"30d"
],
"default": "24h"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"check": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del controllo (upc_…)"
},
"workspace_id": {
"type": "string"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito a cui appartiene il controllo"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "http, keyword, tcp o dns"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"keyword": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expected_status": {
"type": "integer"
},
"http_method": {
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"timeout_seconds": {
"type": "integer"
},
"status": {
"type": "string",
"description": "up, down, pending o paused"
},
"enabled": {
"type": "boolean"
},
"public": {
"type": "boolean",
"description": "Può comparire nelle pagine di stato"
},
"last_checked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_check_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_response_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"ssl_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"ssl_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"domain_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
},
"uptime": {
"type": "object",
"description": "% di uptime per 24h, 7g e 30g"
},
"range": {
"type": "string",
"description": "Finestra di response_times"
},
"response_times": {
"type": "object",
"description": "Tempo di risposta medio in ms per intervallo: {unit, labels, series: {location: [ms…]}}"
},
"incidents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"started_at": {
"type": "string",
"format": "date-time"
},
"resolved_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"duration_seconds": {
"type": "integer",
"description": "Finora, se ancora aperto"
},
"cause": {
"anyOf": [
{
"type": "string",
"description": "Errore più comune, ad esempio timeout o status_503"
},
{
"type": "null"
}
]
},
"failed_locations": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
PATCH
/uptime/checks/:id.json
Modifica un controllo di uptime
uptime_checks_update
Permesso: uptime.manage
curl -X PATCH https://privatusanalytics.com/uptime/checks/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome visualizzato (predefinito: la destinazione)"
},
"kind": {
"type": "string",
"description": "http (codice di stato), keyword (il corpo contiene), tcp (host:porta) o dns (il nome si risolve)",
"enum": [
"http",
"keyword",
"tcp",
"dns"
]
},
"url": {
"type": "string",
"description": "URL per i controlli http/keyword",
"examples": [
"https://example.com/health"
]
},
"host": {
"type": "string",
"description": "Hostname per i controlli tcp/dns"
},
"port": {
"type": "integer",
"description": "Porta TCP per i controlli tcp"
},
"keyword": {
"type": "string",
"description": "Testo che il corpo della risposta deve contenere (keyword)"
},
"expected_status": {
"type": "integer",
"description": "Codice di stato HTTP atteso"
},
"http_method": {
"type": "string",
"description": "Metodo HTTP",
"enum": [
"GET",
"HEAD"
]
},
"interval_seconds": {
"type": "integer",
"description": "Secondi tra i controlli (si applica il minimo del piano, predefinito 300 o il minimo)"
},
"timeout_seconds": {
"type": "integer",
"description": "Secondi prima che una sonda scada (1-30)"
},
"public": {
"type": "boolean",
"description": "Può comparire nelle pagine di stato pubbliche"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del controllo (upc_…)"
},
"workspace_id": {
"type": "string"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito a cui appartiene il controllo"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "http, keyword, tcp o dns"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"keyword": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expected_status": {
"type": "integer"
},
"http_method": {
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"timeout_seconds": {
"type": "integer"
},
"status": {
"type": "string",
"description": "up, down, pending o paused"
},
"enabled": {
"type": "boolean"
},
"public": {
"type": "boolean",
"description": "Può comparire nelle pagine di stato"
},
"last_checked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_check_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_response_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"ssl_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"ssl_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"domain_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/uptime/probes.json
Datacenter delle sonde, User-Agent e intervalli IP di uscita (per inserire nella allowlist le nostre sonde di uptime)
uptime_probes_list
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl https://privatusanalytics.com/uptime/probes.json
{
"type": "object",
"properties": {},
"required": []
}
{
"type": "object"
}
POST
/uptime/probes/results.json
Invia i risultati di un agente sonda esterno (Bearer token della sonda di uptime)
uptime_probes_results
Permesso: public
· Solo HTTP (non è uno strumento MCP)
curl -X POST https://privatusanalytics.com/uptime/probes/results.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"check_id": {
"type": "string"
},
"location": {
"type": "string"
},
"ok": {
"type": "boolean"
},
"status_code": {
"type": "integer"
},
"response_ms": {
"type": "integer"
},
"error": {
"type": "string"
},
"checked_at": {
"type": "string",
"format": "date-time"
}
}
},
"description": "Risultati della sonda: [{check_id, location, ok, status_code, response_ms, error, checked_at}]"
}
},
"required": [
"results"
]
}
{
"type": "object"
}
POST
/workspaces/:workspace_id/uptime.json
Aggiungi un controllo di uptime del workspace (non legato a un sito)
workspace_uptime_checks_create
Permesso: uptime.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/uptime.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome visualizzato (predefinito: la destinazione)"
},
"kind": {
"type": "string",
"description": "http (codice di stato), keyword (il corpo contiene), tcp (host:porta) o dns (il nome si risolve)",
"enum": [
"http",
"keyword",
"tcp",
"dns"
],
"default": "http"
},
"url": {
"type": "string",
"description": "URL per i controlli http/keyword",
"examples": [
"https://example.com/health"
]
},
"host": {
"type": "string",
"description": "Hostname per i controlli tcp/dns"
},
"port": {
"type": "integer",
"description": "Porta TCP per i controlli tcp"
},
"keyword": {
"type": "string",
"description": "Testo che il corpo della risposta deve contenere (keyword)"
},
"expected_status": {
"type": "integer",
"description": "Codice di stato HTTP atteso",
"default": 200
},
"http_method": {
"type": "string",
"description": "Metodo HTTP",
"enum": [
"GET",
"HEAD"
],
"default": "GET"
},
"interval_seconds": {
"type": "integer",
"description": "Secondi tra i controlli (si applica il minimo del piano, predefinito 300 o il minimo)"
},
"timeout_seconds": {
"type": "integer",
"description": "Secondi prima che una sonda scada (1-30)",
"default": 20
},
"public": {
"type": "boolean",
"description": "Può comparire nelle pagine di stato pubbliche",
"default": false
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del controllo (upc_…)"
},
"workspace_id": {
"type": "string"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito a cui appartiene il controllo"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "http, keyword, tcp o dns"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"keyword": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expected_status": {
"type": "integer"
},
"http_method": {
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"timeout_seconds": {
"type": "integer"
},
"status": {
"type": "string",
"description": "up, down, pending o paused"
},
"enabled": {
"type": "boolean"
},
"public": {
"type": "boolean",
"description": "Può comparire nelle pagine di stato"
},
"last_checked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_check_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_response_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"ssl_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"ssl_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"domain_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/uptime.json
Elenca tutti i controlli di uptime di un workspace
workspace_uptime_checks_list
Permesso: analytics.read
curl https://privatusanalytics.com/workspaces/:workspace_id/uptime.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "Solo controlli in questo stato",
"enum": [
"up",
"down",
"pending",
"paused"
]
},
"query": {
"type": "string",
"description": "Filtra per nome o destinazione"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del controllo (upc_…)"
},
"workspace_id": {
"type": "string"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "Sito a cui appartiene il controllo"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "http, keyword, tcp o dns"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"keyword": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expected_status": {
"type": "integer"
},
"http_method": {
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"timeout_seconds": {
"type": "integer"
},
"status": {
"type": "string",
"description": "up, down, pending o paused"
},
"enabled": {
"type": "boolean"
},
"public": {
"type": "boolean",
"description": "Può comparire nelle pagine di stato"
},
"last_checked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_check_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_response_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"ssl_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"ssl_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"domain_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
Webhook
GET
/workspaces/:workspace_id/webhooks/:webhook_id/deliveries.json
Elenca gli invii di un webhook
webhook_deliveries_list
Permesso: workspace.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:webhook_id/deliveries.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "Solo consegne riuscite o fallite",
"enum": [
"succeeded",
"failed"
]
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"webhook_id": {
"type": "string",
"description": "Webhook della risorsa"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"workspace_id",
"webhook_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della consegna, ad esempio whd_123"
},
"event": {
"type": "string"
},
"status": {
"type": "string",
"description": "pending, succeeded o failed"
},
"status_code": {
"anyOf": [
{
"type": "integer",
"description": "Stato HTTP dell'ultimo tentativo"
},
{
"type": "null"
}
]
},
"error": {
"anyOf": [
{
"type": "string",
"description": "Errore di connessione dell'ultimo tentativo"
},
{
"type": "null"
}
]
},
"attempt": {
"type": "integer"
},
"duration_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"payload": {
"type": "object"
},
"response_body": {
"anyOf": [
{
"type": "string",
"description": "Primi 2.000 caratteri"
},
{
"type": "null"
}
]
},
"delivered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
POST
/workspaces/:workspace_id/webhooks/:webhook_id/deliveries/:id/redeliver.json
Invia di nuovo una consegna
webhook_deliveries_redeliver
Permesso: workspace.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:webhook_id/deliveries/:id/redeliver.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"webhook_id": {
"type": "string",
"description": "Webhook della risorsa"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"workspace_id",
"webhook_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della consegna, ad esempio whd_123"
},
"event": {
"type": "string"
},
"status": {
"type": "string",
"description": "pending, succeeded o failed"
},
"status_code": {
"anyOf": [
{
"type": "integer",
"description": "Stato HTTP dell'ultimo tentativo"
},
{
"type": "null"
}
]
},
"error": {
"anyOf": [
{
"type": "string",
"description": "Errore di connessione dell'ultimo tentativo"
},
{
"type": "null"
}
]
},
"attempt": {
"type": "integer"
},
"duration_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"payload": {
"type": "object"
},
"response_body": {
"anyOf": [
{
"type": "string",
"description": "Primi 2.000 caratteri"
},
{
"type": "null"
}
]
},
"delivered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/workspaces/:workspace_id/webhooks.json
Aggiungi un endpoint webhook
webhooks_create
Permesso: workspace.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/webhooks.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "Endpoint HTTPS che riceve il JSON inviato in POST",
"examples": [
"https://example.com/hooks/privatus"
]
},
"events": {
"type": "array",
"items": {
"type": "string",
"enum": [
"alert.triggered",
"alert.resolved",
"goal.completed_threshold",
"uptime.down",
"uptime.up",
"export.ready",
"import.completed",
"import.failed",
"site.created",
"site.deleted",
"member.added",
"usage.threshold"
]
},
"description": "Eventi da inviare"
},
"enabled": {
"type": "boolean",
"description": "Invia le consegne",
"default": true
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"url",
"events",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del webhook, ad esempio wh_7Q2K9XH3AB"
},
"url": {
"type": "string"
},
"events": {
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"type": "boolean"
},
"status": {
"type": "string",
"description": "active, failing o disabled"
},
"secret": {
"type": "string",
"description": "Segreto di firma per Privatus-Signature"
},
"consecutive_failures": {
"type": "integer"
},
"last_success_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_failure_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/workspaces/:workspace_id/webhooks/:id.json
Elimina un webhook
webhooks_delete
Permesso: workspace.manage
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del webhook, ad esempio wh_7Q2K9XH3AB"
},
"url": {
"type": "string"
},
"events": {
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"type": "boolean"
},
"status": {
"type": "string",
"description": "active, failing o disabled"
},
"secret": {
"type": "string",
"description": "Segreto di firma per Privatus-Signature"
},
"consecutive_failures": {
"type": "integer"
},
"last_success_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_failure_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/webhooks.json
Elenca i webhook
webhooks_list
Permesso: workspace.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/webhooks.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del webhook, ad esempio wh_7Q2K9XH3AB"
},
"url": {
"type": "string"
},
"events": {
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"type": "boolean"
},
"status": {
"type": "string",
"description": "active, failing o disabled"
},
"secret": {
"type": "string",
"description": "Segreto di firma per Privatus-Signature"
},
"consecutive_failures": {
"type": "integer"
},
"last_success_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_failure_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/workspaces/:workspace_id/webhooks/:id.json
Ottieni un webhook
webhooks_get
Permesso: workspace.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del webhook, ad esempio wh_7Q2K9XH3AB"
},
"url": {
"type": "string"
},
"events": {
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"type": "boolean"
},
"status": {
"type": "string",
"description": "active, failing o disabled"
},
"secret": {
"type": "string",
"description": "Segreto di firma per Privatus-Signature"
},
"consecutive_failures": {
"type": "integer"
},
"last_success_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_failure_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/workspaces/:workspace_id/webhooks/:id/test.json
Invia una consegna di prova
webhooks_test
Permesso: workspace.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:id/test.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della consegna, ad esempio whd_123"
},
"event": {
"type": "string"
},
"status": {
"type": "string",
"description": "pending, succeeded o failed"
},
"status_code": {
"anyOf": [
{
"type": "integer",
"description": "Stato HTTP dell'ultimo tentativo"
},
{
"type": "null"
}
]
},
"error": {
"anyOf": [
{
"type": "string",
"description": "Errore di connessione dell'ultimo tentativo"
},
{
"type": "null"
}
]
},
"attempt": {
"type": "integer"
},
"duration_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"payload": {
"type": "object"
},
"response_body": {
"anyOf": [
{
"type": "string",
"description": "Primi 2.000 caratteri"
},
{
"type": "null"
}
]
},
"delivered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/workspaces/:workspace_id/webhooks/:id.json
Aggiorna un webhook (eventi, URL, abilitato, ruota il segreto)
webhooks_update
Permesso: workspace.manage
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "Endpoint HTTPS"
},
"events": {
"type": "array",
"items": {
"type": "string",
"enum": [
"alert.triggered",
"alert.resolved",
"goal.completed_threshold",
"uptime.down",
"uptime.up",
"export.ready",
"import.completed",
"import.failed",
"site.created",
"site.deleted",
"member.added",
"usage.threshold"
]
},
"description": "Eventi da inviare"
},
"enabled": {
"type": "boolean",
"description": "Invia le consegne"
},
"rotate_secret": {
"type": "boolean",
"description": "Sostituisci il segreto di firma",
"default": false
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del webhook, ad esempio wh_7Q2K9XH3AB"
},
"url": {
"type": "string"
},
"events": {
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"type": "boolean"
},
"status": {
"type": "string",
"description": "active, failing o disabled"
},
"secret": {
"type": "string",
"description": "Segreto di firma per Privatus-Signature"
},
"consecutive_failures": {
"type": "integer"
},
"last_success_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_failure_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
Workspace
GET
/workspaces/:workspace_id/white_label.json
Ottieni il brand white label
white_label_get
Permesso: workspace.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/white_label.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string"
},
"brand_name": {
"anyOf": [
{
"type": "string",
"description": "Nome mostrato al posto di Privatus Analytics"
},
{
"type": "null"
}
]
},
"brand_logo_url": {
"anyOf": [
{
"type": "string",
"description": "URL dell'immagine del logo"
},
{
"type": "null"
}
]
},
"brand_color": {
"anyOf": [
{
"type": "string",
"description": "Colore di accento"
},
{
"type": "null"
}
]
},
"hide_branding": {
"type": "boolean",
"description": "Il marchio Privatus è nascosto"
},
"available": {
"type": "boolean",
"description": "Il piano include il white label"
},
"active": {
"type": "boolean",
"description": "Il brand è attualmente applicato"
}
}
}
PATCH
/workspaces/:workspace_id/white_label.json
Imposta il brand white label per le dashboard condivise e i report via email (Business)
white_label_update
Permesso: workspace.manage
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/white_label.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"brand_name": {
"type": "string",
"description": "Nome mostrato al posto di Privatus Analytics (vuoto lo rimuove)"
},
"brand_logo_url": {
"type": "string",
"description": "URL https di un'immagine del logo (vuoto lo rimuove)"
},
"brand_color": {
"type": "string",
"description": "Colore di accento, ad esempio #06755b"
},
"hide_branding": {
"type": "boolean",
"description": "Nascondi \"Privatus\" nelle dashboard condivise e nei report via email"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string"
},
"brand_name": {
"anyOf": [
{
"type": "string",
"description": "Nome mostrato al posto di Privatus Analytics"
},
{
"type": "null"
}
]
},
"brand_logo_url": {
"anyOf": [
{
"type": "string",
"description": "URL dell'immagine del logo"
},
{
"type": "null"
}
]
},
"brand_color": {
"anyOf": [
{
"type": "string",
"description": "Colore di accento"
},
{
"type": "null"
}
]
},
"hide_branding": {
"type": "boolean",
"description": "Il marchio Privatus è nascosto"
},
"available": {
"type": "boolean",
"description": "Il piano include il white label"
},
"active": {
"type": "boolean",
"description": "Il brand è attualmente applicato"
}
}
}
GET
/workspaces/:workspace_id/security.json
Ottieni le impostazioni di sicurezza del workspace
workspace_security_get
Permesso: workspace.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/security.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string"
},
"enforce_2fa": {
"type": "boolean",
"description": "I membri devono configurare la 2FA"
},
"login_methods": {
"type": "array",
"items": {
"type": "string"
},
"description": "Metodi di accesso consentiti"
},
"session_ttl_hours": {
"anyOf": [
{
"type": "integer",
"description": "Durata della sessione (null = nessuna)"
},
{
"type": "null"
}
]
},
"app_ip_allowlist": {
"type": "array",
"items": {
"type": "string"
},
"description": "IP/CIDR consentiti (vuoto = ovunque)"
},
"support_access_until": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Il supporto di Privatus può vedere il workspace fino al"
},
{
"type": "null"
}
]
}
}
}
PATCH
/workspaces/:workspace_id/security.json
Aggiorna le impostazioni di sicurezza del workspace (2FA, metodi di accesso, durata della sessione, allowlist IP, accesso del supporto)
workspace_security_update
Permesso: workspace.manage
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/security.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"enforce_2fa": {
"type": "boolean",
"description": "Richiedi ai membri di configurare la 2FA"
},
"login_methods": {
"type": "array",
"items": {
"type": "string",
"enum": [
"password",
"magic_link",
"passkey",
"google",
"github",
"sso"
]
},
"description": "Metodi di accesso consentiti"
},
"session_ttl_hours": {
"type": "integer",
"description": "Disconnetti i membri dopo questo numero di ore (0 = nessun limite)"
},
"app_ip_allowlist": {
"type": "array",
"items": {
"type": "string"
},
"description": "Consenti l'accesso all'app e all'API solo da questi IP/CIDR (Business). Vuoto = ovunque"
},
"support_access": {
"type": "boolean",
"description": "Consenti al supporto di Privatus di vedere il workspace per 7 giorni"
},
"workspace_id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string"
},
"enforce_2fa": {
"type": "boolean",
"description": "I membri devono configurare la 2FA"
},
"login_methods": {
"type": "array",
"items": {
"type": "string"
},
"description": "Metodi di accesso consentiti"
},
"session_ttl_hours": {
"anyOf": [
{
"type": "integer",
"description": "Durata della sessione (null = nessuna)"
},
{
"type": "null"
}
]
},
"app_ip_allowlist": {
"type": "array",
"items": {
"type": "string"
},
"description": "IP/CIDR consentiti (vuoto = ovunque)"
},
"support_access_until": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Il supporto di Privatus può vedere il workspace fino al"
},
{
"type": "null"
}
]
}
}
}
POST
/workspaces.json
Crea un workspace (ne diventi il proprietario)
workspaces_create
Permesso: member
· Solo HTTP (non è uno strumento MCP)
curl -X POST https://privatusanalytics.com/workspaces.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome del workspace",
"examples": [
"Acme Inc"
]
},
"timezone": {
"type": "string",
"description": "Fuso orario predefinito dei report (predefinito: quello dell'utente)"
},
"currency": {
"type": "string",
"description": "Valuta predefinita (ISO 4217)",
"default": "USD"
},
"how_heard": {
"type": "string",
"description": "Come ci hai conosciuto"
}
},
"required": [
"name"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"timezone": {
"type": "string",
"description": "Fuso orario predefinito dei report"
},
"currency": {
"type": "string",
"description": "Valuta predefinita"
},
"plan": {
"type": "string",
"description": "free, pro, business o enterprise"
},
"plan_events": {
"type": "integer",
"description": "Eventi al mese inclusi nel piano"
},
"subscription_status": {
"type": "string"
},
"role": {
"type": "string",
"description": "Il tuo ruolo in questo workspace"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/workspaces/:id.json
Elimina un workspace e tutti i suoi siti (solo il proprietario, annulla qualsiasi abbonamento)
workspaces_delete
Permesso: workspace.manage
curl -X DELETE https://privatusanalytics.com/workspaces/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"confirm": {
"type": "string",
"description": "Digita il nome del workspace per confermare"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"confirm",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"timezone": {
"type": "string",
"description": "Fuso orario predefinito dei report"
},
"currency": {
"type": "string",
"description": "Valuta predefinita"
},
"plan": {
"type": "string",
"description": "free, pro, business o enterprise"
},
"plan_events": {
"type": "integer",
"description": "Eventi al mese inclusi nel piano"
},
"subscription_status": {
"type": "string"
},
"role": {
"type": "string",
"description": "Il tuo ruolo in questo workspace"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces.json
Elenca i tuoi workspace
workspaces_list
Permesso: member
curl https://privatusanalytics.com/workspaces.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"page": {
"type": "integer",
"description": "Pagina (a partire da 1)"
},
"per_page": {
"type": "integer",
"description": "Risultati per pagina (massimo 100)"
}
},
"required": []
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"timezone": {
"type": "string",
"description": "Fuso orario predefinito dei report"
},
"currency": {
"type": "string",
"description": "Valuta predefinita"
},
"plan": {
"type": "string",
"description": "free, pro, business o enterprise"
},
"plan_events": {
"type": "integer",
"description": "Eventi al mese inclusi nel piano"
},
"subscription_status": {
"type": "string"
},
"role": {
"type": "string",
"description": "Il tuo ruolo in questo workspace"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/workspaces/:id.json
Ottieni un workspace
workspaces_get
Permesso: member
curl https://privatusanalytics.com/workspaces/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"timezone": {
"type": "string",
"description": "Fuso orario predefinito dei report"
},
"currency": {
"type": "string",
"description": "Valuta predefinita"
},
"plan": {
"type": "string",
"description": "free, pro, business o enterprise"
},
"plan_events": {
"type": "integer",
"description": "Eventi al mese inclusi nel piano"
},
"subscription_status": {
"type": "string"
},
"role": {
"type": "string",
"description": "Il tuo ruolo in questo workspace"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/workspaces/:id.json
Aggiorna le impostazioni del workspace
workspaces_update
Permesso: workspace.manage
curl -X PATCH https://privatusanalytics.com/workspaces/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Nome del workspace"
},
"timezone": {
"type": "string",
"description": "Fuso orario predefinito dei report"
},
"currency": {
"type": "string",
"description": "Valuta predefinita (ISO 4217)"
},
"id": {
"type": "string",
"description": "Id della risorsa"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id del workspace, ad esempio ws_7Q2K9XH3AB"
},
"name": {
"type": "string"
},
"timezone": {
"type": "string",
"description": "Fuso orario predefinito dei report"
},
"currency": {
"type": "string",
"description": "Valuta predefinita"
},
"plan": {
"type": "string",
"description": "free, pro, business o enterprise"
},
"plan_events": {
"type": "integer",
"description": "Eventi al mese inclusi nel piano"
},
"subscription_status": {
"type": "string"
},
"role": {
"type": "string",
"description": "Il tuo ruolo in questo workspace"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}