Blog API

Manage blog posts, categories, settings, and content revisions programmatically.

Get your API key

Blog Posts

GET /api/v1/projects/{project_id}/blog/posts/

List blog posts.

Filters: ?category={id}&status=published

{
  "success": true,
  "data": [
    {
      "id": "uuid",
      "title": "10 Tips for Better SEO",
      "slug": "10-tips-better-seo",
      "excerpt": "Learn the top strategies...",
      "status": "published",
      "featured_image": "https://...",
      "category": {"id": "uuid", "name": "SEO"},
      "meta_title": "10 SEO Tips | My Agency",
      "published_at": "2026-04-01T10:00:00Z"
    }
  ],
  "count": 15
}
POST /api/v1/projects/{project_id}/blog/posts/

Create a blog post.

{
  "title": "10 Tips for Better SEO",
  "slug": "10-tips-better-seo",
  "content": "<article>...</article>",
  "excerpt": "Learn the top strategies",
  "status": "draft",
  "category_id": "uuid",
  "meta_title": "10 SEO Tips",
  "meta_description": "Discover proven SEO strategies"
}
GET PUT DELETE /api/v1/projects/{project_id}/blog/posts/{post_id}/

Get, update, or delete a blog post.

Blog Categories

GET POST /api/v1/projects/{project_id}/blog/categories/

List or create blog categories.

{
  "name": "SEO",
  "slug": "seo",
  "description": "Search engine optimization tips"
}
PUT DELETE /api/v1/projects/{project_id}/blog/categories/{category_id}/

Update or delete a blog category.

Blog Settings & Pages

GET PUT /api/v1/projects/{project_id}/blog/settings/

Get or update blog settings.

{
  "is_enabled": true,
  "posts_per_page": 10,
  "show_author": true
}
GET PUT /api/v1/projects/{project_id}/blog/page/

Get or update blog listing page HTML.

GET /api/v1/projects/{project_id}/blog/post-template/

Get the blog post template.

Blog Post Versions (Revisions)

Content revisions are automatically created when a blog post's content changes. Max 20 versions per post.

List Versions

GET /api/v1/projects/{project_id}/blog/posts/{post_id}/versions/

Returns all saved versions for a blog post, newest first.

{
  "success": true,
  "versions": [
    {
      "id": "uuid",
      "title": "My Blog Post",
      "label": "Auto-save 2026-04-03 14:30",
      "content_hash": "sha256...",
      "content_preview": "First 200 chars...",
      "created_at": "2026-04-03T14:30:00Z"
    }
  ],
  "count": 5
}

Restore Version

POST /api/v1/projects/{project_id}/blog/posts/{post_id}/versions/{version_id}/restore/

Restores the post's title, excerpt, and content from the selected version. A new version is auto-created after restore.