Skip to main content
All CollectionsConnectors & Integration
Integrate via our API (including documentation)

Integrate via our API (including documentation)

Connect and automate CustomerHub with your own tools

Updated this week

Overview

CustomerHub’s Public API allows Admins to programmatically access, update, and sync data with external systems. This includes user activity, product access, subscriptions, onboarding, and more. The API also supports webhooks, which enable real-time event notifications to external URLs.



Before You Begin

  • You must be an Admin to access API settings

  • All API requests require authentication headers (see below)

  • API and webhook access must be enabled in your app

Please note: This article is highly technical and intended for developers.


Authentication

All endpoints require the following headers, which can be retrieved from /{app}/settings:

  • X-API-KEY

  • X-API-SECRET



Webhook Documentation

A webhook allows CustomerHub to send real-time notifications to your external systems when certain user events occur—such as a login, onboarding completion, or video watched. Think of it as a push-based alert system that keeps your tools in sync without polling.

Webhook API Endpoints

1. Create a Webhook

curl -X POST "https://api.customerhub.com/api/webhooks" \
-H "X-API-KEY: api key" \
-H "X-API-SECRET: api secret" \
-H "Content-Type: application/json" \
-d '{
"url": "webhook_url",
"name": "Test Webhook",
"subscribed_events": ["UserLogin"]
}'

Optional Parameters (available during creation or update):

  • name (string) – Descriptive name for your webhook

  • subscribed_events (array) – Specific events to subscribe to. If omitted, the webhook will subscribe to all available events.

  • status (string) – One of: active, paused, or disabled

2. Get All Webhooks

curl -X GET "https://api.customerhub.com/api/webhooks" \
-H "X-API-KEY: api_key" \
-H "X-API-SECRET: api_secret"


3. Get a Specific Webhook

curl -X GET "https://api.customerhub.com/api/webhooks/{webhook_id}" \
-H "X-API-KEY: api_key" \
-H "X-API-SECRET: api_secret"


4. Update a Webhook

curl -X PUT "https://api.customerhub.com/api/webhooks/{webhook_id}" \
-H "X-API-KEY: api_key" \
-H "X-API-SECRET: api_secret" \
-H "Content-Type: application/json" \
-d '{
"url": "https://webhook.site/updated-url",
"name": "Updated Webhook Name",
"subscribed_events": ["UserOnboardingCompleted"]
}'


5. Delete a Webhook

curl -X DELETE "https://api.customerhub.com/api/webhooks/{webhook_id}" \
-H "X-API-KEY: 320ea908deec70fa2f7bd973" \
-H "X-API-SECRET: 3c601b26e81a8a385a24a933bedf"


Available Webhook Events

You can subscribe to any combination of the following events:

  • UserLogin

  • UserActive

  • UserInactive

  • UserVideoWatched

  • UserVideoCompleted

  • UserAudioListened

  • UserFileDownloaded

  • UserOnboardingStarted

  • UserOnboardingCompleted

  • UserTaskCompleted

  • UserPageCompleted

  • UserProductAccessGranted

  • UserProductAccessRemoved

  • UserProductCompleted

  • UserProductPurchased

  • UserPostLiked

  • UserCommentCreated

  • UserCommentLiked

  • UserCommentReplied

  • UserSubscriptionStarted

  • UserSubscriptionCanceled

  • UserUploadedFile



FAQs

Can I test webhook payloads?
Yes! You can use services like webhook.site to inspect incoming webhook data during setup.

What if I don’t specify subscribed events?
The webhook will be created with all available events by default.

How do I know a webhook worked?
We return standard HTTP responses for each request. Ensure your receiving URL returns a 200-level response to acknowledge receipt.

Can I pause or disable a webhook without deleting it?
Yes—set status to paused or disabled via the update endpoint.

Did this answer your question?