Skip to main content
Five event types. Branch on the event field at the top of your handler. Whether theStacc sends blog.published or blog.updated is decided by whether your receiver has published this blog before: the first successful publish fires blog.published; any subsequent re-publish or content sync of the same blog fires blog.updated. Treat both the same way — upsert on blog_id. A note on preview- prefixed blog_ids: when the user clicks Sample Payload in the dashboard, theStacc fires a real-shaped blog.published event but with blog_id: "preview-00000000-0000-0000-0000-000000000000". Your handler should detect the prefix and skip the actual database write so test runs don’t pollute production data.

test.ping payload

Respond 200 {"ok": true}. Do not require title, slug, or content for this event — there are none.

blog.published / blog.updated payload

On autopilot (scheduled) publishes, the same payload additionally carries two retry-related fields — idempotency_key and publish_attempt. See Idempotency & retries for exactly when they appear and how to use them.

blog.unpublished / blog.deleted payload

For these events, look up the post in your CMS using the blog_id (which you should have stored when handling the original blog.published) and delete or hide it.