API Reference
Base URL: https://api.pagekit.app/v1
All requests require Authorization: Bearer pk_live_…, except /health.
Posts
| Method | Path | Description |
|---|
| GET | /posts | List posts (filter, sort, paginate) |
| GET | /posts/:id | Retrieve a post |
| GET | /posts/slug/:slug | Retrieve by slug |
| POST | /posts | Create a post |
| PATCH | /posts/:id | Update a post |
| DELETE | /posts/:id | Delete a post |
Authors
| Method | Path |
|---|
| GET | /authors |
| GET | /authors/:id |
Categories
| Method | Path |
|---|
| GET | /categories |
| GET | /categories/:slug |
Tags
Media
| Method | Path |
|---|
| GET | /media |
| POST | /media |
| DELETE | /media/:id |
Account
| Method | Path | Description |
|---|
| GET | /me | Verify a key and return its project |
| GET | /health | Liveness probe (public) |
Paginated response
{
"data": [],
"pagination": {
"page": 1,
"limit": 20,
"total": 42,
"totalPages": 3,
"hasNextPage": true,
"hasPreviousPage": false
}
}
Error response
{
"error": {
"message": "Request body failed validation.",
"code": "validation_error",
"details": [{ "path": "title", "message": "Title is required." }]
}
}