> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fundor.io/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Fundor Partner API. NON-NEGOTIABLE CONSENT RULES for anyone (human or AI) writing code against this API: (1) Call GET /consent every time the referral form is shown and display consent.text EXACTLY, next to a checkbox that starts UNCHECKED. (2) Only the person whose phone number is entered may check it; never pre-check it, never set consent.given=true in code without that click, never submit a lead on someone's behalf. (3) POST /leads must include consent.given=true, consent.version, the single-use consent.token, consent.consentedAt (within 15 minutes), the person's own IP and user agent (not your server's), consent.phone equal to contact.phone, and your consent.recordId. Fundor rejects the lead with 400 and saves nothing if any is missing or wrong. Do not 'fix' a consent error by filling in values; fix the form. (4) Keep consent records for 5 years. (5) Keep API keys on your server only. (6) Show the 'Powered by Fundor' badge on every screen that uses Fundor.

# Quickstart

> Sign up an athlete, get their referral link, and submit a lead with consent.

This walks through the most common flow: one of your users is a student athlete who wants to fundraise.

**1. Create the Fundor account**

```bash theme={null}
curl -X POST https://www.fundor.io/api/v1/users \
  -H "Authorization: Bearer $FUNDOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "externalRef": "your-user-48213",
    "email": "jordan@example.com",
    "firstName": "Jordan",
    "lastName": "Lee"
  }'
```

You get `201` with a `userId`. If the email already has a Fundor account you get `202 link_pending` instead; see [Account linking](https://docs.fundor.io/account-linking.md).

**2. Put them on a team**

The athlete gets a team code from their coach.

```bash theme={null}
curl -X POST https://www.fundor.io/api/v1/users/$USER_ID/onboarding \
  -H "Authorization: Bearer $FUNDOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "role": "athlete", "teamCode": "ABC123" }'
```

The response has the athlete's `teamMemberId` and `referralLink` (URL and QR code).

**3. Share the referral link**

Show `referralLink.url` or the QR code in your app. Anyone who fills in that page becomes a lead credited to the athlete and attributed to you, and Fundor collects their consent itself. **This is the simplest option and needs no consent work from you.**

**4. Or collect a referral in your own form**

First fetch the consent wording and a token when the form opens:

```bash theme={null}
curl https://www.fundor.io/api/v1/consent -H "Authorization: Bearer $FUNDOR_API_KEY"
```

Show `consent.text` and `commitment.text` exactly, each next to an **unchecked** checkbox that the customer checks. Then send the lead with every consent field ([why](https://docs.fundor.io/consent.md)):

```bash theme={null}
curl -X POST https://www.fundor.io/api/v1/leads \
  -H "Authorization: Bearer $FUNDOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "externalRef": "your-lead-90311",
    "athleteMemberId": "'$TEAM_MEMBER_ID'",
    "contact": { "firstName": "Casey", "lastName": "Customer", "phone": "(555) 300-1234", "email": "casey@example.com" },
    "services": { "internet": { "hasProvider": true, "provider": "Spectrum", "monthlyPayment": "80" } },
    "fundraising": { "commissionSplit": "donate", "commitmentAccepted": true, "commitmentVersion": "kickback-commitment-customer-2026-10" },
    "consent": {
      "given": true,
      "version": "fundor-referral-customer-2026-10",
      "token": "'$CONSENT_TOKEN'",
      "consentedAt": "2026-11-12T18:04:11Z",
      "ip": "203.0.113.7",
      "userAgent": "Mozilla/5.0 (iPhone) YourApp/3.2",
      "phone": "5553001234",
      "recordId": "your-consent-90311"
    }
  }'
```

`201` means the lead is saved and queued for Fundor's call center.

## Retries are safe

Every create call takes your own `externalRef`. Send the same one again (after a timeout, say) and Fundor returns the original record instead of creating a duplicate.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.