SamaySetu API Docs LogoSamaySetu API Docs Logo
SamaySetu API Docsv1.0.0
  • Documentation
  • API Reference
Getting Started
    OverviewAPI Referencev1
Reference
    Reference OverviewData ModelsCommon HeadersHTTP Status CodesError CodesRate Limits and Maintenance
Useful Links
    SamaySetu Platform
Reference

Rate Limits and Maintenance

Design client applications to handle request throttling (429) and scheduled institutional maintenance windows (503) gracefully.

Tiered Rate Limits (429 Too Many Requests)

Requests are throttled per client IP over a 60,000 ms (1 minute) rolling window using three endpoint tiers:

TierApplies ToProduction Limit / MinDevelopment Default / Min
Authentication/auth/**10 requests20 requests
WritesPOST, PUT, DELETE, PATCH30 requests60 requests
ReadsGET, OPTIONS, HEAD60 requests120 requests

Sample 429 Response (RateLimitErrorResponse)

Code
{ "error": "Too many requests. Please try again later.", "retryAfterMs": 60000 }

Recommended Client Backoff

  1. Pause outgoing requests when HTTP 429 arrives and wait at least retryAfterMs milliseconds (with small jitter) before retrying idempotent GET calls.
  2. Cache reference endpoints (GET /api/academic-years/current, GET /api/time-slots, GET /admin/api/departments) for the duration of a user session rather than polling on every UI route change.
  3. Avoid parallel login bursts in automated scripts; reuse one obtained Bearer token across requests within its 1-hour lifetime.

Maintenance Mode (503 Service Unavailable)

During planned maintenance, protected domain routes and POST /auth/login return HTTP 503:

Code
{ "status": 503, "error": "MaintenanceMode", "maintenanceEnabled": true, "message": "SamaySetu is undergoing scheduled maintenance. Please check back shortly.", "expectedEndAt": "2026-10-01T08:00:00Z" }

Maintenance-Exempt Read Checks

Clients can continue checking service status and caller context cleanly even during maintenance:

  • GET /api/public/maintenance-status (unauthenticated preflight banner check)
  • GET /auth/me, POST /auth/forgot-password, POST /auth/reset-password
  • GET /admin/api/permissions/my-permissions and GET /admin/api/permissions/my-effective-permissions
  • GET /admin/api/institution-settings and PUT /admin/api/institution-settings
Error Codes
On this page
  • Tiered Rate Limits (429 Too Many Requests)
    • Sample 429 Response (RateLimitErrorResponse)
    • Recommended Client Backoff
  • Maintenance Mode (503 Service Unavailable)
    • Maintenance-Exempt Read Checks
JSON
JSON