This page inventories API endpoints and their access requirements. For browser pages and other UI routes, use Page and admin routes.
Resident Council website APIs
Endpoints
| Path | Method | Auth | Purpose | Source |
|---|---|---|---|---|
/api/changelog | GET | Public | Aggregate GitHub commits and releases | ihnyc-rc-landing/functions/api/changelog.ts |
/api/canva-image | GET | Public | Resolve Canva preview image (with screenshot fallback) | ihnyc-rc-landing/functions/api/canva-image.ts |
/api/stats | GET | Public in code (edge protection expected) | Serve stats.json from R2 | ihnyc-rc-landing/functions/api/stats.ts |
/api/csv-upload | POST | Public in code (edge protection expected) | Upload CSV/Excel to R2 with metadata | ihnyc-rc-landing/functions/api/csv-upload.ts |
/api/csv-list | GET | Public in code (edge protection expected) | List uploaded datasets | ihnyc-rc-landing/functions/api/csv-list.ts |
/api/csv-data | GET | Public in code (edge protection expected) | Fetch dataset data | ihnyc-rc-landing/functions/api/csv-data.ts |
/api/dataset-types | GET | Public in code (edge protection expected) | List dataset schemas | ihnyc-rc-landing/functions/api/dataset-types.ts |
/api/publish | POST | Public in code (edge protection expected) | Publish curated datasets to analytics-store | ihnyc-rc-landing/functions/api/publish.ts |
Programs Calendar APIs
Endpoints
| Path | Method | Auth | Purpose | Source |
|---|---|---|---|---|
/api/subs/new | POST | Public (Turnstile for programs) | Start subscription flow | ihnyc-rc-cal-landing/functions/api/subs/new.ts |
/api/subs/verify | GET | Magic link | Mint calendar token | ihnyc-rc-cal-landing/functions/api/subs/verify.ts |
/api/turnstile-site-key | GET | Public | Return Turnstile site key | ihnyc-rc-cal-landing/functions/api/turnstile-site-key.ts |
/renew | GET | Signed renewal credential | Show renewal confirmation | ihnyc-rc-cal-landing/functions/renew.ts |
/api/subs/extend | POST | Signed renewal credential | Extend an existing token row | ihnyc-rc-cal-landing/functions/api/subs/extend.ts |
/cal/programs.ics | GET/HEAD | Token | Serve programs ICS from R2 | ihnyc-rc-cal-landing/functions/cal/programs.ics.ts |
/cal/internal.ics | GET/HEAD | Access (edge) | Proxy internal ICS via n8n | ihnyc-rc-cal-landing/functions/cal/internal.ics.ts |
/api/webhooks/resend | POST | Svix signature | Record email delivery outcomes | ihnyc-rc-cal-landing/functions/api/webhooks/resend.ts |
/api/cron/regenerate-programs-ics | POST | Cron bearer token | Build Programs ICS from Notion | ihnyc-rc-cal-landing/functions/api/cron/regenerate-programs-ics.ts |
/api/cron/renewal-warnings | POST | Cron bearer token | Send renewal warnings | ihnyc-rc-cal-landing/functions/api/cron/renewal-warnings.ts |
/api/admin/* | Varies | Access JWT + RC Console action grant | Observe and operate subscriptions, tokens, email, and templates | ihnyc-rc-cal-landing/functions/api/admin/_middleware.ts |
The exact Calendar admin route-to-action map is in the service API reference. Mixpanel and /api/admin/mixpanel-test have been removed.
RC Console APIs
| Path | Method | Auth | Purpose | Source |
|---|---|---|---|---|
/api/authz/check | POST | Machine service token | Decide whether a person’s current role includes a service action | ihnyc-rc-landing/rc-admin/src/routes/authz.ts |
/api/health | GET | Health service token | Return non-PII cron, publish, and roster health | ihnyc-rc-landing/rc-admin/src/routes/health.ts |
/api/console/* | Varies | Verified Access identity and Console capability | Manage people, positions, assignments, access maps, terms, and settings | ihnyc-rc-landing/rc-admin/src/routes/console.ts |
/api/self/* | Varies | Verified current-member identity | Claim an identity and update the signed-in person’s own profile | ihnyc-rc-landing/rc-admin/src/routes/self.ts |
/api/members | GET | Public | Return the public council-member artifact | ihnyc-rc-landing/rc-admin/src/routes/members.ts |
/api/casework-owners | GET | Casework service token | Return current role owners and the casework-email switch | ihnyc-rc-landing/rc-admin/src/routes/casework.ts |
RC Console is active and D1-authoritative for council people, positions, assignments, and access maps. Calendar uses the policy endpoint; other services retain their own documented authorization model unless listed here.
Gallery API (decommissioned)
Endpoints
| Path | Method | Auth | Purpose | Source |
|---|---|---|---|---|
/health | GET | Public | Service health | ihnyc-rc-gallery/src/index.ts |
/api/gallery | GET | Public | List published items | ihnyc-rc-gallery/src/index.ts |
/api/gallery/:id | GET | Public | Get one item | ihnyc-rc-gallery/src/index.ts |
/media/* | GET/HEAD | Public | Serve original or resized media | ihnyc-rc-gallery/src/index.ts |
/api/admin/media | GET/POST | Access (edge) | List or upload media | ihnyc-rc-gallery/src/index.ts |
/api/admin/media/:id | GET/PATCH/DELETE | Access (edge) | Read/update/delete media | ihnyc-rc-gallery/src/index.ts |
/api/admin/health | GET | Access (edge) | Admin health | ihnyc-rc-gallery/src/index.ts |
/api/admin/repair/ids | POST | Access (edge) | Repair specific ids | ihnyc-rc-gallery/src/index.ts |
/api/admin/repair/orphans | POST | Access (edge) | Cleanup orphans | ihnyc-rc-gallery/src/index.ts |
Voting APIs
Endpoints
| Path | Method | Auth | Purpose | Source |
|---|---|---|---|---|
/health | GET | Public | Service health | ihnyc-rc-vote/src/index.ts |
/admin/elections | GET/POST | Access or ADMIN_API_KEY | Admin elections CRUD | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id | GET | Access or ADMIN_API_KEY | Get election details | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/manual-results | PUT | Access or ADMIN_API_KEY | Save manual results | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/manual-results | DELETE | Access or ADMIN_API_KEY | Clear manual results | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/attachments | PATCH | Access or ADMIN_API_KEY | Update Notion attachments | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/dates | PATCH | Access or ADMIN_API_KEY | Update election dates | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/settings | PATCH | Access or ADMIN_API_KEY | Update election settings | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id | DELETE | Access or ADMIN_API_KEY | Delete election | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/tokens | GET/POST | Access or ADMIN_API_KEY | Token batches | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/batches | DELETE | Access or ADMIN_API_KEY | Delete token batch | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/candidates | GET/POST | Access or ADMIN_API_KEY | Manage ranked candidates | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/options | GET/POST | Access or ADMIN_API_KEY | Manage poll options | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/options/:optionId | DELETE | Access or ADMIN_API_KEY | Delete poll option | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/invite | POST | Access or ADMIN_API_KEY | Send invites | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/invites | GET | Access or ADMIN_API_KEY | Invite status | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/invites/:inviteId/resend | POST | Access or ADMIN_API_KEY | Resend invite | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/invites/:inviteId/remind | POST | Access or ADMIN_API_KEY | Send reminder to invite | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/reminders/send | POST | Access or ADMIN_API_KEY | Send reminders | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/results-email | POST | Access or ADMIN_API_KEY | Send results emails | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/close | POST | Access or ADMIN_API_KEY | Close election | ihnyc-rc-vote/src/routes/admin.ts |
/admin/bulk-invites | POST | Access or ADMIN_API_KEY | Bulk invite management | ihnyc-rc-vote/src/routes/admin.ts |
/admin/test-emails | POST | Access or ADMIN_API_KEY | Send test emails | ihnyc-rc-vote/src/routes/admin.ts |
/admin/audit-logs | GET | Access or ADMIN_API_KEY | Audit log API | ihnyc-rc-vote/src/routes/admin.ts |
/admin/distribution-lists | GET/POST | Access or ADMIN_API_KEY | Distribution lists | ihnyc-rc-vote/src/routes/admin.ts |
/admin/distribution-lists/:id | GET/PUT | Access or ADMIN_API_KEY | Distribution list detail | ihnyc-rc-vote/src/routes/admin.ts |
/admin/distribution-lists/:id | DELETE | Access or ADMIN_API_KEY | Delete distribution list | ihnyc-rc-vote/src/routes/admin.ts |
/admin/distribution-lists/:id/emails | POST | Access or ADMIN_API_KEY | Add emails to list | ihnyc-rc-vote/src/routes/admin.ts |
/admin/distribution-lists/:id/emails/:emailId | DELETE | Access or ADMIN_API_KEY | Remove email from list | ihnyc-rc-vote/src/routes/admin.ts |
/admin/notion/databases | GET | Access or ADMIN_API_KEY | List Notion databases | ihnyc-rc-vote/src/routes/admin.ts |
/admin/notion/databases/:databaseId/pages | GET | Access or ADMIN_API_KEY | Search Notion pages | ihnyc-rc-vote/src/routes/admin.ts |
/admin/notion/pages/:pageId/validate | GET | Access or ADMIN_API_KEY | Validate Notion page | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/notion/link | POST | Access or ADMIN_API_KEY | Link election to Notion | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/notion/link | DELETE | Access or ADMIN_API_KEY | Unlink election from Notion | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/notion/sync | POST | Access or ADMIN_API_KEY | Trigger Notion sync | ihnyc-rc-vote/src/routes/admin.ts |
/admin/elections/:id/published-status | GET | Access or ADMIN_API_KEY | Debug published status | ihnyc-rc-vote/src/routes/admin.ts |
Shared notes
Edge Protection
Access enforcement for some admin routes is handled at the Cloudflare edge in production.
Sources: ihnyc-rc-gallery/README.md, ihnyc-rc-cal-landing/README.md
Games APIs
Endpoints
| Path | Method | Auth | Purpose | Source |
|---|---|---|---|---|
/api/health | GET | Public | Health check | ihnyc-games/services/api/src/index.ts |
/api/events | GET | Public | List events | ihnyc-games/services/api/src/index.ts |
/api/events/:id | GET | Public | Fetch one event | ihnyc-games/services/api/src/index.ts |
/api/standings | GET | Public | Medal table by floor | ihnyc-games/services/api/src/index.ts |
/api/rosters/summary | GET | Public | Roster totals by building/floor | ihnyc-games/services/api/src/index.ts |
/api/admin/events | GET/POST | Admin | List/create events | ihnyc-games/services/api/src/index.ts |
/api/admin/events/:id | PATCH | Admin | Update event | ihnyc-games/services/api/src/index.ts |
/api/admin/results | GET/POST | Admin | Get/save results | ihnyc-games/services/api/src/index.ts |
/api/admin/results/:id | DELETE | Admin | Delete result row | ihnyc-games/services/api/src/index.ts |
/api/admin/import/csv | POST | Admin | Import CSV submissions | ihnyc-games/services/api/src/index.ts |
/api/admin/imports | GET | Admin | Import run history | ihnyc-games/services/api/src/index.ts |
/api/admin/submissions | GET | Admin | Submission review | ihnyc-games/services/api/src/index.ts |
/api/admin/submissions/:id | DELETE | Admin | Delete submission | ihnyc-games/services/api/src/index.ts |