Company Pages
Endpoints for managing company page snapshots.
Company Pages
List Company Pages
GET /api/company/<company_slug>/company-pages/
Auth: read_only or full_access
Returns a paginated list of page snapshots for a company.
Query parameters:
| Parameter | Type | Description |
|---|---|---|
year |
integer | Filter by year |
month |
integer | Filter by month |
page_type |
string | Filter by page type (e.g., docs, product, company) |
limit |
integer | Results per page |
offset |
integer | Pagination offset |
Response:
{
"total_count": 500,
"returned_count": 50,
"offset": 0,
"results": [...]
}
Bulk Create Company Pages
POST /api/company/<company_slug>/company-pages/bulk/
Auth: full_access
Create or update up to 1000 company pages in a single request. Existing
pages are matched by slug and date_parsed.
Request body:
{
"pages": [
{
"slug": "getting-started",
"source_url": "https://example.com/docs/getting-started",
"title": "Getting Started",
"page_type_label": "docs",
"date_parsed": "2025-01-15",
"text": "Page content...",
"word_count": 800,
"language_code": "en",
"content_hash": "abc123"
}
]
}
Required fields per page: slug, source_url, date_parsed
Optional fields: title, page_type_label, text, word_count,
language_code, content_hash, llm_feedback, has_code, hn_link,
hn_points, hn_post_date
Query parameters:
| Parameter | Type | Description |
|---|---|---|
include_pages |
string | Return created/updated pages in response (true/false) |
Response:
{
"created_count": 45,
"updated_count": 5,
"error_count": 0,
"total_processed": 50
}
Delete Company Pages by Month
DELETE /api/company/<company_slug>/company-pages/
Auth: full_access
Delete company pages for a specific year and month.
Query parameters:
| Parameter | Type | Description |
|---|---|---|
year |
integer | Required. Year to delete. |
month |
integer | Required. Month to delete. |
page_type |
string | Optional page type filter. |
Response:
{
"company": "example",
"deleted_count": 120,
"year": 2025,
"month": 1,
"page_type": null
}
Cleanup Excluded Pages
POST /api/company/<company_slug>/company-pages/cleanup-excluded/
Auth: full_access
Delete pages that match the company's exclude path rules.
Request body: Empty.
Response:
{
"deleted_count": 15,
"message": "Removed 15 pages matching exclude rules."
}