Sending Candu user data allows you to use Segmentation to personalize content and improve user experience. Webhooks can be used to leverage your existing data and bring it into Candu.

What is a webhook?

A webhook is a way for one application to provide other applications with real time information. In Candu, webhooks automatically pass data to an external source via JSON. Webhooks are a great way to leverage the data and information you gather about how users engage with your Candu content in third party applications.

Webhooks contain a message - or a payload - that is sent to a unique URL.

We have introduced webhooks as a way of sending user event and trait data into Candu

Sending data to Candu directly

Candu provides an endpoint to send data into Candu. These include user identity info and user events. In order to do so you will need to send a HTTP POST request to the following endpoint: https://api.candu.ai/api/eventWebhook

To send an event you will need your API key which you can find in your workspace settings under Access Keys section.

You can then post the following requests depending on whether you are updating user identity or sending a user event:

Authentication

The endpoint uses Basic Authentication via the http Authorization header you simply need to pass your API key as the username without a password essentially the API key suffixed with a colon and then base64 encoded. For example if your API key is TestApiKey then you would base 64 encode "TestApiKey:" and you would end up with an Authorization header that looks something like this:

"Authorization": "Basic VGVzdEFwaUtleTo="

Identify

You can use identify events to pass user properties that can be used in segmentation, you can use the traits property to pass in all the user info you have and we will update this data so you can use it to build segments, here is a sample object:

{
"type": "identify",
"userId": "anUserId",
"traits": {
"email": "[email protected]", // special trait which will be shown in users view
"location": "New York",
"isAdmin": true7 },
"timestamp": "2021-11-01T15:58:02Z" // Optional we will generate as current time if not passed9}

Event

You can use track events to pass events that a user has performed so that it can be used in segmentation, here is a sample object:

{
"type": "track",
"userId": "anUserId",
"event": "Hello World", // The event the user performed
"timestamp": "2021-11-01T15:58:02Z" // Optional we will generate as current time if not passed5}

Alternative Ways to Send Data to Candu

Please review this guide to see what third-party integrations integrate with Candu.

Did this answer your question?