: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": {
"description": {
"description": "Human-readable description of what this function does.",
"type": "string"
},
"enabled": {
"description": "Whether the alert is active. Defaults to true.",
"type": "boolean"
},
"execution_order": {
"anyOf": [
{
"maximum": 32767,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"description": "Execution priority for transformations. Lower values run first."
},
"filters": {
"description": "Event filters that control which events trigger this function.",
"properties": {
"actions": {
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"bytecode_contract": {
"type": "string"
},
"data_warehouse": {
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"events": {
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"filter_test_accounts": {
"type": "boolean"
},
"properties": {
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"source": {
"default": "events",
"description": "* `events` - events\n* `internal-events` - internal-events\n* `person-updates` - person-updates\n* `data-warehouse-table` - data-warehouse-table\n* `data-warehouse-view` - data-warehouse-view",
"enum": [
"events",
"internal-events",
"person-updates",
"data-warehouse-table",
"data-warehouse-view"
],
"type": "string"
}
},
"type": "object"
},
"hog": {
"description": "Source code. Hog language for most types; TypeScript for site_destination and site_app.",
"type": "string"
},
"icon_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "URL for the function's icon displayed in the UI."
},
"inputs": {
"additionalProperties": {
"properties": {
"bytecode": {
"items": {},
"type": "array"
},
"bytecode_contract": {
"type": "string"
},
"order": {
"type": "number"
},
"templating": {
"description": "* `hog` - hog\n* `liquid` - liquid",
"enum": ["hog", "liquid"],
"type": "string"
},
"transpiled": {},
"value": {}
},
"type": "object"
},
"description": "Values for each input defined in inputs_schema.",
"propertyNames": {
"type": "string"
},
"type": "object"
},
"inputs_schema": {
"description": "Schema defining the configurable input parameters for this function.",
"items": {
"properties": {
"choices": {
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"default": {},
"description": {
"type": "string"
},
"hidden": {
"default": false,
"type": "boolean"
},
"key": {
"type": "string"
},
"label": {
"type": "string"
},
"required": {
"default": false,
"type": "boolean"
},
"searchable": {
"type": "boolean"
},
"secret": {
"default": false,
"type": "boolean"
},
"templating": {
"anyOf": [
{
"type": "boolean"
},
{
"enum": ["hog", "liquid"],
"type": "string"
}
]
},
"type": {
"description": "* `string` - string\n* `number` - number\n* `boolean` - boolean\n* `dictionary` - dictionary\n* `choice` - choice\n* `json` - json\n* `integration` - integration\n* `integration_multi` - integration_multi\n* `integration_field` - integration_field\n* `email` - email\n* `native_email` - native_email\n* `posthog_assignee` - posthog_assignee\n* `posthog_ticket_tags` - posthog_ticket_tags\n* `posthog_business_hours` - posthog_business_hours\n* `non_failure_status_codes` - non_failure_status_codes\n* `customer_analytics_account_properties` - customer_analytics_account_properties\n* `customer_analytics_account_relationships` - customer_analytics_account_relationships\n* `task_model` - task_model\n* `task_repository` - task_repository\n* `task_mcp_installations` - task_mcp_installations\n* `signals_scout` - signals_scout\n* `posthog_survey` - posthog_survey\n* `task_skills` - task_skills\n* `replay_vision_scan` - replay_vision_scan",
"enum": [
"string",
"number",
"boolean",
"dictionary",
"choice",
"json",
"integration",
"integration_multi",
"integration_field",
"email",
"native_email",
"posthog_assignee",
"posthog_ticket_tags",
"posthog_business_hours",
"non_failure_status_codes",
"customer_analytics_account_properties",
"customer_analytics_account_relationships",
"task_model",
"task_repository",
"task_mcp_installations",
"signals_scout",
"posthog_survey",
"task_skills",
"replay_vision_scan"
],
"type": "string"
}
},
"required": ["type", "key"],
"type": "object"
},
"type": "array"
},
"mappings": {
"anyOf": [
{
"items": {
"properties": {
"filters": {
"properties": {
"actions": {
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"bytecode_contract": {
"type": "string"
},
"data_warehouse": {
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"events": {
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"filter_test_accounts": {
"type": "boolean"
},
"properties": {
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"source": {
"default": "events",
"description": "* `events` - events\n* `internal-events` - internal-events\n* `person-updates` - person-updates\n* `data-warehouse-table` - data-warehouse-table\n* `data-warehouse-view` - data-warehouse-view",
"enum": [
"events",
"internal-events",
"person-updates",
"data-warehouse-table",
"data-warehouse-view"
],
"type": "string"
}
},
"type": "object"
},
"inputs": {
"additionalProperties": {
"properties": {
"bytecode": {
"items": {},
"type": "array"
},
"bytecode_contract": {
"type": "string"
},
"order": {
"type": "number"
},
"templating": {
"description": "* `hog` - hog\n* `liquid` - liquid",
"enum": ["hog", "liquid"],
"type": "string"
},
"transpiled": {},
"value": {}
},
"type": "object"
},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"inputs_schema": {
"items": {
"properties": {
"choices": {
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"default": {},
"description": {
"type": "string"
},
"hidden": {
"default": false,
"type": "boolean"
},
"key": {
"type": "string"
},
"label": {
"type": "string"
},
"required": {
"default": false,
"type": "boolean"
},
"searchable": {
"type": "boolean"
},
"secret": {
"default": false,
"type": "boolean"
},
"templating": {
"anyOf": [
{
"type": "boolean"
},
{
"enum": ["hog", "liquid"],
"type": "string"
}
]
},
"type": {
"description": "* `string` - string\n* `number` - number\n* `boolean` - boolean\n* `dictionary` - dictionary\n* `choice` - choice\n* `json` - json\n* `integration` - integration\n* `integration_multi` - integration_multi\n* `integration_field` - integration_field\n* `email` - email\n* `native_email` - native_email\n* `posthog_assignee` - posthog_assignee\n* `posthog_ticket_tags` - posthog_ticket_tags\n* `posthog_business_hours` - posthog_business_hours\n* `non_failure_status_codes` - non_failure_status_codes\n* `customer_analytics_account_properties` - customer_analytics_account_properties\n* `customer_analytics_account_relationships` - customer_analytics_account_relationships\n* `task_model` - task_model\n* `task_repository` - task_repository\n* `task_mcp_installations` - task_mcp_installations\n* `signals_scout` - signals_scout\n* `posthog_survey` - posthog_survey\n* `task_skills` - task_skills\n* `replay_vision_scan` - replay_vision_scan",
"enum": [
"string",
"number",
"boolean",
"dictionary",
"choice",
"json",
"integration",
"integration_multi",
"integration_field",
"email",
"native_email",
"posthog_assignee",
"posthog_ticket_tags",
"posthog_business_hours",
"non_failure_status_codes",
"customer_analytics_account_properties",
"customer_analytics_account_relationships",
"task_model",
"task_repository",
"task_mcp_installations",
"signals_scout",
"posthog_survey",
"task_skills",
"replay_vision_scan"
],
"type": "string"
}
},
"required": ["type", "key"],
"type": "object"
},
"type": "array"
},
"name": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "Event-to-destination field mappings. Only for destination and site_destination types."
},
"masking": {
"anyOf": [
{
"properties": {
"hash": {
"description": "Hog expression used to compute the masking hash.",
"type": "string"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Optional threshold count before masking applies."
},
"ttl": {
"description": "Time-to-live in seconds for the masking cache (60–86400).",
"maximum": 86400,
"minimum": 60,
"type": "number"
}
},
"required": ["ttl", "hash"],
"type": "object"
},
{
"type": "null"
}
],
"description": "PII masking configuration with TTL, threshold, and hash expression."
},
"name": {
"anyOf": [
{
"maxLength": 400,
"type": "string"
},
{
"type": "null"
}
],
"description": "Display name for the function."
},
"template_id": {
"anyOf": [
{
"maxLength": 400,
"type": "string"
},
{
"type": "null"
}
],
"description": "Integration template — one of `template-slack`, `template-webhook`, `template-discord`, `template-microsoft-teams`, `template-linear`, `template-github`, `template-gitlab`."
},
"type": {
"anyOf": [
{
"description": "* `destination` - Destination\n* `site_destination` - Site Destination\n* `internal_destination` - Internal Destination\n* `source_webhook` - Source Webhook\n* `warehouse_source_webhook` - Warehouse Source Webhook\n* `site_app` - Site App\n* `transformation` - Transformation\n* `transformation_log` - Transformation Log\n* `legacy_destination` - Legacy Destination",
"enum": [
"destination",
"site_destination",
"internal_destination",
"source_webhook",
"warehouse_source_webhook",
"site_app",
"transformation",
"transformation_log",
"legacy_destination"
],
"type": "string"
},
{
"type": "null"
}
],
"description": "Must be `internal_destination` for an error tracking alert. Other values create non-alert HogFunctions and should be created via `cdp-functions-create` instead."
}
},
"type": "object"
}