Foundation endpoints require authentication (auth.supabase + foundation middleware) and are scoped to the authenticated user’s foundation. These power the admin dashboard and are available for third-party integrations (Pro plan).
All endpoints are prefixed with /api.
| Method | Path | Middleware | Description |
|---|
| POST | /register | auth.supabase:relaxed | Register a new foundation |
| POST | /logout | auth.supabase, foundation | Log out |
| GET | /me | auth.supabase, foundation | Get current user with foundation |
| GET | /my-foundations | auth.supabase | List all foundations for this auth user |
| Method | Path | Description |
|---|
| GET | /foundation | Get foundation details (with resolved vocabulary and modules) |
| PUT | /foundation | Update foundation settings |
| Field | Type | Rules |
|---|
name | string | max 255 |
slug | string | lowercase, hyphenated, unique |
email | string? | valid email |
phone | string? | max 50 |
mission_statement | string? | max 2000 |
brand_colors | array? | JSON color configuration |
safety_mode | boolean | Enable/disable safety mode |
org_type | string | Must be a valid key in config/org-types.php |
is_registered_nonprofit | boolean? | 501(c)(3) status |
vocabulary_overrides | array? | Custom terminology |
enabled_modules | array? | Feature toggles |
settings | array? | Merged with existing settings (preserves plan key) |
| Method | Path | Description |
|---|
| GET | /dashboard/metrics | Get dashboard metrics |
Returns: total_raised, donor_count, new_donors_this_month, average_gift, recurring_count, recent_donations (last 10), whats_next (action items).
| Method | Path | Description |
|---|
| GET | /contacts | List contacts (paginated) |
| POST | /contacts | Create a contact |
| GET | /contacts/{id} | Show a contact |
| PUT | /contacts/{id} | Update a contact |
| DELETE | /contacts/{id} | Delete a contact |
| Method | Path | Description |
|---|
| GET | /tags | List tags |
| POST | /tags | Create a tag |
| DELETE | /tags/{tag} | Delete a tag |
| Method | Path | Description |
|---|
| GET | /segments | List saved segments |
| POST | /segments | Create a saved segment |
| POST | /segments/preview | Preview matching contact count |
| DELETE | /segments/{segment} | Delete a segment |
| Method | Path | Description |
|---|
| GET | /donation-pages | List donation pages |
| POST | /donation-pages | Create a donation page |
| GET | /donation-pages/{id} | Show a donation page |
| PUT | /donation-pages/{id} | Update a donation page |
| DELETE | /donation-pages/{id} | Delete a donation page |
| Method | Path | Description |
|---|
| GET | /donations | List donations (read-only) |
| GET | /donations/{id} | Show a donation |
Donations are created through the donation flow, not directly via the API.
| Method | Path | Description |
|---|
| POST | /stripe/onboard | Create Express account, return onboarding URL |
| GET | /stripe/callback | Handle onboarding return |
| GET | /stripe/status | Check account status |
| POST | /stripe/disconnect | Disconnect Stripe |
| GET | /stripe/account-details | Get business profile |
| Method | Path | Description |
|---|
| GET | /campaigns | List campaigns |
| POST | /campaigns | Create a campaign |
| GET | /campaigns/{id} | Show a campaign |
| PUT | /campaigns/{id} | Update a campaign |
| DELETE | /campaigns/{id} | Delete a campaign |
| POST | /campaigns/{id}/send | Send a campaign |
| GET | /campaigns/{id}/stats | Get delivery statistics |
| Method | Path | Description |
|---|
| GET | /message-templates | List templates |
| POST | /message-templates | Create a template |
| GET | /message-templates/{id} | Show a template |
| PUT | /message-templates/{id} | Update a template |
| DELETE | /message-templates/{id} | Delete a template |
| Method | Path | Description |
|---|
| GET | /sequences | List sequences |
| POST | /sequences | Create a sequence |
| GET | /sequences/{id} | Show a sequence |
| PUT | /sequences/{id} | Update a sequence |
| DELETE | /sequences/{id} | Delete a sequence |
| POST | /sequences/{id}/steps | Add a step |
| PUT | /sequences/{id}/steps/{step} | Update a step |
| DELETE | /sequences/{id}/steps/{step} | Delete a step |
| Method | Path | Description |
|---|
| GET | /scholarships | List scholarships |
| POST | /scholarships | Create a scholarship |
| GET | /scholarships/{id} | Show a scholarship |
| PUT | /scholarships/{id} | Update a scholarship |
| DELETE | /scholarships/{id} | Delete a scholarship |
| GET | /scholarships/{id}/applications | List applications |
| Method | Path | Description |
|---|
| GET | /applications/{id} | Show an application |
| PATCH | /applications/{id}/stage | Update application stage |
| DELETE | /applications/{id} | Delete an application |
| Method | Path | Description |
|---|
| GET | /disbursements | List disbursements |
| POST | /disbursements | Create a disbursement |
| GET | /disbursements/{id} | Show a disbursement |
| DELETE | /disbursements/{id} | Delete a disbursement |
| Method | Path | Description |
|---|
| POST | /import/upload | Upload CSV, return headers and preview |
| POST | /import/confirm | Execute import with column mapping |
| GET | /import/status/{importId} | Check import status |
| POST | /import/ingest | Direct JSON contact import |
| Method | Path | Description |
|---|
| GET | /site | Get foundation site configuration |
| POST | /site/wizard | Run site setup wizard |
| PATCH | /site/settings | Update site settings |
| PATCH | /site/pages/{pageId} | Update a page |
| POST | /site/pages | Add a page |
| GET | /site/blocks | List available blocks |
| GET | /site/palettes | List available palettes |
| Method | Path | Description |
|---|
| GET | /team | List members and pending invites |
| GET | /team/roles | List roles (seeds defaults if empty) |
| POST | /team/roles | Create a custom role |
| PUT | /team/roles/{role} | Update a role |
| DELETE | /team/roles/{role} | Delete a role |
| POST | /team/invite | Send a team invitation |
| DELETE | /team/invites/{invite} | Cancel a pending invite |
| PUT | /team/members/{user}/role | Change a member’s role |
| DELETE | /team/members/{user} | Remove a team member |
| GET | /team/permissions | List all permission groups |