Referrers

End-users of your app who refer others

A Referrer is an end-user of your app who can share a referral link. The create endpoint is a create-or-identify upsert, so you can safely call it any time a user could become a referrer — from the SDKs it backs identify().

The Referrer object

FieldTypeDescription
idstringUnique identifier (a UUID).
objectstringAlways referrer.
external_idstringYour stable id for this user.
emailstringThe user's email address.
namestringThe user's display name.
propertiesobjectArbitrary properties you attach.
notification_preferencesobjectPer-channel notification opt-outs: { "email": boolean, "push": boolean }. Both default true.
modestringtest or live.
livemodebooleanWhether the referrer exists in live mode.
created_atstring (date-time)Creation time.

Create or identify a referrer

POST/v1/referrers

Idempotent on external_id within an organization and mode: the first call creates the referrer, later calls update and return the same one (200 either way). Call it whenever a user could become a referrer.

Accepts publishable keys.

ParameterInTypeRequiredDescription
Idempotency-KeyheaderstringNoRetries with the same key return the original result.
external_idbodystringYesYour stable id for this user.
emailbodystringNoThe user's email address.
namebodystringNoThe user's display name.
propertiesbodyobjectNoArbitrary properties.
notification_preferencesbodyobjectNoPer-channel toggles, e.g. { "email": false, "push": false }. Omitted channels are left unchanged.
curl https://api.invitebase.com/v1/referrers \
  -H "Authorization: Bearer $INVITEBASE_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "external_id": "usr_123",
    "email": "andrew@example.com",
    "name": "Andrew",
    "properties": { "plan": "pro" }
  }'

Response — 200 OK:

{
  "id": "6b1d4f9a-8e25-4c07-a3f6-1c5e9d7b2a84",
  "object": "referrer",
  "external_id": "usr_123",
  "email": "andrew@example.com",
  "name": "Andrew",
  "properties": { "plan": "pro" },
  "notification_preferences": { "email": true, "push": true },
  "mode": "test",
  "livemode": false,
  "created_at": "2026-07-09T10:05:00Z"
}

List referrers

GET/v1/referrers

Returns a paginated list of referrers.

ParameterInTypeRequiredDescription
limitqueryintegerNo1–100, default 25.
starting_afterquerystringNoCursor (referrer id) for the next page.
curl "https://api.invitebase.com/v1/referrers?limit=10" \
  -H "Authorization: Bearer $INVITEBASE_SECRET_KEY"

Response — 200 OK:

{
  "object": "list",
  "has_more": true,
  "data": [
    {
      "id": "6b1d4f9a-8e25-4c07-a3f6-1c5e9d7b2a84",
      "object": "referrer",
      "external_id": "usr_123",
      "email": "andrew@example.com",
      "name": "Andrew",
      "mode": "test",
      "livemode": false,
      "created_at": "2026-07-09T10:05:00Z"
    }
  ]
}

Retrieve a referrer

GET/v1/referrers/{referrerId}
ParameterInTypeRequiredDescription
referrerIdpathstringYesThe referrer id.
curl https://api.invitebase.com/v1/referrers/6b1d4f9a-8e25-4c07-a3f6-1c5e9d7b2a84 \
  -H "Authorization: Bearer $INVITEBASE_SECRET_KEY"

Response — 200 OK: the Referrer object. Returns 404 if the referrer does not exist.

What's next

On this page