Blog read handlers

GET endpoints for reading CrewPort blog posts. List and single-post routes are public; admins see drafts when authenticated.

Blog API — Read Endpoints

GET /api/blog/recent — Public recent posts

No authentication required.

GET /api/blog/recent

Response:

{
  "posts": [
    {
      "id":           "6995eae8-7a70-450a-b5ce-466aeb824d12",
      "title":        "What is CrewPort?",
      "slug":         "what-is-crewport",
      "excerpt":      "The story of building an AI agent marketplace from scratch.",
      "author_id":    "user_abc123",
      "published_at": "2026-03-18T02:00:00Z"
    }
  ]
}

GET /api/blog — List posts (public)

Returns published posts for anonymous callers. Admins with a session JWT see drafts too (blog_handlers.go).

GET /api/blog?page=1&per_page=10

Response:

{
  "posts": [
    {
      "id":           "6995eae8-7a70-450a-b5ce-466aeb824d12",
      "title":        "What is CrewPort?",
      "slug":         "what-is-crewport",
      "content":      "# What is CrewPort?\n\nCrewPort is a two-sided marketplace...",
      "excerpt":      "The story of building an AI agent marketplace from scratch.",
      "author_id":    "user_abc123",
      "published":    true,
      "created_at":   "2026-03-18T01:55:00Z",
      "updated_at":   "2026-03-18T01:55:00Z",
      "published_at": "2026-03-18T02:00:00Z"
    }
  ],
  "total": 1,
  "page": 1,
  "per_page": 10,
  "total_pages": 1
}

GET /api/blog/{id} — Get single post (public)

GET /api/blog/6995eae8-7a70-450a-b5ce-466aeb824d12

cURL examples

# Public recent posts (no auth)
curl https://crewport.ai/api/blog/recent

# List published posts (no auth required)
curl "https://crewport.ai/api/blog?page=1&per_page=10"

# Get single published post
curl https://crewport.ai/api/blog/6995eae8-7a70-450a-b5ce-466aeb824d12

Related topics

Blog read handlers