ɳSentry API Reference
Error ingestion, SLO queries, and incident management endpoints
ɳSentry provides REST and GraphQL APIs for error ingestion, SLO tracking, and incident management.
Error Ingestion Endpoint
Send errors directly from your application.
URL
POST https://sentry.yourdomain.com/api/errors/events
Headers
Authorization: Bearer YOUR_NSENTRY_DSN_KEY
Content-Type: application/json
Request Body
{
"environment": "production",
"level": "error",
"message": "Failed to fetch user",
"exception": {
"values": [
{
"type": "FetchError",
"value": "Connection timeout",
"stacktrace": {
"frames": [
{
"filename": "src/api/user.ts",
"function": "fetchUser",
"lineno": 42,
"colno": 15,
"source": "const user = await fetch(...)"
}
]
}
}
]
},
"release": "1.0.0",
"timestamp": "2026-05-13T10:30:45Z"
}
Response
{
"id": "error-uuid-here",
"received": true
}
GraphQL API
Access via https://sentry.yourdomain.com/api/graphql
Query: Errors
query GetErrors($filter: ErrorFilter!) {
errors(first: 50, filter: $filter) {
edges {
node {
id
message
severity
occurrenceCount
firstSeen
lastSeen
stackTrace
sourceMap {
filename
source
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
Variables:
{
"filter": {
"severity": "ERROR",
"service": "api",
"timeRange": "24h"
}
}
Query: SLOs
query GetSLOs {
slos {
edges {
node {
id
name
service
targetPercentage
currentBurnRate
errorBudgetRemaining
status # ON_TRACK, AT_RISK, BREACHED
}
}
}
}
Query: Incidents
query GetIncidents($status: IncidentStatus) {
incidents(status: $status) {
edges {
node {
id
title
severity
status
createdAt
resolvedAt
assignee {
name
email
}
alerts {
count
types
}
}
}
}
}
REST Endpoints
Create Incident
POST /api/incidents
Authorization: Bearer token
{
"title": "API latency spike",
"severity": "high",
"description": "p99 latency exceeded 5s threshold",
"service": "api",
"runbookUrl": "https://wiki.yourdomain.com/incident-response"
}
Update SLO
PATCH /api/slos/{slo-id}
Authorization: Bearer token
{
"targetPercentage": 99.9,
"errorBudgetAlertThreshold": 10
}
Get Status Page
GET /api/status-page/{slug}
Response:
{
"components": [
{
"name": "API",
"status": "operational",
"lastUpdate": "2026-05-13T10:00:00Z"
}
],
"incidents": [ ... ]
}
Authentication
Generate API tokens in the ɳSentry dashboard:
Settings → API Tokens → Create Token
Token format: nsentry_xxx_yyy (DSN key for error ingestion, secret key for management API)
Rate Limits
- Error ingestion: 10,000 events/min per DSN
- GraphQL/REST: 100 requests/min per token
- Status page: No limit (public)
SDKs
Pre-built SDKs available:
- JavaScript/TypeScript:
@nsentry/react,@nsentry/nextjs - Python:
nsentry-sdk - Go:
github.com/nself-org/nsentry-go - iOS:
NSentry(CocoaPods) - Android:
com.nself:nsentry(Maven)
Install & initialize per-SDK docs.
Example: Send Error from Node.js
const nsentry = require('@nsentry/node');
nsentry.init({
dsn: 'https://key@sentry.yourdomain.com/...',
environment: 'production',
tracesSampleRate: 0.1
});
try {
// Your code
} catch (error) {
nsentry.captureException(error);
}
See: Getting Started · Plugins · Architecture