Skip to content

: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.

3.2 KB
Raw Blame
{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
        "capture_engagement": {
            "description": "Whether the engagement events (sent, delivered, opened, clicked, bounced) of the email your code rendered are captured as analytics events of the recipient. Defaults to true. A project whose admin turned engagement capture off captures nothing, whatever the send says.",
            "type": "boolean"
        },
        "distinct_id": {
            "anyOf": [
                {
                    "maxLength": 400,
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Distinct ID of the recipient's person. The send and its engagement events are recorded against that person. Defaults to the recipient's email address."
        },
        "from": {
            "description": "Sender of the email your code rendered, as `[email protected]` or `Example <[email protected]>`, on a verified domain of the project. Without it, the email goes out from the project's default sender, or from its only verified sender when it has no default.",
            "maxLength": 1024,
            "type": "string"
        },
        "html": {
            "description": "HTML body of the email, exactly as the recipient should see it. Through this tool the whole request as JSON, html and text included, must stay under 1 MiB, and quotes and line breaks count twice. A larger email can't be sent here.",
            "type": "string"
        },
        "reply_to": {
            "description": "Addresses replies to the email your code rendered go to.",
            "items": {
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                "type": "string"
            },
            "maxItems": 10,
            "type": "array"
        },
        "subject": {
            "description": "Subject of the email your code rendered.",
            "type": "string"
        },
        "template_key": {
            "description": "Names an email whose content your code rendered, such as `order-shipped`, so its metrics, logs and status group under it. Letters, numbers, hyphens (-) and underscores (_) only. Send it with `subject` and `html` or `text`. PostHog sends the content as is and never stores it as a template.",
            "maxLength": 400,
            "pattern": "^[a-zA-Z0-9_-]+$",
            "type": "string"
        },
        "text": {
            "description": "Plain text body of the email. Without it, PostHog derives the text from html. Through this tool the whole request as JSON, html and text included, must stay under 1 MiB.",
            "type": "string"
        },
        "to": {
            "description": "Email address of the recipient.",
            "format": "email",
            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
            "type": "string"
        }
    },
    "required": ["to", "template_key", "subject"],
    "type": "object"
}