Webhooks

Interacting with a third-party API like ReferralHero's can introduce two problems:

  • Services not directly responsible for making an API request may still need to know the response of that request

  • Some events, like deleting a subscriber, are not the result of a direct API request

Webhooks solve these problems by letting you register a URL that we will notify anytime an event happens in your campaign. When the event occurs—for example, when a user successfully subscribes to your list, ReferralHero will send a webhook notification to your registered webhooks.

Understand that you only need to use webhooks for behind-the-scenes events. The results of most ReferralHero requests—including new subscriptions—are reported synchronously to your code, and don't require webhooks for verification.

Important Considerations

Due to the nature of network requests, your application should assume webhook requests could arrive out of order or could even fail to arrive; webhooks should be used only as notifications and not as a primary ReferralHero data source (make sure your application could still work when webhook is not available).

Last updated