Skip to content

API Documentation

Scalar

The API documentation is served by Scalar, a modern interactive API documentation UI. When the API is running locally, access Scalar at:

http://localhost:5000/scalar

Scalar reads the OpenAPI specification generated by Microsoft.AspNetCore.OpenApi and provides:

  • Interactive request/response testing
  • All registered endpoints with their schemas
  • Request body examples
  • Authentication support

API Endpoints

Health Checks

MethodPathDescription
GET/healthAggregated health status (cached 10s)
GET/health/liveLiveness probe (no dependency checks)
GET/health/readyReadiness probe (all dependencies)

Storage (Internal)

MethodPathDescription
POST/api/internal/storage/uploadUpload file (multipart)
GET/api/internal/storage/{id}/urlGet presigned download URL
DELETE/api/internal/storage/{id}Delete file

Test Endpoints (Development Only)

These endpoints are only registered when ASPNETCORE_ENVIRONMENT=Development:

MethodPathDescription
POST/api/internal/test/auditCreate test audit log in ClickHouse
POST/api/internal/test/databaseInsert and retrieve test record in PostgreSQL
POST/api/internal/test/emailSend test email via Mailpit
POST/api/internal/test/cacheWrite and read Redis cache entry
POST/api/internal/test/outboxWrite a test outbox message and verify processing

Email Renderer API

The email renderer runs as a separate Hono/Bun service on port 3050.

MethodPathDescription
GET/healthHealth check ({ "status": "ok", "service": "wilo-email" })
POST/renderRender email template to HTML + plain text

POST /render

Request:

json
{
  "template": "welcome",
  "props": {
    "userName": "John Doe",
    "baseUrl": "https://clubwilo.com",
    "dashboardUrl": "https://clubwilo.com/dashboard"
  }
}

Response:

json
{
  "html": "<!DOCTYPE html>...",
  "text": "Welcome, John Doe..."
}

Available templates: welcome, verify-email, reset-password, notification