When one of your users completes all the tasks in their onboarding checklist, Clice will send a webhook to the URL you’ve specified.
This allows your application to be notified each time an onboarding is completed, so you can update the user’s information in your database accordingly.
In the Onboardings section, click the Actions dropdown menu and choose Integrate.
In the third section, you’ll find the field where you can enter your webhook URL.
Here’s how our backend sends the webhook:
fetch(onboardingFinishedEndpoint, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${apiKey}`,
},
body: JSON.stringify({
userId,
onboardingName,
}),
});
Your endpoint must be a POST route that:
First verifies that the request actually comes from https://api.clice.app
Checks that the API key in the Authorization header matches your Clice API key
(to find your API key, see API)
Only if both checks are successful, extracts from the request body:
userId: the unique ID of the user in your applicationonboardingName: the name of the onboarding they completedUpdates the corresponding user record in your database.