Content Publishing API

Each organization owns one Content site. Create a Content API key from Content settings, then call the API only from your server. Never ship the key to browser code.

Authentication

Send the key with every request:
x-api-key: nafru_content_...

List published content

curl "{{API_URL}}/v1/content?type=post&limit=20&offset=0" \
  -H "x-api-key: $NAFRU_CONTENT_API_KEY"
Only published content from the active organization site is returned. The response includes items and pagination.

Fetch one item

curl "{{API_URL}}/v1/content/getting-started" \
  -H "x-api-key: $NAFRU_CONTENT_API_KEY"
The response includes canonical markdown, sanitized html, frontmatter, taxonomy, reading statistics, and publication timestamps. Render html directly only when it is appropriate for your framework; otherwise render markdown with your own renderer.

Server-side example

const response = await fetch(`${process.env.NAFRU_API_URL}/v1/content`, {
  headers: { 'x-api-key': process.env.NAFRU_CONTENT_API_KEY! },
})

const { data } = await response.json()