Reference
Capture API
To send errors to Oxvel from any language, or to configure the browser script.
The endpoint
POST https://oxvel.dev/api/ingest/ox_…
No session needed, the project key is enough. The body is a JSON object, sent as application/json or text/plain. Any site can call this endpoint. 100,000 characters at most.
Fields
All are optional. Texts that are too long are truncated.
| Field | Content |
|---|---|
type | The error type, such as TypeError. Defaults to Error. |
message | The message, 500 characters at most. |
stack | The stack trace, as your language writes it. |
level | fatal, error, warning or info. Defaults to error. |
release | The live commit or version. |
environment | production, staging… |
url | The page or request involved. |
method | The HTTP method of the request. |
user | The identifier of the affected person. |
platform | browser, node… |
runtime | The browser or engine version. |
tags | A key-value object, 20 entries at most. |
breadcrumbs | What happened before. The last 10 are kept. |
Example
curl -X POST https://oxvel.dev/api/ingest/ox_… \
-H "content-type: application/json" \
-d '{"type":"TypeError","message":"cart is undefined","level":"error","release":"a1b2c3d"}'Responses
| 204 | Received |
| 400 | Invalid key or JSON |
| 404 | No project has this key |
| 413 | Body too large |
| 429 | Too many new errors for this project this hour |
Beyond 30 new errors per hour, errors that are already known keep being counted.
The browser script
data-key | The project key |
data-release | The deployed commit |
data-environment | Defaults to production |
Oxvel.capture(err, options) | Sends an error manually. options can contain level and tags. |
Oxvel.setUser(id) | Links the following errors to a person |
The script keeps the last 20 events (console errors and warnings, page changes). It sends at most 25 errors per page load, and the same error only once if it comes back within the same second.