Endpoint
Authentication
This endpoint uses DSN key authentication, not a session cookie. Pass your project’s public key in theX-Sentry-Auth request header using the sentry_key= format. You can find your DSN public key in Project Settings → Client Keys.
Path Parameters
The project ID extracted from your DSN. The DSN format is
https://<publicKey>@<host>/<projectId> — the path segment after the host is your projectId.Request Body
Send a JSON object conforming to the envelope schema below. Theexception field is the only required top-level key.
Top-level fields
The error payload. Contains the exception class, message, and full stack trace. See the Exception object section for the full shape.
Severity level of the event. Accepted values:
fatal, error, warning, info, debug.
Defaults to error.When the error occurred, expressed as milliseconds since the Unix epoch (i.e. the value of
Date.now()). Must be ≥ 1577836800000 (2020-01-01). Omit this field to let the server use the receipt time.The deployment environment, e.g.
production, staging, or development.The release identifier for your application, e.g. a semantic version
1.4.2 or a Git SHA.Information about the affected user. Both fields are optional but at least one improves issue triage.
| Field | Type | Description |
|---|---|---|
id | string | Your internal user ID |
email | string | User’s email address |
An ordered list of events that led up to the error — navigation changes, log lines, network requests, etc. Maximum 100 breadcrumbs per envelope.Each breadcrumb has the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
type | string | ✅ | Category label, e.g. navigation, http |
message | string | — | Human-readable description |
timestamp | number | — | Milliseconds since epoch (Date.now()) |
data | object | — | Arbitrary key/value metadata |
A flat
Record<string, string> of arbitrary tags you want to associate with this event, e.g. { "region": "us-east-1", "tenant": "acme" }. All keys and values must be strings.Metadata about the HTTP request that triggered the error.
| Field | Type | Description |
|---|---|---|
url | string | Full request URL |
method | string | HTTP method |
headers | Record<string, string> | Request headers map |
Runtime context details about the client environment.
| Field | Type | Description |
|---|---|---|
browser.name | string | Browser name, e.g. Chrome |
browser.version | string | Browser version, e.g. 125.0 |
os.name | string | Operating system, e.g. macOS |
os.version | string | OS version, e.g. 14.4 |
Exception object
Theexception object is required and must include a non-empty stack trace.
The error class name, e.g.
TypeError, RangeError, or your custom exception class.The error message string, e.g.
Cannot read properties of undefined (reading 'id').An array of stack frames in innermost-first order (the frame at index
0 is the throw site). Must contain at least one frame.| Field | Type | Required | Description |
|---|---|---|---|
filename | string | ✅ | Source file path or URL |
lineno | integer | ✅ | Line number (must be a positive integer) |
function | string | — | Function or method name |
colno | integer | — | Column number |
Example Request
Responses
| Status | Meaning |
|---|---|
200 | Event accepted and recorded. |
400 | Invalid envelope — validation failed. The response body contains field-level errors. |
401 | Missing or invalid DSN public key in X-Sentry-Auth. |
429 | Rate limit or monthly event quota exceeded. |
200 — Accepted
400 — Validation Error
Transaction Envelopes (performance)
The same endpoint also accepts performance envelopes, discriminated by"type": "transaction". They pass the same DSN auth, rate limit, and quota chain as error envelopes.
Marks the envelope as a performance transaction instead of an error event.
Operation label, e.g.
page.load /dashboard (1–200 chars).Total duration in milliseconds (≥ 0).
Milliseconds since epoch — same rule as error envelopes.
Outcome, e.g.
ok (default).Optional web vitals:
{ lcp?, cls?, fcp?, ttfb? } — LCP/FCP/TTFB in ms, CLS unitless.