API reference
Webhooks
Scribbles can POST a JSON event to URLs you configure when published posts or pages change. The body includes post metadata and content. Use this to trigger static site rebuilds or any automation that accepts an HTTP POST.
Setup
- Open Publishing → Feeds → Actions for your blog. A headless blog uses these webhooks as the publish path; see Headless.
- Paste one webhook URL per line (HTTPS recommended). Deploy-hook URLs that ignore the body work fine.
- Save actions. The next publish, update, unpublish, or delete of live content will enqueue delivery.
Headless
Scribbles can run headless: write here, publish on your own site. Turn on
Published elsewhere
under Advanced, set your site URL, and use these webhooks as the publish path.
When a site URL is set, post.url
is the mapped post URL (for example https://example.com/blog/slug).
Events
Delivered asynchronously. Drafts, future-scheduled posts, and komments-only updates do not fire webhooks.
| Event | When |
|---|---|
| post.published | A post or page becomes live (create or draft → published) |
| post.updated | A live post or page is saved again |
| post.unpublished | A live post or page is moved back to draft |
| post.deleted | A live post or page is destroyed |
Payload
Requests use Content-Type: application/json
and User-Agent: Scribbles-Webhooks/1.0.
Example body
{
"event": "post.published",
"occurred_at": "2026-08-16T10:00:00Z",
"blog": { "id": 1015, "slug": "vincent", "title": "Vincent's Blog" },
"post": {
"id": 20122,
"slug": "computer-says-no",
"title": "Computer says no",
"type": "post",
"status": "published",
"url": "https://blog.vincentritter.com/post/computer-says-no",
"published_at": "2026-08-14T21:58:17Z",
"updated_at": "2026-08-14T21:58:17Z",
"category": null,
"meta": {
"hidden": false,
"archived": false,
"hide_in_rss": false
},
"summary": "I've been working on a personal thing…",
"content": {
"html": "<p>…</p>",
"text": "…"
}
}
}
categoryis{ "id", "name", "slug" }ornull.statusis"published"or"draft". An unpublished event still includes the post as a draft.summaryis the post summary.content.htmlis processed HTML (nice_html);content.textis plain text.- On
post.deleted,contentandsummaryare omitted. - On a headless blog with a site URL,
post.urlis the mapped URL. See Headless.
Signatures
Each delivery includes an HMAC so you can verify the request came from Scribbles. The formula is
HMAC_SHA256(secret, "#{timestamp}.#{raw_body}").
| Header | Value |
|---|---|
| X-Scribbles-Timestamp | ISO8601 UTC time the request was signed |
| X-Scribbles-Signature | sha256= plus the HMAC-SHA256 hex digest |
Reject stale timestamps (five minutes is a reasonable window). The secret is shown under Publishing → Feeds → Actions; regenerate it there when you need to.
Verify a signature
timestamp = request.headers["X-Scribbles-Timestamp"]
signature = request.headers["X-Scribbles-Signature"].to_s.delete_prefix("sha256=")
payload = request.raw_post
expected = OpenSSL::HMAC.hexdigest("SHA256", ENV.fetch("SCRIBBLES_WEBHOOK_SECRET"), "#{timestamp}.#{payload}")
if timestamp.blank? || (Time.iso8601(timestamp) - Time.current).abs > 5.minutes
head :unauthorized and return
end
unless ActiveSupport::SecurityUtils.secure_compare(expected, signature)
head :unauthorized and return
end
Deploy hooks
Paste a Netlify, Vercel, or Cloudflare Pages deploy hook into the Webhooks field. Those endpoints typically ignore the JSON body and extra headers and start a build on any POST. In the build, fetch posts with the JSON API using an API key stored as a secret in CI.
Fetch published posts in CI
curl -s "https://scribbles.page/api/v1/posts?status=published&include_content=true&limit=100" \
-H "Authorization: Bearer YOUR_API_KEY"