SimpleNS LogoDocs

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 (notification scope, 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

GroupKey EndpointsPurpose
NotificationsPOST /api/notification, POST /api/notification/batchDispatch 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 & SetupPOST /api/auth/setup, POST /api/auth/login, GET /api/auth/statusFirst-launch admin setup and JWT/cookie login (protected by authRateLimiter).
API KeysGET /api/keys, POST /api/keys, DELETE /api/keys/:idCreate and revoke scoped API keys.
Plugins & RoutingGET /api/plugins, GET /api/plugins/catalog, install / version / uninstall, npm-auth, /api/providers/*, /api/channels/routingZero-restart plugin lifecycle, encrypted provider credentials, and channel routing.
Dynamic SettingsGET /api/settings, PUT /api/settings, POST /api/settings/resetLive operational config updates (workers, retries, limits, rate limiters).
Notifications & FailuresPUT /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/downloadConfigure MinIO/S3 storage and upload/download attachments. See File Attachments.
HealthGET /api/healthService health check (plus internal K8s probeServer liveness/readiness probes).

Common Status Codes

CodeMeaningDescription
202AcceptedNotification(s) queued for delivery.
400Bad RequestValidation failure (errors array in response).
401UnauthorizedInvalid or missing API key or Admin session.
403ForbiddenToken or API key lacks the required scope/permission.
409ConflictDuplicate request_id + channel detected.
429Too Many RequestsRedis-backed IP rate limiter (generalRateLimiter or authRateLimiter) triggered.
500Internal ErrorServer-side processing error.

On this page