Labs

For machines

Content API

Everything in Labs can be read publicly and written with an API key. Useful for scripts, automations, or pushing content in from somewhere else.

Base URL

https://labs.dewabuanam.com/api/v1

Authentication

Reads of published content need nothing. Writes, and reading drafts, need a bearer token created in the admin area.

Authorization: Bearer labs_sk_xxxxxxxxxxxxxxxxxxxxxxxx

Keys are stored as SHA-256 hashes, so the plaintext is shown exactly once at creation. Each key carries a read scope and optionally write.

Endpoints

GET/projects

List published projects. Query: category, tag, q, featured, limit, offset, and status (needs a key).

Public
POST/projects

Create a project.

write
GET/projects/{'{id-or-slug}'}

Fetch one project. A read key also returns drafts.

Public
PATCH/projects/{'{id-or-slug}'}

Partially update a project. Only the fields you send change.

write
DELETE/projects/{'{id-or-slug}'}

Delete a project permanently.

write
GET/categories

List categories with published-project counts.

Public
POST/categories

Create a category.

write

Create a project

curl -X POST https://labs.dewabuanam.com/api/v1/projects \
  -H "Authorization: Bearer $LABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Aurora Notes",
    "subtitle": "A notes app that thinks in graphs",
    "summary": "A weekend build exploring bidirectional links and local-first sync.",
    "content": "## The problem\n\nNotes apps forget how ideas connect…",
    "category": "web",
    "status": "published",
    "featured": true,
    "featured_rank": 1,
    "tech_stack": ["Next.js", "SQLite", "Tailwind"],
    "tags": ["local-first", "weekend-build"],
    "year": 2026,
    "client": "Personal",
    "role": "Design & build",
    "cover_image": "https://images.unsplash.com/photo-1499750310159-5b5b5b5b5b5b",
    "metrics": { "Duration": "2 weekends", "Status": "Live" },
    "links": [
      { "label": "Live site", "url": "https://example.com", "kind": "demo" },
      { "label": "Source", "url": "https://github.com/…", "kind": "repo" }
    ]
  }'

Update and publish

curl -X PATCH https://labs.dewabuanam.com/api/v1/projects/aurora-notes \
  -H "Authorization: Bearer $LABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "status": "published", "featured": true }'

Responses

Success returns { "data": … }, with meta on list endpoints. Failure returns { "error": { "status", "message", "details"? } }.

{
  "data": [ { "id": "…", "slug": "aurora-notes", "title": "Aurora Notes" } ],
  "meta": { "total": 12, "limit": 24, "offset": 0 }
}
  • 401: missing or invalid key
  • 403: key revoked or missing the scope
  • 409: slug already taken
  • 422: validation failed (see details)

Caching

Public pages revalidate every 60 seconds, and any write through the API revalidates the affected pages immediately. Content you push should be visible within seconds.