---
title: "Track Events"
method: POST
path: "/api/track"
tags: ["Analytics"]
---

# Track Events

`POST /api/track`

## Request

- Base URL: `https://pegarex.com.br` (the document declares no server; this is the origin it was published from)
- URL: `https://pegarex.com.br/api/track`
- Auth: HTTP bearer

Accept a batch of behavioral events. Returns 204 (no body) on success.

## Request body

- TrackBatch
  - `events` TrackEvent[], required
    - `event_type` string, required
    - `anon_id` string, required
    - `session_id` string, nullable
    - `car_id` integer, nullable
    - `url` string, nullable
    - `referrer` string, nullable
    - `occurred_at` string, date-time, nullable
    - `props` object

## Response `204`

Successful Response

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/pegarex/apis/pegarex-api.md) · [All operations](https://skmtc.dev/pegarex/apis/pegarex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pegarex/apis/pegarex-api/revisions/8c789c9bd72d?raw)
