DocsInteractive API Docs/api/v1/tracking/log
post

/api/v1/tracking/log

Sentry-like logging endpoint for centralized log ingestion.

Accepts log events from frontends (React/Next.js), backend services, workers and third-party systems. Each request creates a single log entry bound to the organisation, classified by severity and optionally eligible for notifications.

Debouncing can be enabled to group repeated/noisy events. useDebounce supports a simple boolean or an advanced configuration with a custom key and a relative time window (maxInterval, e.g. 10m, 1h 30m, or minutes).

Endpoint Info
Base URLapi.bizkithub.com
AuthBearer Token
Methods1
Authentication Required

This endpoint requires a valid API key passed as a query parameter or Bearer token.

Get your API key

Parameters

4 body parameters

messagestringrequired

Log message payload. Intended for system/application logs coming from external services/websites. Keep it human-readable or JSON; include essential context (e.g., module, action, identifiers) to make triage easier. For structured data, serialize into the message or extend the endpoint to accept extra fields.

level"info" | "success" | "error" | "warning" | "critical"

Severity level of the log entry. Used for filtering, alerting and retention rules.

  • info = diagnostic signal
  • success = positive milestone
  • warning = potential issue
  • error = failure that impacted a request/job
  • critical = high priority incident requiring immediate attention.

If omitted, the backend should treat it as a default level (commonly info).

Values: infosuccesserrorwarningcritical
sendNotificationboolean

When true, the log entry is eligible to trigger notifications (e.g., email/Slack/push) according to organisation settings. Use sparingly for actionable events (typically error/critical). If omitted, the system decides based on level and notification rules.

useDebounceobject | boolean

Example Request

JavaScript fetch

const response = await fetch("https://api.bizkithub.com/api/v1/tracking/log", {
  method: "POST",
  headers: {
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "message": "[checkout] Payment callback failed: missing transId (orderId=25000233)",
    "level": "error",
    "sendNotification": true
  })
});

const data = await response.json();
console.log(data);
post

Example Response

200Success
{
  "success": true
}

cURL

Command line example

curl -X POST "https://api.bizkithub.com/api/v1/tracking/log" \
  -H "Content-Type: application/json" \
  -d '{
  "message": "[checkout] Payment callback failed: missing transId (orderId=25000233)",
  "level": "error",
  "sendNotification": true
}'

Need an API key?

All BizKitHub API endpoints require authentication via API key.

Get API Key