> For the complete documentation index, see [llms.txt](https://ciusji.gitbook.io/luden/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ciusji.gitbook.io/luden/sending-data/event-api.md).

# Event API

Lude has API for direct event collection. You can use it for sending events directly from apps or backends.

Authorization server secret token might be provided either as query parameter or HTTP header

## POST: /api/v1/s2s/event?token=$server\_API\_key\_secret

Parameters:

* X-Auth-Token: required
* token: required

Payload:

```
{
  "event_id": "x96f60pzk1",
  "event_data": {
    ...
  },
  "page_ctx": {
    "page_title": "Luden Demo",
    "referer": "",
    "url": "http://track-demo.ksense"
  },
  "device_ctx": {
    "ip": "10.10.10.10",
    "user_agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36",
  },
  "user": {
    ...
  }
}
```

Response:

```
{"status": "ok"}
```

<figure><img src="https://3772893841-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMfQt2eTfNlkZBgnWOxuC%2Fuploads%2FMW1ESKhso4EG7ZjNiZQz%2FScreen%20Shot%202023-03-18%20at%2014.24.12.png?alt=media&amp;token=fbf43c78-bdc7-467a-a3d3-20370eb3eea2" alt=""><figcaption></figcaption></figure>
