Guide: Inbound Webhooks
Send conversion events to CleanClicks from CRMs, automation tools, or custom backends using the inbound webhook API.
Inbound webhooks let you send conversion events to CleanClicks from any external system: CRMs, marketing automation tools, Zapier, Make.com, n8n, or custom backends.
When to Use Inbound Webhooks
Use inbound webhooks when conversions happen outside the browser:
- CRM events: A lead is qualified in HubSpot, Salesforce, or your CRM
- Backend purchases: An order is completed through a custom checkout
- Phone calls: A call tracking system logs a completed call
- Form processors: A form submission is handled by a third-party system
- Manual events: Any event you want to push to CleanClicks programmatically
Endpoint
POST https://cleanclicks.yourdomain.com/__cc/inbound
Authentication
Include your API key in the X-CC-Api-Key header:
X-CC-Api-Key: cc_your_api_key_here
Create API keys in Configuration > API Keys tab. See API Keys.
Request Format
Send a JSON payload:
{
"email": "customer@example.com",
"event": "purchase",
"value": 149.99,
"currency": "USD",
"orderId": "ORD-12345"
}
Required Fields
| Field | Type | Description |
|---|---|---|
email | string | Customer email address. Hashed server-side before sending to ad platforms. |
event | string | Event name (e.g., purchase, lead, signup) |
Optional Fields
| Field | Type | Description |
|---|---|---|
value | number | Monetary value of the conversion |
currency | string | ISO 4217 currency code (default: USD) |
orderId | string | Order or transaction identifier |
firstName | string | Customer first name |
lastName | string | Customer last name |
phone | string | Customer phone number |
Response
Success (200)
{
"ok": true,
"dispatched": ["googleads", "meta"]
}
The dispatched array shows which platforms received the event.
Error (400/401/500)
{
"error": "Invalid API key"
}
How Attribution Works
When an inbound webhook arrives, CleanClicks:
- Looks up the email address in its session database
- If found, recovers the original visit's click IDs (gclid, fbclid, etc.), UTM parameters, and geographic data
- Dispatches the event to all connected platforms with full attribution
This means a conversion that happens hours or days after the initial website visit still gets attributed to the correct ad click, as long as the same email was captured during the visitor's session.
If no prior session is found for the email, the event is still dispatched to ad platforms, but without click ID attribution. Platforms can still match via email using their own identity graphs.
Examples
Zapier
- Create a Zap triggered by your CRM event
- Add a Webhooks by Zapier action (POST)
- URL:
https://cleanclicks.yourdomain.com/__cc/inbound - Headers:
X-CC-Api-Key: cc_your_key - Body: map fields from your trigger to the JSON format above
Make.com (Integromat)
- Create a scenario with your trigger module
- Add an HTTP Make a request module
- Method: POST
- URL:
https://cleanclicks.yourdomain.com/__cc/inbound - Headers:
X-CC-Api-Key: cc_your_key,Content-Type: application/json - Body: JSON with mapped fields
cURL (Testing)
curl -X POST https://cleanclicks.yourdomain.com/__cc/inbound \
-H "Content-Type: application/json" \
-H "X-CC-Api-Key: cc_your_api_key" \
-d '{
"email": "test@example.com",
"event": "purchase",
"value": 99.99,
"currency": "USD"
}'
Python
import requests
response = requests.post(
"https://cleanclicks.yourdomain.com/__cc/inbound",
headers={
"Content-Type": "application/json",
"X-CC-Api-Key": "cc_your_api_key"
},
json={
"email": "customer@example.com",
"event": "purchase",
"value": 149.99,
"currency": "USD",
"orderId": "ORD-12345"
}
)
print(response.json())
Node.js
const response = await fetch('https://cleanclicks.yourdomain.com/__cc/inbound', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CC-Api-Key': 'cc_your_api_key'
},
body: JSON.stringify({
email: 'customer@example.com',
event: 'purchase',
value: 149.99,
currency: 'USD',
orderId: 'ORD-12345'
})
});
const data = await response.json();
console.log(data);
Security Notes
- Always use HTTPS. The endpoint enforces TLS.
- Keep API keys server-side. Never put them in browser JavaScript.
- One key per integration. Easier to revoke if compromised.
- Email is hashed automatically. You send the raw email; CleanClicks SHA-256 hashes it before relaying to ad platforms.
Related: API Keys | Connections Overview
Last updated Apr 1, 2026
Built with Documentation.AI