Referrals

Individual referral attempts and their lifecycle state

A Referral is one referred person's journey through your campaign: from the first link click, through the qualification gates, to validation and reward. Referrals are created by Invitebase (a link click creates one in clicked); the API exposes read access to their state and gate progress.

The Referral object

FieldTypeDescription
idstringUnique identifier (a UUID).
objectstringAlways referral.
statusstringLifecycle state — see the status table.
campaign_idstringThe Campaign this referral belongs to.
referrer_idstringThe Referrer who made the referral.
referred_user_idstringYour id for the referred end-user, once known.
gate_progressarrayPer-condition progress toward the qualification gate (below).
is_billablebooleanWhether this referral counts toward billing (true once validated).
validated_atstring (date-time)When the referral validated, if it has.
modestringtest or live.
livemodebooleanWhether the referral exists in live mode.
created_atstring (date-time)Creation time (the first click).

Each gate_progress entry:

FieldTypeDescription
eventstringThe event this condition tracks, e.g. subscription_started.
targetnumberThe value the condition requires — a count of occurrences, or a summed value/count.
currentnumberProgress so far toward target from matching events.
satisfiedbooleanWhether the condition has been met (currenttarget).
satisfied_atstring (date-time)When it was met, if it has been.

Referral statuses

The referral lifecycle is a state machine. Linked ≠ validated: linked means a signup bound to a referrer; validated means the referred user passed the qualification gates and fraud checks. Rewards and billing only ever fire on validated.

StatusMeaning
clickedSomeone opened the referral link; no signup yet.
signed_upThe referred user signed up and was linked to a referrer.
in_progressThe referred user is working through the qualification gates.
validatedAll gates passed inside the window, fraud checks cleared. Billable; triggers reward creation.
reward_pendingA Reward has been created and is awaiting fulfillment.
reward_fulfilledThe reward was delivered (app grant sent or payout completed). Terminal.
reward_failedPayout fulfillment failed (money rewards only, e.g. payout error).
expiredThe qualification window passed without the gates being satisfied. Terminal.
rejectedRejected by the fraud rules on the pass that would have validated it, or reversed later. Terminal, never billed.

List referrals

GET/v1/referrals

Returns a paginated list of referrals, filterable by campaign, referrer, and status.

ParameterInTypeRequiredDescription
limitqueryintegerNo1–100, default 25.
starting_afterquerystringNoCursor (referral id) for the next page.
campaign_idquerystringNoOnly referrals in this campaign.
referrer_idquerystringNoOnly referrals made by this referrer.
statusquerystringNoOnly referrals in this status.
curl "https://api.invitebase.com/v1/referrals?campaign_id=7e1f8a3b-4c26-49d0-b591-0d8e2f6a3c15&status=validated" \
  -H "Authorization: Bearer $INVITEBASE_SECRET_KEY"

Response — 200 OK:

{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "2c9d4e7f-1a63-48b5-8e02-6f3a9b1d5c74",
      "object": "referral",
      "status": "validated",
      "campaign_id": "7e1f8a3b-4c26-49d0-b591-0d8e2f6a3c15",
      "referrer_id": "6b1d4f9a-8e25-4c07-a3f6-1c5e9d7b2a84",
      "referred_user_id": "usr_456",
      "gate_progress": [
        {
          "event": "subscription_started",
          "target": 1,
          "current": 1,
          "satisfied": true,
          "satisfied_at": "2026-07-08T18:20:00Z"
        }
      ],
      "is_billable": true,
      "validated_at": "2026-07-08T18:20:05Z",
      "mode": "test",
      "livemode": false,
      "created_at": "2026-07-02T11:40:00Z"
    }
  ]
}

Retrieve a referral

GET/v1/referrals/{referralId}

Returns the referral, including gate progress.

ParameterInTypeRequiredDescription
referralIdpathstringYesThe referral id.
curl https://api.invitebase.com/v1/referrals/2c9d4e7f-1a63-48b5-8e02-6f3a9b1d5c74 \
  -H "Authorization: Bearer $INVITEBASE_SECRET_KEY"

Response — 200 OK: the Referral object. Returns 404 if the referral does not exist.

{
  "id": "2c9d4e7f-1a63-48b5-8e02-6f3a9b1d5c74",
  "object": "referral",
  "status": "in_progress",
  "campaign_id": "7e1f8a3b-4c26-49d0-b591-0d8e2f6a3c15",
  "referrer_id": "6b1d4f9a-8e25-4c07-a3f6-1c5e9d7b2a84",
  "referred_user_id": "usr_456",
  "gate_progress": [
    {
      "event": "subscription_started",
      "target": 1,
      "current": 0,
      "satisfied": false
    }
  ],
  "is_billable": false,
  "mode": "test",
  "livemode": false,
  "created_at": "2026-07-02T11:40:00Z"
}

What's next

On this page