- Generate a secret —
openssl rand -hex 32(the secret must be 16+ characters, which theStacc enforces at save time). - Add an env var to your hosting platform:
STACC_WEBHOOK_SECRET=<the secret>. - Add a database table for incoming blogs — see Database schemas for Postgres, MySQL, Prisma and MongoDB templates.
- Add a receiver route at, for example,
POST /api/stacc-webhook— see Receiver examples for Next.js, Express, Astro, FastAPI, Flask and PHP. - Deploy. Note the public HTTPS URL.
- In theStacc: go to Content SEO > Settings > Publishing, add a Custom Webhook, enter the URL and secret, then click Test Connection. A green check means it’s working.
- Click Sample Payload to validate your full publish handler with a fake blog (
blog_idwill start withpreview-). - Approve a blog and publish. The first real blog should land in your database within a few seconds.
Webhooks
Quickstart
A field-tested path from “we picked Webhook” to “first blog publishes live”.
A field-tested path from “we picked Webhook” to “first blog publishes live”:
