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/json

No auth header. The pixel ID itself is the only identifier — abuse controls live at the rate-limit and IP-fingerprint layer.

Request body

FieldTypeRequiredDescription
eventNamestringyesStandard event name (Lead, Purchase, ViewContent, …) or a custom string.
eventIdstringnoUUID. Auto-generated if omitted. Used for browser/server dedup.
eventTimenumbernoUnix timestamp in seconds. Defaults to server-receive time.
eventSourceUrlstringnoPage URL where the event happened.
customDataobjectnoFree-form: { value, currency, content_id, content_name, … }.
emailstringnoUser email. Will be SHA-256 hashed on ingest if not pre-hashed.
phonestringnoUser phone. E.164-normalized + SHA-256 hashed.
clientIdstringnoPer-visitor identifier (pb.js generates a UUID + persists in localStorage).
test_event_codestringnoRoutes 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: true means a previous event with the same eventId was 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.