> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lemrock.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Server API

> Send events from your backend, alongside the pixel, so orders count even with ad blockers.

Your backend can send the same events as the pixel. Use the server API for `order_created` alongside the pixel: it survives ad blockers and only reports orders your payment provider actually captured. Ask your Lemrock contact for an API key.

```
POST https://api.lemrock.com/v1/server/events
Authorization: Bearer lr_sk_...
Content-Type: application/json
```

```json theme={null}
{
  "event_id": "12345",
  "event_type": "order_created",
  "event_time_ms": 1788954030123,
  "lrclid": "lr_clk_3xk9Qm2vT8LpW1nRz5bYcA",
  "source_url": "https://shop.example/checkout/thank-you",
  "data": {
    "type": "contents",
    "amount": 5198,
    "currency": "EUR",
    "contents": [{ "id": "sku_123", "quantity": 2, "amount": 2599 }]
  },
  "user": { "email_sha256": "86e0b9e5..." }
}
```

* **One event per request.** Required: `event_id`, `event_type`, `event_time_ms` and `data`. `data` takes the same [event fields](/en/conversion-tracking/reference#event-fields) as the pixel.
* `event_time_ms` is Unix milliseconds, as a number, within the last 90 days.
* **Store** `lrclid` **yourself.** Visitors from a Lemrock ad land with `?lrclid=lr_clk_...` in the URL. Save it with the session or customer and attach it to the order. Without it, the event needs a hashed email or phone in `user`.
* **Use the same** `event_id` **as the pixel**, so the order counts once.
* **Only send events for visitors whose consent you hold.**
* `validate_only: true` checks the event without recording it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.