Pagekit Docs

Getting started

Authentication

Every request to the content API is authenticated with a project API key:

Authorization: Bearer pk_live_xxxxxxxxx

Key lifecycle

PropertyBehaviour
Prefixpk_live_ for production keys
StorageHashed with SHA-256; plaintext is never persisted
VisibilityShown exactly once, at creation
ScopeA single project — keys cannot read across projects
RevocationImmediate, from Project → Settings → API keys

Verifying a key

curl https://api.pagekit.app/v1/me \
  -H "Authorization: Bearer pk_live_xxxxx"
{
  "project": { "id": "proj_123", "name": "Acme Blog", "slug": "acme-blog" },
  "apiKeyId": "key_123",
  "posts": { "published": 12, "draft": 4, "scheduled": 2 }
}

Errors

StatusMeaning
401Missing, malformed, revoked, or expired key
403Key valid, resource belongs to another project
429Project rate limit exceeded

Keep keys server-side. Never ship a pk_live_ key to the browser.