Public Endpoints

Postnomic provides unauthenticated public endpoints for accessing published blog content. These endpoints are served by the PublicBlogsController, PublicPostsController, and PublicAnalyticsController ...

Overview

Postnomic provides unauthenticated public endpoints for accessing published blog content. These endpoints are served by the PublicBlogsController, PublicPostsController, and PublicAnalyticsController and do not require JWT or API Key authentication.

Public endpoints are ideal for:

  • Building custom frontends that display blog content
  • Static site generators that fetch content at build time
  • Third-party integrations that need read-only access

Blog Information

Get Blog Info

Retrieve public information about a blog by its slug.

curl -X GET https://api.postnomic.com/api/public/blogs/my-dev-blog

Response:

{
  "publicId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "My Dev Blog",
  "slug": "my-dev-blog",
  "description": "A blog about software development",
  "canonicalUrl": "https://example.com/blog",
  "layout": "Default"
}

Posts

List Published Posts

Retrieve a paginated list of published posts for a blog.

curl -X GET "https://api.postnomic.com/api/public/blogs/my-dev-blog/posts?page=1&pageSize=10"

Response:

{
  "items": [
    {
      "publicId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
      "title": "Getting Started with Docker",
      "slug": "getting-started-with-docker",
      "excerpt": "Learn the fundamentals of containerization...",
      "coverImageUrl": "/api/blob/my-dev-blog/images/docker-cover.jpg",
      "publishedAt": "2026-03-01T10:00:00Z",
      "author": {
        "displayName": "Jane Developer",
        "headline": "Senior Software Engineer"
      },
      "tags": ["docker", "devops"],
      "categories": ["Tutorials"]
    }
  ],
  "totalCount": 42,
  "page": 1,
  "pageSize": 10
}

Get Post by Slug

Retrieve the full content of a specific published post.

curl -X GET https://api.postnomic.com/api/public/blogs/my-dev-blog/posts/getting-started-with-docker

Response:

{
  "publicId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "title": "Getting Started with Docker",
  "slug": "getting-started-with-docker",
  "content": "## Introduction\n\nDocker is a platform for...",
  "excerpt": "Learn the fundamentals of containerization...",
  "coverImageUrl": "/api/blob/my-dev-blog/images/docker-cover.jpg",
  "publishedAt": "2026-03-01T10:00:00Z",
  "author": {
    "publicId": "c3d4e5f6-a7b8-9012-cdef-345678901234",
    "displayName": "Jane Developer",
    "headline": "Senior Software Engineer",
    "bio": "Passionate about cloud-native development..."
  },
  "tags": ["docker", "devops"],
  "categories": ["Tutorials"],
  "commentsEnabled": true
}

Filter Posts

Filter posts by category or tag using query parameters:

# Filter by category
curl -X GET "https://api.postnomic.com/api/public/blogs/my-dev-blog/posts?category=tutorials"

# Filter by tag
curl -X GET "https://api.postnomic.com/api/public/blogs/my-dev-blog/posts?tag=docker"

Analytics

Get Public Analytics

Retrieve basic view counts for public display.

curl -X GET https://api.postnomic.com/api/public/analytics/my-dev-blog/posts/getting-started-with-docker

Comments

Get Comments for a Post

Retrieve approved comments for a published post.

curl -X GET https://api.postnomic.com/api/public/blogs/my-dev-blog/posts/getting-started-with-docker/comments

Comments are returned as a threaded structure with parent-child relationships for nested replies.

Response Format

All public endpoints return JSON responses with consistent field naming:

  • Entity references use publicId (a Guid) rather than internal database IDs
  • Dates are formatted in ISO 8601 UTC (e.g., 2026-03-01T10:00:00Z)
  • Image URLs are relative paths through the blob proxy (e.g., /api/blob/...)
  • Pagination uses page, pageSize, and totalCount fields

Was this article helpful?

Thank you for your feedback!