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

# POST /api/track/

`POST /api/track/`

## Request body

- BatchEventRequest
  - `batch` EventRequest[], required
    - `event_name` string, required — String name of the event, corresponds to definition in metrics
    - `properties` object — Extra metadata on the event that can be filtered and queried on in the metrics. All key value pairs should have string keys and values can be either strings or numbers. Place subscription filters in this object to specify which subscription the event should be tracked under
    - `time_created` string, date-time, required — The time that the event occured, represented as a datetime in ISO 8601 in the UTC timezome.
    - `idempotency_id` string, required — A unique identifier for the specific event being passed in. Passing in a unique id allows Lotus to make sure no double counting occurs. We recommend using a UUID4. You can use the same idempotency_id again after 7 days
    - `customer_id` string, required — The id of the customer that this event is associated with, usually the customer id in your backend

## Response `201`

- TrackEventSuccess
  - `success` 'all' | 'some', required
  - `failed_events` object, required

## Other responses

- `400`

## Changes

- **2023-01-16** `36b48cae00a3` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/uselotus/apis/lotus-api/changes/api/track/post.md)

---

[API](https://skmtc.dev/uselotus/apis/lotus-api.md) · [All operations](https://skmtc.dev/uselotus/apis/lotus-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/uselotus/lotus-api/revisions/718df5d01ac4/schema)
