Skip to content

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.

MethodPathDescription
GET/api/public/foundationsList all directory-listed foundations
GET/api/public/foundations/:slugGet a foundation’s public profile
GET/api/public/foundations/:slug/donateGet donation page data for a foundation
GET/api/public/foundations/:slug/scholarshipsList active scholarships for a foundation

Returns foundations where directory_listed is true. Used to populate the miranda.gives directory.

Returns the public profile for a foundation by slug, including name, mission statement, brand colors, logo, category, and tagline.

MethodPathDescription
POST/api/public/donateProcess a donation (no auth)

Used by the Blade-rendered donation pages to submit payments server-side.

MethodPathDescription
GET/api/public/activityRecent public activity across all foundations
GET/api/public/activity/trendingTrending activity and popular foundations
GET/api/public/statsPlatform-wide aggregate statistics

These endpoints power the miranda.gives homepage with social proof — recent donations, trending foundations, and platform totals.

MethodPathDescription
GET/api/public/competitions/currentGet the current giving competition

Returns the active GivingCompetition if one exists.

MethodPathDescription
POST/api/scholarships/applicationsSubmit 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": []
}

These endpoints are outside the /api/public prefix and use the invite token as authorization:

MethodPathDescription
GET/api/team/invites/:token/detailsGet invitation details
POST/api/team/invites/:token/acceptAccept an invitation
POST/api/team/invites/:token/accept-and-loginAccept and receive session tokens
MethodPathDescription
GET/api/plansList available subscription plans
GET/api/org-typesList available organization types

These endpoints power the registration flow on miranda.foundation.

In addition to the JSON API, Miranda serves public pages via web routes:

MethodPathDescription
GET/donate/:foundationSlugShow donation form
POST/donate/:foundationSlugProcess donation
GET/donate/:foundationSlug/thank-youThank-you page
MethodPathDescription
GET/scholarships/:foundationSlug/:scholarshipSlugShow application form
POST/scholarships/:foundationSlug/:scholarshipSlugSubmit application
GET/scholarships/:foundationSlug/:scholarshipSlug/confirmationConfirmation page

Foundations with custom subdomains (e.g., yourfoundation.miranda.gives) get these routes:

MethodPathDescription
GET/Foundation home page
GET/donateDonation landing
GET/donate/:pageSlugSpecific donation page
GET/aboutAbout page
GET/scholarshipsScholarships listing
GET/updatesFoundation updates
MethodPathDescription
POST/stripe/webhookStripe webhook handler
POST/strp/wbhkStripe webhook (alias)