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.

10.8 KB
Raw Blame
{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "properties": {
        "action_id": {
            "description": "Id of the function_email step whose email to edit.",
            "type": "string"
        },
        "base_updated_at": {
            "description": "Optimistic concurrency: the updated_at (or draft_updated_at) last loaded. If the stored workflow is newer, the patch is rejected with 409 instead of clobbering a concurrent edit.",
            "type": "string"
        },
        "email_patch": {
            "additionalProperties": {},
            "description": "Partial email fields deep-merged into the step's email (a null leaf deletes the key): subject, preheader, text, to, from, replyTo, cc, bcc. The design is edited via operations, and html is always re-rendered from it.",
            "propertyNames": {
                "type": "string"
            },
            "type": "object"
        },
        "id": {
            "description": "The workflow (HogFlow) id.",
            "type": "string"
        },
        "operations": {
            "description": "Ordered edits applied atomically to the step's email design - the same operations as workflows-patch-email-template. The result is re-rendered to HTML server-side, so the sent email always matches the patched design. Reference blocks by id (read them via workflows-get).",
            "items": {
                "oneOf": [
                    {
                        "additionalProperties": false,
                        "properties": {
                            "id": {
                                "description": "Id of the content block to update.",
                                "type": "string"
                            },
                            "op": {
                                "const": "update_content",
                                "type": "string"
                            },
                            "patch": {
                                "additionalProperties": {},
                                "description": "Partial content-block fields, deep-merged into the existing block; a null leaf deletes that key. e.g. {values: {text: '<p>Hi</p>'}} changes only the block's text.",
                                "propertyNames": {
                                    "type": "string"
                                },
                                "type": "object"
                            }
                        },
                        "required": ["op", "id", "patch"],
                        "type": "object"
                    },
                    {
                        "additionalProperties": false,
                        "properties": {
                            "id": {
                                "description": "Id of the column to update.",
                                "type": "string"
                            },
                            "op": {
                                "const": "update_column",
                                "type": "string"
                            },
                            "patch": {
                                "additionalProperties": {},
                                "description": "Partial column fields, deep-merged; a null leaf deletes that key.",
                                "propertyNames": {
                                    "type": "string"
                                },
                                "type": "object"
                            }
                        },
                        "required": ["op", "id", "patch"],
                        "type": "object"
                    },
                    {
                        "additionalProperties": false,
                        "properties": {
                            "id": {
                                "description": "Id of the row to update.",
                                "type": "string"
                            },
                            "op": {
                                "const": "update_row",
                                "type": "string"
                            },
                            "patch": {
                                "additionalProperties": {},
                                "description": "Partial row fields, deep-merged; a null leaf deletes that key.",
                                "propertyNames": {
                                    "type": "string"
                                },
                                "type": "object"
                            }
                        },
                        "required": ["op", "id", "patch"],
                        "type": "object"
                    },
                    {
                        "additionalProperties": false,
                        "properties": {
                            "op": {
                                "const": "update_body",
                                "type": "string"
                            },
                            "patch": {
                                "additionalProperties": {},
                                "description": "Partial body fields, deep-merged. e.g. {values: {backgroundColor: '#ffffff'}}.",
                                "propertyNames": {
                                    "type": "string"
                                },
                                "type": "object"
                            }
                        },
                        "required": ["op", "patch"],
                        "type": "object"
                    },
                    {
                        "additionalProperties": false,
                        "properties": {
                            "column_id": {
                                "description": "Id of the column to insert the block into.",
                                "type": "string"
                            },
                            "content": {
                                "additionalProperties": {},
                                "description": "A content block {type, values: {...}}; omit id and values._meta — they are assigned server-side. type is one of text, heading, button, image, divider, html, etc.",
                                "propertyNames": {
                                    "type": "string"
                                },
                                "type": "object"
                            },
                            "index": {
                                "description": "0-based insert position; omit to append to the end.",
                                "maximum": 9007199254740991,
                                "minimum": -9007199254740991,
                                "type": "integer"
                            },
                            "op": {
                                "const": "add_content",
                                "type": "string"
                            }
                        },
                        "required": ["op", "column_id", "content"],
                        "type": "object"
                    },
                    {
                        "additionalProperties": false,
                        "properties": {
                            "id": {
                                "description": "Id of the content block to remove.",
                                "type": "string"
                            },
                            "op": {
                                "const": "remove_content",
                                "type": "string"
                            }
                        },
                        "required": ["op", "id"],
                        "type": "object"
                    },
                    {
                        "additionalProperties": false,
                        "properties": {
                            "column_id": {
                                "description": "Id of the destination column.",
                                "type": "string"
                            },
                            "id": {
                                "description": "Id of the content block to move.",
                                "type": "string"
                            },
                            "index": {
                                "description": "0-based position in the destination column; omit to append.",
                                "maximum": 9007199254740991,
                                "minimum": -9007199254740991,
                                "type": "integer"
                            },
                            "op": {
                                "const": "move_content",
                                "type": "string"
                            }
                        },
                        "required": ["op", "id", "column_id"],
                        "type": "object"
                    },
                    {
                        "additionalProperties": false,
                        "properties": {
                            "index": {
                                "description": "0-based insert position; omit to append to the end.",
                                "maximum": 9007199254740991,
                                "minimum": -9007199254740991,
                                "type": "integer"
                            },
                            "op": {
                                "const": "add_row",
                                "type": "string"
                            },
                            "row": {
                                "additionalProperties": {},
                                "description": "A full row {cells, columns: [{contents: [...], values}], values}; ids and Unlayer numbering are assigned server-side for the row and everything nested in it.",
                                "propertyNames": {
                                    "type": "string"
                                },
                                "type": "object"
                            }
                        },
                        "required": ["op", "row"],
                        "type": "object"
                    },
                    {
                        "additionalProperties": false,
                        "properties": {
                            "id": {
                                "description": "Id of the row to remove.",
                                "type": "string"
                            },
                            "op": {
                                "const": "remove_row",
                                "type": "string"
                            }
                        },
                        "required": ["op", "id"],
                        "type": "object"
                    }
                ]
            },
            "minItems": 1,
            "type": "array"
        }
    },
    "required": ["id", "action_id"],
    "type": "object"
}