HTTP APIs
June serves a dashboard and health probes on its main web server. The optional docs server publishes a read-only command manifest and status API.
1. Documentation & Manifest API
When enabled via DOCS_API_ENABLED=true in src/docs/server.js, June exposes a read-only, versioned interface designed for static site builders, documentation portals, and LLM context indexers.
Configuration
DOCS_API_ENABLED=true
DOCS_API_HOST=0.0.0.0
DOCS_API_PORT=3010
DOCS_ORIGIN=https://docs.june.4ofl.dev
DOCS_INCLUDE_ADMIN_COMMANDS=falseEndpoints
GET /v1/manifest
Returns the complete generated command contract with ETag caching support.
- Fields:
schemaVersion,generatedAt,product,version,categories, andcommands. - Exclusions: Excludes internal secrets, administrator IDs, database connection strings, and unwhitelisted server IDs.
GET /v1/commands
A lightweight array of command specifications without product metadata, optimized for automated CI validation and test harnesses.
GET /v1/status
Returns a status snapshot with checkedAt, status, version, uptimeSeconds, discord, database, providers, and runtime. Readiness determines whether HTTP status is 200 or 503. The main web server also publishes this snapshot at /api/status and /v1/status.
GET /v1/llms.txt
Plain-text, markdown-formatted command reference optimized for Large Language Model indexing and developer CLI consumption.
2. Dashboard API
Discord OAuth establishes a seven-day signed session. Production uses the __Host-june_session cookie with Secure, HttpOnly, and SameSite=Lax. Set a dedicated SESSION_SECRET in production. June resolves the current Discord user's access on each request.
| Method | Endpoint | Access | Description |
|---|---|---|---|
| GET | /auth/login, /auth/callback | OAuth | Start and complete Discord sign-in. |
| GET | /auth/me | Public | Check dashboard sign-in and profile. |
| POST | /auth/logout | Public | Clear the session cookie. |
| GET | /api/state | Approved | Load settings, receipts, reminders, watches, and temporary inboxes. |
| PATCH | /api/settings | Approved | Update preferences. |
| DELETE | /api/receipts/:id, /api/receipts | Approved | Delete one or all saved receipts. |
| POST | /api/reminders | Approved | Schedule a Discord DM within 24 hours. |
| DELETE | /api/reminders/:id, /api/reminders | Approved | Cancel one or all reminders. |
| POST | /api/watches | Approved | Add a URL to monitor. |
| DELETE | /api/watches/:id, /api/watches | Approved | Remove one or all watches. |
| POST | /api/tempmail | Approved | Create a temporary inbox. |
| DELETE | /api/tempmail/:address | Approved | Remove an inbox lease. |
| GET | /api/tempmail/:address/messages/:id | Approved | Read one message from an inbox the caller owns. |
| POST | /api/admin/whitelist | Admin or owner | Approve a Discord account. |
| DELETE | /api/admin/whitelist/:userId | Admin or owner | Revoke approval for a Discord account. |
Dashboard reminders go to Discord DMs. For reminders created in Discord, June checks that you can still post to the original channel before delivering. If channel delivery is unavailable, June tries DM. Temporary failures are retried, and reminders that exhaust retries show a delivery failure in the list.
June queries Stalwart on demand when loading inbox state or reading a message.
3. Health and Metrics
June exposes standard observability endpoints for container orchestrators and Prometheus scraping:
GET /healthz: Process liveness probe. Returns HTTP 200{ "ok": true, "status": "ok" }if the event loop is responsive.GET /readyz: Readiness probe. Validates Discord Gateway connection and SQLite database accessibility. Returns HTTP 503 if the database is busy or the gateway is disconnected.GET /metrics: Prometheus-formatted metrics (application counters and timings). Gated byMETRICS_TOKENBearer authentication.GET /version: Returns deployed application version and git commit hash.