PostHog · Schema

Annotation

A/B TestingAnalyticsFeature FlagsOpen SourceProduct AnalyticsSession Recording

Properties

Name Type Description
id integer
content string Annotation text shown on charts to describe the change, release, or incident.
date_marker string When this annotation happened (ISO 8601 timestamp). Used to position it on charts.
creation_type object Who created this annotation. Use `USR` for user-created notes and `GIT` for bot/deployment notes. * `USR` - user * `GIT` - GitHub
dashboard_item integer
dashboard_id integer
dashboard_name string
insight_short_id string
insight_name string
insight_derived_name string
created_by object
created_at string
updated_at string
deleted boolean Soft-delete flag. Set to true to hide the annotation, or false to restore it.
scope object Annotation visibility scope: `project`, `organization`, `dashboard`, or `dashboard_item`. `recording` is deprecated and rejected. * `dashboard_item` - insight * `dashboard` - dashboard * `project` - p
View JSON Schema on GitHub

JSON Schema

posthog-annotation-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Annotation",
  "title": "Annotation",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "readOnly": true
    },
    "content": {
      "type": "string",
      "nullable": true,
      "description": "Annotation text shown on charts to describe the change, release, or incident.",
      "maxLength": 8192
    },
    "date_marker": {
      "type": "string",
      "format": "date-time",
      "nullable": true,
      "description": "When this annotation happened (ISO 8601 timestamp). Used to position it on charts."
    },
    "creation_type": {
      "allOf": [
        {
          "$ref": "#/components/schemas/CreationTypeEnum"
        }
      ],
      "description": "Who created this annotation. Use `USR` for user-created notes and `GIT` for bot/deployment notes.\n\n* `USR` - user\n* `GIT` - GitHub"
    },
    "dashboard_item": {
      "type": "integer",
      "nullable": true
    },
    "dashboard_id": {
      "type": "integer",
      "nullable": true
    },
    "dashboard_name": {
      "type": "string",
      "nullable": true,
      "readOnly": true
    },
    "insight_short_id": {
      "type": "string",
      "nullable": true,
      "readOnly": true
    },
    "insight_name": {
      "type": "string",
      "nullable": true,
      "readOnly": true
    },
    "insight_derived_name": {
      "type": "string",
      "nullable": true,
      "readOnly": true
    },
    "created_by": {
      "allOf": [
        {
          "$ref": "#/components/schemas/UserBasic"
        }
      ],
      "readOnly": true
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true,
      "nullable": true
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "deleted": {
      "type": "boolean",
      "description": "Soft-delete flag. Set to true to hide the annotation, or false to restore it."
    },
    "scope": {
      "allOf": [
        {
          "$ref": "#/components/schemas/AnnotationScopeEnum"
        }
      ],
      "description": "Annotation visibility scope: `project`, `organization`, `dashboard`, or `dashboard_item`. `recording` is deprecated and rejected.\n\n* `dashboard_item` - insight\n* `dashboard` - dashboard\n* `project` - project\n* `organization` - organization\n* `recording` - recording"
    }
  },
  "required": [
    "created_at",
    "created_by",
    "dashboard_name",
    "id",
    "insight_derived_name",
    "insight_name",
    "insight_short_id",
    "updated_at"
  ]
}