🔥 LogBlazer

API Documentation

LogBlazer provides endpoints for ingesting logs and managing heartbeat monitors. Send log data via POST and it appears in your dashboard. Register heartbeat URLs and LogBlazer will actively ping them on a schedule, tracking health checks, response times, and alerting you when things break.

Base URL

https://app.logblazer.com

Endpoint

POST /api/logs/{api_key}

The api_key is a UUID unique to each project. You can find it in your project settings on the LogBlazer dashboard. No other authentication is required — the key in the URL is your credential.

Request

Headers

Content-Type: application/json

Body (JSON)

Field Type Required Description
payload string Yes The log message content.
status string No One of: SUCCESS, FAILURE, WARNING, NOTICE. Defaults to NOTICE.
source string No Identifies the origin of the log (e.g. web-server, cron-worker, deploy-script). Max 255 characters.
monitor_title string No* Display name for the monitor on your project dashboard (e.g. CPU Usage, Deploy Status). Max 255 characters.
monitor_type string No* One of: status, boolean, number, text. Determines how the value is displayed on the dashboard.
monitor_value string No* The current value for this monitor (e.g. healthy, true, 42). Max 255 characters.
monitor_status string No Controls the color tint of the monitor card. One of: success (green), failure (red), warning (yellow). Omit for a neutral appearance.

* Monitor fields are optional, but if any one is provided then all three (monitor_title, monitor_type, monitor_value) are required together.

Monitors

Monitors let you display the latest state of a value on your project dashboard. Each log entry can optionally include monitor data. The dashboard shows the most recent value for each unique monitor_title within a project.

Monitor types

Type Description
status A status label such as healthy, degraded, or down.
boolean A true/false value (e.g. true or false).
number A numeric value (e.g. 42, 99.8).
text Free-form text (e.g. v2.4.1, us-east-1).

Monitor status (color)

The optional monitor_status field controls the color tint of the monitor card on the dashboard. It is independent of the log status field.

Value Color Use when
success Green Healthy, deployed, passed, OK
failure Red Failed, error, down
warning Yellow Degraded, slow, at capacity

When omitted, the monitor card renders with a neutral appearance.

Example: sending a monitor

curl -X POST https://app.logblazer.com/api/logs/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "payload": "Health check passed",
    "status": "SUCCESS",
    "source": "health-checker",
    "monitor_title": "API Status",
    "monitor_type": "status",
    "monitor_value": "healthy",
    "monitor_status": "success"
  }'

Response

201 Created

{
  "message": "Log received"
}

404 Not Found

Returned when the API key does not match any project.

422 Unprocessable Entity

Returned when validation fails (e.g. missing payload or invalid status value).

Examples

cURL

curl -X POST https://app.logblazer.com/api/logs/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{"payload": "User signed up", "status": "SUCCESS", "source": "auth-service"}'

JavaScript (fetch)

await fetch("https://app.logblazer.com/api/logs/YOUR_API_KEY", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    payload: "Deployment finished",
    status: "SUCCESS",
    source: "deploy-script"
  })
});

PHP

$response = Http::post("https://app.logblazer.com/api/logs/YOUR_API_KEY", [
    'payload' => 'Database backup completed',
    'status'  => 'SUCCESS',
    'source'  => 'backup-worker',
]);

Python

import requests

requests.post("https://app.logblazer.com/api/logs/YOUR_API_KEY", json={
    "payload": "Cron job failed: timeout after 30s",
    "status": "FAILURE",
    "source": "cron-worker"
})

Bash (minimal)

# Minimum required — just the payload
curl -X POST https://app.logblazer.com/api/logs/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{"payload": "Something happened"}'

LLM-friendly endpoint

Each project's public dashboard has a plain-text endpoint designed for LLM consumption. It returns the current monitors and recent logs as a Markdown document.

GET /d/{api_key}/llm

Response

Returns text/plain Markdown with monitors table and recent log entries. No authentication required.

# My Project — Dashboard

Generated: 2026-03-05 14:30:00 UTC

## Monitors (2)

| Monitor | Value | Monitor Status | Updated |
|---|---|---|---|
| API Status | healthy | success | 2026-03-05 14:25:00 |
| Deploy | DEPLOYED | success | 2026-03-05 14:20:00 |

## Recent Logs (3)

| Time | Source | Status | Payload |
|---|---|---|---|
| 2026-03-05 14:25:00 | health-checker | SUCCESS | Health check passed |
| 2026-03-05 14:20:00 | deploy-pipeline | SUCCESS | Production deployed |
| 2026-03-05 14:15:00 | cron | NOTICE | Backup completed |

Usage

curl https://app.logblazer.com/d/YOUR_API_KEY/llm

Use this endpoint to give AI agents and LLMs access to your project's current status. The same public dashboard is also available as a web page at /d/{api_key}.

Heartbeat Monitors

Heartbeats let LogBlazer actively monitor your services. Register a URL and LogBlazer will ping it on a configurable schedule, parse a standardized JSON health response, and alert you by email when checks fail. Results are integrated into your project dashboard as monitors and log entries automatically.

Register a heartbeat

POST /api/heartbeats/{api_key}
Field Type Required Description
name string Yes Display name for the heartbeat (e.g. My App Production). Max 255 characters.
short_name string No Compact display name for dashboard cards (e.g. CE Prod). Max 50 characters. Falls back to name if not set.
url string Yes The health check URL to ping (e.g. https://myapp.com/api/heartbeat). Max 2048 characters.
auth_token string No Bearer token sent with each health check request. Stored encrypted.
interval_minutes integer No How often to ping, in minutes. Range: 1–60. Default: 3.
timeout_seconds integer No Request timeout. Range: 1–30. Default: 10.
alert_emails array No Email addresses to notify on failure. Max 5 addresses.
alert_after_failures integer No Consecutive failures before alerting. Range: 1–10. Default: 2.

Response — 201 Created

{
  "id": "uuid",
  "name": "My App Production",
  "short_name": null,
  "url": "https://myapp.com/api/heartbeat",
  "interval_minutes": 3,
  "timeout_seconds": 10,
  "alert_emails": ["ops@myapp.com"],
  "alert_after_failures": 2,
  "is_active": true,
  "last_status": "UNKNOWN",
  "created_at": "2026-03-09T12:00:00Z"
}

Other heartbeat endpoints

Method Path Description
GET /api/heartbeats/{api_key} List all heartbeats for the project.
PATCH /api/heartbeats/{api_key}/{id} Update a heartbeat (partial update).
DELETE /api/heartbeats/{api_key}/{id} Delete a heartbeat. Returns 204.
GET /api/heartbeats/{api_key}/{id}/status Get current status, checks, and recent results.
POST /api/heartbeats/{api_key}/{id}/check Trigger an immediate health check.

Health Check Protocol

Your target application should respond to LogBlazer's health check requests with a JSON body containing an overall status and individual checks. LogBlazer sends a GET request with Accept: application/json and an optional Authorization: Bearer header if configured.

Expected response

{
  "status": "PASS",
  "checks": {
    "database": {
      "status": "PASS",
      "ms": 3,
      "detail": "SELECT 1 succeeded",
      "label": "DB Connection"
    },
    "queue_health": {
      "status": "PASS",
      "detail": "No stale jobs"
    },
    "external_api": {
      "status": "FAIL",
      "ms": 5023,
      "detail": "Timeout after 5s"
    }
  }
}
Field Type Required Description
status string Yes PASS or FAIL. Overall health status.
checks object No Map of check name → check result. When omitted, only the top-level status is used.
checks.*.status string Yes PASS or FAIL for each check.
checks.*.ms integer No Response time in milliseconds.
checks.*.detail string No Human-readable context.
checks.*.label string No Custom display name for this check. Overrides the auto-humanized check key on the dashboard.

HTTP status codes

Return 200 when all checks pass and 503 when one or more checks fail. Any other status code, timeout, or connection error is treated as a complete failure.

Example: registering and checking a heartbeat

# Register a heartbeat
curl -X POST https://app.logblazer.com/api/heartbeats/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production API",
    "url": "https://myapp.com/api/heartbeat",
    "interval_minutes": 5,
    "alert_emails": ["ops@myapp.com"],
    "alert_after_failures": 3
  }'

# Check status
curl https://app.logblazer.com/api/heartbeats/YOUR_API_KEY/HEARTBEAT_ID/status

# Trigger an immediate check
curl -X POST https://app.logblazer.com/api/heartbeats/YOUR_API_KEY/HEARTBEAT_ID/check

How it works

Automatic monitoring

LogBlazer pings your URL at the configured interval. Each check creates log entries and monitor cards on your dashboard automatically.

Smart alerting

Alerts are sent only after the configured number of consecutive failures. You also get a recovery notification when a heartbeat comes back up.

Quick reference

Authentication

API key in the URL path. No headers or tokens needed.

Content type

Always application/json.

Status values

SUCCESS, FAILURE, WARNING, NOTICE

Monitor types

status, boolean, number, text

Monitor status

success, failure, warning

Rate limits

None currently enforced.

Heartbeat intervals

1–60 minutes (default 3)

Health check response

200 = PASS, 503 = FAIL, other = failure