Skip to main content

Integrate via our API (including documentation)

Technical reference for CustomerHub's Public API and webhooks, covering authentication, webhook endpoints, and the available webhook events. Intended for developers.

📝 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

⚠️ This article is highly technical and intended for developers.


🔐 Authentication

All endpoints require the following headers. To find your API credentials, click Settings (gear icon) in the sidebar, hover over Workspace, then click App Settings. Scroll down to the Advanced section.

Toggle Enable API keys to ON. Your API credentials will appear:

  • X-API-KEY — Your API Key (click the eye icon to reveal, or the copy icon to copy)

  • X-API-SECRET — Your API Secret (click the eye icon to reveal, or the copy icon to copy)

💡 Use the REGENERATE button to create new API credentials if your keys are compromised. This will immediately invalidate your old keys.


📡 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: api_key" \
-H "X-API-SECRET: api_secret"

📋 Available Webhook Events

You can subscribe to any combination of the following events:

  • UserLogin

  • UserActive

  • UserInactive

  • UserVideoWatched

  • UserVideoCompleted

  • UserAudioListened

  • UserFileDownloaded

  • UserUploadedFile

  • UserOnboardingStarted

  • UserOnboardingCompleted

  • UserTaskCompleted

  • UserPageCompleted

  • UserProductAccessGranted

  • UserProductAccessRemoved

  • UserProductCompleted

  • UserProductPurchased

  • UserPostLiked

  • UserCommentCreated

  • UserCommentLiked

  • UserCommentReplied

  • UserSubscriptionStarted

  • UserSubscriptionCanceled


❓ 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?