Events Reference
Below are sample request payloads you will receive based on the webhook event types you have selected for your campaign.

PARTICIPANT_REACHED_A_GOAL

Description: When a participant unlocks a new reward

Important notes:

  • For double-sided rewards, two events will be sent for both referrer and referee. To discern between the two, use the data.reward.isReferrer property (the referrer will have isReferrer as true).
  • If you have manual reward approval enabled for your campaign, events will be sent twice: (1) when the reward is pending approval and (2) when the reward is approved. To discern between unapproved/approved rewards, use the data.reward.approved property (approved rewards will have approved as true).
1
{
2
"event": "PARTICIPANT_REACHED_A_GOAL",
3
"createdAt": 1558345202613,
4
"data": {
5
"participant": {
6
"id": "x9a7uu",
7
"email": "[email protected]",
8
"firstName": "Richard",
9
"lastName": "Hendricks",
10
"notes": "",
11
"rank": 9,
12
"isWinner": true,
13
"referralCount": 11,
14
"monthlyReferralCount": 8,
15
"prevMonthlyReferralCount": 0,
16
"shareUrl": "http://piedpiper.com?grsf=x9a7uu",
17
"impressionCount": 309,
18
"uniqueImpressionCount": 285,
19
"inviteCount": 285,
20
"shareCount": 163,
21
"createdAt": 1554431962667,
22
"referralSource": "DIRECT",
23
"fraudRiskLevel": "LOW",
24
"metadata": {
25
"piedPiperUserId": "12a39-8aajd-1dwiq",
26
"companyName": "Pied Piper, Inc",
27
"teamSize": "1-10"
28
}
29
},
30
"reward": {
31
"approved": true,
32
"conversionsRequired": 1,
33
"couponCode": "PROMO_20_OFF",
34
"createdAt": 1542560101404,
35
"description": "Win a free t-shirt when you refer a friend to sign up to Pied Piper!",
36
"imageUrl": "https://res.cloudinary.com/growsurf/image/upload/v1553218876/development/ls8shgq3qlwldljr8tl2.jpg",
37
"limit": 3,
38
"title": "Early-Bird Reward",
39
"isReferrer": true,
40
"type": "SINGLE_SIDED",
41
"rewardId": "xlj123",
42
"id" : "ccm2ue",
43
"referredId": "ad3dfa",
44
"referrerId": "x9a7uu",
45
"metadata": {
46
"foo": "bar"
47
"amount": "$25",
48
"points": "1000"
49
}
50
}
51
}
52
}
Copied!

NEW_PARTICIPANT_ADDED

Description: When a new participant is added to the campaign (includes direct signups, referrals, and participants added/imported via dashboard).
1
{
2
"event": "NEW_PARTICIPANT_ADDED",
3
"createdAt": 1558345215720,
4
"data": {
5
"id": "p88y0a",
6
"email": "[email protected]",
7
"firstName": "Gavin",
8
"lastName": "Belson",
9
"notes": "This is obviously our competitor trying out our product!",
10
"rank": 762,
11
"isWinner": false,
12
"shareUrl": "http://piedpiper.com?grsf=p88y0a",
13
"referralCount": 0,
14
"monthlyReferralCount": 0,
15
"prevMonthlyReferralCount": 0,
16
"impressionCount": 0,
17
"uniqueImpressionCount": 0,
18
"inviteCount": 0,
19
"shareCount": 3,
20
"createdAt": 1554479231190,
21
"referralSource": "PARTICIPANT",
22
"fraudRiskLevel": "LOW",
23
"referredBy": "x9a7uu",
24
"referrer": {
25
"id": "x9a7uu",
26
"email": "[email protected]",
27
"firstName": "Richard",
28
"lastName": "Hendricks",
29
"notes": "",
30
"rank": "9",
31
"isWinner": true,
32
"referralCount": 11,
33
"monthlyReferralCount": 8,
34
"shareUrl": "http://piedpiper.com?grsf=x9a7uu",
35
"impressionCount": 309,
36
"uniqueImpressionCount": 285,
37
"inviteCount": 285,
38
"shareCount": 163,
39
"createdAt": 1554431962667,
40
"referralSource": "PARTICIPANT",
41
"fraudRiskLevel": "LOW",
42
"metadata": {
43
"piedPiperUserId": "12a39-8aajd-1dwiq",
44
"companyName": "Pied Piper, Inc",
45
"teamSize": "1-10"
46
}
47
},
48
"metadata": {
49
"piedPiperUserId": "au71p-121x9-88faa",
50
"companyName": "Hooli, Inc",
51
"teamSize": "10,000+"
52
}
53
}
54
}
Copied!

CAMPAIGN_ENDED

Description: When the campaign ends.
Please note: Only the first 1,000 will be returned in the winners Array.
1
{
2
"event": "CAMPAIGN_ENDED",
3
"createdAt": 1558345152138,
4
"data": {
5
"id": "ct8f71",
6
"name": "Middle-Out Compression Launch",
7
"participantCount": 5661,
8
"startedAt": 1522432573250,
9
"endedAt": 1533532422153,
10
"status": "COMPLETE",
11
"impressionCount": 11075,
12
"referralCount": 1673,
13
"winnerCount": 1673,
14
"winners": [
15
{
16
"id": "x9a7uu",
17
"email": "[email protected]",
18
"firstName": "Richard",
19
"lastName": "Hendricks",
20
"notes": "",
21
"rank": 9,
22
"isWinner": true,
23
"referralCount": 11,
24
"monthlyReferralCount": 8,
25
"prevMonthlyReferralCount": 0,
26
"shareUrl": "http://piedpiper.com?grsf=x9a7uu",
27
"impressionCount": 309,
28
"uniqueImpressionCount": 285,
29
"shareCount": 163,
30
"createdAt": 1554431962667,
31
"referralSource": "PARTICIPANT",
32
"fraudRiskLevel": "LOW",
33
"metadata": {
34
"piedPiperUserId": "12a39-8aajd-1dwiq",
35
"companyName": "Pied Piper, Inc",
36
"teamSize": "1-10"
37
}
38
}
39
]
40
}
41
}
Copied!
Last modified 1yr ago