:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"creation_method": {
"anyOf": [
{
"description": "* `ai` - AI draft\n* `template` - Template\n* `scratch` - From scratch",
"enum": ["ai", "template", "scratch"],
"type": "string"
},
{
"type": "null"
}
],
"description": "How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Only the app can answer this, so a request from anywhere else reports the calling surface instead of whatever it sends here. Ignored on update.\n\n* `ai` - AI draft\n* `template` - Template\n* `scratch` - From scratch"
},
"credit_limit": {
"anyOf": [
{
"maximum": 2147483647,
"minimum": 1,
"type": "number"
},
{
"type": "null"
}
],
"description": "Optional cap on this scanner's own credit spend per billing period. Null means no scanner-level cap. When reached, this scanner stops scanning until the period resets. It stays enabled and does not scan the sessions it skipped."
},
"description": {
"description": "Free-form description shown in the scanner management UI.",
"maxLength": 1000,
"type": "string"
},
"emits_signals": {
"description": "When true, the prompt is augmented with the Signal side mission and the scanner emits PostHog Signals.",
"type": "boolean"
},
"enabled": {
"description": "When false, the reconciler removes the scanner's Temporal schedule. On-demand triggers still work.",
"type": "boolean"
},
"experiment_targeting": {
"anyOf": [
{
"description": "The experiment a scanner watches. Scans derive their person-scoped exposure filter from\nthis blob at query time, so it is the only place an experiment can enter a scanner's\ntargeting — which is what lets the write-side access check and read-side redaction cover it.",
"properties": {
"experiment_id": {
"description": "The experiment the scanner watches.",
"minimum": 1,
"type": "number"
},
"variant": {
"anyOf": [
{
"maxLength": 400,
"type": "string"
},
{
"type": "null"
}
],
"description": "Narrow to sessions of people exposed to this variant. Null means every variant."
}
},
"required": ["experiment_id"],
"type": "object"
},
{
"type": "null"
},
{
"type": "null"
}
],
"description": "The experiment this scanner's targeting watches, if any. Set null when the experiment targeting is removed."
},
"free_only": {
"description": "Run only while the organization has free credits left this billing period, so the scanner never adds spend.",
"type": "boolean"
},
"goal": {
"anyOf": [
{
"maxLength": 2000,
"type": "string"
},
{
"type": "null"
}
],
"description": "The goal an AI draft was built from, in the creator's own words, so the scanner keeps what it was meant to find. Set on create only and ignored on update."
},
"model": {
"description": "Concrete model to use for this scanner.\n\n* `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite\n* `gemini-3-flash-preview` - Gemini 3 Flash\n* `gemini-3.8-flash` - Gemini 3.8 Flash",
"enum": ["gemini-3.5-flash-lite", "gemini-3-flash-preview", "gemini-3.8-flash"],
"type": "string"
},
"name": {
"description": "Human-readable scanner name. Unique within the team.",
"maxLength": 255,
"type": "string"
},
"provider": {
"description": "LLM provider. v1 is Google-only.\n\n* `google` - Google",
"enum": ["google"],
"type": "string"
},
"query": {
"additionalProperties": {},
"description": "Which recordings the scanner watches, as a `RecordingsQuery`. Omit every filter to watch every new recording. The date range is ignored, because the schedule controls time.",
"properties": {
"actions": {
"anyOf": [
{
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "Saved actions a recording must contain, such as `{\"id\": 12, \"type\": \"actions\", \"order\": 0}`."
},
"console_log_filters": {
"anyOf": [
{
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "Console log filters, such as `{\"type\": \"log_entry\", \"key\": \"level\", \"value\": [\"error\"], \"operator\": \"exact\"}`."
},
"events": {
"anyOf": [
{
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "Events a recording must contain, such as `{\"id\": \"$pageview\", \"type\": \"events\", \"order\": 0}`. Each can carry `properties` that filter that event."
},
"filter_test_accounts": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Leave out recordings from internal and test accounts."
},
"having_predicates": {
"anyOf": [
{
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "Duration filters, such as `{\"type\": \"recording\", \"key\": \"active_seconds\", \"value\": 60, \"operator\": \"gt\"}`. These always apply with AND, whatever `operand` says."
},
"kind": {
"const": "RecordingsQuery",
"default": "RecordingsQuery",
"type": "string"
},
"operand": {
"anyOf": [
{
"enum": ["AND", "OR"],
"type": "string"
},
{
"type": "null"
}
],
"description": "How `events`, `actions`, `properties` and `console_log_filters` combine. `AND`, the default when omitted, keeps recordings that match every condition. `OR` keeps recordings that match any one. An explicit `null` is read as `OR`. `having_predicates` and `filter_test_accounts` always apply with AND."
},
"properties": {
"anyOf": [
{
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "Recording, session, person and cohort filters, such as `{\"type\": \"recording\", \"key\": \"visited_page\", \"value\": \"/checkout\", \"operator\": \"icontains\"}` or `{\"type\": \"cohort\", \"key\": \"id\", \"value\": 7, \"operator\": \"in\"}`."
}
},
"type": "object"
},
"sampling_mode": {
"description": "Quality pre-filter applied before random sampling. focused = top sessions only, balanced = drops the lowest-quality, comprehensive = no filter (default).\n\n* `focused` - Focused\n* `balanced` - Balanced\n* `comprehensive` - Comprehensive",
"enum": ["focused", "balanced", "comprehensive"],
"type": "string"
},
"sampling_rate": {
"description": "0..1 random downsample applied after the query matches. Defaults to 1.0 (no downsampling). Use exactly 0 to pause scanning; non-zero rates below 0.0001 (0.01%) are rejected as below the sampling precision.",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"scanner_config": {
"description": "Type-specific configuration. All scanner types require `prompt`; monitors add optional `allow_inconclusive`, classifiers add `tags`, scorers add `scale`, summarizers add optional `length`."
},
"scanner_type": {
"description": "What the scanner does: monitor, classifier, scorer, or summarizer.\n\n* `monitor` - Monitor\n* `classifier` - Classifier\n* `scorer` - Scorer\n* `summarizer` - Summarizer\n* `experiment` - Experiment",
"enum": ["monitor", "classifier", "scorer", "summarizer", "experiment"],
"type": "string"
},
"tags": {
"description": "Organizational tags for this scanner. Distinct from a classifier's categories in scanner_config. Tags cannot contain commas.",
"items": {
"maxLength": 255,
"type": "string"
},
"maxItems": 32,
"type": "array"
},
"take_over_as_creator": {
"description": "Set with `enabled: true` to turn on a scanner whose creator can no longer view recordings. The caller becomes the scanner's creator, and scheduled scans then run as the caller. Without it, that request fails with code `scanner_creator_lost_access`.",
"type": "boolean"
}
},
"required": ["name", "scanner_type", "scanner_config", "model"],
"type": "object"
}