API reference

Admin API

The authenticated API for reading analytics and moderating comments.

Base: https://api.vlozi.app/engagement/admin

Unlike the public door, these need an API key with the right permissions:

curl -H "Authorization: Bearer $VLOZI_API_KEY" \
  "https://api.vlozi.app/engagement/admin/analytics/overview?days=30"

Create a key in Dashboard → Settings → API keys. The Editor preset includes engagement moderation; for read-only analytics, build a Custom key with just engagement:stats.read.

Permissions

Permission Lets you
engagement:stats.read read analytics, settings and targets
engagement:sites.read / .write see / manage sites and snippets
engagement:settings.admin change settings and per-target comment modes
engagement:comments.read list and export comments — includes commenter emails
engagement:comments.moderate approve, reject, mark spam
engagement:comments.reply reply as the site owner
engagement:comments.delete delete
engagement:bans.manage ban a commenter
engagement:members.read / .manage see / ban / erase verified readers

Analytics

GET /analytics/overview?days=30 totals + a daily series. days is 7, 30 or 90.
GET /analytics/targets/:key?days=30 one target's series
GET /analytics/top?metric=views&days=7&limit=10 leaderboard
GET /analytics/breakdown?by=referrer&days=7 traffic sources

by is referrer, country, device or hour.

These numbers are estimates. The breakdown comes from a sampled analytics store, and the response says estimated: true. It's directionally right — good for "most of our traffic is from Hacker News" — and wrong for anything you'd reconcile. Views, reads and comment counts everywhere else are exact.

If it answers available: false, breakdowns aren't enabled on your deployment. Everything else still works.

Comments

GET /comments?status=pending&targetKey=…&q=…&limit=50 list. status is pending, published, spam, rejected or all
GET /comments/counts badge counts per status
GET /comments/:id one comment, with its flags
PATCH /comments/:id { "status": "published" } or { "note": "…" }
POST /comments/bulk { "ids": [...], "status": "spam" } — up to 200
POST /comments/:id/reply { "body": "…", "authorName": "Team" }
DELETE /comments/:id
GET /comments/export CSV of everything

Approving a held comment publishes it, which costs a credit at the same rate an auto-published one does (10 comments per credit). Replying is free.

Sites, settings, bans, members

GET/POST/PATCH/DELETE /sites{,/:id} manage embeddable sites
POST /sites/:id/rotate new site id — invalidates every existing snippet
GET/PUT /settings everything in Settings
GET /targets, PATCH /targets/:key list content; open or close comments per target
GET/POST/DELETE /bans{,/:id} { "kind": "email" | "ip", "value": "…" }. Emails are stored hashed
GET /members{,/:id} verified readers
PATCH /members/:id { "banned": true } — signs them out everywhere immediately
DELETE /members/:id GDPR erasure — see below
GET /webhooks/deliveries, POST /webhooks/deliveries/:id/retry delivery log

Erasing a reader

DELETE /members/:id anonymises rather than deletes. Their email and name are scrubbed, every session is revoked, and their published comments stay visible attributed to a deleted reader.

That's the deliberate choice: people replied to those comments, and hard-deleting the parent would orphan the replies and silently rewrite a conversation other readers took part in. It satisfies an erasure request — no personal data remains — without destroying other people's contributions.

Webhooks

Set a URL in Settings → Webhooks to get comment.published, rating.created and target.milestone as they happen.

Each delivery carries X-Vlozi-Signature: sha256=…, an HMAC over ${timestamp}.${body} using your webhook secret. Verify it, and check the timestamp is recent — the timestamp is inside the signature specifically so a captured payload can't be replayed later.

Failed deliveries are retried three times with backoff, and every attempt is in the delivery log.

MCP

Everything above is also available to AI agents through Vlozi MCP as engagement.* tools — list_comments, moderate_comment, summarize_comments and the rest. Your key needs the same permissions. Publishable keys are refused on MCP entirely.

Engagement · API referenceEdit on GitHub