> ## 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.

# Attribution

> How Fundor records that a user, team, lead or application came from you.

Every record you create through the API is stamped with your partner account and your `externalRef`:

| Record | Attributed when |
| - | - |
| User | You create it with `POST /users` |
| Team | A coach you onboarded creates it, or you call `POST /teams` |
| Lead | You submit it with `POST /leads` |
| Lead (hosted link) | A customer fills in the hosted referral page of an athlete you signed up |
| Application | You submit it with `POST /coach-applications` or `/partner-applications/*` |

Fundor's lead reports and its call-center records show the source of each lead: submitted by your API, or through one of your athletes' links.

## First channel wins

If a person already had a Fundor account before you linked it (see [Account linking](https://docs.fundor.io/account-linking.md)), the account stays attributed to wherever it came from first. Fundor still records that you linked it, and the account is usable by you from then on.

## `externalRef`

Use a stable ID from your own system, unique per record type. It lets you match Fundor records to yours and makes retries safe: the same `externalRef` never creates a second record.


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