Webhooks API
Configure outgoing webhook subscriptions and receive incoming webhooks from external platforms. Management endpoints require authentication; incoming webhook endpoints use source-specific verification.
List Webhooks
/api/webhooksList all configured webhook subscriptions
Returns an array of webhook configurations:
[
{
"id": "wh_001",
"url": "https://example.com/hooks/apex",
"events": ["lead.created", "experiment.completed"],
"status": "active",
"createdAt": "2025-01-10T08:00:00Z"
}
]
Create Webhook
/api/webhooksSubscribe a URL to receive event notifications
| Parameter | Type | Description |
|---|---|---|
urlrequired | string | HTTPS URL to deliver webhook payloads to |
eventsrequired | array | Event types to subscribe to (e.g. lead.created, experiment.completed, goal.reached) |
secret | string | Shared secret for HMAC signature verification. Auto-generated if not provided. |
Warning
Store the returned secret securely. It is used to verify webhook signatures and is only returned once at creation time.
Available Event Types
| Event | Fired when |
|---|---|
lead.created | A new lead is identified via identity stitching |
lead.updated | A lead's data or attribution changes |
experiment.started | An experiment transitions to running |
experiment.completed | An experiment reaches statistical significance or is manually stopped |
goal.reached | A goal hits its target value |
connector.synced | A connector sync completes successfully |
connector.error | A connector sync fails |
Delete Webhook
/api/webhooksRemove a webhook subscription
| Parameter | Type | Description |
|---|---|---|
idrequired | string | Webhook ID to delete |
Receive External Webhook
/api/webhooks/:sourceReceive incoming webhooks from external platforms
| Parameter | Type | Description |
|---|---|---|
sourcerequired | string | Source platform identifier: hubspot, stripe, github (path parameter) |
Info
Incoming webhook endpoints are authenticated by the source platform's own verification mechanism (e.g. HubSpot signature header, Stripe webhook secret) rather than Apex API keys.
Configure these URLs in your external platform's webhook settings:
https://your-instance.com/api/webhooks/hubspot
https://your-instance.com/api/webhooks/stripe
Apex processes the payload, extracts relevant data (new contacts, deals, payments), and feeds it into the identity and attribution pipeline.