Docs menu · Server-side API

Docs / Integrations

Server-side API

Direct HTTP API • Any programming language • Full control

API Endpoint

POST https://track.pixelfly.io/e

Or use your custom domain: POST https://t.yourdomain.com/e

Required Headers

Content-Type: application/json
X-PF-Key: YOUR_API_KEY

Request Body

{
  "event": "Purchase",
  "event_id": "unique-event-id-123",
  "value": 5000,
  "currency": "BDT",
  "order_id": "ORDER-123",
  "content_ids": ["SKU123"],
  "user_data": {
    "email": "customer@example.com",
    "phone": "+8801712345678"
  }
}

PHP / Laravel Example

$response = Http::withHeaders([
    'X-PF-Key' => env('PIXELFLY_API_KEY'),
])->post('https://track.pixelfly.io/e', [
    'event' => 'Purchase',
    'event_id' => Str::uuid()->toString(),
    'value' => $order->total,
    'currency' => 'BDT',
    'order_id' => $order->id,
    'user_data' => [
        'email' => $order->email,
        'phone' => $order->phone,
    ],
]);

Response

{
  "success": true,
  "event_id": "unique-event-id-123"
}

We use cookies to enhance your experience, analyze site traffic, and for marketing purposes. By continuing to use our site, you consent to our use of cookies. Learn more