ReferralFlo
Documentation

Built by developers, for developers

A documented, versioned, idempotent REST API. TypeScript SDK with full types. Webhooks with signed payloads. Everything you'd want, nothing you don't.

Getting started

Your first API call in 60 seconds.

  • Quickstart
  • Authentication
  • Sandbox
  • API conventions

API Reference

Every endpoint, every parameter.

  • Programs
  • Advocates
  • Referrals
  • Rewards
  • Events
  • Reports

Webhooks

Real-time events to your backend.

  • Setup
  • Signing
  • Retries
  • Event types

SDKs

First-class clients for major languages.

  • JavaScript / TS
  • Python
  • Ruby
  • Go
  • PHP

Recipes

Copy-paste solutions for common tasks.

  • Track a referral
  • Issue a reward
  • Sync a contact
  • Build a portal

Security

Auth, encryption, and best practices.

  • API keys
  • OAuth
  • Encryption
  • Rate limits
Hello, World

Your first call in 60 seconds

1Generate an API key in your dashboard
2Install the SDK: npm install @referralflo/sdk
3Initialize with your key and start making calls
4Run in sandbox mode until you're ready to go live
first-referral.ts
// Initialize the ReferralFlo client
import { ReferralFlo } from '@referralflo/sdk';

const rf = new ReferralFlo({
  apiKey: process.env.RF_API_KEY,
});

// Track a referral
await rf.referrals.create({
  programId: 'prog_abc123',
  advocateId: 'adv_sarah_chen',
  refereeEmail: 'priya@example.com',
  metadata: { source: 'in-app-share' },
});

// Issue a reward
await rf.rewards.create({
  advocateId: 'adv_sarah_chen',
  amount: 25_00, // $25.00 in cents
  currency: 'USD',
  type: 'cash',
});

Need a developer's eye on your integration?

Our developer support team responds in under 4 hours, every time.