Webhooks
Webhooks are used to send events from SparkLoop to your server. We send a POST HTTP request with a JSON payload when specific events occur.

Create a webhook

To create a webhook:

Update/delete a webhook

To update or delete a webhook hover over the three dots to the right of the webhook to open the settings menu and click on the link to update or delete.

Test a webhook

To test a webhook hover over the three dots to the right of the webhook to open the settings menu and click on "Send test webhook"

Events

We currently send three types of events:

new_referral

Is sent when a new referral made by a subscriber in a referral program is tracked
{
"type": "new_referral",
"campaign_id": "MF6319db9890",
"subscriber": {
"id": "sub_hjdgc74u",
"first_name": "John",
"name": "John Doe",
"email": "[email protected]",
"referral_code": "ada90f39",
"referral_link": "https://mywebsite.com?rh_ref=ada90f39",
"referred": true,
"tot_referrals": 0,
"next_reward": 2,
"created_at": 1564400550
},
"referrer": {
"id": "sub_93ehus8h",
"first_name": "John",
"name": "John Smith",
"email": "[email protected]",
"referral_code": "f9464199",
"referral_link": "https://mywebsite.com?rh_ref=f9464199",
"referred": false,
"tot_referrals": 4,
"next_reward": 1,
"created_at": 1564403873
}
}

new_partner_referral

Is sent when a new referral made by a partner is tracked
{
"type": "new_partner_referral",
"campaign": {
"id": "partner_campaign_de9c1c7c7bbc",
"referral_code": "1b5b5c4094",
"type": "partner_program",
"publication_id": "pub_a6db3f666c55",
"created_at": 1658780774,
"partner_program_id": "partner_program_5b925f623c28"
},
"subscriber": {
"id": "sub_042448acb02a",
"first_name": null,
"name": null,
"email": "[email protected]",
"referral_code": "6363a0b5",
"referred": true,
"tot_referrals": 0,
"referral_status": "verified",
"last_reward": null,
"created_at": 1659536359
},
"partner": {
"id": "partner_0a8a45c403f8",
"name": "Jason Resnickss",
"logo": "http://dash.sparkloop.app/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBPQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--36ac8d234a450db1db32c62fe9e399b29a9e42f0/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9VY21WemFYcGxYM1J2WDJ4cGJXbDBXd2RwQVpacEFaWT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--b97dd663f95aeeb4752185ef091f0728b0f28f4a/active_campaign.png"
}
}

reward_unlocked

Is sent when a subscriber hits a milestone and unlocks a reward
{
"type": "reward_unlocked",
"campaign_id": "MF6319db9890",
"referrals": 4,
"coupon_code": "9wusha0",
"subscriber": {
"id": "sub_hjdgc74u",
"first_name": "John",
"name": "John Doe ",
"email": "[email protected]",
"referral_code": "f9464199",
"referral_link": "https://mywebsite.com?rh_ref=f9464199",
"referred": true,
"tot_referrals": 4,
"next_reward": 2,
"created_at": 1564403873
},
"reward": {
"id": "reward_cdebf4f013",
"name": "2018 Private Report: State of the Ecommerce",
"referrals": 4,
"recurring": false
}
}

Errors

Please send back a blank response with a status code of 200. All not-200 responses will be considered errors.
If a webhook fails, we will try to deliver it 3 times over a period of 5 minutes.
Last modified 9d ago