System health
The single canonical health endpoint. Returns 200 when the API and Postgres pool are reachable.
GET/api/v1/health
Try it: GET /api/v1/health · curl -sS https://ourcodefund.com/api/v1/health
Identity
GET/api/v1/me — Returns the authenticated user, wallet balance, lifetime pledges, and active campaigns. Requires Authorization: Bearer <token>. Returns 401 unauthenticated.
POST/api/v1/auth/request-code — Request a magic-code email. Body: { email }.
POST/api/v1/auth/verify-code — Verify a magic code and mint a session. Body: { email, code }.
Intake
POST/api/v1/intake/spark — Drive Spark from the front desk. Session-gated. Body: { message, context }. Returns a Working Brief extraction.
Campaigns & pledges
GET/api/v1/library — Public library of completed V1.0+ campaigns.
POST/api/v1/pledges — Create a Stripe-backed pledge. Session-gated.
POST/api/v1/webhooks/stripe — Stripe webhook receiver. Signature-verified; not for client use.
Conventions
- All money is integer USD cents. 1 Banana Buck = 1 cent.
- All authenticated endpoints expect
Authorization: Bearer <token>. - JSON in, JSON out. Error envelopes:
{ error, message }. - Schema is canonical at
./database/schema.sql.
Surface is the production V1.0 API as of the current deploy. Spec lives alongside the open-source codebase under MIT License.