Logzly Blog API v1
This automated interface allows developers, headless scripts, and integrations to programmatically synchronize, curate, and maintain software logs and text content natively.
1. Global Conventions
1.1 Base URL
All API requests must be routed via the following root endpoint protocol:
https://logzly.com/api/v1
1.2 Authentication
Authentication is enforced using an API Key. You must supply your secret token inside the HTTP header of every request:
| Header Key | Value Assignment |
|---|---|
| X-API-KEY | Your unique client secret assigned under account profile console. |
X-API-KEY header will be explicitly rejected with a 401 Unauthorized block.
1.3 Data Formats
- Request Payload Type (POST/PUT):
application/json - Response Package Type:
application/json - Timestamp Formatting:
yyyy-MM-dd HH:mm:ss
2. Core Endpoint Index
/posts
Retrieves a paginated manifest of all active logs and drafts under your current identifier node (excludes files residing in trash).
Query Parameters
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
| page | Integer | No | 0 | Zero-indexed pagination pointer. |
| size | Integer | No | 20 | Maximum data records delivered per partition. |
Request Blueprint
curl -X GET "https://logzly.com/api/v1/posts?page=0&size=1" \
-H "X-API-KEY: your_secret_key_here"
Success Response (200 OK)
{
"username": "geek_coder",
"currentPage": 0,
"posts": [
{
"id": 12,
"title": "My Automated Post via Python",
"slug": "my-automated-post-via-python",
"status": "PUBLISHED",
"pinned": true,
"createdAt": "2026-06-10T03:58:18"
}
]
}
/posts
Spawns a new text slate entry. Execution hooks immediately spin up a headless background task to re-bake the user index files (SSG engine).
JSON Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| title | String | Yes | Header title of the post log. Cannot be blank. |
| slug | String | Yes | Clean URL handle. Enforces ^[a-z0-9_-]+$ regular syntax expression. |
| content | String | No | Body text raw stream. Fully parses standard Markdown notations. |
| tagsInput | String | No | Separated hashtags string descriptor. Absolute limit of 3. |
| action | String | No | Pass PUBLISHED to emit immediately. Omissions default to DRAFT. |
Request Blueprint
curl -X POST "https://logzly.com/api/v1/posts" \
-H "X-API-KEY: your_secret_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Publishing via OkHttp Client",
"slug": "publishing-via-okhttp-client",
"content": "This markdown content is compiled via API pipeline.",
"tagsInput": "api, automation",
"action": "PUBLISHED"
}'
Success Response (201 Created)
{
"message": "Post created successfully.",
"id": 13
}
/posts/{id}
Overrides content records tied to the exact path identifier ID. Re-compiles output assets right after verification validation.
Request Blueprint
curl -X PUT "https://logzly.com/api/v1/posts/13" \
-H "X-API-KEY: your_secret_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Modified Title via Endpoint",
"slug": "publishing-via-okhttp-client",
"content": "Updated content logs.",
"action": "DRAFT"
}'
Success Response (200 OK)
{
"message": "Post updated successfully."
}
/posts/{id}/toggle-pin
Inverts the structural anchoring parameter of a log entry, shifting its vertical alignment order in public discovery indexes.
Request Blueprint
curl -X POST "https://logzly.com/api/v1/posts/13/toggle-pin" \
-H "X-API-KEY: your_secret_key_here" \
-d ""
Success Response (200 OK)
{
"message": "Pin status toggled.",
"isPinned": true
}
/posts/{id}
Purges target entry out of distribution networks and relocates metadata parameters inside private trash nodes.
Request Blueprint
curl -X DELETE "https://logzly.com/api/v1/posts/13" \
-H "X-API-KEY: your_secret_key_here"
Success Response (200 OK)
{
"message": "Post moved to trash repository successfully."
}
3. Global Error Manifest
Unhandled processing logic configurations fail with proper standard HTTP codes alongside explicit descriptions:
| Code | Trigger Source Context | Sample JSON Body |
|---|---|---|
| 401 Unauthorized | Token credential matching mismatch or header parameter missing entirely. | {"error": "Invalid X-API-KEY."} |
| 403 Forbidden | Attempting to edit, read, or change someone else's entity profile logs. | {"error": "Access denied."} |
| 404 Not Found | The physical record matching the requested ID index path cannot be tracked. | {"error": "Post Not Found."} |
| 400 Bad Request | Illegal slug validation patterns or fields omitted completely. | {"error": "Title cannot be empty."} |
| 409 Conflict | Unique key path naming collision (the slug is already reserved by another post). | {"error": "The slug is already used..."} |