Demo docs: examples are illustrative.
Referral API

Track a signup

POST
/events/signup

Call this when someone creates an account. If the visitor arrived through a share link, pass the referral code so the signup is attributed to the right referrer.

Authorization

apiKey
headerAuthorizationBearer <token>

Use a secret key such as sk_test_... in test mode or sk_live_... in production.

Header Parameters

Idempotency-Key?string

A unique key that makes retries safe. Keys expire after 24 hours.

Formatuuid

Request Body

application/json
  1. body
external_id*string
email*string
Formatemail
referral_code?string

The code from the share link, usually read by the browser script.

ip_address?string

Used by fraud checks. Never shown to the referrer.

Response Body

The signup was accepted for processing.

application/json
  1. response
id*string
referrer_id*string
referred_external_id?string
status*ReferralStatus
Value in"pending""in_review""converted""rejected""expired"
risk_score?number

Higher scores are more likely to be abuse. Scores above your threshold are held for review.

Range0 <= value <= 1
created_at*string
Formatdate-time
converted_at?|
Formatdate-time
Example Request
curl -X POST 'https://api.referralapi.example/v1/events/signup' \  -H 'Content-Type: application/json' \  -d '{  "external_id": "user_2088",  "email": "sam@example.com"}'
Example Response202
{  "id": "rfl_7Yp1aZc6",  "referrer_id": "string",  "referred_external_id": "string",  "status": "pending",  "risk_score": 0,  "created_at": "2019-08-24T14:15:22Z",  "converted_at": "2019-08-24T14:15:22Z"}