Posts
Fields
| Field | Type | Notes |
|---|
id | string | |
title | string | Required |
slug | string | Unique per project, auto-generated from the title |
content | string | Markdown |
excerpt | string? | Listings, RSS, social cards |
status | enum | draft · scheduled · published · archived |
publishedAt | ISO date? | Set when published |
scheduledFor | ISO date? | Set when scheduled |
author | object? | { id, name } |
category | object? | { id, name, slug } |
tags | string[] | Tag names |
seo | object | { title, description, canonicalUrl, ogImage } |
Querying
GET /v1/posts?status=published&category=engineering&tag=ai&sort=-published_at&page=1&limit=20
| Parameter | Description |
|---|
status | Filter by status |
category | Category slug |
tag | Tag slug |
author | Author id |
search | Case-insensitive title match |
sort | field or -field for descending |
page, limit | Pagination (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"
}'