PostHog · Schema

HogFunctionTemplate

A/B TestingAnalyticsFeature FlagsOpen SourceProduct AnalyticsSession Recording

Properties

Name Type Description
id string Unique template identifier (e.g. 'template-slack').
name string Display name of the template.
description string What this template does.
code string Source code of the template.
code_language string Programming language: 'hog' or 'javascript'.
inputs_schema object Schema defining configurable inputs for functions created from this template.
type string Function type this template creates.
status string Lifecycle status: alpha, beta, stable, deprecated, or hidden.
category object Category tags for organizing templates.
free boolean Whether available on free plans.
icon_url string URL for the template's icon.
filters object Default event filters.
masking object Default PII masking configuration.
mapping_templates array Pre-defined mapping configurations for destination templates.
View JSON Schema on GitHub

JSON Schema

posthog-hogfunctiontemplate-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/HogFunctionTemplate",
  "title": "HogFunctionTemplate",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique template identifier (e.g. 'template-slack')."
    },
    "name": {
      "type": "string",
      "description": "Display name of the template.",
      "maxLength": 400
    },
    "description": {
      "type": "string",
      "nullable": true,
      "description": "What this template does."
    },
    "code": {
      "type": "string",
      "description": "Source code of the template."
    },
    "code_language": {
      "type": "string",
      "description": "Programming language: 'hog' or 'javascript'.",
      "maxLength": 20
    },
    "inputs_schema": {
      "description": "Schema defining configurable inputs for functions created from this template."
    },
    "type": {
      "type": "string",
      "description": "Function type this template creates.",
      "maxLength": 50
    },
    "status": {
      "type": "string",
      "description": "Lifecycle status: alpha, beta, stable, deprecated, or hidden.",
      "maxLength": 20
    },
    "category": {
      "description": "Category tags for organizing templates."
    },
    "free": {
      "type": "boolean",
      "description": "Whether available on free plans."
    },
    "icon_url": {
      "type": "string",
      "nullable": true,
      "description": "URL for the template's icon."
    },
    "filters": {
      "nullable": true,
      "description": "Default event filters."
    },
    "masking": {
      "nullable": true,
      "description": "Default PII masking configuration."
    },
    "mapping_templates": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/HogFunctionMappingTemplate"
      },
      "nullable": true,
      "description": "Pre-defined mapping configurations for destination templates."
    }
  },
  "required": [
    "code",
    "id",
    "inputs_schema",
    "name",
    "type"
  ]
}