How to set up Trustpilot Webhooks

When it comes to tracking your review activity, there are a few approaches you can take. At the most basic level, you can enable Email Notifications. A more advanced approach would be to make API calls to look for new reviews. But the problem with this approach is that you will likely need to make many unnecessary API calls to monitor your review activity (ie. API polling).

So what is the best solution? In many cases, we would recommend using our webhooks. With this approach, you can provide Trustpilot with one or more "Subscription URLs". Whenever you get a new, updated, or deleted review, Trustpilot will then make a POST request to these URLs.

 

To navigate there within your Trustpilot business app, you can go to Integrations > Developers > Webhooks (direct link). 

 

And here is an example of the data that will come through in this POST request for 'New Service Reviews':

{
  "events": [
    {
      "eventName": "service-review-created",
      "version": "1",
      "eventData": {
        "id": "53bffd360000640002975387",
        "language": "en",
        "title": "Great service",
        "text": "Nothing other than excellent customer service.",
        "referenceId": "ABC-123-xyz",
        "stars": 5,
        "createdAt": "2017-05-20T09:34:44.000Z",
        "isVerified": true,
        "locationId": "43f51215-a1fc-4c60-b6dd-e4afb6d7b831",
        "link": "https://api.trustpilot.com/v1/reviews/53bffd360000640002975387",
        "consumer": {
          "id": "53bffc3900006400017e5db8",
          "name": "Customer",
          "link": "https://api.trustpilot.com/v1/consumers/53bffd360000640002975387"
        },
        "tags": [
          {
            "group": "Generic",
            "value": "Tag value"
          }
        ]
      }
    }
  ]
}

NOTE: For privacy reasons, the customer email address is not included in our Service Review webhook payloads, so in order to map a specific review back to a specific customer, we suggest using the Reference ID field.

 

FAQs

Q: How real-time are webhooks?

A: Webhooks are typically very close to real-time. If we don't receive a successful response from your server, then our system will try to resend several additional times with more and more time between each attempt over the next 24 hours.

 

Q: Can I add any security to the webhooks?

A: Yes, you can use Basic Authentication. This means you can include a "username" and "password" of your choosing as part of the Subscription URL. For example: https://username:password@domain.com. When your server receives the webhook, you can check the Header to ensure that the Basic Authentication matches.


NOTE: This "username" and "password" can be anything you would like — it has no correlation to any Trustpilot username or password (or API key/secret) that you may use for your account.

 

Q: Can I whitelist the IP address for your webhooks?

A: No, we use dynamic IP addresses through Amazon Web Services (AWS), so there isn't a single IP address that we can provide to you.

 

Q: Are there any easy tools that can receive webhooks?

A: Yes, if you are not able to build out your own URLs to catch Trustpilot webhooks, there are many tools that have this functionality. One popular choice would be Zapier: https://zapier.com/apps/webhook/integrations

Was this post helpful?

3 comments

Sort by
  • Avatar

    Michael Cohen Trustpilot

    Hi Stephen Huang,


    Our webhooks are sent at the same time that the reviews are publicly posted. In other words, if a review takes 2 hours to be posted (due to our delayed posting safeguard), then the webhook will also take 2 hours to be sent.


    Hope this helps to clear things up!


    Cheers,

    Michael

    1
  • Avatar

    auspayday

    Webhooks. From there, you can create a new webhook and configure it with the necessary settings, such as the events you want to be notified about and the URL to which the webhook should send the data. You can also set up multiple webhooks if you need to send the data to different endpoints.

    By using webhooks, you can avoid the need for constant API polling, which can be resource-intensive and inefficient. Instead, Trustpilot will send the review data to your specified endpoints as soon as it becomes available, allowing you to process the data in real-time and take immediate action if needed.

    Overall, using webhooks is a powerful and flexible way to track your review activity on Trustpilot, and can help you stay on top of your reviews more effectively.

    0
  • Avatar

    Stephen Huang

    Hi there,

    Does webhook not sending instant notification if we use "Generate service review invitation link?"

    Since it says "It may takes up to 2 hours to show reviews on Trustpilot" or something similar on the Trustpilot submitted review page.

    I have filled the Subscription URL for "New Review".

    Best regards.

    0
Please sign in to leave a comment.