Build your own integration in any language. All you need is an HTTP client that can POST JSON.
Base URL: https://errorcapture.com/api.php
/api.php
Submit an error. This is the main endpoint your application calls when an error occurs.
Content-Type
required
application/json
hash
required
Your project key
level
required
Error severity, e.g. Fatal Error, Warning, Notice
message
required
The error message
file
optional
Source file path
line
optional
Line number (integer)
hostname
optional
Server or machine name
request
optional
Object with method, url, get, post fields
curl -X POST https://errorcapture.com/api.php \
-H "Content-Type: application/json" \
-d '{
"hash": "your-project-key",
"level": "Warning",
"message": "Undefined variable $foo",
"file": "/var/www/app/index.php",
"line": 42,
"hostname": "dev-machine",
"request": {
"method": "GET",
"url": "http://localhost/page?id=5",
"get": {"id": "5"},
"post": null
}
}'
{"ok": true, "id": 1}
If the project key doesn't exist yet, it will be auto-created. The request object is entirely optional — you can send just hash, level, and message for a minimal integration.
/api.php?action=generate
Generate a new project key.
name
optional
A label for the project
curl "https://errorcapture.com/api.php?action=generate&name=my-app"
{"hash": "62e12151cb074f9a676a48a521ae0cdb"}
/api.php?action=errors
Fetch errors for a project. Supports pagination via the since parameter.
hash
required
Your project key
since
optional
Return only errors with id greater than this value (for polling)
curl "https://errorcapture.com/api.php?action=errors&hash=your-key&since=0"
{
"errors": [
{
"id": 1,
"level": "Warning",
"message": "Undefined variable $foo",
"file": "/var/www/app/index.php",
"line": 42,
"url": "http://localhost/page?id=5",
"method": "GET",
"get_params": {"id": "5"},
"post_params": null,
"hostname": "dev-machine",
"received_at": "2026-04-14 12:00:00"
}
]
}
/api.php?action=clear
Delete all errors for a project.
hash
required
Your project key
curl "https://errorcapture.com/api.php?action=clear&hash=your-key"
{"ok": true, "deleted": 4}
The API accepts standard JSON over HTTP, so you can report errors from any language or framework.
import requests, traceback, sys
ERRORCAPTURE_ENDPOINT = "https://errorcapture.com/api.php"
ERRORCAPTURE_HASH = "your-key"
def report_error(exc_type, exc_value, exc_tb):
tb = traceback.extract_tb(exc_tb)[-1] if exc_tb else None
requests.post(ERRORCAPTURE_ENDPOINT, json={
"hash": ERRORCAPTURE_HASH,
"level": exc_type.__name__,
"message": str(exc_value),
"file": tb.filename if tb else "",
"line": tb.lineno if tb else 0,
})
sys.__excepthook__(exc_type, exc_value, exc_tb)
sys.excepthook = report_error
const ERRORCAPTURE_ENDPOINT = "https://errorcapture.com/api.php";
const ERRORCAPTURE_HASH = "your-key";
process.on("uncaughtException", (err) => {
const match = err.stack?.match(/at .+? \((.+?):(\d+):\d+\)/);
fetch(ERRORCAPTURE_ENDPOINT, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
hash: ERRORCAPTURE_HASH,
level: err.name,
message: err.message,
file: match?.[1] ?? "",
line: parseInt(match?.[2] ?? "0"),
}),
}).catch(() => {});
process.exit(1);
});
Useful for reporting errors from shell scripts or CI pipelines:
report_error() {
curl -s -X POST "https://errorcapture.com/api.php" \
-H "Content-Type: application/json" \
-d "{
\"hash\": \"your-key\",
\"level\": \"$1\",
\"message\": \"$2\",
\"file\": \"${BASH_SOURCE[1]:-unknown}\",
\"line\": ${BASH_LINENO[0]:-0}
}"
}
# Usage:
report_error "Error" "Deploy failed: migration returned non-zero"
At its simplest, the API just needs three fields. Send this JSON as a POST:
{
"hash": "your-project-key",
"level": "Error",
"message": "Something went wrong"
}
Everything else (file, line, hostname, request) is optional context that makes the dashboard more useful but isn't required.