Skip to content

Foundation Endpoints

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.

MethodPathMiddlewareDescription
POST/registerauth.supabase:relaxedRegister a new foundation
POST/logoutauth.supabase, foundationLog out
GET/meauth.supabase, foundationGet current user with foundation
GET/my-foundationsauth.supabaseList all foundations for this auth user
MethodPathDescription
GET/foundationGet foundation details (with resolved vocabulary and modules)
PUT/foundationUpdate foundation settings
FieldTypeRules
namestringmax 255
slugstringlowercase, hyphenated, unique
emailstring?valid email
phonestring?max 50
mission_statementstring?max 2000
brand_colorsarray?JSON color configuration
safety_modebooleanEnable/disable safety mode
org_typestringMust be a valid key in config/org-types.php
is_registered_nonprofitboolean?501(c)(3) status
vocabulary_overridesarray?Custom terminology
enabled_modulesarray?Feature toggles
settingsarray?Merged with existing settings (preserves plan key)
MethodPathDescription
GET/dashboard/metricsGet dashboard metrics

Returns: total_raised, donor_count, new_donors_this_month, average_gift, recurring_count, recent_donations (last 10), whats_next (action items).

MethodPathDescription
GET/contactsList contacts (paginated)
POST/contactsCreate a contact
GET/contacts/{id}Show a contact
PUT/contacts/{id}Update a contact
DELETE/contacts/{id}Delete a contact
MethodPathDescription
GET/tagsList tags
POST/tagsCreate a tag
DELETE/tags/{tag}Delete a tag
MethodPathDescription
GET/segmentsList saved segments
POST/segmentsCreate a saved segment
POST/segments/previewPreview matching contact count
DELETE/segments/{segment}Delete a segment
MethodPathDescription
GET/donation-pagesList donation pages
POST/donation-pagesCreate 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
MethodPathDescription
GET/donationsList donations (read-only)
GET/donations/{id}Show a donation

Donations are created through the donation flow, not directly via the API.

MethodPathDescription
POST/stripe/onboardCreate Express account, return onboarding URL
GET/stripe/callbackHandle onboarding return
GET/stripe/statusCheck account status
POST/stripe/disconnectDisconnect Stripe
GET/stripe/account-detailsGet business profile
MethodPathDescription
GET/campaignsList campaigns
POST/campaignsCreate a campaign
GET/campaigns/{id}Show a campaign
PUT/campaigns/{id}Update a campaign
DELETE/campaigns/{id}Delete a campaign
POST/campaigns/{id}/sendSend a campaign
GET/campaigns/{id}/statsGet delivery statistics
MethodPathDescription
GET/message-templatesList templates
POST/message-templatesCreate a template
GET/message-templates/{id}Show a template
PUT/message-templates/{id}Update a template
DELETE/message-templates/{id}Delete a template
MethodPathDescription
GET/sequencesList sequences
POST/sequencesCreate a sequence
GET/sequences/{id}Show a sequence
PUT/sequences/{id}Update a sequence
DELETE/sequences/{id}Delete a sequence
POST/sequences/{id}/stepsAdd a step
PUT/sequences/{id}/steps/{step}Update a step
DELETE/sequences/{id}/steps/{step}Delete a step
MethodPathDescription
GET/scholarshipsList scholarships
POST/scholarshipsCreate a scholarship
GET/scholarships/{id}Show a scholarship
PUT/scholarships/{id}Update a scholarship
DELETE/scholarships/{id}Delete a scholarship
GET/scholarships/{id}/applicationsList applications
MethodPathDescription
GET/applications/{id}Show an application
PATCH/applications/{id}/stageUpdate application stage
DELETE/applications/{id}Delete an application
MethodPathDescription
GET/disbursementsList disbursements
POST/disbursementsCreate a disbursement
GET/disbursements/{id}Show a disbursement
DELETE/disbursements/{id}Delete a disbursement
MethodPathDescription
POST/import/uploadUpload CSV, return headers and preview
POST/import/confirmExecute import with column mapping
GET/import/status/{importId}Check import status
POST/import/ingestDirect JSON contact import
MethodPathDescription
GET/siteGet foundation site configuration
POST/site/wizardRun site setup wizard
PATCH/site/settingsUpdate site settings
PATCH/site/pages/{pageId}Update a page
POST/site/pagesAdd a page
GET/site/blocksList available blocks
GET/site/palettesList available palettes
MethodPathDescription
GET/teamList members and pending invites
GET/team/rolesList roles (seeds defaults if empty)
POST/team/rolesCreate a custom role
PUT/team/roles/{role}Update a role
DELETE/team/roles/{role}Delete a role
POST/team/inviteSend a team invitation
DELETE/team/invites/{invite}Cancel a pending invite
PUT/team/members/{user}/roleChange a member’s role
DELETE/team/members/{user}Remove a team member
GET/team/permissionsList all permission groups