action posthog_subscriptions_deliveries_retrieve { label: "Retrieve subscription delivery" description: "Fetch one delivery row by id." provider: posthog method: GET path: "/api/projects/{project_id}/subscriptions/{subscription_id}/deliveries/{id}/" encoding: json input: { type: "object" properties: { id: { type: "string" format: "uuid" } subscription_id: { type: "integer" } } required: ["id", "subscription_id"] additionalProperties: false } output: { type: "object" required: ["ai_report", "ai_report_diagnostics", "ai_report_prompt", "change_summary", "content_snapshot", "created_at", "error", "exported_asset_ids", "finished_at", "id", "idempotency_key", "last_updated_at", "recipient_results", "scheduled_at", "status", "subscription", "target_type", "target_value", "temporal_workflow_id", "trigger_type"] properties: { ai_report: { type: ["string", "null"] description: "AI-generated report markdown delivered by this run. Null for non-AI deliveries or runs without a persisted report." } ai_report_diagnostics: { type: ["array", "null"] description: "Per-step query diagnostics (generated HogQL + failure type) for this report. Null for non-AI deliveries or runs without persisted diagnostics." items: { type: "object" required: ["description", "error_type", "hogql", "ok"] properties: { description: { type: "string" description: "What this query step was meant to compute." } error_type: { type: ["string", "null"] description: "Exception class name when the query failed; null on success." } hogql: { type: "string" description: "The HogQL the assistant generated for this step." } human_readable_error: { type: ["string", "null"] description: "Human-readable failure reason, present only for query errors safe to surface to the subscription owner (e.g. an unresolved field name); null on success and for internal errors, which expose error_type only." } ok: { type: "boolean" description: "Whether the query ran successfully." } } } } ai_report_prompt: { type: ["string", "null"] description: "The subscription's prompt as it was when this report was generated. Null for older deliveries and non-AI deliveries." } change_summary: { type: ["string", "null"] description: "AI-generated summary included in this delivery, when one was produced." } content_snapshot: { description: "Snapshot at send time: dashboard metadata, total_insight_count, and per-exported-insight entries (id, short_id, name, query_hash, cache_key, query_results, optional query_error)." type: "object" } created_at: { type: "string" format: "date-time" description: "When the delivery row was created." } error: { description: "Top-level failure payload when status is failed, if any." type: "object" } exported_asset_ids: { type: "array" description: "ExportedAsset ids generated for this send." items: { type: "integer" } } finished_at: { type: ["string", "null"] format: "date-time" description: "When the run finished, if applicable." } id: { type: "string" format: "uuid" description: "Primary key for this delivery row." } idempotency_key: { type: "string" description: "Dedupes activity retries for the same logical run." } last_updated_at: { type: "string" format: "date-time" description: "Last ORM update to this row." } recipient_results: { description: "Per-destination outcomes; items use status success, failed, or partial." type: "object" } scheduled_at: { type: ["string", "null"] format: "date-time" description: "Planned send time when applicable." } status: { description: "Overall run status: starting, completed, failed, or skipped.\n\n* `starting` - Starting\n* `completed` - Completed\n* `failed` - Failed\n* `skipped` - Skipped" type: "object" } subscription: { type: "integer" description: "Parent subscription id." } target_type: { type: "string" description: "Channel snapshot at send time (email or slack)." } target_value: { type: "string" description: "Destination snapshot at send time (emails, channel id, URL)." } temporal_workflow_id: { type: "string" description: "Temporal workflow id for this delivery run." } trigger_type: { type: "string" description: "Why the run started (e.g. scheduled, manual, subscription update)." } } } }