API Reference
Quick reference for the SimpleNS REST API, with a link to the complete Bruno API collection.
Complete Bruno API Documentation
The complete, up-to-date REST API specification (every endpoint, request body, query param, and example) is maintained as a Bruno API collection at: github.com/SimpleNotificationSystem/simplens-core/tree/master/api-docs
Authentication
SimpleNS uses unified accessControl middleware:
- Notification & File Upload APIs (
/api/notification*,/api/file/upload): Authenticate with a scoped API key (notificationscope, created in Dashboard → API Keys (/keys)) or an Admin JWT/cookie session. - Admin Management APIs (
/api/keys,/api/plugins/*,/api/settings/*,/api/storage/*,/api/file/:id*,/api/notifications/*): Require an Admin JWT/cookie session (created via/setup+/login).
Authorization: Bearer <YOUR_API_KEY_OR_ADMIN_JWT>Quick Endpoints Overview
| Group | Key Endpoints | Purpose |
|---|---|---|
| Notifications | POST /api/notification, POST /api/notification/batch | Dispatch single or batch notifications (202 Accepted). Use Payload Studio in the Dashboard for exact provider schemas; attach uploaded files in content.attachments or content.<channel>.attachments. |
| Auth & Setup | POST /api/auth/setup, POST /api/auth/login, GET /api/auth/status | First-launch admin setup and JWT/cookie login (protected by authRateLimiter). |
| API Keys | GET /api/keys, POST /api/keys, DELETE /api/keys/:id | Create and revoke scoped API keys. |
| Plugins & Routing | GET /api/plugins, GET /api/plugins/catalog, install / version / uninstall, npm-auth, /api/providers/*, /api/channels/routing | Zero-restart plugin lifecycle, encrypted provider credentials, and channel routing. |
| Dynamic Settings | GET /api/settings, PUT /api/settings, POST /api/settings/reset | Live operational config updates (workers, retries, limits, rate limiters). |
| Notifications & Failures | PUT /api/notifications/:id (edit & requeue), POST /api/notifications/:id/retry, /api/notifications/* | Inspect notifications, edit failed payloads/recipients, and retry. |
| Storage & Attachments | /api/storage/*, POST /api/file/upload, GET /api/file/:id, GET /api/file/:id/download | Configure MinIO/S3 storage and upload/download attachments. See File Attachments. |
| Health | GET /api/health | Service health check (plus internal K8s probeServer liveness/readiness probes). |
Common Status Codes
| Code | Meaning | Description |
|---|---|---|
202 | Accepted | Notification(s) queued for delivery. |
400 | Bad Request | Validation failure (errors array in response). |
401 | Unauthorized | Invalid or missing API key or Admin session. |
403 | Forbidden | Token or API key lacks the required scope/permission. |
409 | Conflict | Duplicate request_id + channel detected. |
429 | Too Many Requests | Redis-backed IP rate limiter (generalRateLimiter or authRateLimiter) triggered. |
500 | Internal Error | Server-side processing error. |
File Attachments
Upload, store, and attach files to notifications using MinIO / S3-compatible object storage, with per-provider validation and automatic cleanup.
Admin Dashboard
Essential web-based control plane for SimpleNS onboarding, plugin management, API keys, live settings, file storage, and monitoring.
Docs