This takes about five minutes. You need an API key and at least one published entry.
With curl
Every request authenticates with a single header:
curl -H "Kookee-API-Key: YOUR_API_KEY" \
https://api.kookee.dev/v1/blog/posts
You get back a paginated envelope:
{
"data": [
{
"id": "...",
"slug": "hello-world",
"title": "Hello world",
"locale": "en"
}
],
"total": 1,
"page": 1,
"limit": 10,
"totalPages": 1
}
With the SDK
npm install @kookee/sdk
import { Kookee } from '@kookee/sdk';
const kookee = new Kookee({ apiKey: process.env.KOOKEE_API_KEY! });
const response = await kookee.blog.list({ limit: 5 });
response.data.forEach((post) => {
console.log(post.title, post.slug);
});
The response format
List methods always return the same envelope:
data— the array of itemstotal— total matching items across all pagespage— the current page, 1-basedlimit— items per page (default 10, maximum 100)totalPages— how many pages exist
Single-item methods return the item directly, with no envelope:
const post = await kookee.blog.getBySlug('hello-world');
console.log(post.title);
console.log(post.contentHtml);
List items are summaries
This is the detail that surprises people most often. List responses omit the body to keep them small. contentHtml is only returned when you fetch a single entry:
const { data } = await kookee.blog.list();
data[0].contentHtml; // undefined — not included in list items
const post = await kookee.blog.getBySlug(data[0].slug);
post.contentHtml; // the full HTML body
So an index page uses list(), and a detail page uses getBySlug().
Try another module
The same client reaches every module:
const articles = await kookee.help.list({ limit: 5 });
const releases = await kookee.changelog.list({ limit: 5 });
const pages = await kookee.pages.list();
const config = await kookee.config.list();
If you get an empty list
Almost always one of three things:
The content is still a draft — only published entries are returned
You are filtering by a
localethat has no translations, withfallback: falseYou are querying a different project than the one you created content in
If you get an error
{ "code": "API_KEY_INVALID" }
A 401 means the key is invalid or missing. A 404 means the slug or ID does not exist. A 429 means you have hit a rate limit — see Rate limits, plans and error handling.