"Send a friend $40 in Airbnb credit. You’ll get $20 when they travel and $75 when they host."
POST
Add participant
method. Alternatively, you can use the JavaScript method growsurf.addParticipant()
instead to add participants.growsurfId
.saveUser(user, growsurfId)
is an example function you would use to save the GrowSurf participant ID to the new user in your database. We will use this growsurfId
value later for triggering a referral.growsurfId
to your database?email
can be used instead of the growsurfId
to trigger a referral later. If you have access to the participant's email then there is no need to persist the growsurfId
into your database.user
argument passed into signUp(user)
is an Object that looks like this:referredBy
to associate this new user with a referrer. This value can be the referrer's email address or unique GrowSurf ID (you may want to use growsurf.getReferrerId()
to retrieve the referrer ID).metadata
Object to the GrowSurf Participant. This is optional, but is useful for viewing specific participant information in your GrowSurf dashboard (see image).POST
Trigger referral by participant ID
method. growsurfId
argument, which is the GrowSurf participant's unique ID and is required in the API call. If you do not have access to the growsurfId
of the participant, the participant email
can be used instead."For every friend you refer, you’ll both receive an extra 250MB in cloud storage."
POST
Add participant
method.user
argument passed into signUp(user)
is an Object that looks like this:referredBy
to associate this new user with a referrer. This value can be the referrer's email address or unique GrowSurf ID (you may want to use growsurf.getReferrerId()
to retrieve the referrer ID)referralStatus
to be CREDIT_AWARDED
. This triggers the referral credit at the same time that this new participant is added (and it overrides the campaign referral trigger (what's a referral trigger?) that was set from the Installation step of the Campaign Editor (see image).referralStatus
must be used with referredBy
, or else it will be ignored.metadata
Object to the GrowSurf Participant. This is optional, but is useful for viewing specific participant information in your GrowSurf dashboard (see image).Participant
s and ParticipantReward
s by using either of the following API methods:userEmail
so we could set it in the GrowSurf API URL at line 16.console.log
would print something like this: