Skip to content
Dashboard

API Reference - Event Schemas

These are the JSON schemas for events the SDK sends to the Guard ingest endpoint. You don’t normally interact with these directly — they’re documented here for debugging and self-hosting.

Request event

FieldTypeDescription
urlstringRequest URL as the framework provides it. May include scheme/host (Python) or be path-only (Node, Go)
endpointstringPath with query string
methodstringHTTP method, uppercased
status_codeintResponse status code
request_headersobjectLowercased keys, sensitive values redacted
request_bodyanyParsed JSON when possible, capped at 64KB
response_headersobjectLowercased keys
response_bodyanyParsed JSON when possible, capped at 64KB
duration_msintResponse time in milliseconds
client_ipstringExtracted from proxy headers
{
"url": "/api/users/42",
"endpoint": "/api/users/42",
"method": "GET",
"status_code": 200,
"request_headers": {
"content-type": "application/json",
"authorization": "[REDACTED]"
},
"request_body": null,
"response_headers": { "content-type": "application/json" },
"response_body": {
"id": 42,
"name": "Jane Doe",
"email": "ja***@example.com"
},
"duration_ms": 23,
"client_ip": "203.0.113.42"
}

Error event

FieldTypeDescription
_typestringAlways "error"
error_typestringException class name
error_messagestringError message
levelstring"fatal", "error", or "warning"
fingerprintstring?Optional grouping key (Node, Python)
stack_framesStackFrame[]Stack trace
request_urlstring?Request URL that caused the error
request_methodstring?HTTP method
client_ipstring?Client IP
timestampintUnix milliseconds

Stack frame

FieldTypeDescription
filestringSource file path
lineintLine number
columnint?Column (Node, Python 3.11+)
functionstringFunction name
contextstring[]?Surrounding source lines (Python only)
in_appbooltrue if your code, false for library/runtime