Skip to content

S2S Collect API

Endpoint

POST https://events.thrad.ai/v1/api/collect

Headers

Required:

  • Authorization: Bearer <YOUR_API_KEY>
  • Content-Type: application/json

Request body

Required fields:

  • event_name (string)

Optional fields:

  • tag_id
  • event_id
  • timestamp (unix seconds)
  • page_url
  • referrer
  • user_agent
  • channel (stored as server)
  • session_id
  • attribution_type
  • impression_id
  • click_id
  • bid_id
  • impression_state
  • view_time_ms
  • consent
  • params (object)

Behavior notes

  • Success response: 204 No Content
  • If tag_id is missing or empty, server derives site:<host> from page_url, then Origin, then Referer (fallback site:unknown)
  • Dedupe applies when event_id is present (by tag_id + event_id)
  • Auth metadata is stamped into params (integration, partner_id, api_key_label)

Example

curl -X POST "https://events.thrad.ai/v1/api/collect" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "event_name": "page_view",
    "event_id": "pv-checkout-step-1",
    "page_url": "https://shop.example.com/checkout",
    "params": {
      "step": "shipping"
    }
  }'