farfield · docs

feed

feed.farfield.systems

Ephemeral short-form posts. No titles, just a markdown body and tags. The feed is the fastest way to publish — write, tag, and ship in one step.

Screenshot of the Farfield feed UI
Feed admin stream in the logged-in state. The site fetches posts as JSON with a read token; writes use the write key.

Authentication

The read endpoints require a bearer token — send the read key as Authorization: Bearer <token> or X-API-Key; the write key is also accepted. /status stays public, and responses still send Access-Control-Allow-Origin: *.

One exception: a single post, GET /api/posts/{slug}, is public so "view source" links open in a browser — no token — but rate-limited per client IP (keyed callers are exempt). The post list stays token-gated, since it enumerates every post.

JSON API

GET /api/posts
{ "posts": [Post, …] }
GET /api/posts/{slug}
Post — public, rate-limited; 404 if missing; strong ETag
GET /status
{ "service": "feed", "ok": true, "posts": N }

Write endpoints (POST /api/posts, PUT /api/posts/{slug}, DELETE /api/posts/{slug}) require an API key.

Record Shape

Post

{
  "slug": "string",
  "cid": "bafk…",
  "body": "markdown",
  "tags": ["string"],
  "createdAt": "2024-01-01T00:00:00Z",
  "updatedAt": "2024-01-01T00:00:00Z"
}