Pagekit Docs

Content

Posts

Fields

FieldTypeNotes
idstring
titlestringRequired
slugstringUnique per project, auto-generated from the title
contentstringMarkdown
excerptstring?Listings, RSS, social cards
statusenumdraft · scheduled · published · archived
publishedAtISO date?Set when published
scheduledForISO date?Set when scheduled
authorobject?{ id, name }
categoryobject?{ id, name, slug }
tagsstring[]Tag names
seoobject{ title, description, canonicalUrl, ogImage }

Querying

GET /v1/posts?status=published&category=engineering&tag=ai&sort=-published_at&page=1&limit=20
ParameterDescription
statusFilter by status
categoryCategory slug
tagTag slug
authorAuthor id
searchCase-insensitive title match
sortfield or -field for descending
page, limitPagination (limit max 100)

Creating a post

curl -X POST https://api.pagekit.app/v1/posts \
  -H "Authorization: Bearer pk_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Building AI Agents",
    "content": "# What we learned",
    "tags": ["AI", "Engineering"],
    "status": "draft"
  }'