Home / Docs / Blog Posts

Blog Posts

Endpoints for creating, listing, and updating blog posts.

Blog Posts

Create Blog Post

POST /api/blog-post/

Auth: full_access

Create a new blog post entry.

Request body:

{
  "title": "Announcing Our New Feature",
  "source_url": "https://example.com/blog/new-feature",
  "company_slug": "example",
  "word_count": 1200,
  "author": "Jane Doe",
  "date_published": "2025-01-15",
  "text": "Full blog post text...",
  "summary": "A brief summary of the post.",
  "language_code": "en"
}

Required fields: title, source_url, company_slug, word_count

Optional fields: author, date_published, date_parsed (defaults to today), text, summary, language_code, hn_link, hn_points, hn_post_date, is_removed


List Blog Posts

GET /api/blog-posts/

Auth: read_only or full_access

Returns a paginated list of blog posts.

Query parameters:

Parameter Type Default Description
company_slug string - Filter by company
has_summary string - Filter: true, false, or empty
limit integer 50 Results per page (max 500)
offset integer 0 Pagination offset
random string false Randomize order (true/false)
order_by string -date_published Sort field: date_parsed, -date_parsed, date_published, -date_published

Response:

{
  "total_count": 1234,
  "limit": 50,
  "offset": 0,
  "results": [...]
}

Update Blog Post

PUT / PATCH /api/blog-post/<slug>/

Auth: full_access

Update a blog post by its slug. Use PUT for a full update or PATCH for a partial update.


Check URLs

POST /api/blog-post/check-urls/

Auth: read_only or full_access

Check whether a list of URLs already exist as blog posts or redirects.

Request body:

{
  "company_slug": "example",
  "urls": [
    "https://example.com/blog/post-1",
    "https://example.com/blog/post-2"
  ]
}

Response: Returns each URL's existence status along with the company's exclude/include path rules.


Update Blog Summary

POST /api/update_blog_summary/

Auth: full_access

Update the summary text for an existing blog post.

Request body:

{
  "slug": "announcing-our-new-feature",
  "summary": "Updated summary text."
}

Create Blog Post Redirect

POST /api/blog-post-redirect/

Auth: full_access

Create a redirect URL that points to an existing blog post.

Request body:

{
  "blog_post_slug": "announcing-our-new-feature",
  "redirect_url": "https://example.com/old-url",
  "redirect_type": "301"
}

redirect_type is optional and defaults to "301". Accepted values: "301", "302".