/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).
This endpoint requires a valid API key passed as a query parameter or Bearer token.
Get your API keyParameters
4 body parameters
messagestringrequiredLog 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 signalsuccess= positive milestonewarning= potential issueerror= failure that impacted a request/jobcritical= high priority incident requiring immediate attention.
If omitted, the backend should treat it as a default level (commonly info).
infosuccesserrorwarningcriticalsendNotificationbooleanWhen 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 | booleanExample 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);Example Response
{
"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.