API Documentation
Integrate HashTransit content into your websites and applications using our REST API. Public endpoints for reading published blogs, and private API-key endpoints for organization content distribution.
Base URL
All API endpoints are prefixed with https://api.hashtransit.net/api. In development, use http://localhost:5000/api instead.
Authentication
Public Endpoints (v1 API)
The /v1 API endpoints are public and do not require authentication. They return all published blogs across the platform.
Private Endpoints (Organization API)
The /blogs/external endpoints require an API key. Pass it via the X-API-Key header or ?apiKey= query parameter. API keys are generated by organization admins from the My Organizations page.
Public API (v1)
These endpoints return all published blogs on the platform. No authentication required.
/v1/blogs
Get All Published Blogs
Retrieves a paginated list of all published blogs.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 10 | Number of blogs to return |
page | number | 1 | Page number for pagination |
organizationId | number | — | Filter blogs by organization ID |
Example Response
/v1/blogs/:slug
Get Blog by Slug
Retrieves a single published blog by its slug, including full content.
/v1/organizations/:id/blogs
Get Organization Blogs
Retrieves all published blogs for a specific organization.
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 10 | Number of blogs to return |
page | number | 1 | Page number for pagination |
Private API (Organization Content)
These endpoints return published blogs for a specific organization, authenticated via API key.
/blogs/external
Get Organization Blogs by API Key
Retrieves all published blogs for the organization associated with the provided API key. Includes translation group information for multi-language content.
Headers
| Header | Type | Required | Description |
|---|---|---|---|
X-API-Key | string | Yes* | Organization API key |
* Alternatively, pass ?apiKey= as a query parameter.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 10 | Number of blogs to return |
page | number | 1 | Page number for pagination |
section | number | — | Filter by section ID |
locale | string | — | Filter by language (en, es) |
Example Response
/blogs/external/:slug
Get Single Blog by Slug (API Key)
Retrieves a single published blog by slug for the organization associated with the API key. Requires the same X-API-Key header or ?apiKey= query parameter.
Error Responses
All endpoints return a standard error format:
| Status Code | Description |
|---|---|
200 | Success |
400 | Bad Request — invalid parameters |
401 | Unauthorized — missing or invalid API key |
404 | Not Found — resource does not exist |
500 | Internal Server Error |
Code Example
Fetch organization blogs using JavaScript:
CORS & Rate Limiting
CORS: The API supports Cross-Origin Resource Sharing for all origins, allowing it to be consumed from any website or web application.
Rate Limiting: No rate limits are currently enforced. Consider caching responses on the client side to reduce server load.
Need an API Key?
Organization admins can generate and manage API keys from the My Organizations page.
