Public Endpoints
Public endpoints require no authentication and power the public-facing donation pages, foundation directory, activity feeds, and scholarship application forms. They are consumed by miranda.gives and any external integrations.
All API endpoints are prefixed with /api/public unless noted otherwise.
Foundation Directory
Section titled “Foundation Directory”| Method | Path | Description |
|---|---|---|
| GET | /api/public/foundations | List all directory-listed foundations |
| GET | /api/public/foundations/:slug | Get a foundation’s public profile |
| GET | /api/public/foundations/:slug/donate | Get donation page data for a foundation |
| GET | /api/public/foundations/:slug/scholarships | List active scholarships for a foundation |
GET /api/public/foundations
Section titled “GET /api/public/foundations”Returns foundations where directory_listed is true. Used to populate the miranda.gives directory.
GET /api/public/foundations/:slug
Section titled “GET /api/public/foundations/:slug”Returns the public profile for a foundation by slug, including name, mission statement, brand colors, logo, category, and tagline.
Public Donations
Section titled “Public Donations”| Method | Path | Description |
|---|---|---|
| POST | /api/public/donate | Process a donation (no auth) |
Used by the Blade-rendered donation pages to submit payments server-side.
Activity Feed
Section titled “Activity Feed”| Method | Path | Description |
|---|---|---|
| GET | /api/public/activity | Recent public activity across all foundations |
| GET | /api/public/activity/trending | Trending activity and popular foundations |
| GET | /api/public/stats | Platform-wide aggregate statistics |
These endpoints power the miranda.gives homepage with social proof — recent donations, trending foundations, and platform totals.
Competitions
Section titled “Competitions”| Method | Path | Description |
|---|---|---|
| GET | /api/public/competitions/current | Get the current giving competition |
Returns the active GivingCompetition if one exists.
Scholarship Applications (API)
Section titled “Scholarship Applications (API)”| Method | Path | Description |
|---|---|---|
| POST | /api/scholarships/applications | Submit a scholarship application (no auth) |
This endpoint is outside the /api/public prefix. It accepts application data directly:
{ "scholarship_id": "uuid", "email": "applicant@example.com", "first_name": "Jane", "last_name": "Doe", "responses": { "gpa": "3.8", "essay": "I believe in..." }, "attachments": []}Team Invitations (Public)
Section titled “Team Invitations (Public)”These endpoints are outside the /api/public prefix and use the invite token as authorization:
| Method | Path | Description |
|---|---|---|
| GET | /api/team/invites/:token/details | Get invitation details |
| POST | /api/team/invites/:token/accept | Accept an invitation |
| POST | /api/team/invites/:token/accept-and-login | Accept and receive session tokens |
Plans and Organization Types
Section titled “Plans and Organization Types”| Method | Path | Description |
|---|---|---|
| GET | /api/plans | List available subscription plans |
| GET | /api/org-types | List available organization types |
These endpoints power the registration flow on miranda.foundation.
Web routes (non-API)
Section titled “Web routes (non-API)”In addition to the JSON API, Miranda serves public pages via web routes:
Donation pages (Blade-rendered)
Section titled “Donation pages (Blade-rendered)”| Method | Path | Description |
|---|---|---|
| GET | /donate/:foundationSlug | Show donation form |
| POST | /donate/:foundationSlug | Process donation |
| GET | /donate/:foundationSlug/thank-you | Thank-you page |
Scholarship forms (Blade-rendered)
Section titled “Scholarship forms (Blade-rendered)”| Method | Path | Description |
|---|---|---|
| GET | /scholarships/:foundationSlug/:scholarshipSlug | Show application form |
| POST | /scholarships/:foundationSlug/:scholarshipSlug | Submit application |
| GET | /scholarships/:foundationSlug/:scholarshipSlug/confirmation | Confirmation page |
Foundation subdomain routes
Section titled “Foundation subdomain routes”Foundations with custom subdomains (e.g., yourfoundation.miranda.gives) get these routes:
| Method | Path | Description |
|---|---|---|
| GET | / | Foundation home page |
| GET | /donate | Donation landing |
| GET | /donate/:pageSlug | Specific donation page |
| GET | /about | About page |
| GET | /scholarships | Scholarships listing |
| GET | /updates | Foundation updates |
Stripe webhooks
Section titled “Stripe webhooks”| Method | Path | Description |
|---|---|---|
| POST | /stripe/webhook | Stripe webhook handler |
| POST | /strp/wbhk | Stripe webhook (alias) |