Skip to content
Agile Snowglobe

Developer documentation · API v1

Your posts, your pipeline, over JSON.

Everything the dashboard does is available here: pull grounded, cited posts into any CMS, approve or reject them, steer the keyword map, schedule slots, read Search Console metrics and receive signed webhooks on every event.

Overview

The base URL is https://blog.fourdm.services/api/v1. Requests and responses are JSON; timestamps are ISO-8601; ids are integers. A key sees only the sites it belongs to: a site key sees one site, an account key sees every site on the account.

A typical integration does three things: pull status=published posts on a schedule or on a post.published webhook, render them, then call ack with the live URL so the canonical points at your page rather than the hosted copy.

Trying it out first? Write a free sample post, then create a key under Integrations for that site.

Authentication

Send your key as a bearer token on every request. Keys are shown once when created and only a hash is stored, so keep them in a secret store, never in a browser.

Authorization: Bearer sk_site_9_…
KeyFormatReachWhere
Site keysk_site_<id>_…One site. Scopes: posts read and write, sites read, suggestions, metrics, webhooks, product knowledge.Dashboard → site → Integrations → Create key
Account keysk_acct_…Every site on the account, with explicit scopes.Issued on request for agency accounts
Publishable keypk_<id>_…The embed script only; safe in page HTML.Site knowledge → Embed snippet

Scopes: posts:read, posts:write, sites:read, sites:write, keywords:write, suggestions:write, webhooks:write, metrics:read, knowledge:write. A key without a required scope gets 403 forbidden.

Check your key

GET/meany key

What the key is and what it reaches: its type (site or account), its site, its scopes, the sites it can see and the rate limit. Call it first when you set up an integration; a bad key gets 401 unauthorized.

curl "https://blog.fourdm.services/api/v1/me" \
  -H "Authorization: Bearer $SNOWGLOBE_KEY"

Conventions

  • Rate limit: 120 requests per minute per key. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; over the limit you get 429 with Retry-After.
  • Idempotency: creating POSTs (ack, generate, webhooks) accept an Idempotency-Key header. Repeating the same key returns the first response unchanged, so a retry after a timeout never makes a second post or webhook.
  • Request bodies: every body is typed; the interactive explorer lists each field. A field of the wrong type or format gets 422 invalid_request naming the field, for example weekdays.0. Fields we do not know are ignored.
  • Errors: always JSON in one shape, {"error": {"code", "message", "field"}}. See Errors and limits.
  • Pagination: the posts list is cursor based. Pass the returned next_cursor until has_more is false.
  • Caching: the posts list returns a weak ETag; send it back as If-None-Match to get 304 when nothing changed.
  • Long work: generation and re-indexing return 202 with a job_id; poll GET /jobs/{id}.

Posts

The post object

One shape everywhere: every posts endpoint and every post.* webhook payload returns it.

FieldTypeMeaning
id, site_idintPost and site identifiers.
statusstringdraft, pending_review, scheduled, published, failed.
slug, title, h1stringURL slug and headings.
meta_title, meta_description, excerptstringSEO meta, trimmed at word boundaries; excerpt is the first 170 characters of the description.
content_html, content_markdownstringThe body with table of contents, key-takeaways box, FAQ and internal links. Render the HTML, or the Markdown if your CMS prefers it.
content_html_with_imagesstringThe HTML with each infographic placed after its section, at absolute URLs. Single-post and list calls only; webhook payloads leave it out.
word_countintBody length.
primary_keyword, intentstringThe search the post targets and its intent.
seoobjectWhat a CMS's SEO fields take, in one place: title, meta_description, canonical, og_image, focus_keyword.
authorobject | nullThe byline: id, name, role, photo_url.
categoryobject | nullYour category: id, name, slug. The ids are also in author_id and category_id.
schema_jsonldstring | nullArticle and FAQPage JSON-LD, ready to place in a <script type="application/ld+json">.
banner_url, banner_url_absolute, social_image_urlstring | nullThe generated banner (site-relative and absolute) and the 1200×630 social card. Every generated image is WebP.
imagesobject[]Every body image in reading order: kind (infographic or photo), type, url, phone_url (the 1080×1350 copy of a wide infographic), alt, caption, section, width, height. infographic_urls keeps the plain list for older integrations.
social_snippetsobject | nullReady-to-post copy per network.
canonical_urlstring | nullSet by ack; points at your live page.
scores, publishableobject, boolThe editor model's review: overall plus issues; publishable is the gate's verdict.
published_at, approved_at, refreshed_at, created_at, updated_atdatetime | nullISO-8601, UTC.

List posts

GET/sites/{site_id}/postsposts:read
QueryTypeMeaning
statusstringFilter by status, usually published.
updated_sinceISO-8601Only posts changed since this time; ideal for a sync job.
cursorintThe next_cursor from the previous page.
limitint1 to 100, default 50.
curl "https://blog.fourdm.services/api/v1/sites/9/posts?status=published&limit=2" \
  -H "Authorization: Bearer $SNOWGLOBE_KEY"

Get a post

GET/posts/{post_id}posts:read

The full post object. 404 when the post belongs to a site the key cannot see.

curl "https://blog.fourdm.services/api/v1/posts/23" \
  -H "Authorization: Bearer $SNOWGLOBE_KEY"

Acknowledge delivery

POST/posts/{post_id}/ackposts:write · Idempotency-Key

Tell us the post is live on your site. The remote_url (an http or https address, else 400 bad_url) becomes the canonical URL, unless the post has been unpublished. A post.published event goes out when the canonical changes; acknowledging the same URL again changes nothing and sends nothing, so it is safe to ack on every sync.

curl -X POST "https://blog.fourdm.services/api/v1/posts/23/ack" \
  -H "Authorization: Bearer $SNOWGLOBE_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: deploy-2026-09-24-23" \
  -d '{"remote_url": "https://seodada.com/blog/technical-seo-audit-checklist"}'

Approve, reject, refresh, unpublish

CallBodyEffect
POST /posts/{id}/approve{"confirm_claims?", "publish_anyway?"}Approves a post waiting in approve-first mode; it publishes at its slot time. 409 claims_pending while claims without a source are unchecked: send "confirm_claims": true once you have checked them. 409 gate_failed when the post fails the publish check (the message says why): send "publish_anyway": true to publish it regardless.
POST /posts/{id}/reject{"reason"}Rejects it; the slot regenerates. 409 already_published if it already went live.
POST /posts/{id}/refreshNo bodyQueues a refresh: weak sections are rewritten and the post republishes at the same URL.
DELETE /posts/{id}No bodyUnpublishes: status back to draft, the hosted copy hidden, the keyword released. Emits post.unpublished.
curl -X POST "https://blog.fourdm.services/api/v1/posts/23/reject" \
  -H "Authorization: Bearer $SNOWGLOBE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason": "Wrong product name in section 3"}'

Automation

GET/sites/{site_id}/automationsites:read
PATCH/sites/{site_id}/automationsites:write
FieldTypeMeaning
modestringfull_auto, approve_first or draft_only. Full auto stays locked until the site's 30-day quality average clears the bar (trust_state).
timezone, publish_timeIANA, HH:MMWhen posts publish, in the site's local time.
weekdaysint[]0 = Monday … 6 = Sunday.
targetsstring[]Any of pull, wordpress, webhook.
pausedboolStops generation without losing settings.
posts_per_week, auto_refresh, auto_approve_after_hours, cadence_targetread-only hereSet from the dashboard.
curl -X PATCH "https://blog.fourdm.services/api/v1/sites/9/automation" \
  -H "Authorization: Bearer $SNOWGLOBE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode": "approve_first", "publish_time": "06:00", "weekdays": [0, 2, 4], "targets": ["wordpress", "webhook"]}'

Slots

CallBody or queryEffect
GET /sites/{id}/slots?from=&to=The calendar: one slot per scheduled day with date, status, post_id, publish_at.
POST /sites/{id}/slots{"date", "cluster_id?"}Adds a slot on that date at the site's publish time; 409 slot_exists if the day is taken.
DELETE /slots/{slot_id}No bodySkips a scheduled slot.

Generate now and jobs

POST/sites/{site_id}/generateposts:write · Idempotency-Key · 202

Queues one post outside the schedule. Choose the topic with a keyword, or with a cluster_id from the keyword map; send neither and the map picks the next topic. Optional title and intent (informational, commercial, transactional or navigational) steer it further. A cluster_id from another site gets 404 not_found. Poll the job until status is done and read post_id.

curl -X POST "https://blog.fourdm.services/api/v1/sites/9/generate" \
  -H "Authorization: Bearer $SNOWGLOBE_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: cwv-2026-09-24" \
  -d '{"keyword": "core web vitals for content sites"}'
GET/jobs/{job_id}
{ "id": "184", "kind": "generate", "status": "done", "site_id": 9, "post_id": 25, "error": null }

Sites and keywords

CallBody or queryEffect
GET /sitesNo bodyThe sites this key can see: id, name, url, language, description, house_style, active.
GET /sites/{id}No bodyOne site.
PATCH /sites/{id}{"name", "description", "house_style", "language"}Voice and language changes apply to the next post.
POST /sites/{id}/reindexNo bodyRe-crawls the site into the knowledge index. 202 with a job id.
GET /sites/{id}/clusters?status=The keyword map: id, primary, secondaries, intent, format, priority, status, money_url. Pass a cluster's id to generate or to a new slot.
POST /clusters/{id}/approve · /banNo bodyPlan a cluster next, or keep it out. Scope keywords:write.
POST /sites/{id}/seeds{"keywords": [...]}Adds seed keywords the next backlog refresh expands: a list, or one keyword per line in a string. Cleaned and lower-cased, kept in your order, at most 200 per site. Each line comes back as added, existing, invalid (with the reason) or over_limit. Scope keywords:write.
POST /sites/{id}/tools/{tool}{"text", "mode?", "alternatives?", "web?", "deep?"}The writing tools on any text: humanize, paraphrase, grammar, ai-patterns, plagiarism. Same word limits and daily runs as the editor; 402 budget_exceeded over the monthly budget, 429 over the daily runs. Scope posts:write.
curl -X POST "https://blog.fourdm.services/api/v1/sites/9/seeds" \
  -H "Authorization: Bearer $SNOWGLOBE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["log file analysis", "hreflang for multi-language sites", "x"]}'

Suggestions and metrics

CallQueryEffect
GET /sites/{id}/suggestions?status=openThe Brain's advice for the site: type, title, detail, impact, effort, priority, post_id.
POST /suggestions/{id}/accept · /dismissNo bodyAccepting a refresh suggestion queues the refresh. Scope suggestions:write.
GET /sites/{id}/metrics?from=&to=Search Console rows per post and period: clicks, impressions, ctr, position. Scope metrics:read.
curl "https://blog.fourdm.services/api/v1/sites/9/metrics?from=2026-09-01&to=2026-09-30" \
  -H "Authorization: Bearer $SNOWGLOBE_KEY"

Webhooks

Register a URL and we POST a signed JSON envelope for the events you choose. Failed deliveries retry at 1, 5, 30, 120, 360 and 1440 minutes; every attempt is visible in the delivery log and can be replayed from the dashboard or the API.

CallBodyEffect
GET /webhooksNo bodyYour webhooks. A site key sees its own site's.
POST /webhooks{"url", "events?", "site_id?"}201 with the webhook and its secret, shown once. No events means all of them; an event name we do not know gets 400 bad_event with the list of valid ones. The URL must reach a public host.
POST /webhooks/{id}/testNo bodySends a signed ping event now and tells you what your receiver answered. More below.
PATCH /webhooks/{id}{"url?", "events?", "active?"}Changes the URL or the events, or pauses it with "active": false. The secret and the delivery log stay.
POST /webhooks/{id}/rotate-secretNo bodyA new signing secret, shown once. The old one stops working at once, so update your receiver straight after.
DELETE /webhooks/{id}No bodyRemoves it.
GET /webhooks/{id}/deliveriesNo bodyLast 100 deliveries: event_type, status, attempts, response_code, last_error, next_attempt_at.
POST /webhooks/{id}/deliveries/{did}/replayNo bodySends that delivery again now.
curl -X POST "https://blog.fourdm.services/api/v1/webhooks" \
  -H "Authorization: Bearer $SNOWGLOBE_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: hook-seodada-1" \
  -d '{"url": "https://hooks.seodada.com/snowglobe", "events": ["post.published", "post.updated"], "site_id": 9}'

Events: post.generated, post.pending_review, post.approved, post.published, post.updated, post.failed, post.unpublished, slot.skipped, site.indexed, suggestion.created, budget.threshold, connection.failed. A ping comes only from the test call; answer it with any 2xx.

Envelope:

{
  "id": "evt_9f2c1a7e4b3d",
  "type": "post.published",
  "created_at": "2026-09-24T00:30:12Z",
  "data": { "post": { "id": 23, "site_id": 9, "status": "published", "…": "…" } }
}

Test, change and rotate

Test a receiver before you rely on it. The test call sends a real, signed ping to the webhook's URL and waits up to 10 seconds for the answer. ok is true for any 2xx; otherwise response_code and error say what went wrong. The ping shows in the delivery log and is never retried.

curl -X POST "https://blog.fourdm.services/api/v1/webhooks/4/test" \
  -H "Authorization: Bearer $SNOWGLOBE_KEY"

The ping envelope, signed like every other event:

{
  "id": "evt_5c0d9e21a7b4",
  "type": "ping",
  "created_at": "2026-10-22T06:10:44Z",
  "data": { "webhook_id": 4, "message": "Test event from Agile Snowglobe" }
}

To change the events, or to pause a webhook while your site is down, patch it instead of deleting it; the secret and the log stay. If a secret leaks, rotate it: the response carries the new one, once.

curl -X PATCH "https://blog.fourdm.services/api/v1/webhooks/4" \
  -H "Authorization: Bearer $SNOWGLOBE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"events": ["post.published", "post.updated", "post.unpublished"]}'

Verifying signatures

Every delivery carries X-Snowglobe-Signature: t=<unix>,v1=<hex>, where v1 is HMAC-SHA256 of "{t}.{raw body}" with your webhook secret. Reject anything older than five minutes and compare in constant time.

import { createHmac, timingSafeEqual } from "node:crypto";

export function verify(header, secret, rawBody) {
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  if (Math.abs(Date.now() / 1000 - Number(parts.t)) > 300) return false;
  const expected = createHmac("sha256", secret).update(`${parts.t}.${rawBody}`).digest("hex");
  return timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));
}

WordPress and WooCommerce plugin

If your site runs WordPress, you do not need to write against the API at all. The plugin receives each post the moment it is published through a signed webhook it registers itself, with a pull every 15 minutes as a safety net. It creates the post once and updates the same post on later edits, refreshes or a new banner, copies the banner and the infographics into your media library, sets the meta title and description for Yoast SEO and Rank Math, prints the Article and FAQPage JSON-LD, and acknowledges the live URL so the canonical points at your site. On a WooCommerce store it also sends your products to Snowglobe, so posts quote today's prices and link the right product.

Download the plugin (zip)

Install and connect

  1. Plugins → Add New → Upload Plugin, choose the zip, install and activate.
  2. In the dashboard open the site → Integrations → WooCommerce and WordPress plugin → Create connection code. The code holds the API address, the site id and a new site key; it is shown once.
  3. In WordPress open Settings → Agile Snowglobe, paste the code and press Connect. The plugin registers its webhook, pulls every published post and, with WooCommerce, uploads the catalogue 100 products at a time.
  4. Keep the dashboard's WordPress connector (the application-password one) disconnected, otherwise the post is published twice. The Integrations page warns you when both are on.

The Integrations page shows the plugin's WordPress and WooCommerce versions, the products in the site's knowledge, the last webhook delivery and the last check-in, and offers an update when a newer plugin is out.

What it does with each post

Post fieldWordPress
title, slug, content_html_with_imagesPost title, slug and content with the infographics placed after their sections; the leading H1 is dropped because your theme renders the title.
excerpt / meta_descriptionPost excerpt, plus _yoast_wpseo_title, _yoast_wpseo_metadesc, rank_math_title, rank_math_description.
banner_url_absolute, infographic_urlsCopied into the media library once with alt text; the banner becomes the featured image.
schema_jsonldStored on the post and printed in the head of its page.
published_at, updated_atThe post date on first import; unchanged posts are skipped on later pulls.
internal linksLinks that resolve to WooCommerce products are remembered; the [snowglobe_products] shortcode renders them as a product grid (appended automatically when the option is on).
post.unpublishedThe WordPress post goes back to draft.

Product knowledge (WooCommerce)

Published, visible products are sent as structured data: name, price and sale price, the price range of variable products, currency, stock, SKU, categories, tags, visible attributes and descriptions. Snowglobe stores each as a trusted product page of the site; while the plugin is connected a crawl never overwrites it. Saving a product sends it a minute later in the background, and trashing or unpublishing it removes it. Nothing about customers or orders leaves the store. You can call the same endpoints from any other shop system with a site key.

CallBody and result
POST /sites/{id}/plugin/connect{"webhook_url", "site_url", "plugin_version", "wp_version", "woocommerce_version"}. Registers the plugin's webhook for post.published, post.updated and post.unpublished, replacing an earlier one for the same URL, and returns webhook_secret once. Scope webhooks:write.
POST /sites/{id}/plugin/heartbeatVersions plus synced, errors, last_result. Shown on the Integrations page. Scope sites:read.
POST /sites/{id}/products{"products": [{"url", "name", "price", "max_price", "regular_price", "sale_price", "currency", "sku", "stock_status", "short_description", "description", "categories", "tags", "attributes", "image"}]}, up to 50 per call; the URL must be on the site's domain or a subdomain. Returns upserted, unchanged, skipped with reasons, and the product count. Scope knowledge:write.
POST /sites/{id}/products/remove{"urls": [...]}. Removes those pages from the site's knowledge. Scope knowledge:write.

Keys created before the knowledge:write scope existed get a 403 on the product calls; create a new connection code to replace the key. The plugin is plain PHP with no build step: the bootstrap, an API client, the connect flow, the post sync, the product sync, the webhook receiver and the settings page. Read it before you install it; it is yours to change.

Legacy pull API

The original read-only API stays available for sites that integrated before v1. It uses the site's older per-site key as an X-API-Key header (or ?api_key=) and serves published posts only.

CallReturns
GET /api/postsPublished posts, newest first, with limit and offset.
GET /api/posts/{slug}One published post by slug.
GET /api/relatedPosts related to a slug by embedding similarity.

New integrations should use v1: it adds approval, scheduling, keywords, metrics and webhooks, and its post object carries schema, images and scores.

Errors and limits

Every error is JSON in one shape, with the HTTP status. Branch on code, show message to a person, and use field (when set) to point at the input that was wrong.

{ "error": { "code": "slot_exists", "message": "A post is already scheduled for 2026-09-30.", "field": "date" } }
{ "error": { "code": "invalid_request", "message": "Input should be less than or equal to 6", "field": "weekdays.0" } }
{ "error": { "code": "forbidden", "message": "missing scope: posts:write", "field": null } }
StatusCodeTypical cause
400bad_param, bad_date, bad_timezone, bad_url, bad_event, bad_actionA value that has the right type but cannot be used, such as an unknown timezone or a webhook URL on a private network.
401unauthorizedNo bearer token, or a revoked or unknown key.
402budget_exceededThe site's monthly AI budget is used up (writing tools).
403forbiddenThe key lacks the scope, or is scoped to another site.
404not_foundThe site, post, slot, cluster, suggestion or webhook is not visible to this key, or the path does not exist.
409slot_exists, already_published, claims_pending, gate_failedThe request clashes with the post's or the calendar's state.
422invalid_requestA field of the wrong type or format; field names it.
429rate_limitedMore than 120 calls in a minute. Wait Retry-After seconds; X-RateLimit-Reset says when the minute ends.
500server_errorOur fault. Retry with backoff; with an Idempotency-Key a retried POST is safe.

OpenAPI

The machine-readable spec is at https://blog.fourdm.services/api/v1/openapi.json. It covers the v1 API only, declares the bearer key and types every request body. Import it into Postman or Insomnia, or generate a client with openapi-generator.

The interactive explorer at https://blog.fourdm.services/api/docs runs real calls: press Authorize, paste your key, then try GET /me. Calls made there act on your real sites, so use a test site for anything that writes.