Docs
De docs doorbladeren

Analytics REST API

The Privatus Analytics REST API: add .json to any app URL and send a token. Conventions and a reference of every operation, generated from the code.

Als Markdown bekijken

Every page and action in Privatus Analytics is also an API endpoint. There's no separate /api/v1: add .json to a URL and send an API token.

sh
curl https://privatusanalytics.com/sites/pa_7Q2K9XH3AB/stats/aggregate.json?period=7d \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
json
{
  "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.

Alle bewerkingen

Authenticatie

Stuur Authorization: Bearer pat_… mee. Maak tokens aan onder Werkruimte-instellingen, API-tokens. Authenticatiegids.

Overal JSON

Voeg .json toe aan elk pad. Antwoorden zijn { "data": … } en fouten zijn { "error": { "code", "message" } }. Fouten.

MCP

POST JSON-RPC naar https://privatusanalytics.com/mcp met hetzelfde token. Elke onderstaande bewerking is een tool. MCP-gids.

openapi.json downloaden · 285 bewerkingen

API-tokens

POST /workspaces/:workspace_id/api_tokens.json Maak een API-token aan (het token wordt één keer getoond) api_tokens_create

Machtiging: member

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/api_tokens.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Een naam om het token aan te herkennen",
      "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": "Machtigingen (laat weg voor al de jouwe, een lege lijst wordt geweigerd)"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Beperk tot deze site-id's (pa_…). Leeg = alle",
      "default": []
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Verlooptijd (ISO 8601). Leeg = nooit"
    },
    "allowed_ips": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Accepteer alleen verzoeken van deze IP's/CIDR's",
      "default": []
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "token": {
      "anyOf": [
        {
          "type": "string",
          "description": "Het token zelf: wordt alleen bij het aanmaken teruggegeven"
        },
        {
          "type": "null"
        }
      ]
    },
    "token_prefix": {
      "type": "string",
      "description": "Eerste tekens, om het token te herkennen"
    },
    "owner": {
      "type": "string",
      "description": "E-mailadres van het lid dat het bezit"
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Beperkt tot deze sites (leeg = alle)"
    },
    "allowed_ips": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "oauth_client": {
      "anyOf": [
        {
          "type": "string",
          "description": "MCP-client die het heeft ontvangen"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "description": "active, expired of 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 Trek een API-token in api_tokens_delete

Machtiging: member

Voorbeeld
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/api_tokens/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "token": {
      "anyOf": [
        {
          "type": "string",
          "description": "Het token zelf: wordt alleen bij het aanmaken teruggegeven"
        },
        {
          "type": "null"
        }
      ]
    },
    "token_prefix": {
      "type": "string",
      "description": "Eerste tekens, om het token te herkennen"
    },
    "owner": {
      "type": "string",
      "description": "E-mailadres van het lid dat het bezit"
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Beperkt tot deze sites (leeg = alle)"
    },
    "allowed_ips": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "oauth_client": {
      "anyOf": [
        {
          "type": "string",
          "description": "MCP-client die het heeft ontvangen"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "description": "active, expired of 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 API-tokens weergeven api_tokens_list

Machtiging: member

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/api_tokens.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "include_revoked": {
      "type": "boolean",
      "description": "Toon ook ingetrokken en verlopen tokens",
      "default": false
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid"
      },
      "name": {
        "type": "string"
      },
      "token": {
        "anyOf": [
          {
            "type": "string",
            "description": "Het token zelf: wordt alleen bij het aanmaken teruggegeven"
          },
          {
            "type": "null"
          }
        ]
      },
      "token_prefix": {
        "type": "string",
        "description": "Eerste tekens, om het token te herkennen"
      },
      "owner": {
        "type": "string",
        "description": "E-mailadres van het lid dat het bezit"
      },
      "permissions": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "site_ids": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Beperkt tot deze sites (leeg = alle)"
      },
      "allowed_ips": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "oauth_client": {
        "anyOf": [
          {
            "type": "string",
            "description": "MCP-client die het heeft ontvangen"
          },
          {
            "type": "null"
          }
        ]
      },
      "status": {
        "type": "string",
        "description": "active, expired of 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"
      }
    }
  }
}

Abonnementen

GET /plans.json Abonnementen, prijzen en limieten weergeven plans_list

Machtiging: public

Voorbeeld
curl https://privatusanalytics.com/plans.json
Invoer
{
  "type": "object",
  "properties": {
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": []
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "description": "free, pro, business of enterprise"
      },
      "events": {
        "anyOf": [
          {
            "type": "integer",
            "description": "Inbegrepen gebeurtenissen per maand (alleen gratis abonnement)"
          },
          {
            "type": "null"
          }
        ]
      },
      "badge_bonus": {
        "anyOf": [
          {
            "type": "integer",
            "description": "Extra gebeurtenissen per maand voor het tonen van de badge (gratis abonnement)"
          },
          {
            "type": "null"
          }
        ]
      },
      "limits": {
        "type": "object",
        "description": "Abonnementslimieten. Null betekent onbeperkt"
      },
      "tiers": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "events": {
              "type": "integer",
              "description": "Inbegrepen gebeurtenissen per maand"
            },
            "monthly": {
              "type": "integer",
              "description": "USD per maand, maandelijks gefactureerd"
            },
            "yearly": {
              "type": "integer",
              "description": "USD per jaar, jaarlijks gefactureerd (2 maanden gratis)"
            },
            "monthly_price_id": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Paddle-prijs-id (maandelijks)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "yearly_price_id": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Paddle-prijs-id (jaarlijks)"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        "description": "Prijsladder per gebeurtenissen per maand"
      },
      "contact_sales": {
        "type": "boolean",
        "description": "Prijs per contract"
      }
    }
  }
}

Account

GET /account.json Je profiel en voorkeuren ophalen account_get

Machtiging: member

Voorbeeld
curl https://privatusanalytics.com/account.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {},
  "required": []
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string"
    },
    "unconfirmed_email": {
      "anyOf": [
        {
          "type": "string",
          "description": "Nieuw e-mailadres in afwachting van bevestiging"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "theme": {
      "type": "string"
    },
    "default_landing": {
      "type": "string"
    },
    "locale": {
      "type": "string",
      "description": "Taalcode van de app voor dit account (standaard en)"
    },
    "timezone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "shortcuts_enabled": {
      "type": "boolean"
    },
    "reduce_motion": {
      "type": "boolean"
    },
    "product_emails": {
      "type": "boolean"
    },
    "marketing_emails": {
      "type": "boolean",
      "description": "Of marketing-e-mails (drip-campagnes) verstuurd mogen worden. false na een afmelding"
    },
    "newsletter": {
      "type": "boolean"
    },
    "two_factor": {
      "type": "boolean"
    },
    "passkeys": {
      "type": "integer"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /account.json Je profiel en voorkeuren bijwerken account_update

Machtiging: member

Voorbeeld
curl -X PATCH https://privatusanalytics.com/account.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Je naam"
    },
    "email": {
      "type": "string",
      "description": "Nieuw e-mailadres (eerst bevestigd via e-mail)"
    },
    "theme": {
      "type": "string",
      "description": "Kleurthema",
      "enum": [
        "system",
        "light",
        "dark"
      ]
    },
    "default_landing": {
      "type": "string",
      "description": "Pagina na aanmelden: sites of last_site",
      "enum": [
        "sites",
        "last_site"
      ]
    },
    "locale": {
      "type": "string",
      "description": "Taal van de app wanneer je bent ingelogd, als taalcode (en, de, fr enzovoort). Openbare pagina's en de API blijven zoals ze zijn",
      "enum": [
        "en",
        "de",
        "es",
        "fr",
        "it",
        "nl",
        "pt",
        "pl",
        "sv",
        "da",
        "no",
        "fi",
        "ja",
        "ko",
        "zh-CN",
        "zh-TW"
      ]
    },
    "timezone": {
      "type": "string",
      "description": "Je tijdzone (IANA-naam)"
    },
    "shortcuts_enabled": {
      "type": "boolean",
      "description": "Sneltoetsen"
    },
    "reduce_motion": {
      "type": "boolean",
      "description": "Animaties beperken"
    },
    "product_emails": {
      "type": "boolean",
      "description": "E-mails met productupdates en tips"
    },
    "marketing_emails": {
      "type": "boolean",
      "description": "Marketing-e-mails, zoals onboardingtips. Ze weer aanzetten na een afmelding kan alleen in een ingelogde browser"
    },
    "newsletter": {
      "type": "boolean",
      "description": "Maandelijkse nieuwsbrief"
    }
  },
  "required": []
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string"
    },
    "unconfirmed_email": {
      "anyOf": [
        {
          "type": "string",
          "description": "Nieuw e-mailadres in afwachting van bevestiging"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "theme": {
      "type": "string"
    },
    "default_landing": {
      "type": "string"
    },
    "locale": {
      "type": "string",
      "description": "Taalcode van de app voor dit account (standaard en)"
    },
    "timezone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "shortcuts_enabled": {
      "type": "boolean"
    },
    "reduce_motion": {
      "type": "boolean"
    },
    "product_emails": {
      "type": "boolean"
    },
    "marketing_emails": {
      "type": "boolean",
      "description": "Of marketing-e-mails (drip-campagnes) verstuurd mogen worden. false na een afmelding"
    },
    "newsletter": {
      "type": "boolean"
    },
    "two_factor": {
      "type": "boolean"
    },
    "passkeys": {
      "type": "integer"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Affiliateprogramma

GET /account/affiliate/commissions.json Je affiliatecommissies weergeven affiliate_commissions_list

Commissies, terugvorderingen na terugbetalingen en chargebacks, en terugboekingen, nieuwste eerst. Bedragen zijn in centen.

Machtiging: member

Voorbeeld
curl https://privatusanalytics.com/account/affiliate/commissions.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Alleen commissies met deze status",
      "enum": [
        "pending",
        "approved",
        "paid",
        "void"
      ]
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": []
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid",
        "description": "Commissie-id"
      },
      "kind": {
        "type": "string",
        "description": "commission, clawback (terugbetaling of chargeback) of reversal"
      },
      "status": {
        "type": "string",
        "description": "pending (in de wacht), approved (uitbetaalbaar), paid of void"
      },
      "amount_cents": {
        "type": "integer",
        "description": "Jouw deel in centen (negatief bij een terugvordering)"
      },
      "basis_cents": {
        "type": "integer",
        "description": "De nettobetaling (exclusief belasting) waarover het is berekend, in centen"
      },
      "currency": {
        "type": "string",
        "description": "ISO-valutacode"
      },
      "earned_at": {
        "type": "string",
        "format": "date-time",
        "description": "Wanneer de betaling (of terugbetaling) plaatsvond"
      },
      "approved_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time",
            "description": "Wanneer het uitbetaalbaar werd"
          },
          {
            "type": "null"
          }
        ]
      },
      "paid_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time",
            "description": "Wanneer het is uitbetaald"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  }
}
GET /account/affiliate/signup-box.json De code en resultaten van je affiliate-aanmeldvak ophalen affiliate_signup_box_get

De insluitcode voor je aanmeldvak (een script en een gewone iframe) voor het gekozen thema, de attributen die het formulier vooraf invullen, de gebeurtenissen die het script op je pagina afvuurt en de cijfers van het vak: aanmeldingen die nog bevestigd moeten worden, bevestigde aanmeldingen en betalende klanten. available is false totdat je affiliate-aanvraag is goedgekeurd.

Machtiging: member

Voorbeeld
curl https://privatusanalytics.com/account/affiliate/signup-box.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "theme": {
      "type": "string",
      "description": "Thema van het vak: auto (past zich aan het apparaat van de bezoeker aan), light of dark",
      "enum": [
        "auto",
        "light",
        "dark"
      ],
      "examples": [
        "auto"
      ],
      "default": "auto"
    }
  },
  "required": []
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "available": {
      "type": "boolean",
      "description": "Of je een aanmeldvak hebt (alleen voor goedgekeurde affiliates)"
    },
    "theme": {
      "type": "string",
      "description": "Het thema waarvoor de code is gemaakt"
    },
    "frame_url": {
      "anyOf": [
        {
          "type": "string",
          "description": "Het adres van het vak, voor een gewone iframe"
        },
        {
          "type": "null"
        }
      ]
    },
    "script": {
      "anyOf": [
        {
          "type": "string",
          "description": "De insluitcode met script: een element en het laadscript"
        },
        {
          "type": "null"
        }
      ]
    },
    "iframe": {
      "anyOf": [
        {
          "type": "string",
          "description": "De insluitcode met een gewone iframe"
        },
        {
          "type": "null"
        }
      ]
    },
    "prefill_attributes": {
      "type": "array",
      "description": "Attributen op het element die het formulier vooraf invullen voor ingelogde bezoekers"
    },
    "events": {
      "type": "array",
      "description": "DOM-gebeurtenissen die het script op het element afvuurt"
    },
    "waiting": {
      "type": "integer",
      "description": "Aanmeldingen waarvan de gemailde link nog niet is geopend"
    },
    "signups": {
      "type": "integer",
      "description": "Bevestigde aanmeldingen via het vak"
    },
    "customers": {
      "type": "integer",
      "description": "Degenen die betalende klanten zijn geworden"
    }
  }
}
GET /account/affiliate.json Je affiliatestatus, verwijzingslink en statistieken ophalen affiliate_get

De status van je affiliate-aanvraag, je verwijzingslink, de aanmeldingen en betalende klanten die je hebt doorverwezen, en de saldi per valuta (in de wacht, uitbetaalbaar, uitbetaald). status is none als je geen aanvraag hebt gedaan.

Machtiging: member

Voorbeeld
curl https://privatusanalytics.com/account/affiliate.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {},
  "required": []
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "none (geen aanvraag gedaan), pending, approved, rejected of suspended"
    },
    "code": {
      "anyOf": [
        {
          "type": "string",
          "description": "Je verwijzingscode"
        },
        {
          "type": "null"
        }
      ]
    },
    "referral_url": {
      "anyOf": [
        {
          "type": "string",
          "description": "De link om te delen (alleen voor goedgekeurde affiliates)"
        },
        {
          "type": "null"
        }
      ]
    },
    "payout_method": {
      "anyOf": [
        {
          "type": "string",
          "description": "wise of credit"
        },
        {
          "type": "null"
        }
      ]
    },
    "rejection_reason": {
      "anyOf": [
        {
          "type": "string",
          "description": "Waarom de laatste aanvraag is afgewezen"
        },
        {
          "type": "null"
        }
      ]
    },
    "applied_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer je de aanvraag hebt gedaan"
        },
        {
          "type": "null"
        }
      ]
    },
    "approved_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer de aanvraag is goedgekeurd"
        },
        {
          "type": "null"
        }
      ]
    },
    "credit_blocked": {
      "anyOf": [
        {
          "type": "string",
          "description": "Waarom accounttegoed wacht: program (de werkruimte zit in een kortingsprogramma), no_subscription of no_workspace. null wanneer niets het tegenhoudt"
        },
        {
          "type": "null"
        }
      ]
    },
    "signups": {
      "type": "integer",
      "description": "Accounts die via je link of code zijn aangemaakt"
    },
    "customers": {
      "type": "integer",
      "description": "Doorverwezen werkruimtes die hebben betaald"
    },
    "balances": {
      "type": "array",
      "description": "Per valuta: pending_cents (in de wacht), approved_cents (uitbetaalbaar) en paid_cents"
    },
    "payouts": {
      "type": "array",
      "description": "Recente uitbetalingen met amount_cents, currency, payout_method, status (applied: accounttegoed dat wacht op je volgende verlenging, of paid), applied_at en paid_at"
    },
    "terms": {
      "type": "object",
      "description": "Commissiepercentage, maanden, wachtdagen en de uitbetalingsdrempel voor Wise in centen"
    }
  }
}

Analytics

GET /sites/:site_id/overview.json Siteoverzicht: statistieken, grafiekreeksen, toppanelen, live bezoekers en notities stats_overview

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/overview.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Voorinstelling voor datumbereik. Gebruik custom met 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": "Begin van aangepast bereik (tijdzone van de site)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepast bereik, inclusief"
    },
    "compare": {
      "type": "string",
      "description": "Vergelijkingsperiode",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Begin van aangepaste vergelijking"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepaste vergelijking"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Weekdagen van de vergelijking uitlijnen",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Verpak voorwaarden in {\"any\": [...]} voor OF.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Een opgeslagen segment toepassen (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Geïmporteerde historische gegevens toevoegen (datums vóór de eerste eigen gebeurtenis, genegeerd als filters of een segment zijn toegepast)",
      "default": false
    },
    "interval": {
      "type": "string",
      "description": "Tijdvakgrootte van de grafiek",
      "enum": [
        "auto",
        "minute",
        "hour",
        "day",
        "week",
        "month",
        "quarter",
        "year"
      ],
      "default": "auto"
    },
    "panels": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Dimensies waarvoor topwaarden worden opgenomen",
      "default": [
        "channel",
        "referrer",
        "page",
        "entry_page",
        "country",
        "device",
        "browser",
        "os",
        "utm_campaign",
        "event",
        "goal"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /sites/:site_id/experiments.json Experimentrapport: conversieratio per variant, uplift ten opzichte van controle en significantie (twee-proportie z-toets) experiments_report

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/experiments.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Voorinstelling voor datumbereik. Gebruik custom met 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": "Begin van aangepast bereik (tijdzone van de site)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepast bereik, inclusief"
    },
    "compare": {
      "type": "string",
      "description": "Vergelijkingsperiode",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Begin van aangepaste vergelijking"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepaste vergelijking"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Weekdagen van de vergelijking uitlijnen",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Verpak voorwaarden in {\"any\": [...]} voor OF.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Een opgeslagen segment toepassen (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Geïmporteerde historische gegevens toevoegen (datums vóór de eerste eigen gebeurtenis, genegeerd als filters of een segment zijn toegepast)",
      "default": false
    },
    "property": {
      "type": "string",
      "description": "Gebeurteniseigenschap met de variant, bijv. variant",
      "examples": [
        "variant"
      ]
    },
    "goal_id": {
      "type": "string",
      "description": "Doel dat als conversie telt (goal_…)"
    },
    "control": {
      "type": "string",
      "description": "Controlevariant (standaard \"control\" als die er is, anders de variant met de meeste bezoeken)"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "property",
    "goal_id",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /sites/:site_id/insights.json Opvallende veranderingen ten opzichte van de vorige periode, in gewone taal (grootste stijgers en dalers, veranderingen in doelconversie) insights_get

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/insights.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Volledige dagen tot en met gisteren, vergeleken met hetzelfde aantal dagen daarvoor",
      "enum": [
        "7d",
        "14d",
        "28d",
        "30d"
      ],
      "default": "7d"
    },
    "limit": {
      "type": "integer",
      "description": "Maximum aantal inzichten (1 tot 20)",
      "default": 8
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /sites/:site_id/journeys.json Journeys: top 3-stapspaden na een pagina (of elke ingang), of vóór een pagina of doel journeys_explore

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/journeys.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Voorinstelling voor datumbereik. Gebruik custom met 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": "Begin van aangepast bereik (tijdzone van de site)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepast bereik, inclusief"
    },
    "compare": {
      "type": "string",
      "description": "Vergelijkingsperiode",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Begin van aangepaste vergelijking"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepaste vergelijking"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Weekdagen van de vergelijking uitlijnen",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Verpak voorwaarden in {\"any\": [...]} voor OF.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Een opgeslagen segment toepassen (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Geïmporteerde historische gegevens toevoegen (datums vóór de eerste eigen gebeurtenis, genegeerd als filters of een segment zijn toegepast)",
      "default": false
    },
    "mode": {
      "type": "string",
      "description": "forward: pagina's na de startpagina, reverse: pagina's die naar de eindpagina of het doel leiden",
      "enum": [
        "forward",
        "reverse"
      ],
      "default": "forward"
    },
    "path": {
      "type": "string",
      "description": "Startpagina (forward) of eindpagina (reverse). Leeg betekent elke ingang (alleen forward)"
    },
    "goal_id": {
      "type": "string",
      "description": "Reverse-modus: eindig bij dit doel (goal_…) in plaats van een pagina"
    },
    "limit": {
      "type": "integer",
      "description": "Pagina's per stap (max 12)",
      "default": 6
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /sites/:site_id/pages/detail.json Paginadetail: statistieken, vorige en volgende pagina's, bronnen, Web Vitals, gebeurtenissen en klikkaart voor één pad pages_detail

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/pages/detail.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Voorinstelling voor datumbereik. Gebruik custom met 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": "Begin van aangepast bereik (tijdzone van de site)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepast bereik, inclusief"
    },
    "compare": {
      "type": "string",
      "description": "Vergelijkingsperiode",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Begin van aangepaste vergelijking"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepaste vergelijking"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Weekdagen van de vergelijking uitlijnen",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Verpak voorwaarden in {\"any\": [...]} voor OF.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Een opgeslagen segment toepassen (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Geïmporteerde historische gegevens toevoegen (datums vóór de eerste eigen gebeurtenis, genegeerd als filters of een segment zijn toegepast)",
      "default": false
    },
    "path": {
      "type": "string",
      "description": "Paginapad, bijv. /pricing",
      "examples": [
        "/pricing"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "path",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /sites/:site_id/stats/aggregate.json Kernstatistieken voor een periode (met vergelijking) stats_aggregate

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/stats/aggregate.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Voorinstelling voor datumbereik. Gebruik custom met 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": "Begin van aangepast bereik (tijdzone van de site)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepast bereik, inclusief"
    },
    "compare": {
      "type": "string",
      "description": "Vergelijkingsperiode",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Begin van aangepaste vergelijking"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepaste vergelijking"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Weekdagen van de vergelijking uitlijnen",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Verpak voorwaarden in {\"any\": [...]} voor OF.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Een opgeslagen segment toepassen (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Geïmporteerde historische gegevens toevoegen (datums vóór de eerste eigen gebeurtenis, genegeerd als filters of een segment zijn toegepast)",
      "default": false
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /sites/:site_id/breakdown/:dimension.json Topwaarden van een dimensie (pagina's, bronnen, landen…) stats_breakdown

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/breakdown/:dimension.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Voorinstelling voor datumbereik. Gebruik custom met 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": "Begin van aangepast bereik (tijdzone van de site)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepast bereik, inclusief"
    },
    "compare": {
      "type": "string",
      "description": "Vergelijkingsperiode",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Begin van aangepaste vergelijking"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepaste vergelijking"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Weekdagen van de vergelijking uitlijnen",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Verpak voorwaarden in {\"any\": [...]} voor OF.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Een opgeslagen segment toepassen (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Geïmporteerde historische gegevens toevoegen (datums vóór de eerste eigen gebeurtenis, genegeerd als filters of een segment zijn toegepast)",
      "default": false
    },
    "dimension": {
      "type": "string",
      "description": "Dimension van de bron"
    },
    "limit": {
      "type": "integer",
      "description": "Rijen per pagina (max 1000)",
      "default": 10
    },
    "page": {
      "type": "integer",
      "description": "Paginanummer",
      "default": 1
    },
    "sort": {
      "type": "string",
      "description": "Sorteerstatistiek",
      "enum": [
        "visitors",
        "visits",
        "pageviews",
        "revenue"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "dimension",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /sites/:site_id/stats/timeseries.json Statistieken per tijdvak voor grafieken stats_timeseries

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/stats/timeseries.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Voorinstelling voor datumbereik. Gebruik custom met 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": "Begin van aangepast bereik (tijdzone van de site)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepast bereik, inclusief"
    },
    "compare": {
      "type": "string",
      "description": "Vergelijkingsperiode",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Begin van aangepaste vergelijking"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepaste vergelijking"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Weekdagen van de vergelijking uitlijnen",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Verpak voorwaarden in {\"any\": [...]} voor OF.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Een opgeslagen segment toepassen (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Geïmporteerde historische gegevens toevoegen (datums vóór de eerste eigen gebeurtenis, genegeerd als filters of een segment zijn toegepast)",
      "default": false
    },
    "interval": {
      "type": "string",
      "description": "Tijdvakgrootte. auto kiest er een voor het bereik",
      "enum": [
        "auto",
        "minute",
        "hour",
        "day",
        "week",
        "month",
        "quarter",
        "year"
      ],
      "default": "auto"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}

Assistent

POST /sites/:site_id/ask.json Stel een vraag in een nieuw gesprek (telt mee voor de maandlimiet voor AI-vragen) assistant_ask

Machtiging: analytics.read

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/ask.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "question": {
      "type": "string",
      "description": "Je eerste vraag in gewone taal",
      "examples": [
        "How many visitors did we have last week?"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "question",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Gespreks-id, bijv. ask_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site-id"
        },
        {
          "type": "null"
        }
      ]
    },
    "title": {
      "anyOf": [
        {
          "type": "string",
          "description": "De eerste vraag, ingekort"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Tijdstip van het laatste bericht"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Wordt na dit tijdstip automatisch verwijderd (30 dagen na het laatste bericht)"
    },
    "messages": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Bericht-id binnen het gesprek"
        },
        "role": {
          "type": "string",
          "description": "user (de vraag) of assistant (het antwoord)"
        },
        "content": {
          "type": "string",
          "description": "Vraag, of het antwoord in Markdown"
        },
        "queries": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "Hoe ik hieraan kwam: de exacte API-query's achter het antwoord, als [{tool, input, status, error}]"
        },
        "chart": {
          "anyOf": [
            {
              "type": "object",
              "description": "Grafiek van het antwoord: {type: line, labels, series, comparison, metric, format} of {type: table, columns, rows}"
            },
            {
              "type": "null"
            }
          ]
        },
        "goal_draft": {
          "anyOf": [
            {
              "type": "object",
              "description": "Een door de assistent voorgesteld doel, te bevestigen met goals_create"
            },
            {
              "type": "null"
            }
          ]
        },
        "input_tokens": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Gebruikte invoertokens van het model"
            },
            {
              "type": "null"
            }
          ]
        },
        "output_tokens": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Gebruikte uitvoertokens van het model"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "description": "Vragen en antwoorden, oudste eerst"
    }
  }
}
DELETE /sites/:site_id/ask/:id.json Een Ask-gesprek en de berichten ervan verwijderen assistant_conversations_delete

Machtiging: analytics.read

Voorbeeld
curl -X DELETE https://privatusanalytics.com/sites/:site_id/ask/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Gespreks-id, bijv. ask_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site-id"
        },
        {
          "type": "null"
        }
      ]
    },
    "title": {
      "anyOf": [
        {
          "type": "string",
          "description": "De eerste vraag, ingekort"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Tijdstip van het laatste bericht"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Wordt na dit tijdstip automatisch verwijderd (30 dagen na het laatste bericht)"
    }
  }
}
GET /sites/:site_id/ask.json Je Ask-gesprekken voor een site weergeven assistant_conversations_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/ask.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Gespreks-id, bijv. ask_7Q2K9XH3AB"
      },
      "site_id": {
        "anyOf": [
          {
            "type": "string",
            "description": "Site-id"
          },
          {
            "type": "null"
          }
        ]
      },
      "title": {
        "anyOf": [
          {
            "type": "string",
            "description": "De eerste vraag, ingekort"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      },
      "updated_at": {
        "type": "string",
        "format": "date-time",
        "description": "Tijdstip van het laatste bericht"
      },
      "expires_at": {
        "type": "string",
        "format": "date-time",
        "description": "Wordt na dit tijdstip automatisch verwijderd (30 dagen na het laatste bericht)"
      }
    }
  }
}
GET /sites/:site_id/ask/:id.json Een Ask-gesprek: vragen, antwoorden, de query's erachter en grafieken assistant_conversations_get

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/ask/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Gespreks-id, bijv. ask_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site-id"
        },
        {
          "type": "null"
        }
      ]
    },
    "title": {
      "anyOf": [
        {
          "type": "string",
          "description": "De eerste vraag, ingekort"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Tijdstip van het laatste bericht"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Wordt na dit tijdstip automatisch verwijderd (30 dagen na het laatste bericht)"
    },
    "messages": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Bericht-id binnen het gesprek"
        },
        "role": {
          "type": "string",
          "description": "user (de vraag) of assistant (het antwoord)"
        },
        "content": {
          "type": "string",
          "description": "Vraag, of het antwoord in Markdown"
        },
        "queries": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "Hoe ik hieraan kwam: de exacte API-query's achter het antwoord, als [{tool, input, status, error}]"
        },
        "chart": {
          "anyOf": [
            {
              "type": "object",
              "description": "Grafiek van het antwoord: {type: line, labels, series, comparison, metric, format} of {type: table, columns, rows}"
            },
            {
              "type": "null"
            }
          ]
        },
        "goal_draft": {
          "anyOf": [
            {
              "type": "object",
              "description": "Een door de assistent voorgesteld doel, te bevestigen met goals_create"
            },
            {
              "type": "null"
            }
          ]
        },
        "input_tokens": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Gebruikte invoertokens van het model"
            },
            {
              "type": "null"
            }
          ]
        },
        "output_tokens": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Gebruikte uitvoertokens van het model"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "description": "Vragen en antwoorden, oudste eerst"
    }
  }
}
POST /sites/:site_id/ask/:ask_conversation_id/messages.json Stel een vervolgvraag in een gesprek (telt mee voor de maandlimiet voor AI-vragen). Geeft het antwoord terug. assistant_ask_followup

Machtiging: analytics.read

Voorbeeld
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 '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "question": {
      "type": "string",
      "description": "Je vraag in gewone taal",
      "examples": [
        "Which pages had the most visitors last week?"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "ask_conversation_id": {
      "type": "string",
      "description": "Ask conversation van de bron"
    }
  },
  "required": [
    "question",
    "site_id",
    "ask_conversation_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Bericht-id binnen het gesprek"
    },
    "role": {
      "type": "string",
      "description": "user (de vraag) of assistant (het antwoord)"
    },
    "content": {
      "type": "string",
      "description": "Vraag, of het antwoord in Markdown"
    },
    "queries": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Hoe ik hieraan kwam: de exacte API-query's achter het antwoord, als [{tool, input, status, error}]"
    },
    "chart": {
      "anyOf": [
        {
          "type": "object",
          "description": "Grafiek van het antwoord: {type: line, labels, series, comparison, metric, format} of {type: table, columns, rows}"
        },
        {
          "type": "null"
        }
      ]
    },
    "goal_draft": {
      "anyOf": [
        {
          "type": "object",
          "description": "Een door de assistent voorgesteld doel, te bevestigen met goals_create"
        },
        {
          "type": "null"
        }
      ]
    },
    "input_tokens": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Gebruikte invoertokens van het model"
        },
        {
          "type": "null"
        }
      ]
    },
    "output_tokens": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Gebruikte uitvoertokens van het model"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Auditlogboek

GET /workspaces/:workspace_id/audit_log.json Items van het auditlogboek weergeven (voeg .csv toe om te exporteren) audit_logs_get

Machtiging: workspace.manage

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/audit_log.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "actor": {
      "type": "string",
      "description": "Alleen wijzigingen van dit lid (e-mail)"
    },
    "item_type": {
      "type": "string",
      "description": "Alleen dit soort record, bijv. Site"
    },
    "event": {
      "type": "string",
      "description": "Alleen deze actie",
      "enum": [
        "create",
        "update",
        "destroy"
      ]
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Vanaf datum (inclusief)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Tot datum (inclusief)"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid"
      },
      "created_at": {
        "type": "string",
        "format": "date-time",
        "description": "Wanneer"
      },
      "event": {
        "type": "string",
        "description": "create, update of destroy"
      },
      "item_type": {
        "type": "string",
        "description": "Soort record, bijv. Site"
      },
      "item_id": {
        "type": "string",
        "format": "uuid"
      },
      "target": {
        "type": "string",
        "description": "Het record, op naam waar bekend"
      },
      "actor_email": {
        "anyOf": [
          {
            "type": "string",
            "description": "Lid dat de wijziging deed"
          },
          {
            "type": "null"
          }
        ]
      },
      "actor_name": {
        "type": "string"
      },
      "token_name": {
        "anyOf": [
          {
            "type": "string",
            "description": "Gebruikte API-token, indien van toepassing"
          },
          {
            "type": "null"
          }
        ]
      },
      "changes": {
        "type": "object",
        "description": "Gewijzigde velden: { field: [voor, na] }"
      },
      "ip": {
        "anyOf": [
          {
            "type": "string",
            "description": "Het IP-adres van het lid"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  }
}

Campagnes

POST /sites/:site_id/campaigns/costs.json De uitgaven voor een campagne in een maand instellen campaign_costs_create

Machtiging: content.write

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/campaigns/costs.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "campaign": {
      "type": "string",
      "description": "utm_campaign-waarde waar de uitgaven bij horen",
      "examples": [
        "spring_sale"
      ]
    },
    "month": {
      "type": "string",
      "description": "Maand, JJJJ-MM",
      "examples": [
        "2026-09"
      ]
    },
    "amount": {
      "type": "number",
      "description": "Uitgaven in hele eenheden, bijv. 1250.50"
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217-valuta (standaard de valuta van de site)"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "campaign",
    "month",
    "amount",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id van het kostenitem"
    },
    "campaign": {
      "type": "string",
      "description": "utm_campaign-waarde"
    },
    "month": {
      "type": "string",
      "description": "Maand, JJJJ-MM"
    },
    "amount_minor": {
      "type": "integer",
      "description": "Uitgaven in kleinste eenheden"
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217-valuta van het bedrag"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/campaigns/costs/:id.json Een campagnekostenitem verwijderen campaign_costs_delete

Machtiging: content.write

Voorbeeld
curl -X DELETE https://privatusanalytics.com/sites/:site_id/campaigns/costs/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id van het kostenitem"
    },
    "campaign": {
      "type": "string",
      "description": "utm_campaign-waarde"
    },
    "month": {
      "type": "string",
      "description": "Maand, JJJJ-MM"
    },
    "amount_minor": {
      "type": "integer",
      "description": "Uitgaven in kleinste eenheden"
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217-valuta van het bedrag"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /sites/:site_id/campaigns/costs/import.json Campagnekosten importeren uit CSV (campaign,month,amount[,currency]) campaign_costs_import

Machtiging: content.write

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/campaigns/costs/import.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "file": {
      "type": "string",
      "format": "binary",
      "description": "CSV-bestandsupload (multipart-formulieren)"
    },
    "csv": {
      "type": "string",
      "description": "CSV-tekst: campaign,month,amount[,currency]"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "imported": {
      "type": "integer",
      "description": "Opgeslagen rijen"
    },
    "failed": {
      "type": "integer",
      "description": "Overgeslagen rijen"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Waarom rijen zijn overgeslagen (eerste 50)"
    }
  }
}
GET /sites/:site_id/campaigns/costs.json Campagnekostenitems weergeven campaign_costs_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/campaigns/costs.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "campaign": {
      "type": "string",
      "description": "Alleen deze campagne"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid",
        "description": "Id van het kostenitem"
      },
      "campaign": {
        "type": "string",
        "description": "utm_campaign-waarde"
      },
      "month": {
        "type": "string",
        "description": "Maand, JJJJ-MM"
      },
      "amount_minor": {
        "type": "integer",
        "description": "Uitgaven in kleinste eenheden"
      },
      "currency": {
        "type": "string",
        "description": "ISO 4217-valuta van het bedrag"
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      },
      "updated_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
PATCH /sites/:site_id/campaigns/costs/:id.json Een campagnekostenitem wijzigen campaign_costs_update

Machtiging: content.write

Voorbeeld
curl -X PATCH https://privatusanalytics.com/sites/:site_id/campaigns/costs/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "campaign": {
      "type": "string",
      "description": "utm_campaign-waarde"
    },
    "month": {
      "type": "string",
      "description": "Maand, JJJJ-MM"
    },
    "amount": {
      "type": "number",
      "description": "Uitgaven in hele eenheden"
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217-valuta"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id van het kostenitem"
    },
    "campaign": {
      "type": "string",
      "description": "utm_campaign-waarde"
    },
    "month": {
      "type": "string",
      "description": "Maand, JJJJ-MM"
    },
    "amount_minor": {
      "type": "integer",
      "description": "Uitgaven in kleinste eenheden"
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217-valuta van het bedrag"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/campaigns/builder.json Een URL met UTM-tags opbouwen en valideren campaigns_builder

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/campaigns/builder.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "destination": {
      "type": "string",
      "description": "URL van de landingspagina (https://…)",
      "examples": [
        "https://example.com/pricing"
      ]
    },
    "preset": {
      "type": "string",
      "description": "Vul utm_source/utm_medium voor een kanaal in als ze leeg zijn",
      "enum": [
        "newsletter",
        "social",
        "paid_search",
        "paid_social",
        "print",
        "partner"
      ]
    },
    "utm_source": {
      "type": "string",
      "description": "Waar het verkeer vandaan komt"
    },
    "utm_medium": {
      "type": "string",
      "description": "Marketingmedium, bijv. email, cpc"
    },
    "utm_campaign": {
      "type": "string",
      "description": "Campagnenaam, bijv. spring_sale"
    },
    "utm_content": {
      "type": "string",
      "description": "Variant, bijv. header_button"
    },
    "utm_term": {
      "type": "string",
      "description": "Zoekwoord voor betaald zoeken"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "url": {
      "anyOf": [
        {
          "type": "string",
          "description": "Getagde URL (null zolang er fouten zijn)"
        },
        {
          "type": "null"
        }
      ]
    },
    "valid": {
      "type": "boolean",
      "description": "True wanneer er geen fouten zijn"
    },
    "destination": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "preset": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "utm_source": {
      "anyOf": [
        {
          "type": "string",
          "description": "Genormaliseerde utm_source"
        },
        {
          "type": "null"
        }
      ]
    },
    "utm_medium": {
      "anyOf": [
        {
          "type": "string",
          "description": "Genormaliseerde utm_medium"
        },
        {
          "type": "null"
        }
      ]
    },
    "utm_campaign": {
      "anyOf": [
        {
          "type": "string",
          "description": "Genormaliseerde utm_campaign"
        },
        {
          "type": "null"
        }
      ]
    },
    "utm_content": {
      "anyOf": [
        {
          "type": "string",
          "description": "Genormaliseerde utm_content"
        },
        {
          "type": "null"
        }
      ]
    },
    "utm_term": {
      "anyOf": [
        {
          "type": "string",
          "description": "Genormaliseerde utm_term"
        },
        {
          "type": "null"
        }
      ]
    },
    "issues": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "field, level (error of warning) en message"
    },
    "presets": {
      "type": "object",
      "description": "Kanaalvoorinstellingen: utm_source/utm_medium per voorinstelling"
    }
  }
}
GET /sites/:site_id/campaigns/hygiene.json UTM-hygiëne: bijna-dubbele waarden, stijlproblemen en onbekende bronnen campaigns_hygiene

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/campaigns/hygiene.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Voorinstelling voor datumbereik. Gebruik custom met 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": "Begin van aangepast bereik (tijdzone van de site)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepast bereik, inclusief"
    },
    "compare": {
      "type": "string",
      "description": "Vergelijkingsperiode",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Begin van aangepaste vergelijking"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepaste vergelijking"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Weekdagen van de vergelijking uitlijnen",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Verpak voorwaarden in {\"any\": [...]} voor OF.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Een opgeslagen segment toepassen (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Geïmporteerde historische gegevens toevoegen (datums vóór de eerste eigen gebeurtenis, genegeerd als filters of een segment zijn toegepast)",
      "default": false
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "period": {
      "type": "object",
      "description": "from/to van de periode (UTC)"
    },
    "duplicates": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Bijna-dubbele waarden: veld, suggestie en varianten [{value, visits}]"
    },
    "style_issues": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Waarden die niet uit kleine letters met underscores bestaan: field, value, visits, suggestion"
    },
    "unknown_sources": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "utm_source-waarden die we niet herkennen: value, visits"
    }
  }
}
GET /sites/:site_id/campaigns.json Campagneoverzicht met conversies, omzet, kosten, CPA en ROAS campaigns_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/campaigns.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Voorinstelling voor datumbereik. Gebruik custom met 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": "Begin van aangepast bereik (tijdzone van de site)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepast bereik, inclusief"
    },
    "compare": {
      "type": "string",
      "description": "Vergelijkingsperiode",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Begin van aangepaste vergelijking"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepaste vergelijking"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Weekdagen van de vergelijking uitlijnen",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Verpak voorwaarden in {\"any\": [...]} voor OF.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Een opgeslagen segment toepassen (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Geïmporteerde historische gegevens toevoegen (datums vóór de eerste eigen gebeurtenis, genegeerd als filters of een segment zijn toegepast)",
      "default": false
    },
    "goal_id": {
      "type": "string",
      "description": "Doel (goal_…) waarvan de conversies worden geteld. Standaard het eerste actieve doel"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "period": {
      "type": "object",
      "description": "from/to van de periode (UTC)"
    },
    "currency": {
      "type": "string",
      "description": "Sitevaluta voor omzet en kosten"
    },
    "goal_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Doel dat als conversie telt"
        },
        {
          "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 (kleinste eenheden), roas (omzet ÷ kosten) en sources [{source, medium, visitors, visits, conversions, conversion_rate, revenue}]"
    },
    "totals": {
      "type": "object",
      "description": "Sommen over alle vermelde campagnes"
    }
  }
}

Crawlers

POST /sites/:site_id/crawlers/connection.json Hits van AI-crawlers synchroniseren vanuit een Cloudflare-zone (vereist een Cloudflare-toestemming vanuit de browser) crawlers_cloudflare_connect

Machtiging: sites.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/crawlers/connection.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "zone_id": {
      "type": "string",
      "description": "Cloudflare-zone-id, uit crawlers_cloudflare_zones",
      "examples": [
        "023e105f4ecef8ad9ca31a8372d0c353"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "zone_id",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "zone_id": {
      "type": "string",
      "description": "Cloudflare-zone-id"
    },
    "zone_name": {
      "type": "string",
      "description": "Naam van de Cloudflare-zone, bijv. example.com"
    },
    "status": {
      "type": "string",
      "description": "active of error"
    },
    "last_synced_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer crawlerhits voor het laatst zijn geïmporteerd, of null vóór de eerste import"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/crawlers/connection.json Cloudflare loskoppelen en de geïmporteerde crawlerhits verwijderen crawlers_cloudflare_disconnect

Machtiging: sites.manage

Voorbeeld
curl -X DELETE https://privatusanalytics.com/sites/:site_id/crawlers/connection.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "zone_id": {
      "type": "string",
      "description": "Cloudflare-zone-id"
    },
    "zone_name": {
      "type": "string",
      "description": "Naam van de Cloudflare-zone, bijv. example.com"
    },
    "status": {
      "type": "string",
      "description": "active of error"
    },
    "last_synced_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer crawlerhits voor het laatst zijn geïmporteerd, of null vóór de eerste import"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /sites/:site_id/crawlers/sync.json Nu crawlerhits importeren vanuit Cloudflare crawlers_cloudflare_sync

Machtiging: sites.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/crawlers/sync.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "zone_id": {
      "type": "string",
      "description": "Cloudflare-zone-id"
    },
    "zone_name": {
      "type": "string",
      "description": "Naam van de Cloudflare-zone, bijv. example.com"
    },
    "status": {
      "type": "string",
      "description": "active of error"
    },
    "last_synced_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer crawlerhits voor het laatst zijn geïmporteerd, of null vóór de eerste import"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/crawlers/zones.json De Cloudflare-zones weergeven die je kunt koppelen (vereist een Cloudflare-toestemming vanuit de browser) crawlers_cloudflare_zones

Machtiging: sites.manage

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/crawlers/zones.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /sites/:site_id/crawlers.json AI-crawlerrapport: hits per crawler in de tijd, toppaden per crawler, per categorie crawlers_report

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/crawlers.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Voorinstelling voor datumbereik. Gebruik custom met 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": "Begin van aangepast bereik (tijdzone van de site)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepast bereik, inclusief"
    },
    "category": {
      "type": "string",
      "description": "ai, search, seo, other of all",
      "enum": [
        "all",
        "ai",
        "search",
        "seo",
        "other"
      ],
      "default": "ai"
    },
    "crawler": {
      "type": "string",
      "description": "Alleen deze crawler, bijv. GPTBot"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}

Dashboards

GET /workspaces/:workspace_id/dashboards/:id/cards/:index.json Gegevens voor één kaart van een eigen dashboard dashboards_card

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/dashboards/:id/cards/:index.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    },
    "index": {
      "type": "string",
      "description": "Index van de bron"
    }
  },
  "required": [
    "workspace_id",
    "id",
    "index"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
POST /workspaces/:workspace_id/dashboards.json Een eigen dashboard aanmaken dashboards_create

Machtiging: content.write

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/dashboards.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Naam van het dashboard",
      "examples": [
        "Client: Acme"
      ]
    },
    "cards": {
      "type": "array",
      "items": {},
      "description": "Kaarten op volgorde (max 40): [{\"type\": \"metric|chart|breakdown|goal|live|funnel|uptime|vitals\", \"site_id\": \"pa_…\", \"title\": \"optional\", \"params\": {\"period\": \"30d\", \"metric\": \"visitors\", \"dimension\": \"page\", \"funnel_id\": \"fun_…\"}}]. Parameters die een type niet gebruikt worden genegeerd",
      "default": []
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Dashboard-id, bijv. dash_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "cards": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Kaarten op volgorde: [{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 Een eigen dashboard verwijderen dashboards_delete

Machtiging: content.write

Voorbeeld
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/dashboards/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Dashboard-id, bijv. dash_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "cards": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Kaarten op volgorde: [{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 Eigen dashboards weergeven dashboards_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/dashboards.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Dashboard-id, bijv. dash_7Q2K9XH3AB"
      },
      "name": {
        "type": "string"
      },
      "cards": {
        "type": "array",
        "items": {
          "type": "object"
        },
        "description": "Kaarten op volgorde: [{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 Een eigen dashboard en de kaarten ervan ophalen dashboards_get

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/dashboards/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Dashboard-id, bijv. dash_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "cards": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Kaarten op volgorde: [{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 Een eigen dashboard hernoemen of de kaarten ervan vervangen dashboards_update

Machtiging: content.write

Voorbeeld
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/dashboards/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nieuwe naam (ongewijzigd als leeg)"
    },
    "cards": {
      "type": "array",
      "items": {},
      "description": "Vervangt alle kaarten. Kaarten op volgorde (max 40): [{\"type\": \"metric|chart|breakdown|goal|live|funnel|uptime|vitals\", \"site_id\": \"pa_…\", \"title\": \"optional\", \"params\": {\"period\": \"30d\", \"metric\": \"visitors\", \"dimension\": \"page\", \"funnel_id\": \"fun_…\"}}]. Parameters die een type niet gebruikt worden genegeerd"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Dashboard-id, bijv. dash_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "cards": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Kaarten op volgorde: [{type, site_id, title, params}]"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Delen

GET /badge/:site_id.json Bezoekerstellerbadge (SVG) voor een openbare site badges_get

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl https://privatusanalytics.com/badge/:site_id.json
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /share/:token/breakdown/:dimension.json Topwaarden van een gedeelde dimensie shares_breakdown

Machtiging: public

Voorbeeld
curl https://privatusanalytics.com/share/:token/breakdown/:dimension.json
Invoer
{
  "type": "object",
  "properties": {
    "dimension": {
      "type": "string",
      "description": "Dimension van de bron"
    },
    "period": {
      "type": "string",
      "description": "Voorinstelling voor datumbereik (genegeerd als de link het vergrendelt)",
      "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": "Begin van aangepast bereik"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepast bereik, inclusief"
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Extra filters, als de link ze toestaat",
      "default": []
    },
    "limit": {
      "type": "integer",
      "description": "Rijen (max 100)",
      "default": 10
    },
    "token": {
      "type": "string",
      "description": "Token van de bron"
    }
  },
  "required": [
    "dimension",
    "token"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /share/:token.json Overzicht van een gedeeld dashboard voor een deeltoken shares_overview

Machtiging: public

Voorbeeld
curl https://privatusanalytics.com/share/:token.json
Invoer
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Voorinstelling voor datumbereik (genegeerd als de link het vergrendelt)",
      "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": "Begin van aangepast bereik"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepast bereik, inclusief"
    },
    "compare": {
      "type": "string",
      "description": "Vergelijkingsperiode",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Extra filters, als de link ze toestaat: [[\"dimension\",\"operator\",\"value\"], …]",
      "default": []
    },
    "interval": {
      "type": "string",
      "description": "Tijdvakgrootte van de grafiek",
      "enum": [
        "auto",
        "minute",
        "hour",
        "day",
        "week",
        "month",
        "quarter",
        "year"
      ],
      "default": "auto"
    },
    "token": {
      "type": "string",
      "description": "Token van de bron"
    }
  },
  "required": [
    "token"
  ]
}
Antwoordgegevens
{
  "type": "object"
}

Documentatie

GET /docs/api.json Alle API-bewerkingen en MCP-tools weergeven docs_api

Machtiging: public

Voorbeeld
curl https://privatusanalytics.com/docs/api.json
Invoer
{
  "type": "object",
  "properties": {
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": []
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "tool_name": {
        "type": "string",
        "description": "MCP-toolnaam en OpenAPI operationId"
      },
      "summary": {
        "type": "string"
      },
      "description": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "group": {
        "type": "string"
      },
      "verb": {
        "type": "string",
        "description": "HTTP-methode"
      },
      "path": {
        "type": "string",
        "description": "Padsjabloon. Voeg .json toe voor JSON"
      },
      "permission": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "input_schema": {
        "type": "object",
        "description": "JSON Schema van de invoer"
      },
      "response_schema": {
        "type": "object",
        "description": "JSON Schema van `data`"
      }
    }
  }
}
GET /docs.json Documentatiepagina's weergeven docs_list

Machtiging: public

Voorbeeld
curl https://privatusanalytics.com/docs.json
Invoer
{
  "type": "object",
  "properties": {
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": []
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "title": {
        "type": "string",
        "description": "Paginatitel"
      },
      "description": {
        "type": "string",
        "description": "Samenvatting in één regel"
      },
      "path": {
        "type": "string",
        "description": "Paginapad. Voeg .md toe voor Markdown of .json voor JSON"
      },
      "section": {
        "type": "string",
        "description": "Sectieslug, bijv. tracker"
      }
    }
  }
}
GET /openapi.json OpenAPI 3.1-document voor de hele API docs_openapi

Machtiging: public

Voorbeeld
curl https://privatusanalytics.com/openapi.json
Invoer
{
  "type": "object",
  "properties": {},
  "required": []
}
Antwoordgegevens
{
  "type": "object"
}
GET /docs/:section/:page.json Een documentatiepagina lezen (Markdown en HTML) docs_get

section en page komen uit het paginapad /docs/<section>/<page>. Gebruik page "index" voor een sectieoverzicht.

Machtiging: public

Voorbeeld
curl https://privatusanalytics.com/docs/:section/:page.json
Invoer
{
  "type": "object",
  "properties": {
    "section": {
      "type": "string",
      "description": "Section van de bron"
    },
    "page": {
      "type": "string",
      "description": "Page van de bron"
    }
  },
  "required": [
    "section",
    "page"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "Paginatitel"
    },
    "description": {
      "type": "string",
      "description": "Samenvatting in één regel"
    },
    "path": {
      "type": "string",
      "description": "Paginapad. Voeg .md toe voor Markdown of .json voor JSON"
    },
    "section": {
      "type": "string",
      "description": "Sectieslug, bijv. tracker"
    },
    "headings": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Secties op de pagina (id en tekst)"
    },
    "full_markdown": {
      "type": "string",
      "description": "De pagina als Markdown (titel inbegrepen)"
    },
    "html": {
      "type": "string",
      "description": "De paginabody als HTML gerenderd"
    }
  }
}

Doelen

POST /sites/:site_id/goals/:id/archive.json Een doel archiveren (verborgen in rapporten) goals_archive

Machtiging: content.write

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/goals/:id/archive.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Doel-id, bijv. goal_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "page, event, engagement, outbound of download"
    },
    "match_type": {
      "type": "string",
      "description": "exact, prefix, glob of regex"
    },
    "pattern": {
      "anyOf": [
        {
          "type": "string",
          "description": "Pad-, domein- of bestandspatroon"
        },
        {
          "type": "null"
        }
      ]
    },
    "hostname": {
      "anyOf": [
        {
          "type": "string",
          "description": "Hostnaambeperking (paginadoelen)"
        },
        {
          "type": "null"
        }
      ]
    },
    "event_name": {
      "anyOf": [
        {
          "type": "string",
          "description": "Naam van de eigen gebeurtenis (gebeurtenisdoelen)"
        },
        {
          "type": "null"
        }
      ]
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Voorwaarden voor gebeurteniseigenschappen"
    },
    "scroll_threshold": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: scroll-%"
        },
        {
          "type": "null"
        }
      ]
    },
    "time_threshold_seconds": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: seconden op de pagina"
        },
        {
          "type": "null"
        }
      ]
    },
    "value_mode": {
      "type": "string",
      "description": "none, fixed of revenue"
    },
    "fixed_value_minor": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Vaste waarde in kleinste eenheden"
        },
        {
          "type": "null"
        }
      ]
    },
    "count_mode": {
      "type": "string",
      "description": "once_per_visit of every"
    },
    "archived": {
      "type": "boolean"
    },
    "archived_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "stats": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "completions": {
              "type": "integer",
              "description": "Overeenkomende gebeurtenissen, herhalingen inbegrepen"
            },
            "conversions": {
              "type": "integer",
              "description": "Bezoeken met minstens één voltooiing"
            },
            "conversion_rate": {
              "type": "number",
              "description": "Conversies ÷ bezoeken (of ÷ bezoekers, volgens de siteinstelling), %"
            },
            "value": {
              "type": "integer",
              "description": "Doelwaarde in kleinste eenheden van de sitevaluta"
            },
            "change": {
              "anyOf": [
                {
                  "type": "number",
                  "description": "Verandering in conversies ten opzichte van de vorige periode, %"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "Periodestatistieken (alleen in lijst)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /sites/:site_id/goals.json Een doel aanmaken goals_create

Machtiging: content.write

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/goals.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Naam van het doel",
      "examples": [
        "Signed up"
      ]
    },
    "kind": {
      "type": "string",
      "description": "page (een pagina bezoeken), event (eigen gebeurtenis), engagement (scrollen of tijd op de pagina), outbound (klik op een uitgaande link) of download (bestandsdownload)",
      "enum": [
        "page",
        "event",
        "engagement",
        "outbound",
        "download"
      ]
    },
    "match_type": {
      "type": "string",
      "description": "Hoe pattern overeenkomt met het pad (page, engagement), het linkdomein (outbound) of het bestand (download): exact, prefix, glob (*) of regex",
      "enum": [
        "exact",
        "prefix",
        "glob",
        "regex"
      ],
      "default": "exact"
    },
    "pattern": {
      "type": "string",
      "description": "Pad-, domein- of bestandspatroon, bijv. /pricing, /blog/*, stripe.com of *.pdf"
    },
    "hostname": {
      "type": "string",
      "description": "Tel alleen pagina's op deze hostnaam (paginadoelen)"
    },
    "event_name": {
      "type": "string",
      "description": "Naam van de eigen gebeurtenis (gebeurtenisdoelen)"
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      },
      "description": "Voorwaarden voor gebeurteniseigenschappen: [{\"key\": \"plan\", \"operator\": \"is|is_not|contains|gt|lt\", \"value\": \"pro\"}]",
      "default": []
    },
    "scroll_threshold": {
      "type": "integer",
      "description": "Engagement: te bereiken scrolldiepte in %"
    },
    "time_threshold_seconds": {
      "type": "integer",
      "description": "Engagement: seconden op de pagina"
    },
    "value_mode": {
      "type": "string",
      "description": "none, fixed (fixed_value per conversie) of revenue (de omzet van de gebeurtenis)",
      "enum": [
        "none",
        "fixed",
        "revenue"
      ],
      "default": "none"
    },
    "fixed_value": {
      "type": "number",
      "description": "Vaste waarde per conversie in de valuta van de site, bijv. 50.0"
    },
    "count_mode": {
      "type": "string",
      "description": "De waarde telt once_per_visit of bij elke voltooiing",
      "enum": [
        "once_per_visit",
        "every"
      ],
      "default": "once_per_visit"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "kind",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Doel-id, bijv. goal_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "page, event, engagement, outbound of download"
    },
    "match_type": {
      "type": "string",
      "description": "exact, prefix, glob of regex"
    },
    "pattern": {
      "anyOf": [
        {
          "type": "string",
          "description": "Pad-, domein- of bestandspatroon"
        },
        {
          "type": "null"
        }
      ]
    },
    "hostname": {
      "anyOf": [
        {
          "type": "string",
          "description": "Hostnaambeperking (paginadoelen)"
        },
        {
          "type": "null"
        }
      ]
    },
    "event_name": {
      "anyOf": [
        {
          "type": "string",
          "description": "Naam van de eigen gebeurtenis (gebeurtenisdoelen)"
        },
        {
          "type": "null"
        }
      ]
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Voorwaarden voor gebeurteniseigenschappen"
    },
    "scroll_threshold": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: scroll-%"
        },
        {
          "type": "null"
        }
      ]
    },
    "time_threshold_seconds": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: seconden op de pagina"
        },
        {
          "type": "null"
        }
      ]
    },
    "value_mode": {
      "type": "string",
      "description": "none, fixed of revenue"
    },
    "fixed_value_minor": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Vaste waarde in kleinste eenheden"
        },
        {
          "type": "null"
        }
      ]
    },
    "count_mode": {
      "type": "string",
      "description": "once_per_visit of every"
    },
    "archived": {
      "type": "boolean"
    },
    "archived_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "stats": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "completions": {
              "type": "integer",
              "description": "Overeenkomende gebeurtenissen, herhalingen inbegrepen"
            },
            "conversions": {
              "type": "integer",
              "description": "Bezoeken met minstens één voltooiing"
            },
            "conversion_rate": {
              "type": "number",
              "description": "Conversies ÷ bezoeken (of ÷ bezoekers, volgens de siteinstelling), %"
            },
            "value": {
              "type": "integer",
              "description": "Doelwaarde in kleinste eenheden van de sitevaluta"
            },
            "change": {
              "anyOf": [
                {
                  "type": "number",
                  "description": "Verandering in conversies ten opzichte van de vorige periode, %"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "Periodestatistieken (alleen in lijst)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/goals/:id.json Een doel verwijderen (gegevens blijven bewaard) goals_delete

Machtiging: content.write

Voorbeeld
curl -X DELETE https://privatusanalytics.com/sites/:site_id/goals/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Doel-id, bijv. goal_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "page, event, engagement, outbound of download"
    },
    "match_type": {
      "type": "string",
      "description": "exact, prefix, glob of regex"
    },
    "pattern": {
      "anyOf": [
        {
          "type": "string",
          "description": "Pad-, domein- of bestandspatroon"
        },
        {
          "type": "null"
        }
      ]
    },
    "hostname": {
      "anyOf": [
        {
          "type": "string",
          "description": "Hostnaambeperking (paginadoelen)"
        },
        {
          "type": "null"
        }
      ]
    },
    "event_name": {
      "anyOf": [
        {
          "type": "string",
          "description": "Naam van de eigen gebeurtenis (gebeurtenisdoelen)"
        },
        {
          "type": "null"
        }
      ]
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Voorwaarden voor gebeurteniseigenschappen"
    },
    "scroll_threshold": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: scroll-%"
        },
        {
          "type": "null"
        }
      ]
    },
    "time_threshold_seconds": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: seconden op de pagina"
        },
        {
          "type": "null"
        }
      ]
    },
    "value_mode": {
      "type": "string",
      "description": "none, fixed of revenue"
    },
    "fixed_value_minor": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Vaste waarde in kleinste eenheden"
        },
        {
          "type": "null"
        }
      ]
    },
    "count_mode": {
      "type": "string",
      "description": "once_per_visit of every"
    },
    "archived": {
      "type": "boolean"
    },
    "archived_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "stats": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "completions": {
              "type": "integer",
              "description": "Overeenkomende gebeurtenissen, herhalingen inbegrepen"
            },
            "conversions": {
              "type": "integer",
              "description": "Bezoeken met minstens één voltooiing"
            },
            "conversion_rate": {
              "type": "number",
              "description": "Conversies ÷ bezoeken (of ÷ bezoekers, volgens de siteinstelling), %"
            },
            "value": {
              "type": "integer",
              "description": "Doelwaarde in kleinste eenheden van de sitevaluta"
            },
            "change": {
              "anyOf": [
                {
                  "type": "number",
                  "description": "Verandering in conversies ten opzichte van de vorige periode, %"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "Periodestatistieken (alleen in lijst)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /sites/:site_id/goals/:id/duplicate.json Een doel kopiëren goals_duplicate

Machtiging: content.write

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/goals/:id/duplicate.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Naam voor de kopie"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Doel-id, bijv. goal_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "page, event, engagement, outbound of download"
    },
    "match_type": {
      "type": "string",
      "description": "exact, prefix, glob of regex"
    },
    "pattern": {
      "anyOf": [
        {
          "type": "string",
          "description": "Pad-, domein- of bestandspatroon"
        },
        {
          "type": "null"
        }
      ]
    },
    "hostname": {
      "anyOf": [
        {
          "type": "string",
          "description": "Hostnaambeperking (paginadoelen)"
        },
        {
          "type": "null"
        }
      ]
    },
    "event_name": {
      "anyOf": [
        {
          "type": "string",
          "description": "Naam van de eigen gebeurtenis (gebeurtenisdoelen)"
        },
        {
          "type": "null"
        }
      ]
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Voorwaarden voor gebeurteniseigenschappen"
    },
    "scroll_threshold": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: scroll-%"
        },
        {
          "type": "null"
        }
      ]
    },
    "time_threshold_seconds": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: seconden op de pagina"
        },
        {
          "type": "null"
        }
      ]
    },
    "value_mode": {
      "type": "string",
      "description": "none, fixed of revenue"
    },
    "fixed_value_minor": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Vaste waarde in kleinste eenheden"
        },
        {
          "type": "null"
        }
      ]
    },
    "count_mode": {
      "type": "string",
      "description": "once_per_visit of every"
    },
    "archived": {
      "type": "boolean"
    },
    "archived_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "stats": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "completions": {
              "type": "integer",
              "description": "Overeenkomende gebeurtenissen, herhalingen inbegrepen"
            },
            "conversions": {
              "type": "integer",
              "description": "Bezoeken met minstens één voltooiing"
            },
            "conversion_rate": {
              "type": "number",
              "description": "Conversies ÷ bezoeken (of ÷ bezoekers, volgens de siteinstelling), %"
            },
            "value": {
              "type": "integer",
              "description": "Doelwaarde in kleinste eenheden van de sitevaluta"
            },
            "change": {
              "anyOf": [
                {
                  "type": "number",
                  "description": "Verandering in conversies ten opzichte van de vorige periode, %"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "Periodestatistieken (alleen in lijst)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/goals.json Doelen weergeven met voltooiingen, conversies, ratio en waarde voor een periode goals_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/goals.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Voorinstelling voor datumbereik. Gebruik custom met 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": "Begin van aangepast bereik (tijdzone van de site)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepast bereik, inclusief"
    },
    "compare": {
      "type": "string",
      "description": "Vergelijkingsperiode",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Begin van aangepaste vergelijking"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepaste vergelijking"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Weekdagen van de vergelijking uitlijnen",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Verpak voorwaarden in {\"any\": [...]} voor OF.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Een opgeslagen segment toepassen (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Geïmporteerde historische gegevens toevoegen (datums vóór de eerste eigen gebeurtenis, genegeerd als filters of een segment zijn toegepast)",
      "default": false
    },
    "status": {
      "type": "string",
      "description": "active, archived of all doelen",
      "enum": [
        "active",
        "archived",
        "all"
      ],
      "default": "active"
    },
    "page": {
      "type": "integer",
      "description": "Paginanummer",
      "default": 1
    },
    "per_page": {
      "type": "integer",
      "description": "Doelen per pagina (max 100)",
      "default": 25
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Doel-id, bijv. goal_7Q2K9XH3AB"
      },
      "name": {
        "type": "string"
      },
      "kind": {
        "type": "string",
        "description": "page, event, engagement, outbound of download"
      },
      "match_type": {
        "type": "string",
        "description": "exact, prefix, glob of regex"
      },
      "pattern": {
        "anyOf": [
          {
            "type": "string",
            "description": "Pad-, domein- of bestandspatroon"
          },
          {
            "type": "null"
          }
        ]
      },
      "hostname": {
        "anyOf": [
          {
            "type": "string",
            "description": "Hostnaambeperking (paginadoelen)"
          },
          {
            "type": "null"
          }
        ]
      },
      "event_name": {
        "anyOf": [
          {
            "type": "string",
            "description": "Naam van de eigen gebeurtenis (gebeurtenisdoelen)"
          },
          {
            "type": "null"
          }
        ]
      },
      "conditions": {
        "type": "array",
        "items": {
          "type": "object"
        },
        "description": "Voorwaarden voor gebeurteniseigenschappen"
      },
      "scroll_threshold": {
        "anyOf": [
          {
            "type": "integer",
            "description": "Engagement: scroll-%"
          },
          {
            "type": "null"
          }
        ]
      },
      "time_threshold_seconds": {
        "anyOf": [
          {
            "type": "integer",
            "description": "Engagement: seconden op de pagina"
          },
          {
            "type": "null"
          }
        ]
      },
      "value_mode": {
        "type": "string",
        "description": "none, fixed of revenue"
      },
      "fixed_value_minor": {
        "anyOf": [
          {
            "type": "integer",
            "description": "Vaste waarde in kleinste eenheden"
          },
          {
            "type": "null"
          }
        ]
      },
      "count_mode": {
        "type": "string",
        "description": "once_per_visit of every"
      },
      "archived": {
        "type": "boolean"
      },
      "archived_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "stats": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "completions": {
                "type": "integer",
                "description": "Overeenkomende gebeurtenissen, herhalingen inbegrepen"
              },
              "conversions": {
                "type": "integer",
                "description": "Bezoeken met minstens één voltooiing"
              },
              "conversion_rate": {
                "type": "number",
                "description": "Conversies ÷ bezoeken (of ÷ bezoekers, volgens de siteinstelling), %"
              },
              "value": {
                "type": "integer",
                "description": "Doelwaarde in kleinste eenheden van de sitevaluta"
              },
              "change": {
                "anyOf": [
                  {
                    "type": "number",
                    "description": "Verandering in conversies ten opzichte van de vorige periode, %"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "description": "Periodestatistieken (alleen in lijst)"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      },
      "updated_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
GET /sites/:site_id/goals/:id.json Doelrapport: statistieken, grafiek, uitsplitsingen en de weg naar conversie goals_get

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/goals/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Voorinstelling voor datumbereik. Gebruik custom met 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": "Begin van aangepast bereik (tijdzone van de site)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepast bereik, inclusief"
    },
    "compare": {
      "type": "string",
      "description": "Vergelijkingsperiode",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Begin van aangepaste vergelijking"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepaste vergelijking"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Weekdagen van de vergelijking uitlijnen",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Verpak voorwaarden in {\"any\": [...]} voor OF.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Een opgeslagen segment toepassen (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Geïmporteerde historische gegevens toevoegen (datums vóór de eerste eigen gebeurtenis, genegeerd als filters of een segment zijn toegepast)",
      "default": false
    },
    "interval": {
      "type": "string",
      "description": "Tijdvakgrootte van de grafiek",
      "enum": [
        "auto",
        "minute",
        "hour",
        "day",
        "week",
        "month",
        "quarter",
        "year"
      ],
      "default": "auto"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "period": {
      "type": "object",
      "description": "from/to van de periode (UTC)"
    },
    "goal": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Doel-id, bijv. goal_7Q2K9XH3AB"
        },
        "name": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "description": "page, event, engagement, outbound of download"
        },
        "match_type": {
          "type": "string",
          "description": "exact, prefix, glob of regex"
        },
        "pattern": {
          "anyOf": [
            {
              "type": "string",
              "description": "Pad-, domein- of bestandspatroon"
            },
            {
              "type": "null"
            }
          ]
        },
        "hostname": {
          "anyOf": [
            {
              "type": "string",
              "description": "Hostnaambeperking (paginadoelen)"
            },
            {
              "type": "null"
            }
          ]
        },
        "event_name": {
          "anyOf": [
            {
              "type": "string",
              "description": "Naam van de eigen gebeurtenis (gebeurtenisdoelen)"
            },
            {
              "type": "null"
            }
          ]
        },
        "conditions": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "Voorwaarden voor gebeurteniseigenschappen"
        },
        "scroll_threshold": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Engagement: scroll-%"
            },
            {
              "type": "null"
            }
          ]
        },
        "time_threshold_seconds": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Engagement: seconden op de pagina"
            },
            {
              "type": "null"
            }
          ]
        },
        "value_mode": {
          "type": "string",
          "description": "none, fixed of revenue"
        },
        "fixed_value_minor": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Vaste waarde in kleinste eenheden"
            },
            {
              "type": "null"
            }
          ]
        },
        "count_mode": {
          "type": "string",
          "description": "once_per_visit of every"
        },
        "archived": {
          "type": "boolean"
        },
        "archived_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "stats": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "completions": {
                  "type": "integer",
                  "description": "Overeenkomende gebeurtenissen, herhalingen inbegrepen"
                },
                "conversions": {
                  "type": "integer",
                  "description": "Bezoeken met minstens één voltooiing"
                },
                "conversion_rate": {
                  "type": "number",
                  "description": "Conversies ÷ bezoeken (of ÷ bezoekers, volgens de siteinstelling), %"
                },
                "value": {
                  "type": "integer",
                  "description": "Doelwaarde in kleinste eenheden van de sitevaluta"
                },
                "change": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "Verandering in conversies ten opzichte van de vorige periode, %"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "description": "Periodestatistieken (alleen in lijst)"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "description": "De doeldefinitie"
    },
    "metrics": {
      "type": "object",
      "description": "completions, conversions, conversion_rate (%), value (kleinste eenheden)"
    },
    "comparison_period": {
      "anyOf": [
        {
          "type": "object",
          "description": "from/to van de vergelijking"
        },
        {
          "type": "null"
        }
      ]
    },
    "comparison": {
      "anyOf": [
        {
          "type": "object",
          "description": "Statistieken voor de vergelijkingsperiode"
        },
        {
          "type": "null"
        }
      ]
    },
    "change": {
      "anyOf": [
        {
          "type": "object",
          "description": "Verandering ten opzichte van de vergelijking, % per statistiek"
        },
        {
          "type": "null"
        }
      ]
    },
    "interval": {
      "type": "string",
      "description": "Tijdvakgrootte van de grafiek"
    },
    "series": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Per tijdvak: date, completions, conversions, conversion_rate"
    },
    "breakdowns": {
      "type": "object",
      "description": "Topwaarden naar conversies voor channel, utm_campaign, entry_page, country en device: value, completions, conversions, conversion_rate"
    },
    "journey": {
      "anyOf": [
        {
          "type": "object",
          "description": "converting_visits, median_seconds_to_convert, median_pages_before en pages_before (pagina's die eerder in het bezoek zijn bekeken, per converterend bezoek)"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
POST /sites/:site_id/goals/:id/unarchive.json Een gearchiveerd doel herstellen goals_unarchive

Machtiging: content.write

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/goals/:id/unarchive.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Doel-id, bijv. goal_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "page, event, engagement, outbound of download"
    },
    "match_type": {
      "type": "string",
      "description": "exact, prefix, glob of regex"
    },
    "pattern": {
      "anyOf": [
        {
          "type": "string",
          "description": "Pad-, domein- of bestandspatroon"
        },
        {
          "type": "null"
        }
      ]
    },
    "hostname": {
      "anyOf": [
        {
          "type": "string",
          "description": "Hostnaambeperking (paginadoelen)"
        },
        {
          "type": "null"
        }
      ]
    },
    "event_name": {
      "anyOf": [
        {
          "type": "string",
          "description": "Naam van de eigen gebeurtenis (gebeurtenisdoelen)"
        },
        {
          "type": "null"
        }
      ]
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Voorwaarden voor gebeurteniseigenschappen"
    },
    "scroll_threshold": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: scroll-%"
        },
        {
          "type": "null"
        }
      ]
    },
    "time_threshold_seconds": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: seconden op de pagina"
        },
        {
          "type": "null"
        }
      ]
    },
    "value_mode": {
      "type": "string",
      "description": "none, fixed of revenue"
    },
    "fixed_value_minor": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Vaste waarde in kleinste eenheden"
        },
        {
          "type": "null"
        }
      ]
    },
    "count_mode": {
      "type": "string",
      "description": "once_per_visit of every"
    },
    "archived": {
      "type": "boolean"
    },
    "archived_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "stats": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "completions": {
              "type": "integer",
              "description": "Overeenkomende gebeurtenissen, herhalingen inbegrepen"
            },
            "conversions": {
              "type": "integer",
              "description": "Bezoeken met minstens één voltooiing"
            },
            "conversion_rate": {
              "type": "number",
              "description": "Conversies ÷ bezoeken (of ÷ bezoekers, volgens de siteinstelling), %"
            },
            "value": {
              "type": "integer",
              "description": "Doelwaarde in kleinste eenheden van de sitevaluta"
            },
            "change": {
              "anyOf": [
                {
                  "type": "number",
                  "description": "Verandering in conversies ten opzichte van de vorige periode, %"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "Periodestatistieken (alleen in lijst)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /sites/:site_id/goals/:id.json Een doel bijwerken goals_update

Machtiging: content.write

Voorbeeld
curl -X PATCH https://privatusanalytics.com/sites/:site_id/goals/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Naam van het doel",
      "examples": [
        "Signed up"
      ]
    },
    "kind": {
      "type": "string",
      "description": "page (een pagina bezoeken), event (eigen gebeurtenis), engagement (scrollen of tijd op de pagina), outbound (klik op een uitgaande link) of download (bestandsdownload)",
      "enum": [
        "page",
        "event",
        "engagement",
        "outbound",
        "download"
      ]
    },
    "match_type": {
      "type": "string",
      "description": "Hoe pattern overeenkomt met het pad (page, engagement), het linkdomein (outbound) of het bestand (download): exact, prefix, glob (*) of regex",
      "enum": [
        "exact",
        "prefix",
        "glob",
        "regex"
      ]
    },
    "pattern": {
      "type": "string",
      "description": "Pad-, domein- of bestandspatroon, bijv. /pricing, /blog/*, stripe.com of *.pdf"
    },
    "hostname": {
      "type": "string",
      "description": "Tel alleen pagina's op deze hostnaam (paginadoelen)"
    },
    "event_name": {
      "type": "string",
      "description": "Naam van de eigen gebeurtenis (gebeurtenisdoelen)"
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      },
      "description": "Voorwaarden voor gebeurteniseigenschappen: [{\"key\": \"plan\", \"operator\": \"is|is_not|contains|gt|lt\", \"value\": \"pro\"}]"
    },
    "scroll_threshold": {
      "type": "integer",
      "description": "Engagement: te bereiken scrolldiepte in %"
    },
    "time_threshold_seconds": {
      "type": "integer",
      "description": "Engagement: seconden op de pagina"
    },
    "value_mode": {
      "type": "string",
      "description": "none, fixed (fixed_value per conversie) of revenue (de omzet van de gebeurtenis)",
      "enum": [
        "none",
        "fixed",
        "revenue"
      ]
    },
    "fixed_value": {
      "type": "number",
      "description": "Vaste waarde per conversie in de valuta van de site, bijv. 50.0"
    },
    "count_mode": {
      "type": "string",
      "description": "De waarde telt once_per_visit of bij elke voltooiing",
      "enum": [
        "once_per_visit",
        "every"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Doel-id, bijv. goal_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "page, event, engagement, outbound of download"
    },
    "match_type": {
      "type": "string",
      "description": "exact, prefix, glob of regex"
    },
    "pattern": {
      "anyOf": [
        {
          "type": "string",
          "description": "Pad-, domein- of bestandspatroon"
        },
        {
          "type": "null"
        }
      ]
    },
    "hostname": {
      "anyOf": [
        {
          "type": "string",
          "description": "Hostnaambeperking (paginadoelen)"
        },
        {
          "type": "null"
        }
      ]
    },
    "event_name": {
      "anyOf": [
        {
          "type": "string",
          "description": "Naam van de eigen gebeurtenis (gebeurtenisdoelen)"
        },
        {
          "type": "null"
        }
      ]
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Voorwaarden voor gebeurteniseigenschappen"
    },
    "scroll_threshold": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: scroll-%"
        },
        {
          "type": "null"
        }
      ]
    },
    "time_threshold_seconds": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: seconden op de pagina"
        },
        {
          "type": "null"
        }
      ]
    },
    "value_mode": {
      "type": "string",
      "description": "none, fixed of revenue"
    },
    "fixed_value_minor": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Vaste waarde in kleinste eenheden"
        },
        {
          "type": "null"
        }
      ]
    },
    "count_mode": {
      "type": "string",
      "description": "once_per_visit of every"
    },
    "archived": {
      "type": "boolean"
    },
    "archived_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "stats": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "completions": {
              "type": "integer",
              "description": "Overeenkomende gebeurtenissen, herhalingen inbegrepen"
            },
            "conversions": {
              "type": "integer",
              "description": "Bezoeken met minstens één voltooiing"
            },
            "conversion_rate": {
              "type": "number",
              "description": "Conversies ÷ bezoeken (of ÷ bezoekers, volgens de siteinstelling), %"
            },
            "value": {
              "type": "integer",
              "description": "Doelwaarde in kleinste eenheden van de sitevaluta"
            },
            "change": {
              "anyOf": [
                {
                  "type": "number",
                  "description": "Verandering in conversies ten opzichte van de vorige periode, %"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "Periodestatistieken (alleen in lijst)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

E-mailrapporten

DELETE /recipients/:id.json Een ontvanger van een e-mailrapport verwijderen email_report_recipients_delete

Machtiging: content.write

Voorbeeld
curl -X DELETE https://privatusanalytics.com/recipients/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Ontvanger-id, bijv. rcp_7Q2K9XH3AB"
    },
    "email": {
      "type": "string",
      "description": "Het adres"
    },
    "status": {
      "type": "string",
      "description": "active, pending, declined of unsubscribed"
    },
    "invited_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer de laatste uitnodiging is verstuurd"
        },
        {
          "type": "null"
        }
      ]
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer een openstaande uitnodiging verloopt"
        },
        {
          "type": "null"
        }
      ]
    },
    "confirmed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer het adres actief werd"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
GET /reports/:report_id/recipients.json De ontvangers van een e-mailrapport met hun status weergeven email_report_recipients_list

Statussen: active (krijgt rapporten), pending (uitgenodigd, nog niet geaccepteerd), declined of unsubscribed. Voeg adressen toe of verwijder ze via de ontvangerslijst van het rapport.

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/reports/:report_id/recipients.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Alleen ontvangers met deze status",
      "enum": [
        "pending",
        "active",
        "declined",
        "unsubscribed"
      ]
    },
    "report_id": {
      "type": "string",
      "description": "Report van de bron"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "report_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Ontvanger-id, bijv. rcp_7Q2K9XH3AB"
      },
      "email": {
        "type": "string",
        "description": "Het adres"
      },
      "status": {
        "type": "string",
        "description": "active, pending, declined of unsubscribed"
      },
      "invited_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time",
            "description": "Wanneer de laatste uitnodiging is verstuurd"
          },
          {
            "type": "null"
          }
        ]
      },
      "expires_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time",
            "description": "Wanneer een openstaande uitnodiging verloopt"
          },
          {
            "type": "null"
          }
        ]
      },
      "confirmed_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time",
            "description": "Wanneer het adres actief werd"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  }
}
POST /recipients/:id/resend.json Een openstaande rapportuitnodiging opnieuw versturen email_report_recipients_resend

Verstuurt de uitnodiging opnieuw met nieuwe links. Toegestaan één keer per 7 dagen per adres per rapport.

Machtiging: content.write

Voorbeeld
curl -X POST https://privatusanalytics.com/recipients/:id/resend.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Ontvanger-id, bijv. rcp_7Q2K9XH3AB"
    },
    "email": {
      "type": "string",
      "description": "Het adres"
    },
    "status": {
      "type": "string",
      "description": "active, pending, declined of unsubscribed"
    },
    "invited_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer de laatste uitnodiging is verstuurd"
        },
        {
          "type": "null"
        }
      ]
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer een openstaande uitnodiging verloopt"
        },
        {
          "type": "null"
        }
      ]
    },
    "confirmed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer het adres actief werd"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
POST /workspaces/:workspace_id/reports.json Een e-mailrapport aanmaken email_reports_create

Machtiging: content.write

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/reports.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Site-id's (pa_…) die in het rapport zijn opgenomen"
    },
    "frequency": {
      "type": "string",
      "description": "daily, weekly (op weekdag) of monthly (op de 1e)",
      "enum": [
        "daily",
        "weekly",
        "monthly"
      ]
    },
    "hour": {
      "type": "integer",
      "description": "Uur van de dag om te versturen (0 tot 23, tijdzone van de werkruimte)"
    },
    "weekday": {
      "type": "integer",
      "description": "Wekelijkse rapporten: 0 = zondag … 6 = zaterdag"
    },
    "recipients": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "E-mailadressen (geen account nodig). Items mogen met komma's of regeleinden worden gescheiden. Leden van de werkruimte worden direct toegevoegd. Alle anderen krijgen een uitnodiging en ontvangen pas rapporten nadat ze die hebben geaccepteerd. Adressen die zich voor rapporten hebben afgemeld, worden geweigerd"
    },
    "blocks": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Inhoud: kpis, chart, pages, sources, goals, campaigns, vitals, uptime"
    },
    "attach_pdf": {
      "type": "boolean",
      "description": "Een pdf-versie bijvoegen"
    },
    "intro": {
      "type": "string",
      "description": "Eigen introductietekst (max 2000 tekens)"
    },
    "enabled": {
      "type": "boolean",
      "description": "Volgens schema versturen"
    },
    "name": {
      "type": "string",
      "description": "Naam van het rapport",
      "examples": [
        "Weekly traffic"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Rapport-id, bijv. rep_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Site-id's in het rapport"
    },
    "frequency": {
      "type": "string",
      "description": "daily, weekly of monthly"
    },
    "hour": {
      "type": "integer",
      "description": "Verzenduur (tijdzone van de werkruimte)"
    },
    "weekday": {
      "type": "integer",
      "description": "Wekelijks: 0 = zondag … 6 = zaterdag"
    },
    "recipients": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Elk adres op het rapport, ongeacht de status"
    },
    "recipient_details": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Ontvanger-id, bijv. rcp_7Q2K9XH3AB"
          },
          "email": {
            "type": "string",
            "description": "Het adres"
          },
          "status": {
            "type": "string",
            "description": "active, pending, declined of unsubscribed"
          },
          "invited_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Wanneer de laatste uitnodiging is verstuurd"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Wanneer een openstaande uitnodiging verloopt"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Wanneer het adres actief werd"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "description": "Elke ontvanger met de opt-in-status (alleen actieve ontvangers krijgen rapporten)"
    },
    "blocks": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Inhoudsblokken"
    },
    "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 Bezorglogboek van een e-mailrapport email_reports_deliveries

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/reports/:id/deliveries.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Alleen bezorgingen met deze status",
      "enum": [
        "sent",
        "test",
        "failed",
        "skipped"
      ]
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "status": {
        "type": "string",
        "description": "sent, test, failed of skipped"
      },
      "recipients_count": {
        "type": "integer"
      },
      "error": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "sent_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
DELETE /reports/:id.json Een e-mailrapport verwijderen email_reports_delete

Machtiging: content.write

Voorbeeld
curl -X DELETE https://privatusanalytics.com/reports/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Rapport-id, bijv. rep_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Site-id's in het rapport"
    },
    "frequency": {
      "type": "string",
      "description": "daily, weekly of monthly"
    },
    "hour": {
      "type": "integer",
      "description": "Verzenduur (tijdzone van de werkruimte)"
    },
    "weekday": {
      "type": "integer",
      "description": "Wekelijks: 0 = zondag … 6 = zaterdag"
    },
    "recipients": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Elk adres op het rapport, ongeacht de status"
    },
    "recipient_details": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Ontvanger-id, bijv. rcp_7Q2K9XH3AB"
          },
          "email": {
            "type": "string",
            "description": "Het adres"
          },
          "status": {
            "type": "string",
            "description": "active, pending, declined of unsubscribed"
          },
          "invited_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Wanneer de laatste uitnodiging is verstuurd"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Wanneer een openstaande uitnodiging verloopt"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Wanneer het adres actief werd"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "description": "Elke ontvanger met de opt-in-status (alleen actieve ontvangers krijgen rapporten)"
    },
    "blocks": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Inhoudsblokken"
    },
    "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 E-mailrapporten weergeven email_reports_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/reports.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "frequency": {
      "type": "string",
      "description": "Alleen rapporten met deze frequentie",
      "enum": [
        "daily",
        "weekly",
        "monthly"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Rapport-id, bijv. rep_7Q2K9XH3AB"
      },
      "name": {
        "type": "string"
      },
      "site_ids": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Site-id's in het rapport"
      },
      "frequency": {
        "type": "string",
        "description": "daily, weekly of monthly"
      },
      "hour": {
        "type": "integer",
        "description": "Verzenduur (tijdzone van de werkruimte)"
      },
      "weekday": {
        "type": "integer",
        "description": "Wekelijks: 0 = zondag … 6 = zaterdag"
      },
      "recipients": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Elk adres op het rapport, ongeacht de status"
      },
      "recipient_details": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Ontvanger-id, bijv. rcp_7Q2K9XH3AB"
            },
            "email": {
              "type": "string",
              "description": "Het adres"
            },
            "status": {
              "type": "string",
              "description": "active, pending, declined of unsubscribed"
            },
            "invited_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Wanneer de laatste uitnodiging is verstuurd"
                },
                {
                  "type": "null"
                }
              ]
            },
            "expires_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Wanneer een openstaande uitnodiging verloopt"
                },
                {
                  "type": "null"
                }
              ]
            },
            "confirmed_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Wanneer het adres actief werd"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        "description": "Elke ontvanger met de opt-in-status (alleen actieve ontvangers krijgen rapporten)"
      },
      "blocks": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Inhoudsblokken"
      },
      "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 Nu een e-mailrapport als test versturen email_reports_send_test

Machtiging: content.write

Voorbeeld
curl -X POST https://privatusanalytics.com/reports/:id/send_test.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "recipient": {
      "type": "string",
      "description": "Verstuur de test hiernaartoe (standaard: je e-mailadres)"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "sent, test, failed of skipped"
    },
    "recipients_count": {
      "type": "integer"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "sent_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /reports/:id.json Een e-mailrapport ophalen email_reports_get

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/reports/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Rapport-id, bijv. rep_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Site-id's in het rapport"
    },
    "frequency": {
      "type": "string",
      "description": "daily, weekly of monthly"
    },
    "hour": {
      "type": "integer",
      "description": "Verzenduur (tijdzone van de werkruimte)"
    },
    "weekday": {
      "type": "integer",
      "description": "Wekelijks: 0 = zondag … 6 = zaterdag"
    },
    "recipients": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Elk adres op het rapport, ongeacht de status"
    },
    "recipient_details": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Ontvanger-id, bijv. rcp_7Q2K9XH3AB"
          },
          "email": {
            "type": "string",
            "description": "Het adres"
          },
          "status": {
            "type": "string",
            "description": "active, pending, declined of unsubscribed"
          },
          "invited_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Wanneer de laatste uitnodiging is verstuurd"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Wanneer een openstaande uitnodiging verloopt"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Wanneer het adres actief werd"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "description": "Elke ontvanger met de opt-in-status (alleen actieve ontvangers krijgen rapporten)"
    },
    "blocks": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Inhoudsblokken"
    },
    "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 Een e-mailrapport bijwerken email_reports_update

Machtiging: content.write

Voorbeeld
curl -X PATCH https://privatusanalytics.com/reports/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Site-id's (pa_…) die in het rapport zijn opgenomen"
    },
    "frequency": {
      "type": "string",
      "description": "daily, weekly (op weekdag) of monthly (op de 1e)",
      "enum": [
        "daily",
        "weekly",
        "monthly"
      ]
    },
    "hour": {
      "type": "integer",
      "description": "Uur van de dag om te versturen (0 tot 23, tijdzone van de werkruimte)"
    },
    "weekday": {
      "type": "integer",
      "description": "Wekelijkse rapporten: 0 = zondag … 6 = zaterdag"
    },
    "recipients": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "E-mailadressen (geen account nodig). Items mogen met komma's of regeleinden worden gescheiden. Leden van de werkruimte worden direct toegevoegd. Alle anderen krijgen een uitnodiging en ontvangen pas rapporten nadat ze die hebben geaccepteerd. Adressen die zich voor rapporten hebben afgemeld, worden geweigerd"
    },
    "blocks": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Inhoud: kpis, chart, pages, sources, goals, campaigns, vitals, uptime"
    },
    "attach_pdf": {
      "type": "boolean",
      "description": "Een pdf-versie bijvoegen"
    },
    "intro": {
      "type": "string",
      "description": "Eigen introductietekst (max 2000 tekens)"
    },
    "enabled": {
      "type": "boolean",
      "description": "Volgens schema versturen"
    },
    "name": {
      "type": "string",
      "description": "Naam van het rapport"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Rapport-id, bijv. rep_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Site-id's in het rapport"
    },
    "frequency": {
      "type": "string",
      "description": "daily, weekly of monthly"
    },
    "hour": {
      "type": "integer",
      "description": "Verzenduur (tijdzone van de werkruimte)"
    },
    "weekday": {
      "type": "integer",
      "description": "Wekelijks: 0 = zondag … 6 = zaterdag"
    },
    "recipients": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Elk adres op het rapport, ongeacht de status"
    },
    "recipient_details": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Ontvanger-id, bijv. rcp_7Q2K9XH3AB"
          },
          "email": {
            "type": "string",
            "description": "Het adres"
          },
          "status": {
            "type": "string",
            "description": "active, pending, declined of unsubscribed"
          },
          "invited_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Wanneer de laatste uitnodiging is verstuurd"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Wanneer een openstaande uitnodiging verloopt"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Wanneer het adres actief werd"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "description": "Elke ontvanger met de opt-in-status (alleen actieve ontvangers krijgen rapporten)"
    },
    "blocks": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Inhoudsblokken"
    },
    "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 Een rapportuitnodiging accepteren report_invites_accept

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X POST https://privatusanalytics.com/reports/invites/:token/accept.json \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Token van de bron"
    }
  },
  "required": [
    "token"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Ontvanger-id, bijv. rcp_7Q2K9XH3AB"
    },
    "email": {
      "type": "string",
      "description": "Het adres"
    },
    "status": {
      "type": "string",
      "description": "active, pending, declined of unsubscribed"
    },
    "invited_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer de laatste uitnodiging is verstuurd"
        },
        {
          "type": "null"
        }
      ]
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer een openstaande uitnodiging verloopt"
        },
        {
          "type": "null"
        }
      ]
    },
    "confirmed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer het adres actief werd"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
POST /reports/invites/:token/decline.json Een rapportuitnodiging afwijzen report_invites_decline

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X POST https://privatusanalytics.com/reports/invites/:token/decline.json \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Token van de bron"
    }
  },
  "required": [
    "token"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Ontvanger-id, bijv. rcp_7Q2K9XH3AB"
    },
    "email": {
      "type": "string",
      "description": "Het adres"
    },
    "status": {
      "type": "string",
      "description": "active, pending, declined of unsubscribed"
    },
    "invited_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer de laatste uitnodiging is verstuurd"
        },
        {
          "type": "null"
        }
      ]
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer een openstaande uitnodiging verloopt"
        },
        {
          "type": "null"
        }
      ]
    },
    "confirmed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer het adres actief werd"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
POST /reports/resubscribe/:token.json Weer rapporten ontvangen na een afmelding report_resubscribes_confirm

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X POST https://privatusanalytics.com/reports/resubscribe/:token.json \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Token van de bron"
    }
  },
  "required": [
    "token"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
POST /reports/unsubscribe/:token/resubscribe.json Een adres een link mailen om weer rapporten te ontvangen report_resubscribes_create

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X POST https://privatusanalytics.com/reports/unsubscribe/:token/resubscribe.json \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Token van de bron"
    }
  },
  "required": [
    "token"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
POST /reports/unsubscribe/:token.json Een adres afmelden voor een e-mailrapport report_unsubscribes_create

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X POST https://privatusanalytics.com/reports/unsubscribe/:token.json \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Token van de bron"
    }
  },
  "required": [
    "token"
  ]
}
Antwoordgegevens
{
  "type": "object"
}

Exports

POST /workspaces/:workspace_id/exports.json Een export in de wachtrij zetten (wordt op de achtergrond gemaakt) exports_create

Machtiging: analytics.export

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/exports.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Te exporteren site (pa_…)",
      "examples": [
        "pa_7Q2K9XH3AB"
      ]
    },
    "kind": {
      "type": "string",
      "description": "aggregated: statistieken per tijdvak en dimensies. pageviews/events/raw: één rij per hit (Pro en hoger). imported: geïmporteerde dagstatistieken. dashboard: ZIP van de overzichtspanelen",
      "enum": [
        "aggregated",
        "pageviews",
        "events",
        "imported",
        "raw",
        "dashboard"
      ],
      "default": "aggregated"
    },
    "file_format": {
      "type": "string",
      "description": "csv, json of xlsx (aggregated, pageviews, events, imported), csv of ndjson (raw), zip (dashboard)",
      "enum": [
        "csv",
        "json",
        "xlsx",
        "ndjson",
        "zip"
      ],
      "default": "csv"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Eerste dag, in de tijdzone van de export",
      "examples": [
        "2026-09-01"
      ]
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Laatste dag, inclusief (max 400 dagen, raw 93 dagen)",
      "examples": [
        "2026-09-28"
      ]
    },
    "timezone": {
      "type": "string",
      "description": "Tijdzone voor datums en groepering, bijv. America/New_York (standaard: de tijdzone van de site)"
    },
    "grouping": {
      "type": "string",
      "description": "Tijdvak voor geaggregeerde exports",
      "enum": [
        "hour",
        "day",
        "week",
        "month",
        "quarter",
        "year"
      ],
      "default": "day"
    },
    "dimensions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Bezoekdimensies om geaggregeerde exports op te groeperen (tot 6), bijv. country, channel, entry_page. Voor geïmporteerde exports: de op te nemen geïmporteerde dimensies",
      "default": []
    },
    "metrics": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Statistieken voor geaggregeerde exports (standaard alle): visitors, visits, pageviews, bounce_rate, visit_duration, views_per_visit, revenue",
      "default": []
    },
    "fields": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Kolommen voor exports van pageviews/events/raw (standaard alles behalve 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": "Filters, hetzelfde formaat als de stats-API: [[\"dimension\",\"operator\",\"value\"], …]",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Een opgeslagen segment toepassen (seg_…)"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id",
    "from",
    "to",
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Export-id, bijv. exp_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Geëxporteerde site (pa_…)"
        },
        {
          "type": "null"
        }
      ]
    },
    "kind": {
      "type": "string",
      "description": "aggregated, pageviews, events, imported, raw of dashboard"
    },
    "format": {
      "type": "string",
      "description": "csv, json, xlsx, ndjson of zip"
    },
    "status": {
      "type": "string",
      "description": "queued, running, complete, failed of expired"
    },
    "params": {
      "type": "object",
      "description": "De exportdefinitie (datums, tijdzone, groepering, dimensies, statistieken, velden, filters)"
    },
    "row_count": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Geschreven rijen"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "string",
          "description": "Waarom de export mislukte"
        },
        {
          "type": "null"
        }
      ]
    },
    "completed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer het bestand wordt verwijderd"
        },
        {
          "type": "null"
        }
      ]
    },
    "download_url": {
      "anyOf": [
        {
          "type": "string",
          "description": "Pad dat een kortlevende ondertekende bestandslink teruggeeft (exports_download)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /exports/:id.json Een export en het bestand ervan verwijderen exports_delete

Machtiging: analytics.export

Voorbeeld
curl -X DELETE https://privatusanalytics.com/exports/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Export-id, bijv. exp_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Geëxporteerde site (pa_…)"
        },
        {
          "type": "null"
        }
      ]
    },
    "kind": {
      "type": "string",
      "description": "aggregated, pageviews, events, imported, raw of dashboard"
    },
    "format": {
      "type": "string",
      "description": "csv, json, xlsx, ndjson of zip"
    },
    "status": {
      "type": "string",
      "description": "queued, running, complete, failed of expired"
    },
    "params": {
      "type": "object",
      "description": "De exportdefinitie (datums, tijdzone, groepering, dimensies, statistieken, velden, filters)"
    },
    "row_count": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Geschreven rijen"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "string",
          "description": "Waarom de export mislukte"
        },
        {
          "type": "null"
        }
      ]
    },
    "completed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer het bestand wordt verwijderd"
        },
        {
          "type": "null"
        }
      ]
    },
    "download_url": {
      "anyOf": [
        {
          "type": "string",
          "description": "Pad dat een kortlevende ondertekende bestandslink teruggeeft (exports_download)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /exports/:id/download.json Een ondertekende link naar het bestand ophalen (10 minuten geldig) exports_download

Machtiging: analytics.export

Voorbeeld
curl https://privatusanalytics.com/exports/:id/download.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /workspaces/:workspace_id/exports.json Exports weergeven (de jobwachtrij) exports_list

Machtiging: analytics.export

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/exports.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Alleen exports van deze site (pa_…)"
    },
    "status": {
      "type": "string",
      "description": "Alleen exports met deze status",
      "enum": [
        "queued",
        "running",
        "complete",
        "failed",
        "expired"
      ]
    },
    "kind": {
      "type": "string",
      "description": "Alleen exports van dit soort",
      "enum": [
        "aggregated",
        "pageviews",
        "events",
        "imported",
        "raw",
        "dashboard"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Export-id, bijv. exp_7Q2K9XH3AB"
      },
      "site_id": {
        "anyOf": [
          {
            "type": "string",
            "description": "Geëxporteerde site (pa_…)"
          },
          {
            "type": "null"
          }
        ]
      },
      "kind": {
        "type": "string",
        "description": "aggregated, pageviews, events, imported, raw of dashboard"
      },
      "format": {
        "type": "string",
        "description": "csv, json, xlsx, ndjson of zip"
      },
      "status": {
        "type": "string",
        "description": "queued, running, complete, failed of expired"
      },
      "params": {
        "type": "object",
        "description": "De exportdefinitie (datums, tijdzone, groepering, dimensies, statistieken, velden, filters)"
      },
      "row_count": {
        "anyOf": [
          {
            "type": "integer",
            "description": "Geschreven rijen"
          },
          {
            "type": "null"
          }
        ]
      },
      "error": {
        "anyOf": [
          {
            "type": "string",
            "description": "Waarom de export mislukte"
          },
          {
            "type": "null"
          }
        ]
      },
      "completed_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "expires_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time",
            "description": "Wanneer het bestand wordt verwijderd"
          },
          {
            "type": "null"
          }
        ]
      },
      "download_url": {
        "anyOf": [
          {
            "type": "string",
            "description": "Pad dat een kortlevende ondertekende bestandslink teruggeeft (exports_download)"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
POST /workspaces/:workspace_id/exports/preview.json Een export bekijken: de eerste 20 rijen en het geschatte aantal rijen exports_preview

Machtiging: analytics.export

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/exports/preview.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Te exporteren site (pa_…)",
      "examples": [
        "pa_7Q2K9XH3AB"
      ]
    },
    "kind": {
      "type": "string",
      "description": "aggregated: statistieken per tijdvak en dimensies. pageviews/events/raw: één rij per hit (Pro en hoger). imported: geïmporteerde dagstatistieken. dashboard: ZIP van de overzichtspanelen",
      "enum": [
        "aggregated",
        "pageviews",
        "events",
        "imported",
        "raw",
        "dashboard"
      ],
      "default": "aggregated"
    },
    "file_format": {
      "type": "string",
      "description": "csv, json of xlsx (aggregated, pageviews, events, imported), csv of ndjson (raw), zip (dashboard)",
      "enum": [
        "csv",
        "json",
        "xlsx",
        "ndjson",
        "zip"
      ],
      "default": "csv"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Eerste dag, in de tijdzone van de export",
      "examples": [
        "2026-09-01"
      ]
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Laatste dag, inclusief (max 400 dagen, raw 93 dagen)",
      "examples": [
        "2026-09-28"
      ]
    },
    "timezone": {
      "type": "string",
      "description": "Tijdzone voor datums en groepering, bijv. America/New_York (standaard: de tijdzone van de site)"
    },
    "grouping": {
      "type": "string",
      "description": "Tijdvak voor geaggregeerde exports",
      "enum": [
        "hour",
        "day",
        "week",
        "month",
        "quarter",
        "year"
      ],
      "default": "day"
    },
    "dimensions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Bezoekdimensies om geaggregeerde exports op te groeperen (tot 6), bijv. country, channel, entry_page. Voor geïmporteerde exports: de op te nemen geïmporteerde dimensies",
      "default": []
    },
    "metrics": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Statistieken voor geaggregeerde exports (standaard alle): visitors, visits, pageviews, bounce_rate, visit_duration, views_per_visit, revenue",
      "default": []
    },
    "fields": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Kolommen voor exports van pageviews/events/raw (standaard alles behalve 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": "Filters, hetzelfde formaat als de stats-API: [[\"dimension\",\"operator\",\"value\"], …]",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Een opgeslagen segment toepassen (seg_…)"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id",
    "from",
    "to",
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /exports/:id.json Een export en de status ervan ophalen exports_get

Machtiging: analytics.export

Voorbeeld
curl https://privatusanalytics.com/exports/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Export-id, bijv. exp_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Geëxporteerde site (pa_…)"
        },
        {
          "type": "null"
        }
      ]
    },
    "kind": {
      "type": "string",
      "description": "aggregated, pageviews, events, imported, raw of dashboard"
    },
    "format": {
      "type": "string",
      "description": "csv, json, xlsx, ndjson of zip"
    },
    "status": {
      "type": "string",
      "description": "queued, running, complete, failed of expired"
    },
    "params": {
      "type": "object",
      "description": "De exportdefinitie (datums, tijdzone, groepering, dimensies, statistieken, velden, filters)"
    },
    "row_count": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Geschreven rijen"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "string",
          "description": "Waarom de export mislukte"
        },
        {
          "type": "null"
        }
      ]
    },
    "completed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer het bestand wordt verwijderd"
        },
        {
          "type": "null"
        }
      ]
    },
    "download_url": {
      "anyOf": [
        {
          "type": "string",
          "description": "Pad dat een kortlevende ondertekende bestandslink teruggeeft (exports_download)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Facturatie

POST /workspaces/:workspace_id/billing/badge.json Aan- of afmelden voor de badgebonus (gratis abonnement) billing_badge

Machtiging: billing.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/badge.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "enabled": {
      "type": "boolean",
      "description": "true om de badge te verifiëren en de bonus te verdienen"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "enabled",
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "plan": {
      "type": "string",
      "description": "free, pro, business of enterprise"
    },
    "plan_events": {
      "type": "integer",
      "description": "Gebeurtenissen per maand in het betaalde niveau"
    },
    "allowance": {
      "type": "integer",
      "description": "Gebeurtenissen per maand inclusief eventuele badgebonus"
    },
    "billing_interval": {
      "anyOf": [
        {
          "type": "string",
          "description": "month of year"
        },
        {
          "type": "null"
        }
      ]
    },
    "price": {
      "anyOf": [
        {
          "type": "integer",
          "description": "USD per factuurinterval"
        },
        {
          "type": "null"
        }
      ]
    },
    "subscription_status": {
      "type": "string",
      "description": "none, trialing, active, past_due, paused of canceled"
    },
    "current_period_ends_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wordt verlengd of eindigt op"
        },
        {
          "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 of agency"
            },
            "status": {
              "type": "string",
              "description": "pending, approved (nog niet op het abonnement), active, rejected of revoked"
            },
            "percent": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Kortingspercentage op Pro en Business (null voor het gratis open-sourceprogramma)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "comp_events": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Gratis gebeurtenissen per maand (alleen gratis open-sourceprogramma)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "organization_name": {
              "type": "string",
              "description": "Naam van de organisatie, school, het project of het bureau"
            },
            "website": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Website"
                },
                {
                  "type": "null"
                }
              ]
            },
            "proof_url": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Link naar bewijs of URL van de repository"
                },
                {
                  "type": "null"
                }
              ]
            },
            "license": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "OSI-licentie (open source)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Notitie voor de beoordeling"
                },
                {
                  "type": "null"
                }
              ]
            },
            "rejection_reason": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Waarom de aanvraag niet is goedgekeurd"
                },
                {
                  "type": "null"
                }
              ]
            },
            "created_at": {
              "type": "string",
              "format": "date-time",
              "description": "Aangevraagd op"
            },
            "reviewed_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Beoordeeld op"
                },
                {
                  "type": "null"
                }
              ]
            },
            "applied_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Korting actief sinds"
                },
                {
                  "type": "null"
                }
              ]
            },
            "revoked_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Programma beëindigd op"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "De meest recente aanvraag voor een kortingsprogramma, of null"
        },
        {
          "type": "null"
        }
      ]
    },
    "discount_percent": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Kortingspercentage op Pro en Business uit een goedgekeurd programma, of null"
        },
        {
          "type": "null"
        }
      ]
    },
    "billing_emails": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tax_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "badge": {
      "type": "object",
      "description": "Badgebonus (gratis abonnement)"
    },
    "usage": {
      "type": "object",
      "properties": {
        "month": {
          "type": "string",
          "format": "date",
          "description": "Eerste dag van de gerapporteerde maand"
        },
        "events": {
          "type": "integer",
          "description": "Factureerbare gebeurtenissen (paginaweergaven en aangepaste gebeurtenissen)"
        },
        "bots": {
          "type": "integer",
          "description": "Uitgefilterde bothits (niet gefactureerd)"
        },
        "allowance": {
          "type": "integer",
          "description": "Inbegrepen gebeurtenissen, inclusief eventuele badgebonus"
        },
        "percent": {
          "type": "number",
          "description": "Gebeurtenissen als percentage van het tegoed"
        },
        "forecast": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Verwachte gebeurtenissen aan het einde van de maand"
            },
            {
              "type": "null"
            }
          ]
        },
        "forecast_percent": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "days_left": {
          "type": "integer",
          "description": "Resterende dagen in de maand"
        },
        "status": {
          "type": "string",
          "description": "ok, warning (80%+), over (een voorbije maand op of boven het tegoed), locked of paused"
        },
        "sites": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "site_id": {
                "type": "string"
              },
              "domain": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "events": {
                "type": "integer",
                "description": "Paginaweergaven en eigen gebeurtenissen deze maand"
              },
              "share": {
                "type": "number",
                "description": "Percentage van het totaal van de werkruimte"
              }
            }
          },
          "description": "Gebeurtenissen per site"
        },
        "history": {
          "type": "array",
          "description": "Eerdere maanden, nieuwste eerst"
        },
        "access_locked_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Dashboards vergrendeld door medewerkers van Privatus Analytics sinds"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused": {
          "type": "boolean",
          "description": "True zolang nieuwe gebeurtenissen worden weggegooid (de maandlimiet is bereikt, of medewerkers hebben het verzamelen gepauzeerd)"
        },
        "pause_reason": {
          "anyOf": [
            {
              "type": "string",
              "description": "Waarom het verzamelen is gepauzeerd: limit (het maandelijkse tegoed is bereikt) of staff. null wanneer er wordt verzameld"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Wanneer medewerkers het verzamelen hebben gepauzeerd"
            },
            {
              "type": "null"
            }
          ]
        },
        "resumes_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Wanneer een limietpauze wordt opgeheven: het begin van de volgende maand (UTC), of eerder bij een upgrade. Anders null"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "description": "Deze maand tot nu toe"
    }
  }
}
POST /workspaces/:workspace_id/billing/cancel.json Opzeggen aan het einde van de factuurperiode billing_cancel

Machtiging: billing.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/cancel.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "reason": {
      "type": "string",
      "description": "Belangrijkste reden voor opzeggen (optionele enquête)",
      "enum": [
        "too_expensive",
        "missing_features",
        "switching_tool",
        "not_using",
        "temporary",
        "other"
      ]
    },
    "comment": {
      "type": "string",
      "description": "Alles wat we beter kunnen doen"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "plan": {
      "type": "string",
      "description": "free, pro, business of enterprise"
    },
    "plan_events": {
      "type": "integer",
      "description": "Gebeurtenissen per maand in het betaalde niveau"
    },
    "allowance": {
      "type": "integer",
      "description": "Gebeurtenissen per maand inclusief eventuele badgebonus"
    },
    "billing_interval": {
      "anyOf": [
        {
          "type": "string",
          "description": "month of year"
        },
        {
          "type": "null"
        }
      ]
    },
    "price": {
      "anyOf": [
        {
          "type": "integer",
          "description": "USD per factuurinterval"
        },
        {
          "type": "null"
        }
      ]
    },
    "subscription_status": {
      "type": "string",
      "description": "none, trialing, active, past_due, paused of canceled"
    },
    "current_period_ends_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wordt verlengd of eindigt op"
        },
        {
          "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 of agency"
            },
            "status": {
              "type": "string",
              "description": "pending, approved (nog niet op het abonnement), active, rejected of revoked"
            },
            "percent": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Kortingspercentage op Pro en Business (null voor het gratis open-sourceprogramma)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "comp_events": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Gratis gebeurtenissen per maand (alleen gratis open-sourceprogramma)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "organization_name": {
              "type": "string",
              "description": "Naam van de organisatie, school, het project of het bureau"
            },
            "website": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Website"
                },
                {
                  "type": "null"
                }
              ]
            },
            "proof_url": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Link naar bewijs of URL van de repository"
                },
                {
                  "type": "null"
                }
              ]
            },
            "license": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "OSI-licentie (open source)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Notitie voor de beoordeling"
                },
                {
                  "type": "null"
                }
              ]
            },
            "rejection_reason": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Waarom de aanvraag niet is goedgekeurd"
                },
                {
                  "type": "null"
                }
              ]
            },
            "created_at": {
              "type": "string",
              "format": "date-time",
              "description": "Aangevraagd op"
            },
            "reviewed_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Beoordeeld op"
                },
                {
                  "type": "null"
                }
              ]
            },
            "applied_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Korting actief sinds"
                },
                {
                  "type": "null"
                }
              ]
            },
            "revoked_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Programma beëindigd op"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "De meest recente aanvraag voor een kortingsprogramma, of null"
        },
        {
          "type": "null"
        }
      ]
    },
    "discount_percent": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Kortingspercentage op Pro en Business uit een goedgekeurd programma, of null"
        },
        {
          "type": "null"
        }
      ]
    },
    "billing_emails": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tax_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "badge": {
      "type": "object",
      "description": "Badgebonus (gratis abonnement)"
    },
    "usage": {
      "type": "object",
      "properties": {
        "month": {
          "type": "string",
          "format": "date",
          "description": "Eerste dag van de gerapporteerde maand"
        },
        "events": {
          "type": "integer",
          "description": "Factureerbare gebeurtenissen (paginaweergaven en aangepaste gebeurtenissen)"
        },
        "bots": {
          "type": "integer",
          "description": "Uitgefilterde bothits (niet gefactureerd)"
        },
        "allowance": {
          "type": "integer",
          "description": "Inbegrepen gebeurtenissen, inclusief eventuele badgebonus"
        },
        "percent": {
          "type": "number",
          "description": "Gebeurtenissen als percentage van het tegoed"
        },
        "forecast": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Verwachte gebeurtenissen aan het einde van de maand"
            },
            {
              "type": "null"
            }
          ]
        },
        "forecast_percent": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "days_left": {
          "type": "integer",
          "description": "Resterende dagen in de maand"
        },
        "status": {
          "type": "string",
          "description": "ok, warning (80%+), over (een voorbije maand op of boven het tegoed), locked of paused"
        },
        "sites": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "site_id": {
                "type": "string"
              },
              "domain": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "events": {
                "type": "integer",
                "description": "Paginaweergaven en eigen gebeurtenissen deze maand"
              },
              "share": {
                "type": "number",
                "description": "Percentage van het totaal van de werkruimte"
              }
            }
          },
          "description": "Gebeurtenissen per site"
        },
        "history": {
          "type": "array",
          "description": "Eerdere maanden, nieuwste eerst"
        },
        "access_locked_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Dashboards vergrendeld door medewerkers van Privatus Analytics sinds"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused": {
          "type": "boolean",
          "description": "True zolang nieuwe gebeurtenissen worden weggegooid (de maandlimiet is bereikt, of medewerkers hebben het verzamelen gepauzeerd)"
        },
        "pause_reason": {
          "anyOf": [
            {
              "type": "string",
              "description": "Waarom het verzamelen is gepauzeerd: limit (het maandelijkse tegoed is bereikt) of staff. null wanneer er wordt verzameld"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Wanneer medewerkers het verzamelen hebben gepauzeerd"
            },
            {
              "type": "null"
            }
          ]
        },
        "resumes_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Wanneer een limietpauze wordt opgeheven: het begin van de volgende maand (UTC), of eerder bij een upgrade. Anders null"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "description": "Deze maand tot nu toe"
    }
  }
}
POST /workspaces/:workspace_id/billing/change_plan.json Abonnement, niveau of interval wijzigen (naar rato) billing_change_plan

Machtiging: billing.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/change_plan.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "plan": {
      "type": "string",
      "description": "Abonnement om naar over te stappen: pro of business",
      "enum": [
        "pro",
        "business"
      ]
    },
    "events": {
      "type": "integer",
      "description": "Gebeurtenissen per maand van het niveau, uit GET /plans",
      "examples": [
        1000000
      ]
    },
    "interval": {
      "type": "string",
      "description": "Factuurinterval. Jaarlijks is 2 maanden gratis",
      "enum": [
        "month",
        "year"
      ],
      "default": "month"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "plan",
    "events",
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "plan": {
      "type": "string",
      "description": "free, pro, business of enterprise"
    },
    "plan_events": {
      "type": "integer",
      "description": "Gebeurtenissen per maand in het betaalde niveau"
    },
    "allowance": {
      "type": "integer",
      "description": "Gebeurtenissen per maand inclusief eventuele badgebonus"
    },
    "billing_interval": {
      "anyOf": [
        {
          "type": "string",
          "description": "month of year"
        },
        {
          "type": "null"
        }
      ]
    },
    "price": {
      "anyOf": [
        {
          "type": "integer",
          "description": "USD per factuurinterval"
        },
        {
          "type": "null"
        }
      ]
    },
    "subscription_status": {
      "type": "string",
      "description": "none, trialing, active, past_due, paused of canceled"
    },
    "current_period_ends_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wordt verlengd of eindigt op"
        },
        {
          "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 of agency"
            },
            "status": {
              "type": "string",
              "description": "pending, approved (nog niet op het abonnement), active, rejected of revoked"
            },
            "percent": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Kortingspercentage op Pro en Business (null voor het gratis open-sourceprogramma)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "comp_events": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Gratis gebeurtenissen per maand (alleen gratis open-sourceprogramma)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "organization_name": {
              "type": "string",
              "description": "Naam van de organisatie, school, het project of het bureau"
            },
            "website": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Website"
                },
                {
                  "type": "null"
                }
              ]
            },
            "proof_url": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Link naar bewijs of URL van de repository"
                },
                {
                  "type": "null"
                }
              ]
            },
            "license": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "OSI-licentie (open source)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Notitie voor de beoordeling"
                },
                {
                  "type": "null"
                }
              ]
            },
            "rejection_reason": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Waarom de aanvraag niet is goedgekeurd"
                },
                {
                  "type": "null"
                }
              ]
            },
            "created_at": {
              "type": "string",
              "format": "date-time",
              "description": "Aangevraagd op"
            },
            "reviewed_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Beoordeeld op"
                },
                {
                  "type": "null"
                }
              ]
            },
            "applied_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Korting actief sinds"
                },
                {
                  "type": "null"
                }
              ]
            },
            "revoked_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Programma beëindigd op"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "De meest recente aanvraag voor een kortingsprogramma, of null"
        },
        {
          "type": "null"
        }
      ]
    },
    "discount_percent": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Kortingspercentage op Pro en Business uit een goedgekeurd programma, of null"
        },
        {
          "type": "null"
        }
      ]
    },
    "billing_emails": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tax_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "badge": {
      "type": "object",
      "description": "Badgebonus (gratis abonnement)"
    },
    "usage": {
      "type": "object",
      "properties": {
        "month": {
          "type": "string",
          "format": "date",
          "description": "Eerste dag van de gerapporteerde maand"
        },
        "events": {
          "type": "integer",
          "description": "Factureerbare gebeurtenissen (paginaweergaven en aangepaste gebeurtenissen)"
        },
        "bots": {
          "type": "integer",
          "description": "Uitgefilterde bothits (niet gefactureerd)"
        },
        "allowance": {
          "type": "integer",
          "description": "Inbegrepen gebeurtenissen, inclusief eventuele badgebonus"
        },
        "percent": {
          "type": "number",
          "description": "Gebeurtenissen als percentage van het tegoed"
        },
        "forecast": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Verwachte gebeurtenissen aan het einde van de maand"
            },
            {
              "type": "null"
            }
          ]
        },
        "forecast_percent": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "days_left": {
          "type": "integer",
          "description": "Resterende dagen in de maand"
        },
        "status": {
          "type": "string",
          "description": "ok, warning (80%+), over (een voorbije maand op of boven het tegoed), locked of paused"
        },
        "sites": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "site_id": {
                "type": "string"
              },
              "domain": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "events": {
                "type": "integer",
                "description": "Paginaweergaven en eigen gebeurtenissen deze maand"
              },
              "share": {
                "type": "number",
                "description": "Percentage van het totaal van de werkruimte"
              }
            }
          },
          "description": "Gebeurtenissen per site"
        },
        "history": {
          "type": "array",
          "description": "Eerdere maanden, nieuwste eerst"
        },
        "access_locked_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Dashboards vergrendeld door medewerkers van Privatus Analytics sinds"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused": {
          "type": "boolean",
          "description": "True zolang nieuwe gebeurtenissen worden weggegooid (de maandlimiet is bereikt, of medewerkers hebben het verzamelen gepauzeerd)"
        },
        "pause_reason": {
          "anyOf": [
            {
              "type": "string",
              "description": "Waarom het verzamelen is gepauzeerd: limit (het maandelijkse tegoed is bereikt) of staff. null wanneer er wordt verzameld"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Wanneer medewerkers het verzamelen hebben gepauzeerd"
            },
            {
              "type": "null"
            }
          ]
        },
        "resumes_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Wanneer een limietpauze wordt opgeheven: het begin van de volgende maand (UTC), of eerder bij een upgrade. Anders null"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "description": "Deze maand tot nu toe"
    }
  }
}
POST /workspaces/:workspace_id/billing/checkout.json Een Paddle-checkout starten voor een betaald abonnement billing_checkout

Machtiging: billing.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/checkout.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "plan": {
      "type": "string",
      "description": "Abonnement om naar over te stappen: pro of business",
      "enum": [
        "pro",
        "business"
      ]
    },
    "events": {
      "type": "integer",
      "description": "Gebeurtenissen per maand van het niveau, uit GET /plans",
      "examples": [
        1000000
      ]
    },
    "interval": {
      "type": "string",
      "description": "Factuurinterval. Jaarlijks is 2 maanden gratis",
      "enum": [
        "month",
        "year"
      ],
      "default": "month"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "plan",
    "events",
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "transaction_id": {
      "type": "string",
      "description": "Paddle-transactie-id (txn_...)"
    },
    "url": {
      "anyOf": [
        {
          "type": "string",
          "description": "URL van de gehoste checkout"
        },
        {
          "type": "null"
        }
      ]
    },
    "price_id": {
      "type": "string"
    },
    "plan": {
      "type": "string"
    },
    "events": {
      "type": "integer"
    },
    "interval": {
      "type": "string"
    },
    "amount": {
      "type": "integer",
      "description": "USD per interval"
    },
    "client_token": {
      "anyOf": [
        {
          "type": "string",
          "description": "Paddle.js-token aan clientzijde"
        },
        {
          "type": "null"
        }
      ]
    },
    "environment": {
      "type": "string",
      "description": "sandbox of production"
    },
    "custom_data": {
      "type": "object",
      "description": "Aan Paddle doorgegeven om het abonnement te koppelen"
    },
    "discount_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Paddle-kortings-id van een goedgekeurd programma, toegepast op deze checkout"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
POST /workspaces/:workspace_id/billing/discount.json Korting aanvragen voor non-profit, onderwijs of open source billing_discount

Machtiging: billing.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/discount.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "program": {
      "type": "string",
      "description": "nonprofit, education, open_source (50% korting), open_source_free (gratis Pro tot 1M gebeurtenissen per maand) of agency (20% korting op elke werkruimte waarvan je eigenaar bent)",
      "enum": [
        "nonprofit",
        "education",
        "open_source",
        "open_source_free",
        "agency"
      ]
    },
    "organization_name": {
      "type": "string",
      "description": "Naam van de organisatie, school, het project of het bureau"
    },
    "website": {
      "type": "string",
      "description": "De website ervan"
    },
    "proof_url": {
      "type": "string",
      "description": "Link naar bewijs. Voor open source de URL van de repository"
    },
    "license": {
      "type": "string",
      "description": "OSI-licentie van het project (alleen open source)"
    },
    "note": {
      "type": "string",
      "description": "Alles wat helpt bij de beoordeling, maximaal 1.000 tekens"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "program",
    "organization_name",
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "program": {
      "type": "string",
      "description": "nonprofit, education, open_source, open_source_free of agency"
    },
    "status": {
      "type": "string",
      "description": "pending, approved (nog niet op het abonnement), active, rejected of revoked"
    },
    "percent": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Kortingspercentage op Pro en Business (null voor het gratis open-sourceprogramma)"
        },
        {
          "type": "null"
        }
      ]
    },
    "comp_events": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Gratis gebeurtenissen per maand (alleen gratis open-sourceprogramma)"
        },
        {
          "type": "null"
        }
      ]
    },
    "organization_name": {
      "type": "string",
      "description": "Naam van de organisatie, school, het project of het bureau"
    },
    "website": {
      "anyOf": [
        {
          "type": "string",
          "description": "Website"
        },
        {
          "type": "null"
        }
      ]
    },
    "proof_url": {
      "anyOf": [
        {
          "type": "string",
          "description": "Link naar bewijs of URL van de repository"
        },
        {
          "type": "null"
        }
      ]
    },
    "license": {
      "anyOf": [
        {
          "type": "string",
          "description": "OSI-licentie (open source)"
        },
        {
          "type": "null"
        }
      ]
    },
    "note": {
      "anyOf": [
        {
          "type": "string",
          "description": "Notitie voor de beoordeling"
        },
        {
          "type": "null"
        }
      ]
    },
    "rejection_reason": {
      "anyOf": [
        {
          "type": "string",
          "description": "Waarom de aanvraag niet is goedgekeurd"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Aangevraagd op"
    },
    "reviewed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Beoordeeld op"
        },
        {
          "type": "null"
        }
      ]
    },
    "applied_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Korting actief sinds"
        },
        {
          "type": "null"
        }
      ]
    },
    "revoked_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Programma beëindigd op"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
POST /workspaces/:workspace_id/billing/payment_method.json Een link ophalen om de betaalmethode bij te werken billing_payment_method

Machtiging: billing.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/payment_method.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "description": "portal, payment_method of invoice"
    },
    "url": {
      "anyOf": [
        {
          "type": "string",
          "description": "Kortlevende Paddle-URL"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
POST /workspaces/:workspace_id/billing/portal.json Een link naar het Paddle-klantenportaal ophalen billing_portal

Machtiging: billing.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/portal.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "description": "portal, payment_method of invoice"
    },
    "url": {
      "anyOf": [
        {
          "type": "string",
          "description": "Kortlevende Paddle-URL"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
GET /workspaces/:workspace_id/billing/preview.json Een abonnementswijziging bekijken met verrekening naar rato billing_preview

Machtiging: billing.manage

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/billing/preview.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "plan": {
      "type": "string",
      "description": "Abonnement om naar over te stappen: pro of business",
      "enum": [
        "pro",
        "business"
      ]
    },
    "events": {
      "type": "integer",
      "description": "Gebeurtenissen per maand van het niveau, uit GET /plans",
      "examples": [
        1000000
      ]
    },
    "interval": {
      "type": "string",
      "description": "Factuurinterval. Jaarlijks is 2 maanden gratis",
      "enum": [
        "month",
        "year"
      ],
      "default": "month"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "plan",
    "events",
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "plan": {
      "type": "string"
    },
    "events": {
      "type": "integer"
    },
    "interval": {
      "type": "string"
    },
    "price_id": {
      "type": "string"
    },
    "amount": {
      "type": "integer",
      "description": "Nieuwe prijs in USD per interval"
    },
    "currency": {
      "type": "string"
    },
    "charge_minor": {
      "type": "integer",
      "description": "Nu in rekening gebracht, in kleinste eenheden"
    },
    "credit_minor": {
      "type": "integer",
      "description": "Tegoed voor ongebruikte tijd, kleinste eenheden"
    },
    "result_action": {
      "anyOf": [
        {
          "type": "string",
          "description": "charge of credit"
        },
        {
          "type": "null"
        }
      ]
    },
    "result_minor": {
      "type": "integer",
      "description": "Netto bedrag of tegoed, kleinste eenheden"
    },
    "next_billed_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Verbruik of limieten die het nieuwe abonnement niet zou dekken"
    }
  }
}
POST /workspaces/:workspace_id/billing/resume.json Een geplande opzegging ongedaan maken of een pauze hervatten billing_resume

Machtiging: billing.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/resume.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "plan": {
      "type": "string",
      "description": "free, pro, business of enterprise"
    },
    "plan_events": {
      "type": "integer",
      "description": "Gebeurtenissen per maand in het betaalde niveau"
    },
    "allowance": {
      "type": "integer",
      "description": "Gebeurtenissen per maand inclusief eventuele badgebonus"
    },
    "billing_interval": {
      "anyOf": [
        {
          "type": "string",
          "description": "month of year"
        },
        {
          "type": "null"
        }
      ]
    },
    "price": {
      "anyOf": [
        {
          "type": "integer",
          "description": "USD per factuurinterval"
        },
        {
          "type": "null"
        }
      ]
    },
    "subscription_status": {
      "type": "string",
      "description": "none, trialing, active, past_due, paused of canceled"
    },
    "current_period_ends_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wordt verlengd of eindigt op"
        },
        {
          "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 of agency"
            },
            "status": {
              "type": "string",
              "description": "pending, approved (nog niet op het abonnement), active, rejected of revoked"
            },
            "percent": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Kortingspercentage op Pro en Business (null voor het gratis open-sourceprogramma)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "comp_events": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Gratis gebeurtenissen per maand (alleen gratis open-sourceprogramma)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "organization_name": {
              "type": "string",
              "description": "Naam van de organisatie, school, het project of het bureau"
            },
            "website": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Website"
                },
                {
                  "type": "null"
                }
              ]
            },
            "proof_url": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Link naar bewijs of URL van de repository"
                },
                {
                  "type": "null"
                }
              ]
            },
            "license": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "OSI-licentie (open source)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Notitie voor de beoordeling"
                },
                {
                  "type": "null"
                }
              ]
            },
            "rejection_reason": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Waarom de aanvraag niet is goedgekeurd"
                },
                {
                  "type": "null"
                }
              ]
            },
            "created_at": {
              "type": "string",
              "format": "date-time",
              "description": "Aangevraagd op"
            },
            "reviewed_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Beoordeeld op"
                },
                {
                  "type": "null"
                }
              ]
            },
            "applied_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Korting actief sinds"
                },
                {
                  "type": "null"
                }
              ]
            },
            "revoked_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Programma beëindigd op"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "De meest recente aanvraag voor een kortingsprogramma, of null"
        },
        {
          "type": "null"
        }
      ]
    },
    "discount_percent": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Kortingspercentage op Pro en Business uit een goedgekeurd programma, of null"
        },
        {
          "type": "null"
        }
      ]
    },
    "billing_emails": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tax_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "badge": {
      "type": "object",
      "description": "Badgebonus (gratis abonnement)"
    },
    "usage": {
      "type": "object",
      "properties": {
        "month": {
          "type": "string",
          "format": "date",
          "description": "Eerste dag van de gerapporteerde maand"
        },
        "events": {
          "type": "integer",
          "description": "Factureerbare gebeurtenissen (paginaweergaven en aangepaste gebeurtenissen)"
        },
        "bots": {
          "type": "integer",
          "description": "Uitgefilterde bothits (niet gefactureerd)"
        },
        "allowance": {
          "type": "integer",
          "description": "Inbegrepen gebeurtenissen, inclusief eventuele badgebonus"
        },
        "percent": {
          "type": "number",
          "description": "Gebeurtenissen als percentage van het tegoed"
        },
        "forecast": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Verwachte gebeurtenissen aan het einde van de maand"
            },
            {
              "type": "null"
            }
          ]
        },
        "forecast_percent": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "days_left": {
          "type": "integer",
          "description": "Resterende dagen in de maand"
        },
        "status": {
          "type": "string",
          "description": "ok, warning (80%+), over (een voorbije maand op of boven het tegoed), locked of paused"
        },
        "sites": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "site_id": {
                "type": "string"
              },
              "domain": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "events": {
                "type": "integer",
                "description": "Paginaweergaven en eigen gebeurtenissen deze maand"
              },
              "share": {
                "type": "number",
                "description": "Percentage van het totaal van de werkruimte"
              }
            }
          },
          "description": "Gebeurtenissen per site"
        },
        "history": {
          "type": "array",
          "description": "Eerdere maanden, nieuwste eerst"
        },
        "access_locked_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Dashboards vergrendeld door medewerkers van Privatus Analytics sinds"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused": {
          "type": "boolean",
          "description": "True zolang nieuwe gebeurtenissen worden weggegooid (de maandlimiet is bereikt, of medewerkers hebben het verzamelen gepauzeerd)"
        },
        "pause_reason": {
          "anyOf": [
            {
              "type": "string",
              "description": "Waarom het verzamelen is gepauzeerd: limit (het maandelijkse tegoed is bereikt) of staff. null wanneer er wordt verzameld"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Wanneer medewerkers het verzamelen hebben gepauzeerd"
            },
            {
              "type": "null"
            }
          ]
        },
        "resumes_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Wanneer een limietpauze wordt opgeheven: het begin van de volgende maand (UTC), of eerder bij een upgrade. Anders null"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "description": "Deze maand tot nu toe"
    }
  }
}
GET /workspaces/:workspace_id/billing.json Het abonnement, de subscriptie en het verbruik ophalen billing_get

Machtiging: billing.manage

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/billing.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "plan": {
      "type": "string",
      "description": "free, pro, business of enterprise"
    },
    "plan_events": {
      "type": "integer",
      "description": "Gebeurtenissen per maand in het betaalde niveau"
    },
    "allowance": {
      "type": "integer",
      "description": "Gebeurtenissen per maand inclusief eventuele badgebonus"
    },
    "billing_interval": {
      "anyOf": [
        {
          "type": "string",
          "description": "month of year"
        },
        {
          "type": "null"
        }
      ]
    },
    "price": {
      "anyOf": [
        {
          "type": "integer",
          "description": "USD per factuurinterval"
        },
        {
          "type": "null"
        }
      ]
    },
    "subscription_status": {
      "type": "string",
      "description": "none, trialing, active, past_due, paused of canceled"
    },
    "current_period_ends_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wordt verlengd of eindigt op"
        },
        {
          "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 of agency"
            },
            "status": {
              "type": "string",
              "description": "pending, approved (nog niet op het abonnement), active, rejected of revoked"
            },
            "percent": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Kortingspercentage op Pro en Business (null voor het gratis open-sourceprogramma)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "comp_events": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Gratis gebeurtenissen per maand (alleen gratis open-sourceprogramma)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "organization_name": {
              "type": "string",
              "description": "Naam van de organisatie, school, het project of het bureau"
            },
            "website": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Website"
                },
                {
                  "type": "null"
                }
              ]
            },
            "proof_url": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Link naar bewijs of URL van de repository"
                },
                {
                  "type": "null"
                }
              ]
            },
            "license": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "OSI-licentie (open source)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Notitie voor de beoordeling"
                },
                {
                  "type": "null"
                }
              ]
            },
            "rejection_reason": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Waarom de aanvraag niet is goedgekeurd"
                },
                {
                  "type": "null"
                }
              ]
            },
            "created_at": {
              "type": "string",
              "format": "date-time",
              "description": "Aangevraagd op"
            },
            "reviewed_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Beoordeeld op"
                },
                {
                  "type": "null"
                }
              ]
            },
            "applied_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Korting actief sinds"
                },
                {
                  "type": "null"
                }
              ]
            },
            "revoked_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Programma beëindigd op"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "De meest recente aanvraag voor een kortingsprogramma, of null"
        },
        {
          "type": "null"
        }
      ]
    },
    "discount_percent": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Kortingspercentage op Pro en Business uit een goedgekeurd programma, of null"
        },
        {
          "type": "null"
        }
      ]
    },
    "billing_emails": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tax_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "badge": {
      "type": "object",
      "description": "Badgebonus (gratis abonnement)"
    },
    "usage": {
      "type": "object",
      "properties": {
        "month": {
          "type": "string",
          "format": "date",
          "description": "Eerste dag van de gerapporteerde maand"
        },
        "events": {
          "type": "integer",
          "description": "Factureerbare gebeurtenissen (paginaweergaven en aangepaste gebeurtenissen)"
        },
        "bots": {
          "type": "integer",
          "description": "Uitgefilterde bothits (niet gefactureerd)"
        },
        "allowance": {
          "type": "integer",
          "description": "Inbegrepen gebeurtenissen, inclusief eventuele badgebonus"
        },
        "percent": {
          "type": "number",
          "description": "Gebeurtenissen als percentage van het tegoed"
        },
        "forecast": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Verwachte gebeurtenissen aan het einde van de maand"
            },
            {
              "type": "null"
            }
          ]
        },
        "forecast_percent": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "days_left": {
          "type": "integer",
          "description": "Resterende dagen in de maand"
        },
        "status": {
          "type": "string",
          "description": "ok, warning (80%+), over (een voorbije maand op of boven het tegoed), locked of paused"
        },
        "sites": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "site_id": {
                "type": "string"
              },
              "domain": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "events": {
                "type": "integer",
                "description": "Paginaweergaven en eigen gebeurtenissen deze maand"
              },
              "share": {
                "type": "number",
                "description": "Percentage van het totaal van de werkruimte"
              }
            }
          },
          "description": "Gebeurtenissen per site"
        },
        "history": {
          "type": "array",
          "description": "Eerdere maanden, nieuwste eerst"
        },
        "access_locked_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Dashboards vergrendeld door medewerkers van Privatus Analytics sinds"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused": {
          "type": "boolean",
          "description": "True zolang nieuwe gebeurtenissen worden weggegooid (de maandlimiet is bereikt, of medewerkers hebben het verzamelen gepauzeerd)"
        },
        "pause_reason": {
          "anyOf": [
            {
              "type": "string",
              "description": "Waarom het verzamelen is gepauzeerd: limit (het maandelijkse tegoed is bereikt) of staff. null wanneer er wordt verzameld"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Wanneer medewerkers het verzamelen hebben gepauzeerd"
            },
            {
              "type": "null"
            }
          ]
        },
        "resumes_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Wanneer een limietpauze wordt opgeheven: het begin van de volgende maand (UTC), of eerder bij een upgrade. Anders null"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "description": "Deze maand tot nu toe"
    }
  }
}
PATCH /workspaces/:workspace_id/billing.json Factuur-e-mails, btw-nummer en automatisch upgraden bijwerken billing_update

Machtiging: billing.manage

Voorbeeld
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/billing.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "billing_emails": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Extra adressen voor facturen en factuurberichten (tot 5)"
    },
    "tax_id": {
      "type": "string",
      "description": "Btw-/GST-/belastingnummer op facturen"
    },
    "auto_upgrade": {
      "type": "boolean",
      "description": "true om naar het volgende niveau te gaan en het verschil af te rekenen wanneer de maandlimiet is bereikt, in plaats van het verzamelen te pauzeren. Staat standaard uit"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "plan": {
      "type": "string",
      "description": "free, pro, business of enterprise"
    },
    "plan_events": {
      "type": "integer",
      "description": "Gebeurtenissen per maand in het betaalde niveau"
    },
    "allowance": {
      "type": "integer",
      "description": "Gebeurtenissen per maand inclusief eventuele badgebonus"
    },
    "billing_interval": {
      "anyOf": [
        {
          "type": "string",
          "description": "month of year"
        },
        {
          "type": "null"
        }
      ]
    },
    "price": {
      "anyOf": [
        {
          "type": "integer",
          "description": "USD per factuurinterval"
        },
        {
          "type": "null"
        }
      ]
    },
    "subscription_status": {
      "type": "string",
      "description": "none, trialing, active, past_due, paused of canceled"
    },
    "current_period_ends_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wordt verlengd of eindigt op"
        },
        {
          "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 of agency"
            },
            "status": {
              "type": "string",
              "description": "pending, approved (nog niet op het abonnement), active, rejected of revoked"
            },
            "percent": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Kortingspercentage op Pro en Business (null voor het gratis open-sourceprogramma)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "comp_events": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Gratis gebeurtenissen per maand (alleen gratis open-sourceprogramma)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "organization_name": {
              "type": "string",
              "description": "Naam van de organisatie, school, het project of het bureau"
            },
            "website": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Website"
                },
                {
                  "type": "null"
                }
              ]
            },
            "proof_url": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Link naar bewijs of URL van de repository"
                },
                {
                  "type": "null"
                }
              ]
            },
            "license": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "OSI-licentie (open source)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Notitie voor de beoordeling"
                },
                {
                  "type": "null"
                }
              ]
            },
            "rejection_reason": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Waarom de aanvraag niet is goedgekeurd"
                },
                {
                  "type": "null"
                }
              ]
            },
            "created_at": {
              "type": "string",
              "format": "date-time",
              "description": "Aangevraagd op"
            },
            "reviewed_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Beoordeeld op"
                },
                {
                  "type": "null"
                }
              ]
            },
            "applied_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Korting actief sinds"
                },
                {
                  "type": "null"
                }
              ]
            },
            "revoked_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Programma beëindigd op"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "De meest recente aanvraag voor een kortingsprogramma, of null"
        },
        {
          "type": "null"
        }
      ]
    },
    "discount_percent": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Kortingspercentage op Pro en Business uit een goedgekeurd programma, of null"
        },
        {
          "type": "null"
        }
      ]
    },
    "billing_emails": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tax_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "badge": {
      "type": "object",
      "description": "Badgebonus (gratis abonnement)"
    },
    "usage": {
      "type": "object",
      "properties": {
        "month": {
          "type": "string",
          "format": "date",
          "description": "Eerste dag van de gerapporteerde maand"
        },
        "events": {
          "type": "integer",
          "description": "Factureerbare gebeurtenissen (paginaweergaven en aangepaste gebeurtenissen)"
        },
        "bots": {
          "type": "integer",
          "description": "Uitgefilterde bothits (niet gefactureerd)"
        },
        "allowance": {
          "type": "integer",
          "description": "Inbegrepen gebeurtenissen, inclusief eventuele badgebonus"
        },
        "percent": {
          "type": "number",
          "description": "Gebeurtenissen als percentage van het tegoed"
        },
        "forecast": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Verwachte gebeurtenissen aan het einde van de maand"
            },
            {
              "type": "null"
            }
          ]
        },
        "forecast_percent": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "days_left": {
          "type": "integer",
          "description": "Resterende dagen in de maand"
        },
        "status": {
          "type": "string",
          "description": "ok, warning (80%+), over (een voorbije maand op of boven het tegoed), locked of paused"
        },
        "sites": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "site_id": {
                "type": "string"
              },
              "domain": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "events": {
                "type": "integer",
                "description": "Paginaweergaven en eigen gebeurtenissen deze maand"
              },
              "share": {
                "type": "number",
                "description": "Percentage van het totaal van de werkruimte"
              }
            }
          },
          "description": "Gebeurtenissen per site"
        },
        "history": {
          "type": "array",
          "description": "Eerdere maanden, nieuwste eerst"
        },
        "access_locked_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Dashboards vergrendeld door medewerkers van Privatus Analytics sinds"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused": {
          "type": "boolean",
          "description": "True zolang nieuwe gebeurtenissen worden weggegooid (de maandlimiet is bereikt, of medewerkers hebben het verzamelen gepauzeerd)"
        },
        "pause_reason": {
          "anyOf": [
            {
              "type": "string",
              "description": "Waarom het verzamelen is gepauzeerd: limit (het maandelijkse tegoed is bereikt) of staff. null wanneer er wordt verzameld"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Wanneer medewerkers het verzamelen hebben gepauzeerd"
            },
            {
              "type": "null"
            }
          ]
        },
        "resumes_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Wanneer een limietpauze wordt opgeheven: het begin van de volgende maand (UTC), of eerder bij een upgrade. Anders null"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "description": "Deze maand tot nu toe"
    }
  }
}
GET /workspaces/:workspace_id/billing/usage.json Het verbruik van deze maand, de prognose en de verdeling per site ophalen billing_usage

Machtiging: billing.manage

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/billing/usage.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "month": {
      "type": "string",
      "format": "date",
      "description": "Elke dag in de te rapporteren maand (standaard deze maand)",
      "examples": [
        "2026-09-01"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "month": {
      "type": "string",
      "format": "date",
      "description": "Eerste dag van de gerapporteerde maand"
    },
    "events": {
      "type": "integer",
      "description": "Factureerbare gebeurtenissen (paginaweergaven en aangepaste gebeurtenissen)"
    },
    "bots": {
      "type": "integer",
      "description": "Uitgefilterde bothits (niet gefactureerd)"
    },
    "allowance": {
      "type": "integer",
      "description": "Inbegrepen gebeurtenissen, inclusief eventuele badgebonus"
    },
    "percent": {
      "type": "number",
      "description": "Gebeurtenissen als percentage van het tegoed"
    },
    "forecast": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Verwachte gebeurtenissen aan het einde van de maand"
        },
        {
          "type": "null"
        }
      ]
    },
    "forecast_percent": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "days_left": {
      "type": "integer",
      "description": "Resterende dagen in de maand"
    },
    "status": {
      "type": "string",
      "description": "ok, warning (80%+), over (een voorbije maand op of boven het tegoed), locked of paused"
    },
    "sites": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "site_id": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "events": {
            "type": "integer",
            "description": "Paginaweergaven en eigen gebeurtenissen deze maand"
          },
          "share": {
            "type": "number",
            "description": "Percentage van het totaal van de werkruimte"
          }
        }
      },
      "description": "Gebeurtenissen per site"
    },
    "history": {
      "type": "array",
      "description": "Eerdere maanden, nieuwste eerst"
    },
    "access_locked_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Dashboards vergrendeld door medewerkers van Privatus Analytics sinds"
        },
        {
          "type": "null"
        }
      ]
    },
    "collection_paused": {
      "type": "boolean",
      "description": "True zolang nieuwe gebeurtenissen worden weggegooid (de maandlimiet is bereikt, of medewerkers hebben het verzamelen gepauzeerd)"
    },
    "pause_reason": {
      "anyOf": [
        {
          "type": "string",
          "description": "Waarom het verzamelen is gepauzeerd: limit (het maandelijkse tegoed is bereikt) of staff. null wanneer er wordt verzameld"
        },
        {
          "type": "null"
        }
      ]
    },
    "collection_paused_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer medewerkers het verzamelen hebben gepauzeerd"
        },
        {
          "type": "null"
        }
      ]
    },
    "resumes_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Wanneer een limietpauze wordt opgeheven: het begin van de volgende maand (UTC), of eerder bij een upgrade. Anders null"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
GET /workspaces/:workspace_id/billing/invoices.json Facturen weergeven billing_invoices_list

Machtiging: billing.manage

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/billing/invoices.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Paddle-transactie-id"
      },
      "invoice_number": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "status": {
        "type": "string",
        "description": "paid, completed, payment_failed, ..."
      },
      "amount_minor": {
        "type": "integer",
        "description": "Totaal in kleinste eenheden (centen)"
      },
      "currency": {
        "type": "string"
      },
      "billed_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  }
}
GET /workspaces/:workspace_id/billing/invoices/:id.json De pdf-link van een factuur ophalen billing_invoices_get

Machtiging: billing.manage

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/billing/invoices/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "description": "portal, payment_method of invoice"
    },
    "url": {
      "anyOf": [
        {
          "type": "string",
          "description": "Kortlevende Paddle-URL"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}

Funnels

POST /sites/:site_id/funnels.json Een funnel aanmaken funnels_create

Machtiging: content.write

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/funnels.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Naam van de funnel",
      "examples": [
        "Signup flow"
      ]
    },
    "steps": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      },
      "description": "Stappen op volgorde (2 tot de limiet van je abonnement): [{\"type\": \"page|event|goal\", \"value\": \"/pricing | Signup | goal_…\", \"match\": \"exact|prefix|glob|regex\" (paginastappen), \"name\": \"optional label\"}]"
    },
    "order_mode": {
      "type": "string",
      "description": "strict: stappen in deze volgorde, any: in willekeurige volgorde",
      "enum": [
        "strict",
        "any"
      ],
      "default": "strict"
    },
    "window": {
      "type": "string",
      "description": "Conversievenster: visit, of day (gemeten binnen een bezoek, dat nooit een UTC-dag overspant)",
      "enum": [
        "visit",
        "day"
      ],
      "default": "visit"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "steps",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Funnel-id, bijv. fun_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "steps": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Stappen: {type: page|event|goal, value, match, name}"
    },
    "order_mode": {
      "type": "string",
      "description": "strict of any"
    },
    "window": {
      "type": "string",
      "description": "visit of day"
    },
    "stats": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "entered": {
              "type": "integer",
              "description": "Bezoeken die stap 1 hebben bereikt"
            },
            "completed": {
              "type": "integer",
              "description": "Bezoeken die de laatste stap bereikten"
            },
            "conversion_rate": {
              "type": "number",
              "description": "Voltooid ÷ binnengekomen, %"
            }
          },
          "description": "Periodestatistieken (alleen in lijst)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/funnels/:id.json Een funnel verwijderen funnels_delete

Machtiging: content.write

Voorbeeld
curl -X DELETE https://privatusanalytics.com/sites/:site_id/funnels/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Funnel-id, bijv. fun_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "steps": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Stappen: {type: page|event|goal, value, match, name}"
    },
    "order_mode": {
      "type": "string",
      "description": "strict of any"
    },
    "window": {
      "type": "string",
      "description": "visit of day"
    },
    "stats": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "entered": {
              "type": "integer",
              "description": "Bezoeken die stap 1 hebben bereikt"
            },
            "completed": {
              "type": "integer",
              "description": "Bezoeken die de laatste stap bereikten"
            },
            "conversion_rate": {
              "type": "number",
              "description": "Voltooid ÷ binnengekomen, %"
            }
          },
          "description": "Periodestatistieken (alleen in lijst)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/funnels.json Funnels weergeven met instroom, voltooiingen en ratio funnels_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/funnels.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Voorinstelling voor datumbereik. Gebruik custom met 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": "Begin van aangepast bereik (tijdzone van de site)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepast bereik, inclusief"
    },
    "compare": {
      "type": "string",
      "description": "Vergelijkingsperiode",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Begin van aangepaste vergelijking"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepaste vergelijking"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Weekdagen van de vergelijking uitlijnen",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Verpak voorwaarden in {\"any\": [...]} voor OF.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Een opgeslagen segment toepassen (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Geïmporteerde historische gegevens toevoegen (datums vóór de eerste eigen gebeurtenis, genegeerd als filters of een segment zijn toegepast)",
      "default": false
    },
    "page": {
      "type": "integer",
      "description": "Paginanummer",
      "default": 1
    },
    "per_page": {
      "type": "integer",
      "description": "Funnels per pagina (max 100)",
      "default": 25
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Funnel-id, bijv. fun_7Q2K9XH3AB"
      },
      "name": {
        "type": "string"
      },
      "steps": {
        "type": "array",
        "items": {
          "type": "object"
        },
        "description": "Stappen: {type: page|event|goal, value, match, name}"
      },
      "order_mode": {
        "type": "string",
        "description": "strict of any"
      },
      "window": {
        "type": "string",
        "description": "visit of day"
      },
      "stats": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "entered": {
                "type": "integer",
                "description": "Bezoeken die stap 1 hebben bereikt"
              },
              "completed": {
                "type": "integer",
                "description": "Bezoeken die de laatste stap bereikten"
              },
              "conversion_rate": {
                "type": "number",
                "description": "Voltooid ÷ binnengekomen, %"
              }
            },
            "description": "Periodestatistieken (alleen in lijst)"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      },
      "updated_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
GET /sites/:site_id/funnels/:id.json Funnelrapport: aantallen per stap, conversie, uitval, tijd tussen stappen en waar bezoeken in plaats daarvan naartoe gingen funnels_get

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/funnels/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Voorinstelling voor datumbereik. Gebruik custom met 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": "Begin van aangepast bereik (tijdzone van de site)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepast bereik, inclusief"
    },
    "compare": {
      "type": "string",
      "description": "Vergelijkingsperiode",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Begin van aangepaste vergelijking"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepaste vergelijking"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Weekdagen van de vergelijking uitlijnen",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Verpak voorwaarden in {\"any\": [...]} voor OF.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Een opgeslagen segment toepassen (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Geïmporteerde historische gegevens toevoegen (datums vóór de eerste eigen gebeurtenis, genegeerd als filters of een segment zijn toegepast)",
      "default": false
    },
    "breakdown": {
      "type": "string",
      "description": "Stapaantallen splitsen op een bezoekdimensie",
      "enum": [
        "channel",
        "device",
        "country",
        "utm_campaign",
        "utm_source",
        "browser",
        "os"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "period": {
      "type": "object",
      "description": "from/to van de periode (UTC)"
    },
    "funnel": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Funnel-id, bijv. fun_7Q2K9XH3AB"
        },
        "name": {
          "type": "string"
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "Stappen: {type: page|event|goal, value, match, name}"
        },
        "order_mode": {
          "type": "string",
          "description": "strict of any"
        },
        "window": {
          "type": "string",
          "description": "visit of day"
        },
        "stats": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "entered": {
                  "type": "integer",
                  "description": "Bezoeken die stap 1 hebben bereikt"
                },
                "completed": {
                  "type": "integer",
                  "description": "Bezoeken die de laatste stap bereikten"
                },
                "conversion_rate": {
                  "type": "number",
                  "description": "Voltooid ÷ binnengekomen, %"
                }
              },
              "description": "Periodestatistieken (alleen in lijst)"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "description": "De funneldefinitie"
    },
    "order_mode": {
      "type": "string",
      "description": "strict of any"
    },
    "window": {
      "type": "string",
      "description": "visit of day (day wordt binnen een bezoek gemeten)"
    },
    "steps": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Per stap: 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": "Laatste stap ÷ eerste stap, %"
    },
    "breakdown": {
      "anyOf": [
        {
          "type": "object",
          "description": "dimension, label en rows [{value, counts, overall_conversion_rate}]"
        },
        {
          "type": "null"
        }
      ]
    },
    "comparison": {
      "anyOf": [
        {
          "type": "object",
          "description": "period, aantallen per stap, overall_conversion_rate en change (%)"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
PATCH /sites/:site_id/funnels/:id.json Een funnel bijwerken funnels_update

Machtiging: content.write

Voorbeeld
curl -X PATCH https://privatusanalytics.com/sites/:site_id/funnels/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Naam van de funnel",
      "examples": [
        "Signup flow"
      ]
    },
    "steps": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      },
      "description": "Stappen op volgorde (2 tot de limiet van je abonnement): [{\"type\": \"page|event|goal\", \"value\": \"/pricing | Signup | goal_…\", \"match\": \"exact|prefix|glob|regex\" (paginastappen), \"name\": \"optional label\"}]"
    },
    "order_mode": {
      "type": "string",
      "description": "strict: stappen in deze volgorde, any: in willekeurige volgorde",
      "enum": [
        "strict",
        "any"
      ]
    },
    "window": {
      "type": "string",
      "description": "Conversievenster: visit, of day (gemeten binnen een bezoek, dat nooit een UTC-dag overspant)",
      "enum": [
        "visit",
        "day"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Funnel-id, bijv. fun_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "steps": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Stappen: {type: page|event|goal, value, match, name}"
    },
    "order_mode": {
      "type": "string",
      "description": "strict of any"
    },
    "window": {
      "type": "string",
      "description": "visit of day"
    },
    "stats": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "entered": {
              "type": "integer",
              "description": "Bezoeken die stap 1 hebben bereikt"
            },
            "completed": {
              "type": "integer",
              "description": "Bezoeken die de laatste stap bereikten"
            },
            "conversion_rate": {
              "type": "number",
              "description": "Voltooid ÷ binnengekomen, %"
            }
          },
          "description": "Periodestatistieken (alleen in lijst)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Gebeurtenissen

GET /sites/:site_id/events/properties.json Sleutels van gebeurteniseigenschappen van de afgelopen 30 dagen weergeven event_properties_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/events/properties.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "event": {
      "type": "string",
      "description": "Alleen sleutels gezien bij deze ruwe gebeurtenisnaam"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
PATCH /sites/:site_id/events/properties.json Een sleutel van een gebeurteniseigenschap hernoemen of verbergen event_properties_update

Machtiging: sites.manage

Voorbeeld
curl -X PATCH https://privatusanalytics.com/sites/:site_id/events/properties.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "description": "Eigenschapssleutel zoals opgeslagen, bijv. plan"
    },
    "display_name": {
      "type": "string",
      "description": "Label om in plaats daarvan te tonen (leeg verwijdert het)"
    },
    "hidden": {
      "type": "boolean",
      "description": "Deze sleutel verbergen in rapporten"
    },
    "export_safe": {
      "type": "boolean",
      "description": "De sleutel bevat geen persoonsgegevens, dus hij wordt opgenomen in ruwe exports en warehouse-synchronisaties"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "key",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
DELETE /sites/:site_id/events.json Een gebeurtenis en de geschiedenis ervan verwijderen (draait op de achtergrond, bevestig door de naam te typen) events_delete

Machtiging: sites.manage

Voorbeeld
curl -X DELETE https://privatusanalytics.com/sites/:site_id/events.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Ruwe gebeurtenisnaam om te verwijderen"
    },
    "confirm": {
      "type": "string",
      "description": "Typ de gebeurtenisnaam opnieuw ter bevestiging"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "confirm",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /sites/:site_id/events.json Gebeurtenissen weergeven met voltooiingen, bezoeken, conversieratio en eerst/laatst gezien events_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/events.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Voorinstelling voor datumbereik. Gebruik custom met 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": "Begin van aangepast bereik (tijdzone van de site)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepast bereik, inclusief"
    },
    "compare": {
      "type": "string",
      "description": "Vergelijkingsperiode",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Begin van aangepaste vergelijking"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepaste vergelijking"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Weekdagen van de vergelijking uitlijnen",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Verpak voorwaarden in {\"any\": [...]} voor OF.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Een opgeslagen segment toepassen (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Geïmporteerde historische gegevens toevoegen (datums vóór de eerste eigen gebeurtenis, genegeerd als filters of een segment zijn toegepast)",
      "default": false
    },
    "search": {
      "type": "string",
      "description": "Alleen gebeurtenissen waarvan de naam dit bevat"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
POST /sites/:site_id/events/merge.json Meerdere gebeurtenissen samenvoegen onder één weergavenaam events_merge

Machtiging: sites.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/events/merge.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "names": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ruwe gebeurtenisnamen om samen te voegen"
    },
    "into": {
      "type": "string",
      "description": "Weergavenaam voor de samengevoegde gebeurtenis",
      "examples": [
        "Signup"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "names",
    "into",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Ruwe gebeurtenisnaam zoals verstuurd door de tracker"
    },
    "display_name": {
      "anyOf": [
        {
          "type": "string",
          "description": "Naam getoond in rapporten"
        },
        {
          "type": "null"
        }
      ]
    },
    "hidden": {
      "type": "boolean",
      "description": "Verborgen in rapporten"
    },
    "currency": {
      "anyOf": [
        {
          "type": "string",
          "description": "Omzetvaluta"
        },
        {
          "type": "null"
        }
      ]
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/events/detail.json Eén gebeurtenis: grafiek, eigenschappen-draaitabel, aggregaten van getaleigenschappen, pagina's en bronnen events_get

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/events/detail.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Voorinstelling voor datumbereik. Gebruik custom met 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": "Begin van aangepast bereik (tijdzone van de site)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepast bereik, inclusief"
    },
    "compare": {
      "type": "string",
      "description": "Vergelijkingsperiode",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Begin van aangepaste vergelijking"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepaste vergelijking"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Weekdagen van de vergelijking uitlijnen",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Verpak voorwaarden in {\"any\": [...]} voor OF.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Een opgeslagen segment toepassen (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Geïmporteerde historische gegevens toevoegen (datums vóór de eerste eigen gebeurtenis, genegeerd als filters of een segment zijn toegepast)",
      "default": false
    },
    "name": {
      "type": "string",
      "description": "Gebeurtenisnaam zoals getoond (na hernoemen)",
      "examples": [
        "Signup"
      ]
    },
    "properties": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Tot 3 eigenschapssleutels om op te draaien",
      "default": []
    },
    "interval": {
      "type": "string",
      "description": "Tijdvakgrootte van de grafiek",
      "enum": [
        "auto",
        "minute",
        "hour",
        "day",
        "week",
        "month",
        "quarter",
        "year"
      ],
      "default": "auto"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
PATCH /sites/:site_id/events/settings.json Een gebeurtenis hernoemen, verbergen of weer tonen, of de valuta instellen events_update

Machtiging: sites.manage

Voorbeeld
curl -X PATCH https://privatusanalytics.com/sites/:site_id/events/settings.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Ruwe gebeurtenisnaam zoals verstuurd door de tracker",
      "examples": [
        "signup_click"
      ]
    },
    "display_name": {
      "type": "string",
      "description": "Naam om in plaats daarvan te tonen (leeg verwijdert de hernoeming)"
    },
    "hidden": {
      "type": "boolean",
      "description": "Verbergen in rapporten (gegevens blijven bewaard)"
    },
    "currency": {
      "type": "string",
      "description": "Valuta voor omzet bij deze gebeurtenis (ISO 4217)"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Ruwe gebeurtenisnaam zoals verstuurd door de tracker"
    },
    "display_name": {
      "anyOf": [
        {
          "type": "string",
          "description": "Naam getoond in rapporten"
        },
        {
          "type": "null"
        }
      ]
    },
    "hidden": {
      "type": "boolean",
      "description": "Verborgen in rapporten"
    },
    "currency": {
      "anyOf": [
        {
          "type": "string",
          "description": "Omzetvaluta"
        },
        {
          "type": "null"
        }
      ]
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Help en feedback

POST /help.json Een vraag of feedback sturen naar het team van Privatus Analytics support_message_send

Het bericht wordt per e-mail naar het team gestuurd, samen met de gegevens van je account, werkruimte en abonnement. Het antwoord en een ontvangstbevestiging gaan naar het e-mailadres van je account. Maximaal 10 berichten per dag.

Machtiging: member

Voorbeeld
curl -X POST https://privatusanalytics.com/help.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "subject": {
      "type": "string",
      "description": "Waar het bericht over gaat (maximaal 150 tekens)",
      "examples": [
        "Funnel shows no data"
      ]
    },
    "message": {
      "type": "string",
      "description": "Je vraag of feedback (10 tot 5.000 tekens)"
    }
  },
  "required": [
    "subject",
    "message"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "received": {
      "type": "boolean",
      "description": "Altijd true wanneer de inzending is geaccepteerd"
    },
    "message": {
      "type": "string",
      "description": "Wat er hierna gebeurt"
    }
  }
}

Imports

GET /sites/:site_id/imports/google/properties.json Google Analytics 4-properties weergeven om te importeren imports_google_properties

Machtiging: sites.manage

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/imports/google/properties.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
POST /sites/:site_id/imports.json Een import starten (GA4-property of CSV-upload) imports_create

Machtiging: sites.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/imports.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "source": {
      "type": "string",
      "description": "ga4 (Google Analytics 4 API) of de tool waarvan je de CSV-export uploadt",
      "enum": [
        "ga4",
        "universal_analytics",
        "fathom",
        "simple_analytics",
        "plausible",
        "matomo",
        "umami",
        "clicky"
      ]
    },
    "property_id": {
      "type": "string",
      "description": "GA4-property, bijv. properties/123 (zie imports_google_properties). Verplicht voor ga4",
      "examples": [
        "properties/123456789"
      ]
    },
    "date_from": {
      "type": "string",
      "format": "date",
      "description": "Eerste dag om te importeren. Verplicht voor ga4. Bij CSV-bestanden zonder datumkolom krijgt elke rij deze dag als datum"
    },
    "date_to": {
      "type": "string",
      "format": "date",
      "description": "Laatste dag om te importeren (ga4 gebruikt standaard de dag vóór je eerste gevolgde gebeurtenis, of gisteren)"
    },
    "file": {
      "type": "string",
      "format": "binary",
      "description": "CSV-export (multipart-upload, max 50 MB). Verplicht voor CSV-bronnen"
    },
    "dimension": {
      "type": "string",
      "description": "Waarop de CSV-rijen worden uitgesplitst (overschrijft detectie, nodig voor Matomo-\"Label\"-exports)",
      "enum": [
        "total",
        "page",
        "source",
        "country",
        "device",
        "browser",
        "os"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "source",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Import-id"
    },
    "site_id": {
      "type": "string"
    },
    "source": {
      "type": "string",
      "description": "ga4, universal_analytics, fathom, simple_analytics, plausible, matomo, umami of clicky"
    },
    "status": {
      "type": "string",
      "description": "queued, running, complete of failed"
    },
    "date_from": {
      "anyOf": [
        {
          "type": "string",
          "format": "date",
          "description": "Eerste geïmporteerde dag"
        },
        {
          "type": "null"
        }
      ]
    },
    "date_to": {
      "anyOf": [
        {
          "type": "string",
          "format": "date",
          "description": "Laatste geïmporteerde dag"
        },
        {
          "type": "null"
        }
      ]
    },
    "rows_imported": {
      "type": "integer",
      "description": "Opgeslagen dagrijen"
    },
    "error": {
      "anyOf": [
        {
          "type": "string",
          "description": "Waarom de import mislukte"
        },
        {
          "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 Een import en alle geïmporteerde gegevens verwijderen imports_delete

Machtiging: sites.manage

Voorbeeld
curl -X DELETE https://privatusanalytics.com/sites/:site_id/imports/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Import-id"
    },
    "site_id": {
      "type": "string"
    },
    "source": {
      "type": "string",
      "description": "ga4, universal_analytics, fathom, simple_analytics, plausible, matomo, umami of clicky"
    },
    "status": {
      "type": "string",
      "description": "queued, running, complete of failed"
    },
    "date_from": {
      "anyOf": [
        {
          "type": "string",
          "format": "date",
          "description": "Eerste geïmporteerde dag"
        },
        {
          "type": "null"
        }
      ]
    },
    "date_to": {
      "anyOf": [
        {
          "type": "string",
          "format": "date",
          "description": "Laatste geïmporteerde dag"
        },
        {
          "type": "null"
        }
      ]
    },
    "rows_imported": {
      "type": "integer",
      "description": "Opgeslagen dagrijen"
    },
    "error": {
      "anyOf": [
        {
          "type": "string",
          "description": "Waarom de import mislukte"
        },
        {
          "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 Imports van een site weergeven imports_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/imports.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Alleen imports met deze status",
      "enum": [
        "queued",
        "running",
        "complete",
        "failed"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Import-id"
      },
      "site_id": {
        "type": "string"
      },
      "source": {
        "type": "string",
        "description": "ga4, universal_analytics, fathom, simple_analytics, plausible, matomo, umami of clicky"
      },
      "status": {
        "type": "string",
        "description": "queued, running, complete of failed"
      },
      "date_from": {
        "anyOf": [
          {
            "type": "string",
            "format": "date",
            "description": "Eerste geïmporteerde dag"
          },
          {
            "type": "null"
          }
        ]
      },
      "date_to": {
        "anyOf": [
          {
            "type": "string",
            "format": "date",
            "description": "Laatste geïmporteerde dag"
          },
          {
            "type": "null"
          }
        ]
      },
      "rows_imported": {
        "type": "integer",
        "description": "Opgeslagen dagrijen"
      },
      "error": {
        "anyOf": [
          {
            "type": "string",
            "description": "Waarom de import mislukte"
          },
          {
            "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 Een import en de status ervan ophalen imports_get

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/imports/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Import-id"
    },
    "site_id": {
      "type": "string"
    },
    "source": {
      "type": "string",
      "description": "ga4, universal_analytics, fathom, simple_analytics, plausible, matomo, umami of clicky"
    },
    "status": {
      "type": "string",
      "description": "queued, running, complete of failed"
    },
    "date_from": {
      "anyOf": [
        {
          "type": "string",
          "format": "date",
          "description": "Eerste geïmporteerde dag"
        },
        {
          "type": "null"
        }
      ]
    },
    "date_to": {
      "anyOf": [
        {
          "type": "string",
          "format": "date",
          "description": "Laatste geïmporteerde dag"
        },
        {
          "type": "null"
        }
      ]
    },
    "rows_imported": {
      "type": "integer",
      "description": "Opgeslagen dagrijen"
    },
    "error": {
      "anyOf": [
        {
          "type": "string",
          "description": "Waarom de import mislukte"
        },
        {
          "type": "null"
        }
      ]
    },
    "completed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Kanaalregels

POST /sites/:site_id/channel_rules.json Een kanaalregel toevoegen channel_rules_create

Machtiging: sites.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/channel_rules.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "channel": {
      "type": "string",
      "description": "Toe te wijzen kanaalnaam, bijv. Partners"
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "operator": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "description": "Voorwaarden waaraan allemaal moet worden voldaan: [{\"field\": \"utm_source\", \"operator\": \"is\", \"value\": \"newsletter\"}]. Velden: referrer_host, utm_source, utm_medium, utm_campaign, ref, path. Operators: is, contains, starts_with, regex."
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "channel",
    "conditions",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Regel-id"
    },
    "channel": {
      "type": "string",
      "description": "Toegewezen kanaal wanneer aan alle voorwaarden wordt voldaan"
    },
    "position": {
      "type": "integer",
      "description": "Volgorde van evaluatie (eerste overeenkomst wint)"
    },
    "conditions": {
      "type": "array",
      "description": "Voorwaarden: field, operator, value"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/channel_rules/:id.json Een kanaalregel verwijderen channel_rules_delete

Machtiging: sites.manage

Voorbeeld
curl -X DELETE https://privatusanalytics.com/sites/:site_id/channel_rules/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Regel-id"
    },
    "channel": {
      "type": "string",
      "description": "Toegewezen kanaal wanneer aan alle voorwaarden wordt voldaan"
    },
    "position": {
      "type": "integer",
      "description": "Volgorde van evaluatie (eerste overeenkomst wint)"
    },
    "conditions": {
      "type": "array",
      "description": "Voorwaarden: field, operator, value"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/channel_rules.json Kanaalregels in volgorde weergeven channel_rules_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/channel_rules.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Regel-id"
    },
    "channel": {
      "type": "string",
      "description": "Toegewezen kanaal wanneer aan alle voorwaarden wordt voldaan"
    },
    "position": {
      "type": "integer",
      "description": "Volgorde van evaluatie (eerste overeenkomst wint)"
    },
    "conditions": {
      "type": "array",
      "description": "Voorwaarden: field, operator, value"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /sites/:site_id/channel_rules/:id/move.json Een kanaalregel omhoog of omlaag verplaatsen channel_rules_move

Machtiging: sites.manage

Voorbeeld
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 '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "direction": {
      "type": "string",
      "description": "Waarheen de regel wordt verplaatst",
      "enum": [
        "up",
        "down",
        "top",
        "bottom"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "direction",
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Regel-id"
    },
    "channel": {
      "type": "string",
      "description": "Toegewezen kanaal wanneer aan alle voorwaarden wordt voldaan"
    },
    "position": {
      "type": "integer",
      "description": "Volgorde van evaluatie (eerste overeenkomst wint)"
    },
    "conditions": {
      "type": "array",
      "description": "Voorwaarden: field, operator, value"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /sites/:site_id/channel_rules/preview.json Het kanaal bekijken voor een voorbeeldverwijzer en UTM-tags channel_rules_preview

Machtiging: analytics.read

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/channel_rules/preview.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "referrer": {
      "type": "string",
      "description": "Verwijzer-URL of hostnaam"
    },
    "utm_source": {
      "type": "string",
      "description": "utm_source-waarde"
    },
    "utm_medium": {
      "type": "string",
      "description": "utm_medium-waarde"
    },
    "utm_campaign": {
      "type": "string",
      "description": "utm_campaign-waarde"
    },
    "ref": {
      "type": "string",
      "description": "ref / via / source-parameter"
    },
    "path": {
      "type": "string",
      "description": "Pad van de landingspagina, bijv. /pricing"
    },
    "paid_click": {
      "type": "boolean",
      "description": "De URL had een klik-id zoals gclid",
      "default": false
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
PATCH /sites/:site_id/channel_rules/:id.json Een kanaalregel wijzigen channel_rules_update

Machtiging: sites.manage

Voorbeeld
curl -X PATCH https://privatusanalytics.com/sites/:site_id/channel_rules/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "channel": {
      "type": "string",
      "description": "Toe te wijzen kanaalnaam"
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "operator": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "description": "Voorwaarden waaraan allemaal moet worden voldaan: [{\"field\": \"utm_source\", \"operator\": \"is\", \"value\": \"newsletter\"}]. Velden: referrer_host, utm_source, utm_medium, utm_campaign, ref, path. Operators: is, contains, starts_with, regex."
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Regel-id"
    },
    "channel": {
      "type": "string",
      "description": "Toegewezen kanaal wanneer aan alle voorwaarden wordt voldaan"
    },
    "position": {
      "type": "integer",
      "description": "Volgorde van evaluatie (eerste overeenkomst wint)"
    },
    "conditions": {
      "type": "array",
      "description": "Voorwaarden: field, operator, value"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Leden

POST /workspaces/:workspace_id/invitations.json Mensen uitnodigen via e-mail invitations_create

Machtiging: members.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/invitations.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "emails": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "E-mailadressen om uit te nodigen"
    },
    "role": {
      "type": "string",
      "description": "Rol voor de nieuwe leden (custom heeft custom_role_id nodig)",
      "enum": [
        "admin",
        "editor",
        "analyst",
        "viewer",
        "billing",
        "custom"
      ],
      "default": "viewer"
    },
    "custom_role_id": {
      "type": "string",
      "description": "Id van de eigen rol (Business)"
    },
    "all_sites": {
      "type": "boolean",
      "description": "Toegang tot alle sites, ook toekomstige",
      "default": true
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Site-id's (pa_…) als all_sites false is",
      "default": []
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "emails",
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "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 Een openstaande uitnodiging intrekken invitations_delete

Machtiging: members.manage

Voorbeeld
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/invitations/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Antwoordgegevens
{
  "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 Openstaande uitnodigingen weergeven invitations_list

Machtiging: members.manage

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/invitations.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "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 Een lid verwijderen (of de werkruimte verlaten) members_delete

Machtiging: member

Voorbeeld
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/members/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Lid-id (gebruik het om het lid bij te werken of te verwijderen)"
    },
    "email": {
      "type": "string"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "role": {
      "type": "string",
      "description": "owner, admin, editor, analyst, viewer, billing of custom"
    },
    "custom_role": {
      "anyOf": [
        {
          "type": "string",
          "description": "Naam van de eigen rol"
        },
        {
          "type": "null"
        }
      ]
    },
    "custom_role_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "all_sites": {
      "type": "boolean",
      "description": "Toegang tot alle sites"
    },
    "include_future_sites": {
      "type": "boolean"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Site-id's als all_sites false is"
    },
    "two_factor": {
      "type": "boolean",
      "description": "Heeft 2FA of een passkey"
    },
    "last_active_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Lid geworden op"
    }
  }
}
GET /workspaces/:workspace_id/members.json Werkruimteleden weergeven members_list

Machtiging: member

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/members.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Filter op naam of e-mailadres"
    },
    "role": {
      "type": "string",
      "description": "Alleen leden met deze rol",
      "enum": [
        "owner",
        "admin",
        "editor",
        "analyst",
        "viewer",
        "billing",
        "custom"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid",
        "description": "Lid-id (gebruik het om het lid bij te werken of te verwijderen)"
      },
      "email": {
        "type": "string"
      },
      "name": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "role": {
        "type": "string",
        "description": "owner, admin, editor, analyst, viewer, billing of custom"
      },
      "custom_role": {
        "anyOf": [
          {
            "type": "string",
            "description": "Naam van de eigen rol"
          },
          {
            "type": "null"
          }
        ]
      },
      "custom_role_id": {
        "anyOf": [
          {
            "type": "string",
            "format": "uuid"
          },
          {
            "type": "null"
          }
        ]
      },
      "all_sites": {
        "type": "boolean",
        "description": "Toegang tot alle sites"
      },
      "include_future_sites": {
        "type": "boolean"
      },
      "site_ids": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Site-id's als all_sites false is"
      },
      "two_factor": {
        "type": "boolean",
        "description": "Heeft 2FA of een passkey"
      },
      "last_active_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time",
        "description": "Lid geworden op"
      }
    }
  }
}
PATCH /workspaces/:workspace_id/members/:id.json De rol of sitetoegang van een lid wijzigen members_update

Machtiging: members.manage

Voorbeeld
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/members/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "role": {
      "type": "string",
      "description": "Nieuwe rol (custom heeft custom_role_id nodig)",
      "enum": [
        "admin",
        "editor",
        "analyst",
        "viewer",
        "billing",
        "custom"
      ]
    },
    "custom_role_id": {
      "type": "string",
      "description": "Id van de eigen rol (Business)"
    },
    "all_sites": {
      "type": "boolean",
      "description": "Toegang tot alle sites, ook toekomstige"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Site-id's (pa_…) als all_sites false is"
    },
    "include_future_sites": {
      "type": "boolean",
      "description": "Verleen ook toegang tot later toegevoegde sites"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Lid-id (gebruik het om het lid bij te werken of te verwijderen)"
    },
    "email": {
      "type": "string"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "role": {
      "type": "string",
      "description": "owner, admin, editor, analyst, viewer, billing of custom"
    },
    "custom_role": {
      "anyOf": [
        {
          "type": "string",
          "description": "Naam van de eigen rol"
        },
        {
          "type": "null"
        }
      ]
    },
    "custom_role_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "all_sites": {
      "type": "boolean",
      "description": "Toegang tot alle sites"
    },
    "include_future_sites": {
      "type": "boolean"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Site-id's als all_sites false is"
    },
    "two_factor": {
      "type": "boolean",
      "description": "Heeft 2FA of een passkey"
    },
    "last_active_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Lid geworden op"
    }
  }
}
POST /workspaces/:workspace_id/ownership_transfer.json Het eigenaarschap van de werkruimte overdragen aan een ander lid (alleen eigenaar, jij wordt beheerder) ownership_transfers_create

Machtiging: member

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/ownership_transfer.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "membership_id": {
      "type": "string",
      "description": "Lid-id van de nieuwe eigenaar"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "membership_id",
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Lid-id (gebruik het om het lid bij te werken of te verwijderen)"
    },
    "email": {
      "type": "string"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "role": {
      "type": "string",
      "description": "owner, admin, editor, analyst, viewer, billing of custom"
    },
    "custom_role": {
      "anyOf": [
        {
          "type": "string",
          "description": "Naam van de eigen rol"
        },
        {
          "type": "null"
        }
      ]
    },
    "custom_role_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "all_sites": {
      "type": "boolean",
      "description": "Toegang tot alle sites"
    },
    "include_future_sites": {
      "type": "boolean"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Site-id's als all_sites false is"
    },
    "two_factor": {
      "type": "boolean",
      "description": "Heeft 2FA of een passkey"
    },
    "last_active_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Lid geworden op"
    }
  }
}

Live

GET /sites/:site_id/live.json Live bezoekers, activiteitenstroom en wat nu populair is (laatste 30 minuten) live_get

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/live.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "feed": {
      "type": "string",
      "description": "Activiteitenstroom: alle hits, paginaweergaven of eigen gebeurtenissen",
      "enum": [
        "all",
        "pageviews",
        "events"
      ],
      "default": "all"
    },
    "limit": {
      "type": "integer",
      "description": "Items in de activiteitenstroom (max 100)",
      "default": 50
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /sites/:site_id/live/wallboard.json Wallboardkaarten (live en vandaag) voor een of meer sites live_wallboard

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/live/wallboard.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Site-id's om tussen te wisselen (standaard deze site)",
      "default": []
    },
    "rotate_seconds": {
      "type": "integer",
      "description": "Seconden dat elke site in beeld blijft (5-300)",
      "default": 20
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /wallboard/:token.json Wallboard voor een wallboardtoken (geen aanmelding nodig) live_public_wallboard

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl https://privatusanalytics.com/wallboard/:token.json
Invoer
{
  "type": "object",
  "properties": {
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Site-id's om tussen te wisselen (standaard deze site)",
      "default": []
    },
    "rotate_seconds": {
      "type": "integer",
      "description": "Seconden dat elke site in beeld blijft (5-300)",
      "default": 20
    },
    "token": {
      "type": "string",
      "description": "Token van de bron"
    }
  },
  "required": [
    "token"
  ]
}
Antwoordgegevens
{
  "type": "object"
}

Meldingen

POST /alerts/:id/acknowledge.json Het laatste incident bevestigen alerts_acknowledge

Machtiging: analytics.read

Voorbeeld
curl -X POST https://privatusanalytics.com/alerts/:id/acknowledge.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Meldings-id, bijv. alr_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site-id (null voor verbruiksmeldingen)"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "threshold, anomaly, goal, no_data, usage, uptime, ssl of vitals"
    },
    "metric": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "operator": {
      "anyOf": [
        {
          "type": "string",
          "description": "gt, gte, lt of lte"
        },
        {
          "type": "null"
        }
      ]
    },
    "threshold": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "window_minutes": {
      "type": "integer"
    },
    "sensitivity": {
      "type": "string",
      "description": "Gevoeligheid van anomaly"
    },
    "goal_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "channel_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Id's van meldingskanalen"
    },
    "state": {
      "type": "string",
      "description": "ok of 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 Een melding aanmaken alerts_create

Machtiging: content.write

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/alerts.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id (pa_…). Verplicht behalve voor verbruiksmeldingen"
    },
    "metric": {
      "type": "string",
      "description": "threshold/anomaly: visitors, visits, pageviews, bounce_rate of conversion. vitals: lcp, inp, cls, fcp of ttfb"
    },
    "operator": {
      "type": "string",
      "description": "Vergelijking (gt, gte, lt, lte). anomaly: lt alleen dalingen, gt alleen pieken, leeg beide",
      "enum": [
        "gt",
        "gte",
        "lt",
        "lte"
      ]
    },
    "threshold": {
      "type": "number",
      "description": "threshold: statistiekwaarde, goal: voltooiingen, no_data: uren, usage: procent, ssl: dagen, vitals: ms (CLS: score)"
    },
    "window_minutes": {
      "type": "integer",
      "description": "Evaluatievenster in minuten (5 tot 10080)"
    },
    "sensitivity": {
      "type": "string",
      "description": "anomaly: low, medium of high",
      "enum": [
        "low",
        "medium",
        "high"
      ]
    },
    "goal_id": {
      "type": "string",
      "description": "goal- en conversion-meldingen: doel-id (goal_…)"
    },
    "uptime_check_id": {
      "type": "string",
      "description": "uptime/ssl: controle-id (standaard: alle controles van de site)"
    },
    "channel_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Id's van meldingskanalen (nch_…)"
    },
    "enabled": {
      "type": "boolean",
      "description": "Deze melding evalueren"
    },
    "name": {
      "type": "string",
      "description": "Naam van de melding",
      "examples": [
        "Traffic dropped"
      ]
    },
    "kind": {
      "type": "string",
      "description": "threshold, anomaly, goal, no_data, usage, uptime, ssl of vitals",
      "enum": [
        "threshold",
        "anomaly",
        "goal",
        "no_data",
        "usage",
        "uptime",
        "ssl",
        "vitals"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "kind",
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Meldings-id, bijv. alr_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site-id (null voor verbruiksmeldingen)"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "threshold, anomaly, goal, no_data, usage, uptime, ssl of vitals"
    },
    "metric": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "operator": {
      "anyOf": [
        {
          "type": "string",
          "description": "gt, gte, lt of lte"
        },
        {
          "type": "null"
        }
      ]
    },
    "threshold": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "window_minutes": {
      "type": "integer"
    },
    "sensitivity": {
      "type": "string",
      "description": "Gevoeligheid van anomaly"
    },
    "goal_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "channel_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Id's van meldingskanalen"
    },
    "state": {
      "type": "string",
      "description": "ok of 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 Een melding verwijderen alerts_delete

Machtiging: content.write

Voorbeeld
curl -X DELETE https://privatusanalytics.com/alerts/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Meldings-id, bijv. alr_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site-id (null voor verbruiksmeldingen)"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "threshold, anomaly, goal, no_data, usage, uptime, ssl of vitals"
    },
    "metric": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "operator": {
      "anyOf": [
        {
          "type": "string",
          "description": "gt, gte, lt of lte"
        },
        {
          "type": "null"
        }
      ]
    },
    "threshold": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "window_minutes": {
      "type": "integer"
    },
    "sensitivity": {
      "type": "string",
      "description": "Gevoeligheid van anomaly"
    },
    "goal_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "channel_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Id's van meldingskanalen"
    },
    "state": {
      "type": "string",
      "description": "ok of 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 Incidentgeschiedenis van een melding alerts_history

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/alerts/:id/history.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "open": {
      "type": "boolean",
      "description": "Alleen onopgeloste incidenten",
      "default": false
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "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": "Gemeten waarde bij het afgaan"
          },
          {
            "type": "null"
          }
        ]
      },
      "message": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "acknowledged_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "acknowledged_by": {
        "anyOf": [
          {
            "type": "string",
            "description": "Naam van het lid dat heeft bevestigd"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  }
}
GET /workspaces/:workspace_id/alerts.json Meldingen weergeven alerts_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/alerts.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Alleen meldingen voor deze site (pa_…)"
    },
    "state": {
      "type": "string",
      "description": "Alleen meldingen met status ok of triggered",
      "enum": [
        "ok",
        "triggered"
      ]
    },
    "kind": {
      "type": "string",
      "description": "Alleen dit soort",
      "enum": [
        "threshold",
        "anomaly",
        "goal",
        "no_data",
        "usage",
        "uptime",
        "ssl",
        "vitals"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Meldings-id, bijv. alr_7Q2K9XH3AB"
      },
      "site_id": {
        "anyOf": [
          {
            "type": "string",
            "description": "Site-id (null voor verbruiksmeldingen)"
          },
          {
            "type": "null"
          }
        ]
      },
      "name": {
        "type": "string"
      },
      "kind": {
        "type": "string",
        "description": "threshold, anomaly, goal, no_data, usage, uptime, ssl of vitals"
      },
      "metric": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "operator": {
        "anyOf": [
          {
            "type": "string",
            "description": "gt, gte, lt of lte"
          },
          {
            "type": "null"
          }
        ]
      },
      "threshold": {
        "anyOf": [
          {
            "type": "number"
          },
          {
            "type": "null"
          }
        ]
      },
      "window_minutes": {
        "type": "integer"
      },
      "sensitivity": {
        "type": "string",
        "description": "Gevoeligheid van anomaly"
      },
      "goal_id": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "channel_ids": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Id's van meldingskanalen"
      },
      "state": {
        "type": "string",
        "description": "ok of 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 De notificaties van een melding dempen (of weer inschakelen) alerts_mute

Machtiging: content.write

Voorbeeld
curl -X POST https://privatusanalytics.com/alerts/:id/mute.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "minutes": {
      "type": "integer",
      "description": "Zoveel minuten dempen (0 schakelt weer in, max 30 dagen)",
      "default": 60
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Meldings-id, bijv. alr_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site-id (null voor verbruiksmeldingen)"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "threshold, anomaly, goal, no_data, usage, uptime, ssl of vitals"
    },
    "metric": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "operator": {
      "anyOf": [
        {
          "type": "string",
          "description": "gt, gte, lt of lte"
        },
        {
          "type": "null"
        }
      ]
    },
    "threshold": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "window_minutes": {
      "type": "integer"
    },
    "sensitivity": {
      "type": "string",
      "description": "Gevoeligheid van anomaly"
    },
    "goal_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "channel_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Id's van meldingskanalen"
    },
    "state": {
      "type": "string",
      "description": "ok of 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 Een melding ophalen alerts_get

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/alerts/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Meldings-id, bijv. alr_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site-id (null voor verbruiksmeldingen)"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "threshold, anomaly, goal, no_data, usage, uptime, ssl of vitals"
    },
    "metric": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "operator": {
      "anyOf": [
        {
          "type": "string",
          "description": "gt, gte, lt of lte"
        },
        {
          "type": "null"
        }
      ]
    },
    "threshold": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "window_minutes": {
      "type": "integer"
    },
    "sensitivity": {
      "type": "string",
      "description": "Gevoeligheid van anomaly"
    },
    "goal_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "channel_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Id's van meldingskanalen"
    },
    "state": {
      "type": "string",
      "description": "ok of 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 Een melding bijwerken alerts_update

Machtiging: content.write

Voorbeeld
curl -X PATCH https://privatusanalytics.com/alerts/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id (pa_…). Verplicht behalve voor verbruiksmeldingen"
    },
    "metric": {
      "type": "string",
      "description": "threshold/anomaly: visitors, visits, pageviews, bounce_rate of conversion. vitals: lcp, inp, cls, fcp of ttfb"
    },
    "operator": {
      "type": "string",
      "description": "Vergelijking (gt, gte, lt, lte). anomaly: lt alleen dalingen, gt alleen pieken, leeg beide",
      "enum": [
        "gt",
        "gte",
        "lt",
        "lte"
      ]
    },
    "threshold": {
      "type": "number",
      "description": "threshold: statistiekwaarde, goal: voltooiingen, no_data: uren, usage: procent, ssl: dagen, vitals: ms (CLS: score)"
    },
    "window_minutes": {
      "type": "integer",
      "description": "Evaluatievenster in minuten (5 tot 10080)"
    },
    "sensitivity": {
      "type": "string",
      "description": "anomaly: low, medium of high",
      "enum": [
        "low",
        "medium",
        "high"
      ]
    },
    "goal_id": {
      "type": "string",
      "description": "goal- en conversion-meldingen: doel-id (goal_…)"
    },
    "uptime_check_id": {
      "type": "string",
      "description": "uptime/ssl: controle-id (standaard: alle controles van de site)"
    },
    "channel_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Id's van meldingskanalen (nch_…)"
    },
    "enabled": {
      "type": "boolean",
      "description": "Deze melding evalueren"
    },
    "name": {
      "type": "string",
      "description": "Naam van de melding"
    },
    "kind": {
      "type": "string",
      "description": "Soort melding",
      "enum": [
        "threshold",
        "anomaly",
        "goal",
        "no_data",
        "usage",
        "uptime",
        "ssl",
        "vitals"
      ]
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Meldings-id, bijv. alr_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site-id (null voor verbruiksmeldingen)"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "threshold, anomaly, goal, no_data, usage, uptime, ssl of vitals"
    },
    "metric": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "operator": {
      "anyOf": [
        {
          "type": "string",
          "description": "gt, gte, lt of lte"
        },
        {
          "type": "null"
        }
      ]
    },
    "threshold": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "window_minutes": {
      "type": "integer"
    },
    "sensitivity": {
      "type": "string",
      "description": "Gevoeligheid van anomaly"
    },
    "goal_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "channel_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Id's van meldingskanalen"
    },
    "state": {
      "type": "string",
      "description": "ok of 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 Meldingen van een site weergeven site_alerts_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/alerts.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "state": {
      "type": "string",
      "description": "Alleen meldingen met status ok of triggered",
      "enum": [
        "ok",
        "triggered"
      ]
    },
    "kind": {
      "type": "string",
      "description": "Alleen dit soort",
      "enum": [
        "threshold",
        "anomaly",
        "goal",
        "no_data",
        "usage",
        "uptime",
        "ssl",
        "vitals"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Meldings-id, bijv. alr_7Q2K9XH3AB"
      },
      "site_id": {
        "anyOf": [
          {
            "type": "string",
            "description": "Site-id (null voor verbruiksmeldingen)"
          },
          {
            "type": "null"
          }
        ]
      },
      "name": {
        "type": "string"
      },
      "kind": {
        "type": "string",
        "description": "threshold, anomaly, goal, no_data, usage, uptime, ssl of vitals"
      },
      "metric": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "operator": {
        "anyOf": [
          {
            "type": "string",
            "description": "gt, gte, lt of lte"
          },
          {
            "type": "null"
          }
        ]
      },
      "threshold": {
        "anyOf": [
          {
            "type": "number"
          },
          {
            "type": "null"
          }
        ]
      },
      "window_minutes": {
        "type": "integer"
      },
      "sensitivity": {
        "type": "string",
        "description": "Gevoeligheid van anomaly"
      },
      "goal_id": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "channel_ids": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Id's van meldingskanalen"
      },
      "state": {
        "type": "string",
        "description": "ok of 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"
      }
    }
  }
}

Meldingskanalen

POST /workspaces/:workspace_id/channels.json Een meldingskanaal toevoegen notification_channels_create

Machtiging: content.write

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/channels.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "Webhook-URL (slack, teams, discord, webhook), HTTPS"
    },
    "secret": {
      "type": "string",
      "description": "webhook: HMAC-geheim voor X-Privatus-Signature"
    },
    "emails": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "email: adressen van ontvangers (max 20)"
    },
    "routing_key": {
      "type": "string",
      "description": "pagerduty: Events API v2-integratiesleutel"
    },
    "api_key": {
      "type": "string",
      "description": "opsgenie: API-integratiesleutel"
    },
    "region": {
      "type": "string",
      "description": "opsgenie: accountregio",
      "enum": [
        "us",
        "eu"
      ]
    },
    "kind": {
      "type": "string",
      "description": "email, slack, teams, discord, webhook, pagerduty, opsgenie of push",
      "enum": [
        "email",
        "slack",
        "teams",
        "discord",
        "webhook",
        "pagerduty",
        "opsgenie",
        "push"
      ]
    },
    "name": {
      "type": "string",
      "description": "Weergavenaam",
      "examples": [
        "#alerts"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "kind",
    "name",
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Kanaal-id, bijv. nch_7Q2K9XH3AB"
    },
    "kind": {
      "type": "string",
      "description": "email, slack, teams, discord, webhook, pagerduty, opsgenie of push"
    },
    "name": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "description": "Gemaskeerde bestemming"
    },
    "last_used_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /channels/:id.json Een meldingskanaal verwijderen notification_channels_delete

Machtiging: content.write

Voorbeeld
curl -X DELETE https://privatusanalytics.com/channels/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Kanaal-id, bijv. nch_7Q2K9XH3AB"
    },
    "kind": {
      "type": "string",
      "description": "email, slack, teams, discord, webhook, pagerduty, opsgenie of push"
    },
    "name": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "description": "Gemaskeerde bestemming"
    },
    "last_used_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /workspaces/:workspace_id/channels.json Meldingskanalen weergeven notification_channels_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/channels.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "description": "Alleen kanalen van dit soort",
      "enum": [
        "email",
        "slack",
        "teams",
        "discord",
        "webhook",
        "pagerduty",
        "opsgenie",
        "push"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Kanaal-id, bijv. nch_7Q2K9XH3AB"
      },
      "kind": {
        "type": "string",
        "description": "email, slack, teams, discord, webhook, pagerduty, opsgenie of push"
      },
      "name": {
        "type": "string"
      },
      "target": {
        "type": "string",
        "description": "Gemaskeerde bestemming"
      },
      "last_used_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
POST /channels/:id/send_test.json Een testbericht via een kanaal versturen notification_channels_send_test

Machtiging: content.write

Voorbeeld
curl -X POST https://privatusanalytics.com/channels/:id/send_test.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Kanaal-id, bijv. nch_7Q2K9XH3AB"
    },
    "kind": {
      "type": "string",
      "description": "email, slack, teams, discord, webhook, pagerduty, opsgenie of push"
    },
    "name": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "description": "Gemaskeerde bestemming"
    },
    "last_used_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /channels/:id.json Een meldingskanaal ophalen notification_channels_get

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/channels/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Kanaal-id, bijv. nch_7Q2K9XH3AB"
    },
    "kind": {
      "type": "string",
      "description": "email, slack, teams, discord, webhook, pagerduty, opsgenie of push"
    },
    "name": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "description": "Gemaskeerde bestemming"
    },
    "last_used_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /channels/:id.json Een meldingskanaal bijwerken notification_channels_update

Machtiging: content.write

Voorbeeld
curl -X PATCH https://privatusanalytics.com/channels/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "Webhook-URL (slack, teams, discord, webhook), HTTPS"
    },
    "secret": {
      "type": "string",
      "description": "webhook: HMAC-geheim voor X-Privatus-Signature"
    },
    "emails": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "email: adressen van ontvangers (max 20)"
    },
    "routing_key": {
      "type": "string",
      "description": "pagerduty: Events API v2-integratiesleutel"
    },
    "api_key": {
      "type": "string",
      "description": "opsgenie: API-integratiesleutel"
    },
    "region": {
      "type": "string",
      "description": "opsgenie: accountregio",
      "enum": [
        "us",
        "eu"
      ]
    },
    "name": {
      "type": "string",
      "description": "Weergavenaam"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Kanaal-id, bijv. nch_7Q2K9XH3AB"
    },
    "kind": {
      "type": "string",
      "description": "email, slack, teams, discord, webhook, pagerduty, opsgenie of push"
    },
    "name": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "description": "Gemaskeerde bestemming"
    },
    "last_used_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /push_subscription.json Een browser registreren voor pushmeldingen push_subscriptions_create

Machtiging: member

Voorbeeld
curl -X POST https://privatusanalytics.com/push_subscription.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "endpoint": {
      "type": "string",
      "description": "PushSubscription.endpoint uit de browser"
    },
    "p256dh": {
      "type": "string",
      "description": "PushSubscription keys.p256dh (base64url)"
    },
    "auth": {
      "type": "string",
      "description": "PushSubscription keys.auth (base64url)"
    }
  },
  "required": [
    "endpoint",
    "p256dh",
    "auth"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "endpoint_host": {
      "type": "string",
      "description": "Host van de pushdienst"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /push_subscription.json Een pushregistratie van een browser verwijderen push_subscriptions_delete

Machtiging: member

Voorbeeld
curl -X DELETE https://privatusanalytics.com/push_subscription.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "endpoint": {
      "type": "string",
      "description": "PushSubscription.endpoint om te verwijderen"
    }
  },
  "required": [
    "endpoint"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "endpoint_host": {
      "type": "string",
      "description": "Host van de pushdienst"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Notities

POST /sites/:site_id/notes.json Een notitie aan een site toevoegen (gebruik bron "deploy" voor release-webhooks) notes_create

Machtiging: content.write

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/notes.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "date": {
      "type": "string",
      "format": "date",
      "description": "Dag van de notitie (tijdzone van de site). Standaard vandaag"
    },
    "end_date": {
      "type": "string",
      "format": "date",
      "description": "Laatste dag, voor een datumbereik"
    },
    "title": {
      "type": "string",
      "description": "Korte titel die op grafieken wordt getoond",
      "examples": [
        "Launched new pricing"
      ]
    },
    "body": {
      "type": "string",
      "description": "Details (Markdown)"
    },
    "url": {
      "type": "string",
      "description": "Link, bijv. een PR of changelog"
    },
    "color": {
      "type": "string",
      "description": "Kleur van de pin",
      "enum": [
        "neutral",
        "brand",
        "blue",
        "amber",
        "red",
        "violet"
      ]
    },
    "source": {
      "type": "string",
      "description": "manual, of deploy voor release-webhooks",
      "enum": [
        "manual",
        "deploy",
        "system",
        "import",
        "incident"
      ],
      "default": "manual"
    },
    "version": {
      "type": "string",
      "description": "Deploys: releaseversie of commit, gebruikt voor de standaardtitel"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Notitie-id, bijv. note_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site, of null voor notities voor de hele werkruimte"
        },
        {
          "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 Een notitie verwijderen notes_delete

Machtiging: content.write

Voorbeeld
curl -X DELETE https://privatusanalytics.com/sites/:site_id/notes/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Notitie-id, bijv. note_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site, of null voor notities voor de hele werkruimte"
        },
        {
          "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 Notities van een site weergeven (inclusief notities voor de hele werkruimte) notes_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/notes.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "format": "date",
      "description": "Alleen notities op of na deze datum"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Alleen notities op of vóór deze datum"
    },
    "source": {
      "type": "string",
      "description": "Alleen notities uit deze bron",
      "enum": [
        "manual",
        "deploy",
        "system",
        "import",
        "incident"
      ]
    },
    "query": {
      "type": "string",
      "description": "Zoek in titel, tekst en link"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Notitie-id, bijv. note_7Q2K9XH3AB"
      },
      "site_id": {
        "anyOf": [
          {
            "type": "string",
            "description": "Site, of null voor notities voor de hele werkruimte"
          },
          {
            "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 Een notitie ophalen notes_get

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/notes/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Notitie-id, bijv. note_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site, of null voor notities voor de hele werkruimte"
        },
        {
          "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 Een notitie bewerken notes_update

Machtiging: content.write

Voorbeeld
curl -X PATCH https://privatusanalytics.com/sites/:site_id/notes/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "date": {
      "type": "string",
      "format": "date",
      "description": "Dag van de notitie"
    },
    "end_date": {
      "type": "string",
      "format": "date",
      "description": "Laatste dag, voor een datumbereik"
    },
    "title": {
      "type": "string",
      "description": "Korte titel die op grafieken wordt getoond"
    },
    "body": {
      "type": "string",
      "description": "Details (Markdown)"
    },
    "url": {
      "type": "string",
      "description": "Link"
    },
    "color": {
      "type": "string",
      "description": "Kleur van de pin",
      "enum": [
        "neutral",
        "brand",
        "blue",
        "amber",
        "red",
        "violet"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Notitie-id, bijv. note_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site, of null voor notities voor de hele werkruimte"
        },
        {
          "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 Een notitie voor de hele werkruimte toevoegen (getoond op elke site) workspace_notes_create

Machtiging: content.write

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/notes.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "date": {
      "type": "string",
      "format": "date",
      "description": "Dag van de notitie (tijdzone van de site). Standaard vandaag"
    },
    "end_date": {
      "type": "string",
      "format": "date",
      "description": "Laatste dag, voor een datumbereik"
    },
    "title": {
      "type": "string",
      "description": "Korte titel die op grafieken wordt getoond",
      "examples": [
        "Launched new pricing"
      ]
    },
    "body": {
      "type": "string",
      "description": "Details (Markdown)"
    },
    "url": {
      "type": "string",
      "description": "Link, bijv. een PR of changelog"
    },
    "color": {
      "type": "string",
      "description": "Kleur van de pin",
      "enum": [
        "neutral",
        "brand",
        "blue",
        "amber",
        "red",
        "violet"
      ]
    },
    "source": {
      "type": "string",
      "description": "manual, of deploy voor release-webhooks",
      "enum": [
        "manual",
        "deploy",
        "system",
        "import",
        "incident"
      ],
      "default": "manual"
    },
    "version": {
      "type": "string",
      "description": "Deploys: releaseversie of commit, gebruikt voor de standaardtitel"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Notitie-id, bijv. note_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site, of null voor notities voor de hele werkruimte"
        },
        {
          "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 Een werkruimtenotitie verwijderen workspace_notes_delete

Machtiging: content.write

Voorbeeld
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/notes/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Notitie-id, bijv. note_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site, of null voor notities voor de hele werkruimte"
        },
        {
          "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 Notities van een hele werkruimte weergeven workspace_notes_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/notes.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "format": "date",
      "description": "Alleen notities op of na deze datum"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Alleen notities op of vóór deze datum"
    },
    "source": {
      "type": "string",
      "description": "Alleen notities uit deze bron",
      "enum": [
        "manual",
        "deploy",
        "system",
        "import",
        "incident"
      ]
    },
    "query": {
      "type": "string",
      "description": "Zoek in titel, tekst en link"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Notitie-id, bijv. note_7Q2K9XH3AB"
      },
      "site_id": {
        "anyOf": [
          {
            "type": "string",
            "description": "Site, of null voor notities voor de hele werkruimte"
          },
          {
            "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 Een werkruimtenotitie bewerken workspace_notes_update

Machtiging: content.write

Voorbeeld
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/notes/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "date": {
      "type": "string",
      "format": "date",
      "description": "Dag van de notitie"
    },
    "end_date": {
      "type": "string",
      "format": "date",
      "description": "Laatste dag, voor een datumbereik"
    },
    "title": {
      "type": "string",
      "description": "Korte titel die op grafieken wordt getoond"
    },
    "body": {
      "type": "string",
      "description": "Details (Markdown)"
    },
    "url": {
      "type": "string",
      "description": "Link"
    },
    "color": {
      "type": "string",
      "description": "Kleur van de pin",
      "enum": [
        "neutral",
        "brand",
        "blue",
        "amber",
        "red",
        "violet"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Notitie-id, bijv. note_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site, of null voor notities voor de hele werkruimte"
        },
        {
          "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"
    }
  }
}

Prestaties

GET /sites/:site_id/performance.json Web Vitals: p75-scorekaart, dagelijkse trend en uitsplitsingen per pagina, apparaat, browser en land performance_report

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/performance.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Voorinstelling voor datumbereik. Gebruik custom met 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": "Begin van aangepast bereik (tijdzone van de site)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepast bereik, inclusief"
    },
    "compare": {
      "type": "string",
      "description": "Vergelijkingsperiode",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Begin van aangepaste vergelijking"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepaste vergelijking"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Weekdagen van de vergelijking uitlijnen",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Verpak voorwaarden in {\"any\": [...]} voor OF.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Een opgeslagen segment toepassen (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Geïmporteerde historische gegevens toevoegen (datums vóór de eerste eigen gebeurtenis, genegeerd als filters of een segment zijn toegepast)",
      "default": false
    },
    "metric": {
      "type": "string",
      "description": "Statistiek voor de trend en uitsplitsingen",
      "enum": [
        "LCP",
        "INP",
        "CLS",
        "FCP",
        "TTFB"
      ],
      "default": "LCP"
    },
    "limit": {
      "type": "integer",
      "description": "Rijen per uitsplitsing (max 100)",
      "default": 10
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}

Rollen

POST /workspaces/:workspace_id/roles.json Een eigen rol aanmaken roles_create

Machtiging: members.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/roles.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Naam van de rol",
      "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": "Machtigingen die de rol verleent"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "permissions",
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id van de eigen rol (custom_role_id bij leden)"
    },
    "name": {
      "type": "string"
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Verleende machtigingen"
    },
    "members": {
      "type": "integer",
      "description": "Leden met deze rol"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /workspaces/:workspace_id/roles/:id.json Een eigen rol verwijderen (mag niet in gebruik zijn) roles_delete

Machtiging: members.manage

Voorbeeld
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/roles/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id van de eigen rol (custom_role_id bij leden)"
    },
    "name": {
      "type": "string"
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Verleende machtigingen"
    },
    "members": {
      "type": "integer",
      "description": "Leden met deze rol"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /workspaces/:workspace_id/roles.json Eigen rollen weergeven roles_list

Machtiging: member

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/roles.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid",
        "description": "Id van de eigen rol (custom_role_id bij leden)"
      },
      "name": {
        "type": "string"
      },
      "permissions": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Verleende machtigingen"
      },
      "members": {
        "type": "integer",
        "description": "Leden met deze rol"
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
PATCH /workspaces/:workspace_id/roles/:id.json Een eigen rol bijwerken roles_update

Machtiging: members.manage

Voorbeeld
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/roles/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Naam van de rol"
    },
    "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": "Machtigingen die de rol verleent"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id van de eigen rol (custom_role_id bij leden)"
    },
    "name": {
      "type": "string"
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Verleende machtigingen"
    },
    "members": {
      "type": "integer",
      "description": "Leden met deze rol"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

SCIM

POST /scim/v2/Users.json Een gebruiker provisionen scim_users_create

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X POST https://privatusanalytics.com/scim/v2/Users.json \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "userName": {
      "type": "string",
      "description": "E-mailadres"
    },
    "name": {
      "type": "object",
      "additionalProperties": true,
      "description": "givenName, familyName, formatted",
      "default": {}
    },
    "active": {
      "type": "boolean",
      "description": "Lid van de werkruimte",
      "default": true
    }
  },
  "required": [
    "userName"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
DELETE /scim/v2/Users/:id.json Een gebruiker deprovisionen scim_users_delete

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X DELETE https://privatusanalytics.com/scim/v2/Users/:id.json \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /scim/v2/Users.json Geprovisionde gebruikers weergeven scim_users_list

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl https://privatusanalytics.com/scim/v2/Users.json
Invoer
{
  "type": "object",
  "properties": {
    "scim_filter": {
      "type": "string",
      "description": "SCIM-filter (queryparameter `filter`), bijv. userName eq \"[email protected]\""
    },
    "startIndex": {
      "type": "integer",
      "description": "Index van het eerste resultaat, beginnend bij 1",
      "default": 1
    },
    "count": {
      "type": "integer",
      "description": "Paginagrootte (max 200)",
      "default": 100
    }
  },
  "required": []
}
Antwoordgegevens
{
  "type": "object"
}
GET /scim/v2/Users/:id.json Een geprovisionde gebruiker ophalen scim_users_get

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl https://privatusanalytics.com/scim/v2/Users/:id.json
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
PATCH /scim/v2/Users/:id.json Een gebruiker bijwerken (PATCH active, name) scim_users_update

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X PATCH https://privatusanalytics.com/scim/v2/Users/:id.json \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "Operations": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      },
      "description": "SCIM PatchOp-bewerkingen"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "Operations",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}

SSO

POST /workspaces/:workspace_id/sso/activate.json Een geteste SSO-configuratie activeren sso_activate

Machtiging: workspace.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/sso/activate.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "protocol": {
      "type": "string",
      "description": "saml of oidc"
    },
    "status": {
      "type": "string",
      "description": "draft, testing, tested of active"
    },
    "enforced": {
      "type": "boolean",
      "description": "SSO is de enige toegang (eigenaar uitgezonderd)"
    },
    "domains": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Geverifieerde e-maildomeinen"
    },
    "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 SSO uitschakelen (terug naar concept) sso_deactivate

Machtiging: workspace.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/sso/deactivate.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "protocol": {
      "type": "string",
      "description": "saml of oidc"
    },
    "status": {
      "type": "string",
      "description": "draft, testing, tested of active"
    },
    "enforced": {
      "type": "boolean",
      "description": "SSO is de enige toegang (eigenaar uitgezonderd)"
    },
    "domains": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Geverifieerde e-maildomeinen"
    },
    "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 Een nieuw SCIM-token genereren (wordt één keer getoond) sso_scim_token

Machtiging: workspace.manage · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/sso/scim_token.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /workspaces/:workspace_id/sso.json SSO-instellingen ophalen sso_get

Machtiging: workspace.manage

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/sso.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "protocol": {
      "type": "string",
      "description": "saml of oidc"
    },
    "status": {
      "type": "string",
      "description": "draft, testing, tested of active"
    },
    "enforced": {
      "type": "boolean",
      "description": "SSO is de enige toegang (eigenaar uitgezonderd)"
    },
    "domains": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Geverifieerde e-maildomeinen"
    },
    "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 SSO-instellingen aanmaken of bijwerken sso_update

Machtiging: workspace.manage

Voorbeeld
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/sso.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "protocol": {
      "type": "string",
      "description": "saml of oidc",
      "enum": [
        "saml",
        "oidc"
      ]
    },
    "idp_sso_url": {
      "type": "string",
      "description": "SAML: single sign-on-URL van de IdP"
    },
    "idp_entity_id": {
      "type": "string",
      "description": "SAML: entiteits-id van de IdP (issuer)"
    },
    "idp_cert": {
      "type": "string",
      "description": "SAML: X.509-ondertekeningscertificaat van de IdP (PEM)"
    },
    "oidc_issuer": {
      "type": "string",
      "description": "OIDC: issuer-URL (discovery)"
    },
    "oidc_client_id": {
      "type": "string",
      "description": "OIDC: client-id"
    },
    "oidc_client_secret": {
      "type": "string",
      "description": "OIDC: client secret (alleen schrijfbaar)"
    },
    "domains": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Geverifieerde e-maildomeinen die deze SSO gebruiken"
    },
    "default_role": {
      "type": "string",
      "description": "Rol voor leden die door JIT of SCIM zijn aangemaakt",
      "enum": [
        "admin",
        "editor",
        "analyst",
        "viewer",
        "billing"
      ]
    },
    "jit_provisioning": {
      "type": "boolean",
      "description": "Leden aanmaken bij de eerste SSO-aanmelding"
    },
    "enforced": {
      "type": "boolean",
      "description": "Alleen SSO-aanmeldingen toestaan (vereist een actieve configuratie)"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "protocol": {
      "type": "string",
      "description": "saml of oidc"
    },
    "status": {
      "type": "string",
      "description": "draft, testing, tested of active"
    },
    "enforced": {
      "type": "boolean",
      "description": "SSO is de enige toegang (eigenaar uitgezonderd)"
    },
    "domains": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Geverifieerde e-maildomeinen"
    },
    "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"
    }
  }
}

Segmenten

POST /sites/:site_id/segments.json Filters opslaan als segment segments_create

Machtiging: content.write

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/segments.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Naam van het segment, bijv. \"Mobiele bezoekers via advertenties\"",
      "examples": [
        "Mobile visitors from ads"
      ]
    },
    "description": {
      "type": "string",
      "description": "Optionele notitie over waar het segment voor dient (maximaal 300 tekens)",
      "examples": [
        "People who might buy the Pro plan"
      ]
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filters, waaraan allemaal moet worden voldaan. Elk item is een voorwaarde [\"dimension\", \"operator\", \"value\"], of {\"any\": [voorwaarden]} wanneer een van meerdere mag overeenkomen. Dimensies: page, entry_page, exit_page, hostname, channel, referrer, referrer_url, ref, utm_source, utm_medium, utm_campaign, utm_content, utm_term, country (ISO-code, bijv. US), language, device (desktop, mobile, tablet, tv, other), browser, browser_version, os, os_version, screen, goal (doel-id), event (naam van aangepaste gebeurtenis) en prop:<key> (eigenschap van aangepaste gebeurtenis). Operators: is, is_not, contains, not_contains, starts_with, regex, not_regex, any_of en none_of (value is een lijst), gt en lt (een getal), between (een lijst van twee getallen). Rijen uit het segmentformulier worden ook geaccepteerd: {\"dimension\", \"operator\", \"value\", \"property\" (voor dimensie prop), \"join\": \"and\" of \"or\" (or combineert de rij met de rij ervoor)}. Voorbeeld: [[\"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": "Zichtbaar voor iedereen met toegang tot de site (false: alleen jij)",
      "default": true
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "filters",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Segment-id, bijv. seg_7Q2K9XH3AB"
    },
    "site_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "description": "Waar het segment voor dient, of null"
        },
        {
          "type": "null"
        }
      ]
    },
    "filters": {
      "type": "array",
      "description": "Filters in het filterformaat van de statistieken: voorwaarden [\"dimension\", \"operator\", \"value\"] waaraan allemaal moet worden voldaan, en groepen {\"any\": [voorwaarden]}"
    },
    "summary": {
      "type": "string",
      "description": "De filters in gewone taal, bijv. \"Bezoekers uit de Verenigde Staten op mobiel die /pricing hebben bekeken\""
    },
    "shared": {
      "type": "boolean",
      "description": "Zichtbaar voor iedereen met toegang tot de site"
    },
    "mine": {
      "type": "boolean",
      "description": "Door jou aangemaakt"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/segments/:id.json Een segment verwijderen segments_delete

Machtiging: content.write

Voorbeeld
curl -X DELETE https://privatusanalytics.com/sites/:site_id/segments/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Segment-id, bijv. seg_7Q2K9XH3AB"
    },
    "site_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "description": "Waar het segment voor dient, of null"
        },
        {
          "type": "null"
        }
      ]
    },
    "filters": {
      "type": "array",
      "description": "Filters in het filterformaat van de statistieken: voorwaarden [\"dimension\", \"operator\", \"value\"] waaraan allemaal moet worden voldaan, en groepen {\"any\": [voorwaarden]}"
    },
    "summary": {
      "type": "string",
      "description": "De filters in gewone taal, bijv. \"Bezoekers uit de Verenigde Staten op mobiel die /pricing hebben bekeken\""
    },
    "shared": {
      "type": "boolean",
      "description": "Zichtbaar voor iedereen met toegang tot de site"
    },
    "mine": {
      "type": "boolean",
      "description": "Door jou aangemaakt"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/segments.json Segmenten weergeven die je op een site kunt gebruiken segments_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/segments.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Segment-id, bijv. seg_7Q2K9XH3AB"
      },
      "site_id": {
        "type": "string"
      },
      "name": {
        "type": "string"
      },
      "description": {
        "anyOf": [
          {
            "type": "string",
            "description": "Waar het segment voor dient, of null"
          },
          {
            "type": "null"
          }
        ]
      },
      "filters": {
        "type": "array",
        "description": "Filters in het filterformaat van de statistieken: voorwaarden [\"dimension\", \"operator\", \"value\"] waaraan allemaal moet worden voldaan, en groepen {\"any\": [voorwaarden]}"
      },
      "summary": {
        "type": "string",
        "description": "De filters in gewone taal, bijv. \"Bezoekers uit de Verenigde Staten op mobiel die /pricing hebben bekeken\""
      },
      "shared": {
        "type": "boolean",
        "description": "Zichtbaar voor iedereen met toegang tot de site"
      },
      "mine": {
        "type": "boolean",
        "description": "Door jou aangemaakt"
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      },
      "updated_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
POST /sites/:site_id/segments/preview.json Filters in gewone taal beschrijven en de bezoekers tellen die er in de afgelopen 30 dagen aan voldeden segments_preview

Machtiging: analytics.read

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/segments/preview.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filters, waaraan allemaal moet worden voldaan. Elk item is een voorwaarde [\"dimension\", \"operator\", \"value\"], of {\"any\": [voorwaarden]} wanneer een van meerdere mag overeenkomen. Dimensies: page, entry_page, exit_page, hostname, channel, referrer, referrer_url, ref, utm_source, utm_medium, utm_campaign, utm_content, utm_term, country (ISO-code, bijv. US), language, device (desktop, mobile, tablet, tv, other), browser, browser_version, os, os_version, screen, goal (doel-id), event (naam van aangepaste gebeurtenis) en prop:<key> (eigenschap van aangepaste gebeurtenis). Operators: is, is_not, contains, not_contains, starts_with, regex, not_regex, any_of en none_of (value is een lijst), gt en lt (een getal), between (een lijst van twee getallen). Rijen uit het segmentformulier worden ook geaccepteerd: {\"dimension\", \"operator\", \"value\", \"property\" (voor dimensie prop), \"join\": \"and\" of \"or\" (or combineert de rij met de rij ervoor)}. Voorbeeld: [[\"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": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /sites/:site_id/segments/:id.json Een segment ophalen segments_get

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/segments/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Segment-id, bijv. seg_7Q2K9XH3AB"
    },
    "site_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "description": "Waar het segment voor dient, of null"
        },
        {
          "type": "null"
        }
      ]
    },
    "filters": {
      "type": "array",
      "description": "Filters in het filterformaat van de statistieken: voorwaarden [\"dimension\", \"operator\", \"value\"] waaraan allemaal moet worden voldaan, en groepen {\"any\": [voorwaarden]}"
    },
    "summary": {
      "type": "string",
      "description": "De filters in gewone taal, bijv. \"Bezoekers uit de Verenigde Staten op mobiel die /pricing hebben bekeken\""
    },
    "shared": {
      "type": "boolean",
      "description": "Zichtbaar voor iedereen met toegang tot de site"
    },
    "mine": {
      "type": "boolean",
      "description": "Door jou aangemaakt"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /sites/:site_id/segments/:id.json Een segment hernoemen of de filters of het delen ervan wijzigen segments_update

Machtiging: content.write

Voorbeeld
curl -X PATCH https://privatusanalytics.com/sites/:site_id/segments/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Naam van het segment"
    },
    "description": {
      "type": "string",
      "description": "Optionele notitie over waar het segment voor dient (maximaal 300 tekens, leeg om te wissen)"
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Vervangende filters, in hetzelfde formaat als bij het aanmaken. Filters, waaraan allemaal moet worden voldaan. Elk item is een voorwaarde [\"dimension\", \"operator\", \"value\"], of {\"any\": [voorwaarden]} wanneer een van meerdere mag overeenkomen. Dimensies: page, entry_page, exit_page, hostname, channel, referrer, referrer_url, ref, utm_source, utm_medium, utm_campaign, utm_content, utm_term, country (ISO-code, bijv. US), language, device (desktop, mobile, tablet, tv, other), browser, browser_version, os, os_version, screen, goal (doel-id), event (naam van aangepaste gebeurtenis) en prop:<key> (eigenschap van aangepaste gebeurtenis). Operators: is, is_not, contains, not_contains, starts_with, regex, not_regex, any_of en none_of (value is een lijst), gt en lt (een getal), between (een lijst van twee getallen). Rijen uit het segmentformulier worden ook geaccepteerd: {\"dimension\", \"operator\", \"value\", \"property\" (voor dimensie prop), \"join\": \"and\" of \"or\" (or combineert de rij met de rij ervoor)}. Voorbeeld: [[\"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": "Zichtbaar voor iedereen op de site"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Segment-id, bijv. seg_7Q2K9XH3AB"
    },
    "site_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "description": "Waar het segment voor dient, of null"
        },
        {
          "type": "null"
        }
      ]
    },
    "filters": {
      "type": "array",
      "description": "Filters in het filterformaat van de statistieken: voorwaarden [\"dimension\", \"operator\", \"value\"] waaraan allemaal moet worden voldaan, en groepen {\"any\": [voorwaarden]}"
    },
    "summary": {
      "type": "string",
      "description": "De filters in gewone taal, bijv. \"Bezoekers uit de Verenigde Staten op mobiel die /pricing hebben bekeken\""
    },
    "shared": {
      "type": "boolean",
      "description": "Zichtbaar voor iedereen met toegang tot de site"
    },
    "mine": {
      "type": "boolean",
      "description": "Door jou aangemaakt"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Sites

POST /sites/:site_id/data_reset.json Alle gebeurtenissen en bezoeken in een datumbereik verwijderen (draait op de achtergrond, kan niet ongedaan worden gemaakt) sites_reset_data

Machtiging: sites.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/data_reset.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "format": "date",
      "description": "Eerste dag om te verwijderen (tijdzone van de site)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Laatste dag om te verwijderen, inclusief"
    },
    "confirm": {
      "type": "string",
      "description": "Typ het domein ter bevestiging"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "from",
    "to",
    "confirm",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /sites/:site_id/filter_stats.json Samenvatting van gefilterd verkeer: bots, verkeersregels of PII-redacties per reden en land (alleen aantallen) sites_filter_stats

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/filter_stats.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "description": "bot (gefilterde bots), rule (verkeersregels) of redaction (PII-scrubber)",
      "enum": [
        "bot",
        "rule",
        "redaction"
      ],
      "default": "bot"
    },
    "days": {
      "type": "integer",
      "description": "Aantal dagen terug te kijken (1-395)",
      "default": 30
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /sites/:site_id/access.json Leden weergeven en of ze deze site kunnen zien sites_access_list

Machtiging: members.manage

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/access.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "membership_id": {
      "type": "string",
      "format": "uuid",
      "description": "Lidmaatschaps-id"
    },
    "email": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "role": {
      "type": "string"
    },
    "access": {
      "type": "boolean",
      "description": "Kan deze site zien"
    },
    "locked": {
      "type": "boolean",
      "description": "Eigenaren en beheerders hebben altijd toegang"
    }
  }
}
PATCH /sites/:site_id/access.json De toegang van één lid tot deze site verlenen of intrekken sites_access_update

Machtiging: members.manage

Voorbeeld
curl -X PATCH https://privatusanalytics.com/sites/:site_id/access.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "membership_id": {
      "type": "string",
      "description": "Lidmaatschaps-id uit sites_access_list"
    },
    "access": {
      "type": "boolean",
      "description": "true om toegang te verlenen, false om die te verwijderen"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "membership_id",
    "access",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "membership_id": {
      "type": "string",
      "format": "uuid",
      "description": "Lidmaatschaps-id"
    },
    "email": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "role": {
      "type": "string"
    },
    "access": {
      "type": "boolean",
      "description": "Kan deze site zien"
    },
    "locked": {
      "type": "boolean",
      "description": "Eigenaren en beheerders hebben altijd toegang"
    }
  }
}
POST /sites/:site_id/favorite.json Een site met een ster markeren (eerst vastgezet in Alle sites) sites_favorite

Machtiging: analytics.read

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/favorite.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Site-id gebruikt in het trackingfragment"
    },
    "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": "Begin van de server-ingest-sleutel"
        },
        {
          "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": "HTML-trackingfragment"
    },
    "favorite": {
      "type": "boolean",
      "description": "Door jou met een ster gemarkeerd"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/favorite.json De ster van een site verwijderen sites_unfavorite

Machtiging: analytics.read

Voorbeeld
curl -X DELETE https://privatusanalytics.com/sites/:site_id/favorite.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Site-id gebruikt in het trackingfragment"
    },
    "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": "Begin van de server-ingest-sleutel"
        },
        {
          "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": "HTML-trackingfragment"
    },
    "favorite": {
      "type": "boolean",
      "description": "Door jou met een ster gemarkeerd"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/setup.json Installatiestatus en fragment voor een site sites_setup_get

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/setup.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
POST /transfers/:token/accept.json Een siteoverdracht accepteren in een van je werkruimtes site_transfers_accept

Machtiging: public

Voorbeeld
curl -X POST https://privatusanalytics.com/transfers/:token/accept.json \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte waarnaar de site wordt verplaatst (ws_…)"
    },
    "token": {
      "type": "string",
      "description": "Token van de bron"
    }
  },
  "required": [
    "workspace_id",
    "token"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site die wordt overgedragen"
    },
    "site_domain": {
      "type": "string"
    },
    "from_workspace": {
      "type": "string",
      "description": "Naam van de huidige werkruimte"
    },
    "to_workspace_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Ontvangende werkruimte"
        },
        {
          "type": "null"
        }
      ]
    },
    "to_email": {
      "type": "string",
      "description": "E-mailadres van de ontvanger"
    },
    "status": {
      "type": "string",
      "description": "pending, accepted of canceled"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /sites/:site_id/transfer.json Beginnen met het overdragen van een site aan een andere werkruimte (e-mailt de ontvanger) sites_transfer_start

Machtiging: sites.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/transfer.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "E-mailadres van de persoon die de site ontvangt (die kiest een van zijn werkruimtes)"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "email",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site die wordt overgedragen"
    },
    "site_domain": {
      "type": "string"
    },
    "from_workspace": {
      "type": "string",
      "description": "Naam van de huidige werkruimte"
    },
    "to_workspace_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Ontvangende werkruimte"
        },
        {
          "type": "null"
        }
      ]
    },
    "to_email": {
      "type": "string",
      "description": "E-mailadres van de ontvanger"
    },
    "status": {
      "type": "string",
      "description": "pending, accepted of canceled"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/transfer.json Een openstaande siteoverdracht annuleren sites_transfer_cancel

Machtiging: sites.manage

Voorbeeld
curl -X DELETE https://privatusanalytics.com/sites/:site_id/transfer.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site die wordt overgedragen"
    },
    "site_domain": {
      "type": "string"
    },
    "from_workspace": {
      "type": "string",
      "description": "Naam van de huidige werkruimte"
    },
    "to_workspace_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Ontvangende werkruimte"
        },
        {
          "type": "null"
        }
      ]
    },
    "to_email": {
      "type": "string",
      "description": "E-mailadres van de ontvanger"
    },
    "status": {
      "type": "string",
      "description": "pending, accepted of canceled"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /transfers/:token.json Een openstaande overdracht ophalen met het token uit de e-mail site_transfers_get

Machtiging: public

Voorbeeld
curl https://privatusanalytics.com/transfers/:token.json
Invoer
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Token van de bron"
    }
  },
  "required": [
    "token"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site die wordt overgedragen"
    },
    "site_domain": {
      "type": "string"
    },
    "from_workspace": {
      "type": "string",
      "description": "Naam van de huidige werkruimte"
    },
    "to_workspace_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Ontvangende werkruimte"
        },
        {
          "type": "null"
        }
      ]
    },
    "to_email": {
      "type": "string",
      "description": "E-mailadres van de ontvanger"
    },
    "status": {
      "type": "string",
      "description": "pending, accepted of canceled"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /workspaces/:workspace_id/sites.json Een site toevoegen sites_create

Machtiging: sites.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/sites.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "domain": {
      "type": "string",
      "description": "Hoofddomein, bijv. example.com",
      "examples": [
        "example.com"
      ]
    },
    "name": {
      "type": "string",
      "description": "Weergavenaam (standaard het domein)"
    },
    "timezone": {
      "type": "string",
      "description": "Tijdzone voor rapportage"
    },
    "currency": {
      "type": "string",
      "description": "Valuta voor omzet (ISO 4217)"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "domain",
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Site-id gebruikt in het trackingfragment"
    },
    "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": "Begin van de server-ingest-sleutel"
        },
        {
          "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": "HTML-trackingfragment"
    },
    "favorite": {
      "type": "boolean",
      "description": "Door jou met een ster gemarkeerd"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:id.json Een site verwijderen (gewist na 7 dagen) sites_delete

Machtiging: sites.manage

Voorbeeld
curl -X DELETE https://privatusanalytics.com/sites/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "confirm": {
      "type": "string",
      "description": "Typ het domein ter bevestiging"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "confirm",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Site-id gebruikt in het trackingfragment"
    },
    "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": "Begin van de server-ingest-sleutel"
        },
        {
          "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": "HTML-trackingfragment"
    },
    "favorite": {
      "type": "boolean",
      "description": "Door jou met een ster gemarkeerd"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /workspaces/:workspace_id/sites.json Sites in een werkruimte weergeven sites_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/sites.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Filter op domein of naam"
    },
    "label": {
      "type": "string",
      "description": "Alleen sites met dit label"
    },
    "sort": {
      "type": "string",
      "description": "position (jouw volgorde), name, of bezoekers in de afgelopen 30 dagen (meeste eerst)",
      "enum": [
        "position",
        "name",
        "visitors"
      ],
      "default": "position"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Site-id gebruikt in het trackingfragment"
      },
      "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": "Begin van de server-ingest-sleutel"
          },
          {
            "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": "HTML-trackingfragment"
      },
      "favorite": {
        "type": "boolean",
        "description": "Door jou met een ster gemarkeerd"
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
GET /sites/:id.json Een site en alle instellingen ervan ophalen sites_get

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Site-id gebruikt in het trackingfragment"
    },
    "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": "Begin van de server-ingest-sleutel"
        },
        {
          "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": "HTML-trackingfragment"
    },
    "favorite": {
      "type": "boolean",
      "description": "Door jou met een ster gemarkeerd"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /sites/:id.json Site-instellingen bijwerken sites_update

Machtiging: sites.manage

Voorbeeld
curl -X PATCH https://privatusanalytics.com/sites/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Weergavenaam"
    },
    "domain": {
      "type": "string",
      "description": "Hoofddomein"
    },
    "extra_domains": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Extra hostnamen"
    },
    "multi_domain_mode": {
      "type": "string",
      "description": "combined: één bezoeker over domeinen heen",
      "enum": [
        "combined",
        "separate"
      ]
    },
    "timezone": {
      "type": "string",
      "description": "Tijdzone voor rapportage"
    },
    "currency": {
      "type": "string",
      "description": "Omzetvaluta (ISO 4217)"
    },
    "week_start": {
      "type": "integer",
      "description": "0 = zondag, 1 = maandag"
    },
    "labels": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Labels om sites te groeperen"
    },
    "honor_dnt": {
      "type": "boolean",
      "description": "Bezoekers die DNT sturen overslaan"
    },
    "honor_gpc": {
      "type": "boolean",
      "description": "Bezoekers die GPC sturen overslaan"
    },
    "pii_scrubber": {
      "type": "boolean",
      "description": "E-mails, tokens, id's redigeren"
    },
    "redaction_rules": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "pattern": {
            "type": "string"
          }
        }
      },
      "description": "Eigen redactie-regexes"
    },
    "allowed_params": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Queryparameters om op paden te behouden"
    },
    "path_masks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "pattern": {
            "type": "string"
          },
          "replacement": {
            "type": "string"
          }
        }
      },
      "description": "Regels voor padmaskering, bijv. /u/* -> /u/:id"
    },
    "retention_months": {
      "type": "integer",
      "description": "Gegevens ouder dan dit verwijderen"
    },
    "bot_filtering": {
      "type": "boolean",
      "description": "Botverkeer filteren"
    },
    "traffic_rule_modes": {
      "type": "object",
      "additionalProperties": true,
      "description": "block of allow per verkeersregellijst"
    },
    "vitals_sample_rate": {
      "type": "integer",
      "description": "Steekproef-% voor Web Vitals"
    },
    "conversion_denominator": {
      "type": "string",
      "description": "Conversieratio ten opzichte van bezoeken of bezoekers",
      "enum": [
        "visits",
        "visitors"
      ]
    },
    "public_dashboard": {
      "type": "boolean",
      "description": "Iedereen met de link kan de statistieken bekijken"
    },
    "public_indexable": {
      "type": "boolean",
      "description": "Zoekmachines de openbare pagina laten indexeren"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Site-id gebruikt in het trackingfragment"
    },
    "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": "Begin van de server-ingest-sleutel"
        },
        {
          "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": "HTML-trackingfragment"
    },
    "favorite": {
      "type": "boolean",
      "description": "Door jou met een ster gemarkeerd"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Statuspagina's

GET /status/:slug/confirm/:token.json Een abonnement bevestigen via de link uit de e-mail public_status_pages_confirm

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl https://privatusanalytics.com/status/:slug/confirm/:token.json
Invoer
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Token van de bron"
    },
    "slug": {
      "type": "string",
      "description": "Slug van de bron"
    }
  },
  "required": [
    "token",
    "slug"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /status/:slug.json Openbare statuspagina: huidige status, uptimebalken van 90 dagen, incidenten en berichten public_status_pages_get

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl https://privatusanalytics.com/status/:slug.json
Invoer
{
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "description": "Slug van de bron"
    }
  },
  "required": [
    "slug"
  ]
}
Antwoordgegevens
{
  "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 of outage"
    },
    "checks": {
      "type": "array",
      "description": "Elk: {name, status, uptime_90d, days: [{date, uptime, downtime_seconds}]}"
    },
    "posts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Bericht-id (spp_…)"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "description": "investigating, identified, monitoring of resolved"
          },
          "posted_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "incidents": {
      "type": "array",
      "description": "Recente incidenten: {check, started_at, resolved_at, duration_seconds}"
    }
  }
}
POST /status/:slug/subscribers.json Een e-mailadres abonneren (dubbele opt-in) public_status_pages_subscribe

Browserclients sturen een Cloudflare Turnstile-token mee als `cf-turnstile-response`. Verzoeken met een API-token hebben dat niet nodig.

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X POST https://privatusanalytics.com/status/:slug/subscribers.json \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "E-mailadres om te informeren",
      "examples": [
        "[email protected]"
      ]
    },
    "slug": {
      "type": "string",
      "description": "Slug van de bron"
    }
  },
  "required": [
    "email",
    "slug"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
POST /status/:slug/unsubscribe/:token.json Afmelden met het token uit de e-mail public_status_pages_unsubscribe

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X POST https://privatusanalytics.com/status/:slug/unsubscribe/:token.json \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Token van de bron"
    },
    "slug": {
      "type": "string",
      "description": "Slug van de bron"
    }
  },
  "required": [
    "token",
    "slug"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
POST /status_pages/:status_page_id/posts.json Een incidentupdate plaatsen (e-mailt abonnees) status_page_posts_create

Machtiging: uptime.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/status_pages/:status_page_id/posts.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "Kop, bijv. \"Verhoogde foutpercentages\""
    },
    "body": {
      "type": "string",
      "description": "Updatetekst (platte tekst)"
    },
    "status": {
      "type": "string",
      "description": "investigating, identified, monitoring of resolved",
      "enum": [
        "investigating",
        "identified",
        "monitoring",
        "resolved"
      ],
      "default": "investigating"
    },
    "posted_at": {
      "type": "string",
      "format": "date-time",
      "description": "Wanneer het gebeurde (standaard nu)"
    },
    "notify": {
      "type": "boolean",
      "description": "Bevestigde abonnees e-mailen",
      "default": true
    },
    "status_page_id": {
      "type": "string",
      "description": "Status page van de bron"
    }
  },
  "required": [
    "title",
    "status_page_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Bericht-id (spp_…)"
    },
    "title": {
      "type": "string"
    },
    "body": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "description": "investigating, identified, monitoring of resolved"
    },
    "posted_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /status_pages/:status_page_id/posts/:id.json Een bericht op een statuspagina verwijderen status_page_posts_delete

Machtiging: uptime.manage

Voorbeeld
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 '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "status_page_id": {
      "type": "string",
      "description": "Status page van de bron"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "status_page_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Bericht-id (spp_…)"
    },
    "title": {
      "type": "string"
    },
    "body": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "description": "investigating, identified, monitoring of resolved"
    },
    "posted_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /status_pages/:status_page_id/posts.json Berichten op een statuspagina weergeven status_page_posts_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/status_pages/:status_page_id/posts.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Alleen berichten met deze status",
      "enum": [
        "investigating",
        "identified",
        "monitoring",
        "resolved"
      ]
    },
    "status_page_id": {
      "type": "string",
      "description": "Status page van de bron"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "status_page_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Bericht-id (spp_…)"
      },
      "title": {
        "type": "string"
      },
      "body": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "status": {
        "type": "string",
        "description": "investigating, identified, monitoring of resolved"
      },
      "posted_at": {
        "type": "string",
        "format": "date-time"
      },
      "updated_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
PATCH /status_pages/:status_page_id/posts/:id.json Een bericht op een statuspagina bewerken status_page_posts_update

Machtiging: uptime.manage

Voorbeeld
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 '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "Kop"
    },
    "body": {
      "type": "string",
      "description": "Updatetekst (platte tekst)"
    },
    "status": {
      "type": "string",
      "description": "investigating, identified, monitoring of resolved",
      "enum": [
        "investigating",
        "identified",
        "monitoring",
        "resolved"
      ]
    },
    "notify": {
      "type": "boolean",
      "description": "Bevestigde abonnees e-mailen als de status verandert",
      "default": true
    },
    "status_page_id": {
      "type": "string",
      "description": "Status page van de bron"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "status_page_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Bericht-id (spp_…)"
    },
    "title": {
      "type": "string"
    },
    "body": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "description": "investigating, identified, monitoring of resolved"
    },
    "posted_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /status_pages/:status_page_id/subscribers/:id.json Een abonnee verwijderen status_page_subscribers_delete

Machtiging: uptime.manage

Voorbeeld
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 '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "status_page_id": {
      "type": "string",
      "description": "Status page van de bron"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "status_page_id",
    "id"
  ]
}
Antwoordgegevens
{
  "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 Abonnees van een statuspagina weergeven status_page_subscribers_list

Machtiging: uptime.manage

Voorbeeld
curl https://privatusanalytics.com/status_pages/:status_page_id/subscribers.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "confirmed": {
      "type": "boolean",
      "description": "true: alleen bevestigde, false: alleen in afwachting"
    },
    "status_page_id": {
      "type": "string",
      "description": "Status page van de bron"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "status_page_id"
  ]
}
Antwoordgegevens
{
  "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 Een statuspagina aanmaken status_pages_create

Machtiging: uptime.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/status_pages.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Paginatitel, bijv. \"Acme-status\""
    },
    "slug": {
      "type": "string",
      "description": "Slug van de openbare URL: /status/<slug> (standaard afgeleid van de naam)"
    },
    "description": {
      "type": "string",
      "description": "Introductietekst onder de titel"
    },
    "logo_url": {
      "type": "string",
      "description": "HTTPS-URL van een logoafbeelding"
    },
    "brand_color": {
      "type": "string",
      "description": "Accentkleur, bijv. #06755b"
    },
    "custom_domain": {
      "type": "string",
      "description": "Eigen domein (CNAME naar onze host), bijv. status.example.com. Leeg om te verwijderen"
    },
    "check_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Id's van uptimecontroles (upc_…) om te tonen"
    },
    "published": {
      "type": "boolean",
      "description": "Zichtbaar voor het publiek",
      "default": true
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Statuspagina-id (sp_…)"
    },
    "workspace_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "slug": {
      "type": "string",
      "description": "Openbare URL: /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's van getoonde uptimecontroles"
    },
    "subscribers": {
      "type": "integer",
      "description": "Bevestigde abonnees"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /status_pages/:id.json Een statuspagina verwijderen status_pages_delete

Machtiging: uptime.manage

Voorbeeld
curl -X DELETE https://privatusanalytics.com/status_pages/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Statuspagina-id (sp_…)"
    },
    "workspace_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "slug": {
      "type": "string",
      "description": "Openbare URL: /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's van getoonde uptimecontroles"
    },
    "subscribers": {
      "type": "integer",
      "description": "Bevestigde abonnees"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /workspaces/:workspace_id/status_pages.json Statuspagina's weergeven status_pages_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/status_pages.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Filter op naam of slug"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Statuspagina-id (sp_…)"
      },
      "workspace_id": {
        "type": "string"
      },
      "name": {
        "type": "string"
      },
      "slug": {
        "type": "string",
        "description": "Openbare URL: /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's van getoonde uptimecontroles"
      },
      "subscribers": {
        "type": "integer",
        "description": "Bevestigde abonnees"
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
GET /status_pages/:id.json Een statuspagina ophalen status_pages_get

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/status_pages/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Statuspagina-id (sp_…)"
    },
    "workspace_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "slug": {
      "type": "string",
      "description": "Openbare URL: /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's van getoonde uptimecontroles"
    },
    "subscribers": {
      "type": "integer",
      "description": "Bevestigde abonnees"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /status_pages/:id.json Een statuspagina wijzigen status_pages_update

Machtiging: uptime.manage

Voorbeeld
curl -X PATCH https://privatusanalytics.com/status_pages/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Paginatitel, bijv. \"Acme-status\""
    },
    "slug": {
      "type": "string",
      "description": "Slug van de openbare URL: /status/<slug> (standaard afgeleid van de naam)"
    },
    "description": {
      "type": "string",
      "description": "Introductietekst onder de titel"
    },
    "logo_url": {
      "type": "string",
      "description": "HTTPS-URL van een logoafbeelding"
    },
    "brand_color": {
      "type": "string",
      "description": "Accentkleur, bijv. #06755b"
    },
    "custom_domain": {
      "type": "string",
      "description": "Eigen domein (CNAME naar onze host), bijv. status.example.com. Leeg om te verwijderen"
    },
    "check_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Id's van uptimecontroles (upc_…) om te tonen"
    },
    "published": {
      "type": "boolean",
      "description": "Zichtbaar voor het publiek"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Statuspagina-id (sp_…)"
    },
    "workspace_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "slug": {
      "type": "string",
      "description": "Openbare URL: /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's van getoonde uptimecontroles"
    },
    "subscribers": {
      "type": "integer",
      "description": "Bevestigde abonnees"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Tracking

POST /sites/:site_id/tracking/ingest_key.json De server-ingest-sleutel aanmaken of roteren (wordt één keer getoond) tracking_ingest_key_rotate

Machtiging: sites.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/tracking/ingest_key.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id"
    },
    "key": {
      "type": "string",
      "description": "De ingest-sleutel. Wordt één keer getoond: bewaar hem nu. Stuur hem als Bearer-token mee naar POST /api/events"
    },
    "prefix": {
      "type": "string",
      "description": "Sleutelprefix getoond in de instellingen"
    }
  }
}
DELETE /sites/:site_id/tracking/ingest_key.json De server-ingest-sleutel intrekken tracking_ingest_key_revoke

Machtiging: sites.manage

Voorbeeld
curl -X DELETE https://privatusanalytics.com/sites/:site_id/tracking/ingest_key.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Site-id gebruikt in het trackingfragment"
    },
    "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": "Begin van de server-ingest-sleutel"
        },
        {
          "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": "HTML-trackingfragment"
    },
    "favorite": {
      "type": "boolean",
      "description": "Door jou met een ster gemarkeerd"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /sites/:site_id/tracking/verify.json Controleren of de tracker op de site is geïnstalleerd (scripttag, site-id, CSP en referrer policy) tracking_verify

Machtiging: sites.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/tracking/verify.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "Te controleren pagina (standaard https://<domain>/)"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /sites/:site_id/tracking/snippet.json Het trackingfragment bouwen voor gekozen opties tracking_snippet

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/tracking/snippet.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "modules": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Optionele modules: auto (uitgaande links, downloads, formulieren, 404's), engage (tijd en scrollen), vitals (Web Vitals), clicks",
      "default": [
        "engage"
      ]
    },
    "manual": {
      "type": "boolean",
      "description": "De automatische paginaweergave uitschakelen",
      "default": false
    },
    "spa": {
      "type": "string",
      "description": "Navigatietracking voor single-page-apps",
      "enum": [
        "auto",
        "history",
        "hash",
        "off"
      ],
      "default": "auto"
    },
    "domains": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Alleen op deze hostnamen tracken",
      "default": []
    },
    "exclude": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Padglobs die niet worden getrackt, bijv. /admin/*",
      "default": []
    },
    "query_params": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Extra queryparameters om te behouden, bijv. page",
      "default": []
    },
    "mask": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Padmaskers aan clientzijde, bijv. /u/*->/u/:id",
      "default": []
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}

Uptime

POST /sites/:site_id/uptime.json Een uptimecontrole voor een site toevoegen uptime_checks_create

Machtiging: uptime.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/uptime.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Weergavenaam (standaard het doel)"
    },
    "kind": {
      "type": "string",
      "description": "http (statuscode), keyword (body bevat), tcp (host:port) of dns (naam wordt omgezet)",
      "enum": [
        "http",
        "keyword",
        "tcp",
        "dns"
      ],
      "default": "http"
    },
    "url": {
      "type": "string",
      "description": "URL voor http-/keyword-controles",
      "examples": [
        "https://example.com/health"
      ]
    },
    "host": {
      "type": "string",
      "description": "Hostnaam voor tcp-/dns-controles"
    },
    "port": {
      "type": "integer",
      "description": "TCP-poort voor tcp-controles"
    },
    "keyword": {
      "type": "string",
      "description": "Tekst die de responsebody moet bevatten (keyword)"
    },
    "expected_status": {
      "type": "integer",
      "description": "Verwachte HTTP-statuscode",
      "default": 200
    },
    "http_method": {
      "type": "string",
      "description": "HTTP-methode",
      "enum": [
        "GET",
        "HEAD"
      ],
      "default": "GET"
    },
    "interval_seconds": {
      "type": "integer",
      "description": "Seconden tussen controles (het minimum van het abonnement geldt, standaard 300 of het minimum)"
    },
    "timeout_seconds": {
      "type": "integer",
      "description": "Seconden voordat een probe een time-out krijgt (1-30)",
      "default": 20
    },
    "public": {
      "type": "boolean",
      "description": "Mag op openbare statuspagina's verschijnen",
      "default": false
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Controle-id (upc_…)"
    },
    "workspace_id": {
      "type": "string"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site waartoe de controle behoort"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "http, keyword, tcp of 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 of paused"
    },
    "enabled": {
      "type": "boolean"
    },
    "public": {
      "type": "boolean",
      "description": "Mag op statuspagina's verschijnen"
    },
    "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 Een uptimecontrole en de geschiedenis ervan verwijderen uptime_checks_delete

Machtiging: uptime.manage

Voorbeeld
curl -X DELETE https://privatusanalytics.com/uptime/checks/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Controle-id (upc_…)"
    },
    "workspace_id": {
      "type": "string"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site waartoe de controle behoort"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "http, keyword, tcp of 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 of paused"
    },
    "enabled": {
      "type": "boolean"
    },
    "public": {
      "type": "boolean",
      "description": "Mag op statuspagina's verschijnen"
    },
    "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 De uptimecontroles van een site weergeven uptime_checks_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/uptime.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Alleen controles met deze status",
      "enum": [
        "up",
        "down",
        "pending",
        "paused"
      ]
    },
    "query": {
      "type": "string",
      "description": "Filter op naam of doel"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Controle-id (upc_…)"
      },
      "workspace_id": {
        "type": "string"
      },
      "site_id": {
        "anyOf": [
          {
            "type": "string",
            "description": "Site waartoe de controle behoort"
          },
          {
            "type": "null"
          }
        ]
      },
      "name": {
        "type": "string"
      },
      "kind": {
        "type": "string",
        "description": "http, keyword, tcp of 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 of paused"
      },
      "enabled": {
        "type": "boolean"
      },
      "public": {
        "type": "boolean",
        "description": "Mag op statuspagina's verschijnen"
      },
      "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 Een uptimecontrole pauzeren uptime_checks_pause

Machtiging: uptime.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/uptime/checks/:id/pause.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Controle-id (upc_…)"
    },
    "workspace_id": {
      "type": "string"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site waartoe de controle behoort"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "http, keyword, tcp of 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 of paused"
    },
    "enabled": {
      "type": "boolean"
    },
    "public": {
      "type": "boolean",
      "description": "Mag op statuspagina's verschijnen"
    },
    "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 Een gepauzeerde uptimecontrole hervatten uptime_checks_resume

Machtiging: uptime.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/uptime/checks/:id/resume.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Controle-id (upc_…)"
    },
    "workspace_id": {
      "type": "string"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site waartoe de controle behoort"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "http, keyword, tcp of 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 of paused"
    },
    "enabled": {
      "type": "boolean"
    },
    "public": {
      "type": "boolean",
      "description": "Mag op statuspagina's verschijnen"
    },
    "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 Een uptimecontrole ophalen: uptime 24u/7d/30d, responstijden en incidenten uptime_checks_get

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/uptime/checks/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "range": {
      "type": "string",
      "description": "Venster voor de responstijdgrafiek",
      "enum": [
        "24h",
        "7d",
        "30d"
      ],
      "default": "24h"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "check": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Controle-id (upc_…)"
        },
        "workspace_id": {
          "type": "string"
        },
        "site_id": {
          "anyOf": [
            {
              "type": "string",
              "description": "Site waartoe de controle behoort"
            },
            {
              "type": "null"
            }
          ]
        },
        "name": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "description": "http, keyword, tcp of 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 of paused"
        },
        "enabled": {
          "type": "boolean"
        },
        "public": {
          "type": "boolean",
          "description": "Mag op statuspagina's verschijnen"
        },
        "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": "Uptime-% voor 24u, 7d en 30d"
    },
    "range": {
      "type": "string",
      "description": "Venster van response_times"
    },
    "response_times": {
      "type": "object",
      "description": "Gemiddelde respons-ms per tijdvak: {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": "Tot nu toe, als nog open"
          },
          "cause": {
            "anyOf": [
              {
                "type": "string",
                "description": "Meest voorkomende fout, bijv. timeout of status_503"
              },
              {
                "type": "null"
              }
            ]
          },
          "failed_locations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
PATCH /uptime/checks/:id.json Een uptimecontrole wijzigen uptime_checks_update

Machtiging: uptime.manage

Voorbeeld
curl -X PATCH https://privatusanalytics.com/uptime/checks/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Weergavenaam (standaard het doel)"
    },
    "kind": {
      "type": "string",
      "description": "http (statuscode), keyword (body bevat), tcp (host:port) of dns (naam wordt omgezet)",
      "enum": [
        "http",
        "keyword",
        "tcp",
        "dns"
      ]
    },
    "url": {
      "type": "string",
      "description": "URL voor http-/keyword-controles",
      "examples": [
        "https://example.com/health"
      ]
    },
    "host": {
      "type": "string",
      "description": "Hostnaam voor tcp-/dns-controles"
    },
    "port": {
      "type": "integer",
      "description": "TCP-poort voor tcp-controles"
    },
    "keyword": {
      "type": "string",
      "description": "Tekst die de responsebody moet bevatten (keyword)"
    },
    "expected_status": {
      "type": "integer",
      "description": "Verwachte HTTP-statuscode"
    },
    "http_method": {
      "type": "string",
      "description": "HTTP-methode",
      "enum": [
        "GET",
        "HEAD"
      ]
    },
    "interval_seconds": {
      "type": "integer",
      "description": "Seconden tussen controles (het minimum van het abonnement geldt, standaard 300 of het minimum)"
    },
    "timeout_seconds": {
      "type": "integer",
      "description": "Seconden voordat een probe een time-out krijgt (1-30)"
    },
    "public": {
      "type": "boolean",
      "description": "Mag op openbare statuspagina's verschijnen"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Controle-id (upc_…)"
    },
    "workspace_id": {
      "type": "string"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site waartoe de controle behoort"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "http, keyword, tcp of 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 of paused"
    },
    "enabled": {
      "type": "boolean"
    },
    "public": {
      "type": "boolean",
      "description": "Mag op statuspagina's verschijnen"
    },
    "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 Probe-datacenter, User-Agent en egress-IP-bereiken (om onze uptimeprobes op de allowlist te zetten) uptime_probes_list

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl https://privatusanalytics.com/uptime/probes.json
Invoer
{
  "type": "object",
  "properties": {},
  "required": []
}
Antwoordgegevens
{
  "type": "object"
}
POST /uptime/probes/results.json Resultaten van een externe probe-agent indienen (Bearer-uptimeprobetoken) uptime_probes_results

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X POST https://privatusanalytics.com/uptime/probes/results.json \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "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": "Proberesultaten: [{check_id, location, ok, status_code, response_ms, error, checked_at}]"
    }
  },
  "required": [
    "results"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
POST /workspaces/:workspace_id/uptime.json Een uptimecontrole voor de werkruimte toevoegen (niet aan een site gekoppeld) workspace_uptime_checks_create

Machtiging: uptime.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/uptime.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Weergavenaam (standaard het doel)"
    },
    "kind": {
      "type": "string",
      "description": "http (statuscode), keyword (body bevat), tcp (host:port) of dns (naam wordt omgezet)",
      "enum": [
        "http",
        "keyword",
        "tcp",
        "dns"
      ],
      "default": "http"
    },
    "url": {
      "type": "string",
      "description": "URL voor http-/keyword-controles",
      "examples": [
        "https://example.com/health"
      ]
    },
    "host": {
      "type": "string",
      "description": "Hostnaam voor tcp-/dns-controles"
    },
    "port": {
      "type": "integer",
      "description": "TCP-poort voor tcp-controles"
    },
    "keyword": {
      "type": "string",
      "description": "Tekst die de responsebody moet bevatten (keyword)"
    },
    "expected_status": {
      "type": "integer",
      "description": "Verwachte HTTP-statuscode",
      "default": 200
    },
    "http_method": {
      "type": "string",
      "description": "HTTP-methode",
      "enum": [
        "GET",
        "HEAD"
      ],
      "default": "GET"
    },
    "interval_seconds": {
      "type": "integer",
      "description": "Seconden tussen controles (het minimum van het abonnement geldt, standaard 300 of het minimum)"
    },
    "timeout_seconds": {
      "type": "integer",
      "description": "Seconden voordat een probe een time-out krijgt (1-30)",
      "default": 20
    },
    "public": {
      "type": "boolean",
      "description": "Mag op openbare statuspagina's verschijnen",
      "default": false
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Controle-id (upc_…)"
    },
    "workspace_id": {
      "type": "string"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Site waartoe de controle behoort"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "http, keyword, tcp of 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 of paused"
    },
    "enabled": {
      "type": "boolean"
    },
    "public": {
      "type": "boolean",
      "description": "Mag op statuspagina's verschijnen"
    },
    "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 Alle uptimecontroles in een werkruimte weergeven workspace_uptime_checks_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/uptime.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Alleen controles met deze status",
      "enum": [
        "up",
        "down",
        "pending",
        "paused"
      ]
    },
    "query": {
      "type": "string",
      "description": "Filter op naam of doel"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Controle-id (upc_…)"
      },
      "workspace_id": {
        "type": "string"
      },
      "site_id": {
        "anyOf": [
          {
            "type": "string",
            "description": "Site waartoe de controle behoort"
          },
          {
            "type": "null"
          }
        ]
      },
      "name": {
        "type": "string"
      },
      "kind": {
        "type": "string",
        "description": "http, keyword, tcp of 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 of paused"
      },
      "enabled": {
        "type": "boolean"
      },
      "public": {
        "type": "boolean",
        "description": "Mag op statuspagina's verschijnen"
      },
      "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"
      }
    }
  }
}

Verkeersregels

POST /sites/:site_id/traffic_rules.json Een verkeersregel toevoegen traffic_rules_create

Machtiging: sites.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/traffic_rules.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "list": {
      "type": "string",
      "description": "hostnames, paths, referrers, countries, ip_ranges, user_agents of events",
      "enum": [
        "hostnames",
        "paths",
        "referrers",
        "countries",
        "ip_ranges",
        "user_agents",
        "events"
      ]
    },
    "pattern": {
      "type": "string",
      "description": "Waarde om mee te vergelijken. * is een jokerteken. ip_ranges nemen een IP of CIDR (v4/v6), countries een ISO-code",
      "examples": [
        "/admin/*"
      ]
    },
    "label": {
      "type": "string",
      "description": "Optionele notitie, bijv. \"Kantoor\""
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "list",
    "pattern",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Regel-id"
    },
    "list": {
      "type": "string",
      "description": "hostnames, paths, referrers, countries, ip_ranges, user_agents of events"
    },
    "pattern": {
      "type": "string",
      "description": "Patroon (* jokertekens, CIDR voor ip_ranges)"
    },
    "label": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "mode": {
      "type": "string",
      "description": "block of allow (de modus van de lijst)"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/traffic_rules/:id.json Een verkeersregel verwijderen traffic_rules_delete

Machtiging: sites.manage

Voorbeeld
curl -X DELETE https://privatusanalytics.com/sites/:site_id/traffic_rules/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Regel-id"
    },
    "list": {
      "type": "string",
      "description": "hostnames, paths, referrers, countries, ip_ranges, user_agents of events"
    },
    "pattern": {
      "type": "string",
      "description": "Patroon (* jokertekens, CIDR voor ip_ranges)"
    },
    "label": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "mode": {
      "type": "string",
      "description": "block of allow (de modus van de lijst)"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/traffic_rules.json Verkeersregels weergeven traffic_rules_list

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/traffic_rules.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "list": {
      "type": "string",
      "description": "Alleen regels in deze lijst",
      "enum": [
        "hostnames",
        "paths",
        "referrers",
        "countries",
        "ip_ranges",
        "user_agents",
        "events"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Regel-id"
    },
    "list": {
      "type": "string",
      "description": "hostnames, paths, referrers, countries, ip_ranges, user_agents of events"
    },
    "pattern": {
      "type": "string",
      "description": "Patroon (* jokertekens, CIDR voor ip_ranges)"
    },
    "label": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "mode": {
      "type": "string",
      "description": "block of allow (de modus van de lijst)"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /sites/:site_id/traffic_rules/test.json Testen of een hit zou worden geteld met de huidige regels van de site traffic_rules_test

Machtiging: analytics.read

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/traffic_rules/test.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "Pagina-URL, bijv. https://example.com/a"
    },
    "referrer": {
      "type": "string",
      "description": "Verwijzer-URL of hostnaam"
    },
    "country": {
      "type": "string",
      "description": "ISO-landcode, bijv. US"
    },
    "ip": {
      "type": "string",
      "description": "IP-adres om te testen tegen ip_ranges (niet opgeslagen)"
    },
    "user_agent": {
      "type": "string",
      "description": "User-Agent-string (teruggebracht tot browser en hoofdversie, zoals bij ingest)"
    },
    "event": {
      "type": "string",
      "description": "Naam van de eigen gebeurtenis"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
PATCH /sites/:site_id/traffic_rules/:id.json Een verkeersregel wijzigen traffic_rules_update

Machtiging: sites.manage

Voorbeeld
curl -X PATCH https://privatusanalytics.com/sites/:site_id/traffic_rules/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "pattern": {
      "type": "string",
      "description": "Nieuw patroon"
    },
    "label": {
      "type": "string",
      "description": "Nieuw label"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Regel-id"
    },
    "list": {
      "type": "string",
      "description": "hostnames, paths, referrers, countries, ip_ranges, user_agents of events"
    },
    "pattern": {
      "type": "string",
      "description": "Patroon (* jokertekens, CIDR voor ip_ranges)"
    },
    "label": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "mode": {
      "type": "string",
      "description": "block of allow (de modus van de lijst)"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Verzamelen

POST /api/logs.json Verstuur servertoegangslogs voor AI-crawlerrapportage (JSON {lines: [...]} of gecombineerde logtekst, met de ingest-sleutel van de site als Bearer-token) crawler_logs_create

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X POST https://privatusanalytics.com/api/logs.json \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "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": "Logregels: [{ts, path, status, user_agent}] (max 1000)"
    }
  },
  "required": [
    "lines"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
POST /api/event.json Een browserhit verzamelen (gebruikt door /js/pa.js) ingest_event

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X POST https://privatusanalytics.com/api/event.json \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site": {
      "type": "string",
      "description": "Site-id (pa_…)"
    },
    "type": {
      "type": "string",
      "description": "Type hit",
      "enum": [
        "pageview",
        "event",
        "engagement",
        "vital",
        "click"
      ]
    },
    "url": {
      "type": "string",
      "description": "Volledige pagina-URL"
    },
    "referrer": {
      "type": "string",
      "description": "document.referrer"
    },
    "name": {
      "type": "string",
      "description": "Gebeurtenisnaam (type=event) of naam van de vital"
    },
    "props": {
      "type": "object",
      "additionalProperties": true,
      "description": "Gebeurteniseigenschappen: tot 30 string-/getal-/booleanwaarden",
      "default": {}
    },
    "screen_width": {
      "type": "integer",
      "description": "Schermbreedte in pixels"
    },
    "language": {
      "type": "string",
      "description": "navigator.language"
    },
    "engaged_ms": {
      "type": "integer",
      "description": "Zichtbare tijd op de pagina (engagement)"
    },
    "scroll_depth": {
      "type": "integer",
      "description": "Maximale scrolldiepte in % (engagement)"
    },
    "value": {
      "type": "number",
      "description": "Waarde van de Web Vital (type=vital)"
    },
    "selector": {
      "type": "string",
      "description": "Selector van het aangeklikte element (type=click)"
    },
    "hash_mode": {
      "type": "boolean",
      "description": "Het #fragment behouden (sites met hash-routing)",
      "default": false
    },
    "dnt": {
      "type": "boolean",
      "description": "Do Not Track staat aan",
      "default": false
    },
    "gpc": {
      "type": "boolean",
      "description": "Global Privacy Control staat aan",
      "default": false
    },
    "interacted": {
      "type": "boolean",
      "description": "1 zodra een vertrouwde invoer (aanwijzer, toets, aanraking of wiel) op de pagina is gezien, 0 daarvoor. Geen coördinaten of timing"
    },
    "revenue": {
      "type": "number",
      "description": "Omzet in hele eenheden, bijv. 49.99"
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217-valuta van de omzet"
    }
  },
  "required": [
    "site",
    "type",
    "url"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
POST /api/events.json Server-side gebeurtenissen verzamelen met een ingest-sleutel van de site ingest_events

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X POST https://privatusanalytics.com/api/events.json \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "events": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      },
      "description": "Tot 100 gebeurtenissen"
    }
  },
  "required": [
    "events"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
GET /api/pixel.json Een paginaweergave zonder JavaScript verzamelen (1×1 GIF) ingest_pixel

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl https://privatusanalytics.com/api/pixel.json
Invoer
{
  "type": "object",
  "properties": {},
  "required": []
}
Antwoordgegevens
{
  "type": "object"
}

Warehouse-synchronisatie

POST /workspaces/:workspace_id/warehouses.json Een warehousebestemming toevoegen warehouse_destinations_create

Machtiging: workspace.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/warehouses.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Weergavenaam, bijv. Data lake"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Te versturen sites (pa_…). Leeg verstuurt alle sites"
    },
    "bucket": {
      "type": "string",
      "description": "s3: bucketnaam"
    },
    "region": {
      "type": "string",
      "description": "s3: regio, bijv. us-east-1 (auto voor R2)"
    },
    "prefix": {
      "type": "string",
      "description": "s3/azure: padprefix, bijv. privatus/events"
    },
    "endpoint": {
      "type": "string",
      "description": "s3: https-eindpunt voor S3-compatibele opslag (GCS-interoperabiliteit, R2, MinIO)"
    },
    "access_key_id": {
      "type": "string",
      "description": "s3: access key id"
    },
    "secret_access_key": {
      "type": "string",
      "description": "s3: secret access key (alleen schrijfbaar)"
    },
    "service_account_json": {
      "type": "string",
      "description": "bigquery: JSON-sleutel van het serviceaccount met BigQuery Data Editor (alleen schrijfbaar)"
    },
    "project_id": {
      "type": "string",
      "description": "bigquery: project-id (standaard: uit de sleutel)"
    },
    "dataset": {
      "type": "string",
      "description": "bigquery: dataset-id"
    },
    "table": {
      "type": "string",
      "description": "bigquery/snowflake: tabelnaam (kolommen: schema v1)"
    },
    "account": {
      "type": "string",
      "description": "snowflake: accountidentificatie, bijv. xy12345.us-east-1 of myorg-myaccount"
    },
    "user": {
      "type": "string",
      "description": "snowflake: gebruiker met key-pair-authenticatie"
    },
    "private_key": {
      "type": "string",
      "description": "snowflake: PEM RSA-privésleutel (alleen schrijfbaar)"
    },
    "database": {
      "type": "string",
      "description": "snowflake: database"
    },
    "schema": {
      "type": "string",
      "description": "snowflake: schema"
    },
    "warehouse": {
      "type": "string",
      "description": "snowflake: virtueel warehouse"
    },
    "role": {
      "type": "string",
      "description": "snowflake: rol (optioneel)"
    },
    "sas_url": {
      "type": "string",
      "description": "azure: container-SAS-URL met create-/write-machtiging (alleen schrijfbaar)"
    },
    "kind": {
      "type": "string",
      "description": "s3 (ook GCS/R2/MinIO), bigquery, snowflake of azure",
      "enum": [
        "s3",
        "bigquery",
        "snowflake",
        "azure"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "kind",
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Bestemmings-id, bijv. whd_7Q2K9XH3AB"
    },
    "kind": {
      "type": "string",
      "description": "s3, bigquery, snowflake of azure"
    },
    "name": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "description": "Waar de gegevens naartoe gaan: s3://bucket/prefix, project.dataset.table, account/database.schema.table of de Azure-container"
    },
    "configured": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Namen van instellingen die zijn ingevuld (waarden worden nooit teruggegeven)"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Verstuurde sites (pa_…). Leeg betekent alle sites"
    },
    "schedule": {
      "type": "string",
      "description": "daily: 02:00 UTC, verstuurt de vorige UTC-dag"
    },
    "schema_version": {
      "type": "string",
      "description": "Verstuurd rijschema"
    },
    "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 Een warehousebestemming verwijderen warehouse_destinations_delete

Machtiging: workspace.manage

Voorbeeld
curl -X DELETE https://privatusanalytics.com/warehouses/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Bestemmings-id, bijv. whd_7Q2K9XH3AB"
    },
    "kind": {
      "type": "string",
      "description": "s3, bigquery, snowflake of azure"
    },
    "name": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "description": "Waar de gegevens naartoe gaan: s3://bucket/prefix, project.dataset.table, account/database.schema.table of de Azure-container"
    },
    "configured": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Namen van instellingen die zijn ingevuld (waarden worden nooit teruggegeven)"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Verstuurde sites (pa_…). Leeg betekent alle sites"
    },
    "schedule": {
      "type": "string",
      "description": "daily: 02:00 UTC, verstuurt de vorige UTC-dag"
    },
    "schema_version": {
      "type": "string",
      "description": "Verstuurd rijschema"
    },
    "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 Warehousebestemmingen weergeven warehouse_destinations_list

Machtiging: workspace.manage

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/warehouses.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "description": "Alleen bestemmingen van dit soort",
      "enum": [
        "s3",
        "bigquery",
        "snowflake",
        "azure"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Bestemmings-id, bijv. whd_7Q2K9XH3AB"
      },
      "kind": {
        "type": "string",
        "description": "s3, bigquery, snowflake of azure"
      },
      "name": {
        "type": "string"
      },
      "target": {
        "type": "string",
        "description": "Waar de gegevens naartoe gaan: s3://bucket/prefix, project.dataset.table, account/database.schema.table of de Azure-container"
      },
      "configured": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Namen van instellingen die zijn ingevuld (waarden worden nooit teruggegeven)"
      },
      "site_ids": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Verstuurde sites (pa_…). Leeg betekent alle sites"
      },
      "schedule": {
        "type": "string",
        "description": "daily: 02:00 UTC, verstuurt de vorige UTC-dag"
      },
      "schema_version": {
        "type": "string",
        "description": "Verstuurd rijschema"
      },
      "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 Een warehousebestemming ophalen (zonder geheimen) warehouse_destinations_get

Machtiging: workspace.manage

Voorbeeld
curl https://privatusanalytics.com/warehouses/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Bestemmings-id, bijv. whd_7Q2K9XH3AB"
    },
    "kind": {
      "type": "string",
      "description": "s3, bigquery, snowflake of azure"
    },
    "name": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "description": "Waar de gegevens naartoe gaan: s3://bucket/prefix, project.dataset.table, account/database.schema.table of de Azure-container"
    },
    "configured": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Namen van instellingen die zijn ingevuld (waarden worden nooit teruggegeven)"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Verstuurde sites (pa_…). Leeg betekent alle sites"
    },
    "schedule": {
      "type": "string",
      "description": "daily: 02:00 UTC, verstuurt de vorige UTC-dag"
    },
    "schema_version": {
      "type": "string",
      "description": "Verstuurd rijschema"
    },
    "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 Nu een synchronisatie van één dag in de wachtrij zetten warehouse_destinations_sync

Machtiging: workspace.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/warehouses/:id/sync.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "date": {
      "type": "string",
      "format": "date",
      "description": "UTC-dag om te versturen, bijv. 2026-09-28 (standaard: gisteren)"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Bestemmings-id, bijv. whd_7Q2K9XH3AB"
    },
    "kind": {
      "type": "string",
      "description": "s3, bigquery, snowflake of azure"
    },
    "name": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "description": "Waar de gegevens naartoe gaan: s3://bucket/prefix, project.dataset.table, account/database.schema.table of de Azure-container"
    },
    "configured": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Namen van instellingen die zijn ingevuld (waarden worden nooit teruggegeven)"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Verstuurde sites (pa_…). Leeg betekent alle sites"
    },
    "schedule": {
      "type": "string",
      "description": "daily: 02:00 UTC, verstuurt de vorige UTC-dag"
    },
    "schema_version": {
      "type": "string",
      "description": "Verstuurd rijschema"
    },
    "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 Een warehousebestemming bijwerken (lege geheimen blijven behouden) warehouse_destinations_update

Machtiging: workspace.manage

Voorbeeld
curl -X PATCH https://privatusanalytics.com/warehouses/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Weergavenaam, bijv. Data lake"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Te versturen sites (pa_…). Leeg verstuurt alle sites"
    },
    "bucket": {
      "type": "string",
      "description": "s3: bucketnaam"
    },
    "region": {
      "type": "string",
      "description": "s3: regio, bijv. us-east-1 (auto voor R2)"
    },
    "prefix": {
      "type": "string",
      "description": "s3/azure: padprefix, bijv. privatus/events"
    },
    "endpoint": {
      "type": "string",
      "description": "s3: https-eindpunt voor S3-compatibele opslag (GCS-interoperabiliteit, R2, MinIO)"
    },
    "access_key_id": {
      "type": "string",
      "description": "s3: access key id"
    },
    "secret_access_key": {
      "type": "string",
      "description": "s3: secret access key (alleen schrijfbaar)"
    },
    "service_account_json": {
      "type": "string",
      "description": "bigquery: JSON-sleutel van het serviceaccount met BigQuery Data Editor (alleen schrijfbaar)"
    },
    "project_id": {
      "type": "string",
      "description": "bigquery: project-id (standaard: uit de sleutel)"
    },
    "dataset": {
      "type": "string",
      "description": "bigquery: dataset-id"
    },
    "table": {
      "type": "string",
      "description": "bigquery/snowflake: tabelnaam (kolommen: schema v1)"
    },
    "account": {
      "type": "string",
      "description": "snowflake: accountidentificatie, bijv. xy12345.us-east-1 of myorg-myaccount"
    },
    "user": {
      "type": "string",
      "description": "snowflake: gebruiker met key-pair-authenticatie"
    },
    "private_key": {
      "type": "string",
      "description": "snowflake: PEM RSA-privésleutel (alleen schrijfbaar)"
    },
    "database": {
      "type": "string",
      "description": "snowflake: database"
    },
    "schema": {
      "type": "string",
      "description": "snowflake: schema"
    },
    "warehouse": {
      "type": "string",
      "description": "snowflake: virtueel warehouse"
    },
    "role": {
      "type": "string",
      "description": "snowflake: rol (optioneel)"
    },
    "sas_url": {
      "type": "string",
      "description": "azure: container-SAS-URL met create-/write-machtiging (alleen schrijfbaar)"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Bestemmings-id, bijv. whd_7Q2K9XH3AB"
    },
    "kind": {
      "type": "string",
      "description": "s3, bigquery, snowflake of azure"
    },
    "name": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "description": "Waar de gegevens naartoe gaan: s3://bucket/prefix, project.dataset.table, account/database.schema.table of de Azure-container"
    },
    "configured": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Namen van instellingen die zijn ingevuld (waarden worden nooit teruggegeven)"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Verstuurde sites (pa_…). Leeg betekent alle sites"
    },
    "schedule": {
      "type": "string",
      "description": "daily: 02:00 UTC, verstuurt de vorige UTC-dag"
    },
    "schema_version": {
      "type": "string",
      "description": "Verstuurd rijschema"
    },
    "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"
    }
  }
}

Webhooks

GET /workspaces/:workspace_id/webhooks/:webhook_id/deliveries.json Bezorgingen van een webhook weergeven webhook_deliveries_list

Machtiging: workspace.manage

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:webhook_id/deliveries.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Alleen geslaagde of mislukte bezorgingen",
      "enum": [
        "succeeded",
        "failed"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "webhook_id": {
      "type": "string",
      "description": "Webhook van de bron"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "workspace_id",
    "webhook_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Bezorg-id, bijv. whd_123"
      },
      "event": {
        "type": "string"
      },
      "status": {
        "type": "string",
        "description": "pending, succeeded of failed"
      },
      "status_code": {
        "anyOf": [
          {
            "type": "integer",
            "description": "HTTP-status van de laatste poging"
          },
          {
            "type": "null"
          }
        ]
      },
      "error": {
        "anyOf": [
          {
            "type": "string",
            "description": "Verbindingsfout van de laatste poging"
          },
          {
            "type": "null"
          }
        ]
      },
      "attempt": {
        "type": "integer"
      },
      "duration_ms": {
        "anyOf": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ]
      },
      "payload": {
        "type": "object"
      },
      "response_body": {
        "anyOf": [
          {
            "type": "string",
            "description": "Eerste 2.000 tekens"
          },
          {
            "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 Een bezorging opnieuw versturen webhook_deliveries_redeliver

Machtiging: workspace.manage

Voorbeeld
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 '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "webhook_id": {
      "type": "string",
      "description": "Webhook van de bron"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "workspace_id",
    "webhook_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Bezorg-id, bijv. whd_123"
    },
    "event": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "description": "pending, succeeded of failed"
    },
    "status_code": {
      "anyOf": [
        {
          "type": "integer",
          "description": "HTTP-status van de laatste poging"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "string",
          "description": "Verbindingsfout van de laatste poging"
        },
        {
          "type": "null"
        }
      ]
    },
    "attempt": {
      "type": "integer"
    },
    "duration_ms": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "payload": {
      "type": "object"
    },
    "response_body": {
      "anyOf": [
        {
          "type": "string",
          "description": "Eerste 2.000 tekens"
        },
        {
          "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 Een webhook-eindpunt toevoegen webhooks_create

Machtiging: workspace.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/webhooks.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "HTTPS-eindpunt dat gePOSTe JSON ontvangt",
      "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": "Te versturen gebeurtenissen"
    },
    "enabled": {
      "type": "boolean",
      "description": "Bezorgingen versturen",
      "default": true
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "url",
    "events",
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Webhook-id, bijv. wh_7Q2K9XH3AB"
    },
    "url": {
      "type": "string"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "enabled": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "description": "active, failing of disabled"
    },
    "secret": {
      "type": "string",
      "description": "Ondertekeningsgeheim voor 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 Een webhook verwijderen webhooks_delete

Machtiging: workspace.manage

Voorbeeld
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Webhook-id, bijv. wh_7Q2K9XH3AB"
    },
    "url": {
      "type": "string"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "enabled": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "description": "active, failing of disabled"
    },
    "secret": {
      "type": "string",
      "description": "Ondertekeningsgeheim voor 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 Webhooks weergeven webhooks_list

Machtiging: workspace.manage

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/webhooks.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Webhook-id, bijv. wh_7Q2K9XH3AB"
      },
      "url": {
        "type": "string"
      },
      "events": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "enabled": {
        "type": "boolean"
      },
      "status": {
        "type": "string",
        "description": "active, failing of disabled"
      },
      "secret": {
        "type": "string",
        "description": "Ondertekeningsgeheim voor 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 Een webhook ophalen webhooks_get

Machtiging: workspace.manage

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Webhook-id, bijv. wh_7Q2K9XH3AB"
    },
    "url": {
      "type": "string"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "enabled": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "description": "active, failing of disabled"
    },
    "secret": {
      "type": "string",
      "description": "Ondertekeningsgeheim voor 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 Een testbezorging versturen webhooks_test

Machtiging: workspace.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:id/test.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Bezorg-id, bijv. whd_123"
    },
    "event": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "description": "pending, succeeded of failed"
    },
    "status_code": {
      "anyOf": [
        {
          "type": "integer",
          "description": "HTTP-status van de laatste poging"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "string",
          "description": "Verbindingsfout van de laatste poging"
        },
        {
          "type": "null"
        }
      ]
    },
    "attempt": {
      "type": "integer"
    },
    "duration_ms": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "payload": {
      "type": "object"
    },
    "response_body": {
      "anyOf": [
        {
          "type": "string",
          "description": "Eerste 2.000 tekens"
        },
        {
          "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 Een webhook bijwerken (gebeurtenissen, URL, ingeschakeld, geheim roteren) webhooks_update

Machtiging: workspace.manage

Voorbeeld
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "HTTPS-eindpunt"
    },
    "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": "Te versturen gebeurtenissen"
    },
    "enabled": {
      "type": "boolean",
      "description": "Bezorgingen versturen"
    },
    "rotate_secret": {
      "type": "boolean",
      "description": "Het ondertekeningsgeheim vervangen",
      "default": false
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Webhook-id, bijv. wh_7Q2K9XH3AB"
    },
    "url": {
      "type": "string"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "enabled": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "description": "active, failing of disabled"
    },
    "secret": {
      "type": "string",
      "description": "Ondertekeningsgeheim voor 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"
    }
  }
}

Website

GET /changelog.json Changelog-items weergeven changelog_list

Gepubliceerde productupdates, nieuwste eerst. Ook beschikbaar als RSS op /changelog.rss.

Machtiging: public

Voorbeeld
curl https://privatusanalytics.com/changelog.json
Invoer
{
  "type": "object",
  "properties": {
    "area": {
      "type": "string",
      "description": "Alleen items voor dit productgebied",
      "enum": [
        "product",
        "dashboard",
        "tracker",
        "privacy",
        "api",
        "integrations",
        "billing",
        "docs"
      ]
    },
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": []
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Item-id, bijv. chg_7Q2K9XH3AB"
      },
      "title": {
        "type": "string",
        "description": "Kop"
      },
      "area": {
        "type": "string",
        "description": "Productgebied, bijv. dashboard, tracker, api"
      },
      "body": {
        "type": "string",
        "description": "Markdown-body"
      },
      "published_at": {
        "type": "string",
        "format": "date-time",
        "description": "Publicatietijd"
      },
      "url": {
        "type": "string",
        "description": "Permanente link"
      }
    }
  }
}
GET /changelog/:id.json Een changelog-item ophalen changelog_get

Machtiging: public

Voorbeeld
curl https://privatusanalytics.com/changelog/:id.json
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Item-id, bijv. chg_7Q2K9XH3AB"
    },
    "title": {
      "type": "string",
      "description": "Kop"
    },
    "area": {
      "type": "string",
      "description": "Productgebied, bijv. dashboard, tracker, api"
    },
    "body": {
      "type": "string",
      "description": "Markdown-body"
    },
    "published_at": {
      "type": "string",
      "format": "date-time",
      "description": "Publicatietijd"
    },
    "url": {
      "type": "string",
      "description": "Permanente link"
    }
  }
}
POST /contact.json Een bericht sturen naar het Privatus Analytics-team contact_create

Browserclients sturen een Cloudflare Turnstile-token mee als `cf-turnstile-response`. Verzoeken met een API-token hebben dat niet nodig.

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X POST https://privatusanalytics.com/contact.json \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Je naam",
      "examples": [
        "Ada Lovelace"
      ]
    },
    "email": {
      "type": "string",
      "description": "Waar we op kunnen antwoorden",
      "examples": [
        "[email protected]"
      ]
    },
    "company": {
      "type": "string",
      "description": "Bedrijf of organisatie (optioneel)"
    },
    "topic": {
      "type": "string",
      "description": "Waar het bericht over gaat",
      "enum": [
        "general",
        "sales",
        "support",
        "privacy",
        "security",
        "partnerships",
        "press"
      ],
      "default": "general"
    },
    "message": {
      "type": "string",
      "description": "Je bericht (10 tot 5.000 tekens)"
    },
    "website": {
      "type": "string",
      "description": "Laat leeg. Spamval voor bots. Ingevulde inzendingen worden weggegooid"
    }
  },
  "required": [
    "name",
    "email",
    "message"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "received": {
      "type": "boolean",
      "description": "Altijd true wanneer de inzending is geaccepteerd"
    },
    "message": {
      "type": "string",
      "description": "Wat er hierna gebeurt"
    }
  }
}
POST /newsletter/confirm.json Een nieuwsbriefabonnement bevestigen (ondertekend token) newsletter_confirm

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X POST https://privatusanalytics.com/newsletter/confirm.json \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Ondertekend token uit de bevestigingsmail"
    }
  },
  "required": [
    "token"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "received": {
      "type": "boolean",
      "description": "Altijd true wanneer de inzending is geaccepteerd"
    },
    "message": {
      "type": "string",
      "description": "Wat er hierna gebeurt"
    }
  }
}
POST /newsletter.json Een e-mailadres abonneren op de nieuwsbrief newsletter_subscribe

Browserclients sturen een Cloudflare Turnstile-token mee als `cf-turnstile-response`. Verzoeken met een API-token hebben dat niet nodig.

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X POST https://privatusanalytics.com/newsletter.json \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "E-mailadres om te abonneren. Er wordt een bevestigingslink naartoe gemaild",
      "examples": [
        "[email protected]"
      ]
    },
    "website": {
      "type": "string",
      "description": "Laat leeg. Spamval voor bots. Ingevulde inzendingen worden weggegooid"
    }
  },
  "required": [
    "email"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "received": {
      "type": "boolean",
      "description": "Altijd true wanneer de inzending is geaccepteerd"
    },
    "message": {
      "type": "string",
      "description": "Wat er hierna gebeurt"
    }
  }
}
POST /newsletter/unsubscribe.json Afmelden met een ondertekend linktoken newsletter_unsubscribe

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X POST https://privatusanalytics.com/newsletter/unsubscribe.json \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Ondertekend token uit de afmeldlink"
    },
    "list": {
      "type": "string",
      "description": "newsletter (standaard: de lijst waarvoor de link was) of marketing (alle marketing-e-mail)",
      "enum": [
        "newsletter",
        "marketing"
      ]
    }
  },
  "required": [
    "token"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "received": {
      "type": "boolean",
      "description": "Altijd true wanneer de inzending is geaccepteerd"
    },
    "message": {
      "type": "string",
      "description": "Wat er hierna gebeurt"
    }
  }
}
GET /pricing.json Abonnementen, prijzen en abonnementslimieten ophalen pricing_get

Dezelfde gegevens als de prijspagina: de gebeurtenissenladder, elke abonnementslimiet en wat als gebeurtenis telt. Geef events mee om het passende niveau te krijgen.

Machtiging: public

Voorbeeld
curl https://privatusanalytics.com/pricing.json
Invoer
{
  "type": "object",
  "properties": {
    "events": {
      "type": "integer",
      "description": "Verwachte paginaweergaven plus eigen gebeurtenissen per maand. Geeft het passende niveau terug als `recommendation`",
      "examples": [
        750000
      ]
    },
    "interval": {
      "type": "string",
      "description": "Factuurinterval voor de getoonde prijzen: month, of year (10x de maandprijs)",
      "enum": [
        "month",
        "year"
      ],
      "default": "month"
    }
  },
  "required": []
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "currency": {
      "type": "string",
      "description": "Valuta van elke prijs (USD)"
    },
    "tax_included": {
      "type": "boolean",
      "description": "Altijd true. Prijzen zijn inclusief btw of omzetbelasting, dus de getoonde prijs is de prijs die je betaalt"
    },
    "interval": {
      "type": "string",
      "description": "month of year. Prijzen gelden voor dit interval"
    },
    "annual_multiplier": {
      "type": "integer",
      "description": "Jaarprijs = maandprijs x dit (twee maanden gratis)"
    },
    "free_events": {
      "type": "integer",
      "description": "Gebeurtenissen per maand inbegrepen in het Gratis abonnement"
    },
    "badge_bonus": {
      "type": "integer",
      "description": "Extra gratis gebeurtenissen per maand als de optionele badge wordt getoond"
    },
    "tiers": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Gebeurtenissenladder: { events, pro, business }-prijzen voor het interval (pro is null waar alleen Business wordt aangeboden), plus de maandprijzen"
    },
    "plans": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Abonnementen met { id, name, from_price, limits }. Limieten van null betekenen onbeperkt"
    },
    "counted": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Wat als factureerbare gebeurtenis telt"
    },
    "not_counted": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Wat nooit meetelt voor het verbruik"
    },
    "recommendation": {
      "anyOf": [
        {
          "type": "object",
          "description": "{ events, plan, tier_events, price } voor de `events`-invoer, of null als er geen volume is opgegeven"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
GET /status.json De huidige systeemstatus ophalen status_get

Gezondheid van database, Redis en achtergrondjobs, hoogstens elke 15 seconden gecontroleerd.

Machtiging: public

Voorbeeld
curl https://privatusanalytics.com/status.json
Invoer
{
  "type": "object",
  "properties": {
    "fresh": {
      "type": "boolean",
      "description": "Sla de cache van 15 seconden over en controleer nu opnieuw",
      "default": false
    }
  },
  "required": []
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Algemeen: operational, degraded of outage"
    },
    "checked_at": {
      "type": "string",
      "format": "date-time",
      "description": "Wanneer de controles liepen (tot 15 s gecachet)"
    },
    "components": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Per component: { id, name, status, detail, latency_ms }, plus queue_latency_s en queue_depth voor wachtrijen"
    }
  }
}
GET /tools/header-checker.json De Referrer-Policy en CSP van een pagina controleren voor analytics tools_header_check

Machtiging: public

Voorbeeld
curl https://privatusanalytics.com/tools/header-checker.json
Invoer
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "Openbare pagina om te controleren (http of https)",
      "examples": [
        "https://example.com"
      ]
    }
  },
  "required": [
    "url"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "Uiteindelijke URL na redirects"
    },
    "status": {
      "type": "integer",
      "description": "HTTP-status van het laatste antwoord"
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Controles: { check, value, level (ok, warn, info), note }"
    }
  }
}
GET /tools/privacy-policy-generator.json Een alinea voor een privacybeleid opstellen voor Privatus Analytics tools_privacy_policy

Machtiging: public

Voorbeeld
curl https://privatusanalytics.com/tools/privacy-policy-generator.json
Invoer
{
  "type": "object",
  "properties": {
    "site_name": {
      "type": "string",
      "description": "De naam van je website of bedrijf",
      "examples": [
        "Example Books"
      ]
    },
    "contact_email": {
      "type": "string",
      "description": "Te vermelden privacycontact (optioneel)"
    },
    "honors_gpc": {
      "type": "boolean",
      "description": "Of Do Not Track en Global Privacy Control worden gehonoreerd (de standaard)",
      "default": true
    }
  },
  "required": [
    "site_name"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "site_name": {
      "type": "string",
      "description": "Invoer: site- of bedrijfsnaam"
    },
    "paragraphs": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "De beleidstekst, één alinea per item"
    },
    "text": {
      "type": "string",
      "description": "De alinea's samengevoegd met lege regels"
    }
  }
}
GET /tools/qr-code.json Een QR-code als SVG genereren tools_qr_code

Machtiging: public

Voorbeeld
curl https://privatusanalytics.com/tools/qr-code.json
Invoer
{
  "type": "object",
  "properties": {
    "text": {
      "type": "string",
      "description": "URL of tekst om te coderen (tot 1.000 tekens)",
      "examples": [
        "https://example.com/?utm_source=poster"
      ]
    },
    "level": {
      "type": "string",
      "description": "Foutcorrectie: l (7%), m (15%), q (25%), h (30%)",
      "enum": [
        "l",
        "m",
        "q",
        "h"
      ],
      "default": "m"
    }
  },
  "required": [
    "text"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "text": {
      "type": "string",
      "description": "De gecodeerde tekst"
    },
    "level": {
      "type": "string",
      "description": "Niveau van foutcorrectie"
    },
    "size": {
      "type": "integer",
      "description": "Modules per zijde"
    },
    "svg": {
      "type": "string",
      "description": "Zelfstandig SVG-document"
    }
  }
}
GET /tools/tracker-scanner.json Cookies en bekende trackers op een pagina weergeven tools_tracker_scan

Machtiging: public

Voorbeeld
curl https://privatusanalytics.com/tools/tracker-scanner.json
Invoer
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "Openbare pagina om te scannen (http of https)",
      "examples": [
        "https://example.com"
      ]
    }
  },
  "required": [
    "url"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "Uiteindelijke URL na redirects"
    },
    "status": {
      "type": "integer",
      "description": "HTTP-status van het laatste antwoord"
    },
    "truncated": {
      "type": "boolean",
      "description": "True wanneer de pagina groter was dan 1 MB en alleen de eerste 1 MB is gescand"
    },
    "cookies": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Cookies gezet door het HTTP-antwoord: { name, domain, path, expires, secure, http_only, same_site }. Waarden worden nooit teruggegeven"
    },
    "trackers": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Bekende tools waarnaar de pagina verwijst: { name, category, match, evidence }"
    },
    "third_party_hosts": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Andere domeinen waarvan de pagina bronnen laadt"
    }
  }
}
GET /tools/utm-builder.json Een campagne-URL met UTM-parameters bouwen tools_utm_builder

Machtiging: public

Voorbeeld
curl https://privatusanalytics.com/tools/utm-builder.json
Invoer
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "URL van de landingspagina",
      "examples": [
        "https://example.com/pricing"
      ]
    },
    "source": {
      "type": "string",
      "description": "utm_source: waar het verkeer vandaan komt",
      "examples": [
        "newsletter"
      ]
    },
    "medium": {
      "type": "string",
      "description": "utm_medium: het kanaal, bijv. email, cpc, social",
      "examples": [
        "email"
      ]
    },
    "campaign": {
      "type": "string",
      "description": "utm_campaign: de campagnenaam",
      "examples": [
        "fall_launch"
      ]
    },
    "term": {
      "type": "string",
      "description": "utm_term: zoekwoord voor betaald zoeken (optioneel)"
    },
    "content": {
      "type": "string",
      "description": "utm_content: welke link of creatie (optioneel)"
    }
  },
  "required": [
    "url",
    "source",
    "medium",
    "campaign"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "De URL van de landingspagina met UTM-parameters"
    },
    "params": {
      "type": "object",
      "description": "De toegevoegde UTM-parameters"
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Problemen die het oplossen waard zijn (hoofdletters, spaties, persoonsgegevens)"
    }
  }
}
POST /waitlist.json Je op een wachtlijst zetten (EU-hosting) waitlist_join

Browserclients sturen een Cloudflare Turnstile-token mee als `cf-turnstile-response`. Verzoeken met een API-token hebben dat niet nodig.

Machtiging: public · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X POST https://privatusanalytics.com/waitlist.json \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "E-mailadres om te informeren",
      "examples": [
        "[email protected]"
      ]
    },
    "list": {
      "type": "string",
      "description": "Welke wachtlijst",
      "enum": [
        "eu_hosting"
      ],
      "default": "eu_hosting"
    },
    "website": {
      "type": "string",
      "description": "Laat leeg. Spamval voor bots. Ingevulde inzendingen worden weggegooid"
    }
  },
  "required": [
    "email"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "received": {
      "type": "boolean",
      "description": "Altijd true wanneer de inzending is geaccepteerd"
    },
    "message": {
      "type": "string",
      "description": "Wat er hierna gebeurt"
    }
  }
}

Werkruimtes

GET /workspaces/:workspace_id/white_label.json Het white-labelmerk ophalen white_label_get

Machtiging: workspace.manage

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/white_label.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "brand_name": {
      "anyOf": [
        {
          "type": "string",
          "description": "Naam die in plaats van Privatus Analytics wordt getoond"
        },
        {
          "type": "null"
        }
      ]
    },
    "brand_logo_url": {
      "anyOf": [
        {
          "type": "string",
          "description": "URL van de logoafbeelding"
        },
        {
          "type": "null"
        }
      ]
    },
    "brand_color": {
      "anyOf": [
        {
          "type": "string",
          "description": "Accentkleur"
        },
        {
          "type": "null"
        }
      ]
    },
    "hide_branding": {
      "type": "boolean",
      "description": "Privatus Analytics-branding is verborgen"
    },
    "available": {
      "type": "boolean",
      "description": "Het abonnement omvat white label"
    },
    "active": {
      "type": "boolean",
      "description": "Het merk wordt momenteel toegepast"
    }
  }
}
PATCH /workspaces/:workspace_id/white_label.json Het white-labelmerk instellen voor gedeelde dashboards en e-mailrapporten (Business) white_label_update

Machtiging: workspace.manage

Voorbeeld
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/white_label.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "brand_name": {
      "type": "string",
      "description": "Naam die in plaats van Privatus Analytics wordt getoond (leeg verwijdert hem)"
    },
    "brand_logo_url": {
      "type": "string",
      "description": "https-URL van een logoafbeelding (leeg verwijdert hem)"
    },
    "brand_color": {
      "type": "string",
      "description": "Accentkleur, bijv. #06755b"
    },
    "hide_branding": {
      "type": "boolean",
      "description": "\"Privatus Analytics\" verbergen op gedeelde dashboards en e-mailrapporten"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "brand_name": {
      "anyOf": [
        {
          "type": "string",
          "description": "Naam die in plaats van Privatus Analytics wordt getoond"
        },
        {
          "type": "null"
        }
      ]
    },
    "brand_logo_url": {
      "anyOf": [
        {
          "type": "string",
          "description": "URL van de logoafbeelding"
        },
        {
          "type": "null"
        }
      ]
    },
    "brand_color": {
      "anyOf": [
        {
          "type": "string",
          "description": "Accentkleur"
        },
        {
          "type": "null"
        }
      ]
    },
    "hide_branding": {
      "type": "boolean",
      "description": "Privatus Analytics-branding is verborgen"
    },
    "available": {
      "type": "boolean",
      "description": "Het abonnement omvat white label"
    },
    "active": {
      "type": "boolean",
      "description": "Het merk wordt momenteel toegepast"
    }
  }
}
GET /workspaces/:workspace_id/security.json De beveiligingsinstellingen van de werkruimte ophalen workspace_security_get

Machtiging: workspace.manage

Voorbeeld
curl https://privatusanalytics.com/workspaces/:workspace_id/security.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "enforce_2fa": {
      "type": "boolean",
      "description": "Leden moeten 2FA instellen"
    },
    "login_methods": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Toegestane aanmeldmethoden"
    },
    "session_ttl_hours": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Sessieduur (null = geen)"
        },
        {
          "type": "null"
        }
      ]
    },
    "app_ip_allowlist": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Toegestane IP's/CIDR's (leeg = overal)"
    },
    "support_access_until": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Privatus Analytics-support mag de werkruimte bekijken tot"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
PATCH /workspaces/:workspace_id/security.json De beveiligingsinstellingen van de werkruimte bijwerken (2FA, aanmeldmethoden, sessieduur, IP-allowlist, supporttoegang) workspace_security_update

Machtiging: workspace.manage

Voorbeeld
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/security.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "enforce_2fa": {
      "type": "boolean",
      "description": "Leden verplichten 2FA in te stellen"
    },
    "login_methods": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "password",
          "magic_link",
          "passkey",
          "google",
          "github",
          "sso"
        ]
      },
      "description": "Toegestane aanmeldmethoden"
    },
    "session_ttl_hours": {
      "type": "integer",
      "description": "Leden na zoveel uur afmelden (0 = geen limiet)"
    },
    "app_ip_allowlist": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Sta app- en API-toegang alleen toe vanaf deze IP's/CIDR's (Business). Leeg = overal"
    },
    "support_access": {
      "type": "boolean",
      "description": "Laat Privatus Analytics-support de werkruimte 7 dagen bekijken"
    },
    "workspace_id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "enforce_2fa": {
      "type": "boolean",
      "description": "Leden moeten 2FA instellen"
    },
    "login_methods": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Toegestane aanmeldmethoden"
    },
    "session_ttl_hours": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Sessieduur (null = geen)"
        },
        {
          "type": "null"
        }
      ]
    },
    "app_ip_allowlist": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Toegestane IP's/CIDR's (leeg = overal)"
    },
    "support_access_until": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Privatus Analytics-support mag de werkruimte bekijken tot"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
POST /workspaces.json Een werkruimte aanmaken (jij wordt de eigenaar) workspaces_create

Machtiging: member · Alleen HTTP (geen MCP-tool)

Voorbeeld
curl -X POST https://privatusanalytics.com/workspaces.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Naam van de werkruimte",
      "examples": [
        "Acme Inc"
      ]
    },
    "timezone": {
      "type": "string",
      "description": "Standaardtijdzone voor rapportage (standaard die van de gebruiker)"
    },
    "currency": {
      "type": "string",
      "description": "Standaardvaluta (ISO 4217)",
      "default": "USD"
    },
    "how_heard": {
      "type": "string",
      "description": "Hoe je over ons hebt gehoord"
    }
  },
  "required": [
    "name"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "timezone": {
      "type": "string",
      "description": "Standaardtijdzone voor rapportage"
    },
    "currency": {
      "type": "string",
      "description": "Standaardvaluta"
    },
    "plan": {
      "type": "string",
      "description": "free, pro, business of enterprise"
    },
    "plan_events": {
      "type": "integer",
      "description": "Gebeurtenissen per maand inbegrepen in het abonnement"
    },
    "subscription_status": {
      "type": "string"
    },
    "role": {
      "type": "string",
      "description": "Jouw rol in deze werkruimte"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /workspaces/:id.json Een werkruimte en al zijn sites verwijderen (alleen eigenaar, zegt elk abonnement op) workspaces_delete

Machtiging: workspace.manage

Voorbeeld
curl -X DELETE https://privatusanalytics.com/workspaces/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "confirm": {
      "type": "string",
      "description": "Typ de naam van de werkruimte ter bevestiging"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "confirm",
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "timezone": {
      "type": "string",
      "description": "Standaardtijdzone voor rapportage"
    },
    "currency": {
      "type": "string",
      "description": "Standaardvaluta"
    },
    "plan": {
      "type": "string",
      "description": "free, pro, business of enterprise"
    },
    "plan_events": {
      "type": "integer",
      "description": "Gebeurtenissen per maand inbegrepen in het abonnement"
    },
    "subscription_status": {
      "type": "string"
    },
    "role": {
      "type": "string",
      "description": "Jouw rol in deze werkruimte"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /workspaces.json Je werkruimtes weergeven workspaces_list

Machtiging: member

Voorbeeld
curl https://privatusanalytics.com/workspaces.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "page": {
      "type": "integer",
      "description": "Pagina (vanaf 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultaten per pagina (max 100)"
    }
  },
  "required": []
}
Antwoordgegevens
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
      },
      "name": {
        "type": "string"
      },
      "timezone": {
        "type": "string",
        "description": "Standaardtijdzone voor rapportage"
      },
      "currency": {
        "type": "string",
        "description": "Standaardvaluta"
      },
      "plan": {
        "type": "string",
        "description": "free, pro, business of enterprise"
      },
      "plan_events": {
        "type": "integer",
        "description": "Gebeurtenissen per maand inbegrepen in het abonnement"
      },
      "subscription_status": {
        "type": "string"
      },
      "role": {
        "type": "string",
        "description": "Jouw rol in deze werkruimte"
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
GET /workspaces/:id.json Een werkruimte ophalen workspaces_get

Machtiging: member

Voorbeeld
curl https://privatusanalytics.com/workspaces/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "timezone": {
      "type": "string",
      "description": "Standaardtijdzone voor rapportage"
    },
    "currency": {
      "type": "string",
      "description": "Standaardvaluta"
    },
    "plan": {
      "type": "string",
      "description": "free, pro, business of enterprise"
    },
    "plan_events": {
      "type": "integer",
      "description": "Gebeurtenissen per maand inbegrepen in het abonnement"
    },
    "subscription_status": {
      "type": "string"
    },
    "role": {
      "type": "string",
      "description": "Jouw rol in deze werkruimte"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /workspaces/:id.json Werkruimte-instellingen bijwerken workspaces_update

Machtiging: workspace.manage

Voorbeeld
curl -X PATCH https://privatusanalytics.com/workspaces/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Naam van de werkruimte"
    },
    "timezone": {
      "type": "string",
      "description": "Standaardtijdzone voor rapportage"
    },
    "currency": {
      "type": "string",
      "description": "Standaardvaluta (ISO 4217)"
    },
    "id": {
      "type": "string",
      "description": "Id van de bron"
    }
  },
  "required": [
    "id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Werkruimte-id, bijv. ws_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "timezone": {
      "type": "string",
      "description": "Standaardtijdzone voor rapportage"
    },
    "currency": {
      "type": "string",
      "description": "Standaardvaluta"
    },
    "plan": {
      "type": "string",
      "description": "free, pro, business of enterprise"
    },
    "plan_events": {
      "type": "integer",
      "description": "Gebeurtenissen per maand inbegrepen in het abonnement"
    },
    "subscription_status": {
      "type": "string"
    },
    "role": {
      "type": "string",
      "description": "Jouw rol in deze werkruimte"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Zoeken

GET /sites/:site_id/search.json Zoekrapport: klikken, vertoningen, CTR, positie, topzoekopdrachten en -pagina's, landingspagina's en kansen search_report

Machtiging: analytics.read

Voorbeeld
curl https://privatusanalytics.com/sites/:site_id/search.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Invoer
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Voorinstelling voor datumbereik. Gebruik custom met 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": "Begin van aangepast bereik (tijdzone van de site)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepast bereik, inclusief"
    },
    "compare": {
      "type": "string",
      "description": "Vergelijkingsperiode",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Begin van aangepaste vergelijking"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Einde van aangepaste vergelijking"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Weekdagen van de vergelijking uitlijnen",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Verpak voorwaarden in {\"any\": [...]} voor OF.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Een opgeslagen segment toepassen (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Geïmporteerde historische gegevens toevoegen (datums vóór de eerste eigen gebeurtenis, genegeerd als filters of een segment zijn toegepast)",
      "default": false
    },
    "provider": {
      "type": "string",
      "description": "google (Search Console) of bing",
      "enum": [
        "google",
        "bing"
      ],
      "default": "google"
    },
    "limit": {
      "type": "integer",
      "description": "Rijen per tabel (max 100)",
      "default": 25
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
POST /sites/:site_id/search/connections.json Een Search Console-property of Bing-site koppelen search_connect

Machtiging: sites.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/search/connections.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "description": "google of bing",
      "enum": [
        "google",
        "bing"
      ],
      "default": "google"
    },
    "property": {
      "type": "string",
      "description": "Search Console-property (bijv. sc-domain:example.com) of Bing-site-URL",
      "examples": [
        "sc-domain:example.com"
      ]
    },
    "bing_api_key": {
      "type": "string",
      "description": "Je eigen API-sleutel van Bing Webmaster Tools (Settings > API access). Verplicht wanneer provider bing is. Wordt versleuteld opgeslagen en nooit teruggegeven."
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "property",
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "description": "google of bing"
    },
    "property": {
      "type": "string",
      "description": "Search Console-property of Bing-site-URL"
    },
    "status": {
      "type": "string",
      "description": "active of 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 Search Console of Bing ontkoppelen en de gegevens ervan verwijderen search_disconnect

Machtiging: sites.manage

Voorbeeld
curl -X DELETE https://privatusanalytics.com/sites/:site_id/search/connections/:provider.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    },
    "provider": {
      "type": "string",
      "description": "Provider van de bron"
    }
  },
  "required": [
    "site_id",
    "provider"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "description": "google of bing"
    },
    "property": {
      "type": "string",
      "description": "Search Console-property of Bing-site-URL"
    },
    "status": {
      "type": "string",
      "description": "active of 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 Properties weergeven die je kunt koppelen (Search Console heeft een Google-toestemming vanuit de browser nodig) search_properties

Machtiging: sites.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/search/properties.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "description": "google of bing",
      "enum": [
        "google",
        "bing"
      ],
      "default": "google"
    },
    "bing_api_key": {
      "type": "string",
      "description": "Je eigen API-sleutel van Bing Webmaster Tools (Settings > API access). Verplicht wanneer provider bing is. Wordt alleen gebruikt om de sites weer te geven die de sleutel kan zien."
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object"
}
POST /sites/:site_id/search/sync.json Nu zoekgegevens importeren search_sync

Machtiging: sites.manage

Voorbeeld
curl -X POST https://privatusanalytics.com/sites/:site_id/search/sync.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Invoer
{
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "description": "google of bing",
      "enum": [
        "google",
        "bing"
      ],
      "default": "google"
    },
    "site_id": {
      "type": "string",
      "description": "Site-id, bijv. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Antwoordgegevens
{
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "description": "google of bing"
    },
    "property": {
      "type": "string",
      "description": "Search Console-property of Bing-site-URL"
    },
    "status": {
      "type": "string",
      "description": "active of error"
    },
    "last_synced_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}