← Back to Methods

METHOD 4: WEBHOOKS & BUILD TRIGGERS

Webhooks & Deploy Trigger Setup

Trigger external server scripts, rebuild production static bundles (Vercel, Netlify), or purge on-demand caches whenever a post changes.

How Webhooks Work

When you save or delete a post, EmbedCMS triggers a non-blocking POST request to the **Webhook URL** specified in your site settings. This request contains a JSON payload detailing the change event, allowing your server to take immediate action (such as rebuilding static assets).

Vercel Deploy Hook Setup

  1. Go to your project dashboard on Vercel and navigate to Settings > Git > Deploy Hooks.
  2. Create a new deploy hook, name it (e.g. `embedcms-deploy`), and select the target build branch.
  3. Copy the generated unique HTTP POST URL.
  4. In your EmbedCMS dashboard, paste this URL into the Webhook URL input inside your Site Settings, and save.

Webhook Event Triggers

We fire events on the following hooks:

  • post.saved: Fired whenever a draft or published post is created, modified, or saved.
  • post.deleted: Fired when an article is permanently removed from the CMS database.

Interactive Webhook & Deploy Simulator

Click the button to simulate a writer saving an article inside EmbedCMS and Vercel starting a production deploy run.

1. Trigger Event

Webhook POST Body

payload.json
{
  "event": "post.saved",
  "timestamp": "2026-07-08T13:26:00Z",
  "post": {
    "title": "Configuring Webhooks on Static Sites",
    "slug": "configuring-webhooks-on-static-sites",
    "status": "published",
    "type": "blog"
  }
}

2. Web Server Deploy Logs

deploy.log
--- Webhook build trigger terminal ---
[Idle] Waiting for trigger...