OurCodeFund.com

API & System Specs

Everything a developer needs to drive the Platform programmatically. Same endpoints the live UI uses.

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

Surface is the production V1.0 API as of the current deploy. Spec lives alongside the open-source codebase under MIT License.