Event ingestion API
The public endpoint pb.js posts to. Documented here so you can call it directly from server-side code or other languages if pb.js isn't a fit.
Endpoint
http
POST https://api.adsping.io/api/v1/t/:pixelId
Content-Type: application/jsonNo auth header. The pixel ID itself is the only identifier — abuse controls live at the rate-limit and IP-fingerprint layer.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
eventName | string | yes | Standard event name (Lead, Purchase, ViewContent, …) or a custom string. |
eventId | string | no | UUID. Auto-generated if omitted. Used for browser/server dedup. |
eventTime | number | no | Unix timestamp in seconds. Defaults to server-receive time. |
eventSourceUrl | string | no | Page URL where the event happened. |
customData | object | no | Free-form: { value, currency, content_id, content_name, … }. |
email | string | no | User email. Will be SHA-256 hashed on ingest if not pre-hashed. |
phone | string | no | User phone. E.164-normalized + SHA-256 hashed. |
clientId | string | no | Per-visitor identifier (pb.js generates a UUID + persists in localStorage). |
test_event_code | string | no | Routes the event to platform Test Events tab. Usually configured at pipeline level instead. |
Examples
bash
# Minimal example
curl -X POST 'https://api.adsping.io/api/v1/t/PIXEL_ID' \
-H 'Content-Type: application/json' \
-d '{
"eventName": "Lead",
"eventId": "abc-123",
"email": "[email protected]",
"customData": { "value": 0, "currency": "USD" },
"eventSourceUrl": "https://example.com/landing"
}'bash
# Purchase with full Advanced Matching
curl -X POST 'https://api.adsping.io/api/v1/t/PIXEL_ID' \
-H 'Content-Type: application/json' \
-d '{
"eventName": "Purchase",
"eventId": "order-9876",
"email": "[email protected]",
"phone": "+15551234567",
"firstName": "Jane",
"lastName": "Doe",
"customData": {
"value": 129.99,
"currency": "USD",
"content_ids": ["prod-42"],
"content_type": "product",
"order_id": "ORD-9876"
}
}'Response
json
{
"success": true,
"data": {
"eventId": "abc-123",
"deduped": false
}
}deduped: truemeans a previous event with the sameeventIdwas already received within the last 24h — this one was discarded.- Errors return HTTP 400/403/500 with
{ success: false, error: "..." }.
Rate limits
- Per-IP: ~60 events/sec sustained. Bursts to 120/sec for ~10 seconds.
- Per-pixel: limited by your plan's monthly event cap. Hitting the cap returns 403.
- Abuse layer drops obvious bots / scrapers / known-bad IPs before they hit your quota.
Most users never need this endpoint directly — pb.js handles all ingestion. Use the API only when you have server-side events that the browser can't see (Shopify orders, CRM webhooks, etc.). For Shopify specifically: install the AdsPing Shopify app — it posts order/refund events for you.