Send Error Event
You typically don’t call this directly — the SDK handles it. This reference is for building custom integrations.
POST https://ingest.squasher.ai/v1/ingest/{project_id}
| Header | Required | Description |
|---|
x-squasher-key | Yes | Your project API key |
Content-Type | Yes | application/json |
Request Body
{
"message": "Cannot read properties of undefined (reading 'map')",
"type": "TypeError",
"stack": "TypeError: Cannot read properties of undefined...\n at UserList (src/components/UserList.tsx:24:18)",
"frames": [
{
"filename": "src/components/UserList.tsx",
"function": "UserList",
"lineno": 24,
"colno": 18,
"in_app": true
}
],
"level": "error",
"environment": "production",
"release": "v1.2.3",
"tags": { "browser": "Chrome 120" },
"user": { "id": "user_42", "email": "user@example.com" },
"breadcrumbs": [
{ "category": "navigation", "message": "/dashboard", "timestamp": "2024-01-15T10:30:00Z" },
{ "category": "fetch", "message": "GET /api/users -> 200", "timestamp": "2024-01-15T10:30:01Z" }
]
}
Response
{
"id": "evt_550e8400-e29b-41d4-a716-446655440000",
"status": "accepted"
}
Status code 202 Accepted. The event is queued for processing — fingerprinting, grouping, and AI triage happen asynchronously.
Payload Fields
| Field | Type | Required | Description |
|---|
message | string | Yes | Error message (cannot be empty) |
type | string | No | Error class name (e.g. TypeError) |
stack | string | No | Raw stack trace string |
frames | array | No | Parsed stack frames (preferred over raw stack) |
level | enum | No | fatal, error, warning, info, debug. Default: error |
environment | string | No | Environment tag |
release | string | No | Release/version string |
tags | object | No | Arbitrary key-value metadata |
user | object | No | User context (id, email, username, ip_address) |
request | object | No | Request context (url, method, headers) |
breadcrumbs | array | No | Trail of events leading to the error |
extra | object | No | Arbitrary extra data |
timestamp | string | No | ISO 8601 timestamp from client |
Vercel Log Drain
POST https://ingest.squasher.ai/v1/drain/vercel/{project_id}
Accepts Vercel log drain payloads in NDJSON or JSON array format. See Vercel integration for setup.
No API key required — authenticate by configuring the drain URL with your project ID. Optionally pass x-squasher-key for additional verification.
Response
200 OK on success.
Railway Log Drain
POST https://ingest.squasher.ai/v1/drain/railway/{project_id}
Accepts Railway HTTP log drain payloads in NDJSON or JSON array format. See Railway integration for setup.
Response
200 OK on success.