Skip to main content

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}

Headers

HeaderRequiredDescription
x-squasher-keyYesYour project API key
Content-TypeYesapplication/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

FieldTypeRequiredDescription
messagestringYesError message (cannot be empty)
typestringNoError class name (e.g. TypeError)
stackstringNoRaw stack trace string
framesarrayNoParsed stack frames (preferred over raw stack)
levelenumNofatal, error, warning, info, debug. Default: error
environmentstringNoEnvironment tag
releasestringNoRelease/version string
tagsobjectNoArbitrary key-value metadata
userobjectNoUser context (id, email, username, ip_address)
requestobjectNoRequest context (url, method, headers)
breadcrumbsarrayNoTrail of events leading to the error
extraobjectNoArbitrary extra data
timestampstringNoISO 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.