---
title: "Track an event"
method: POST
path: "/api/events/track"
tags: ["events"]
---

# Track an event

`POST /api/events/track`

Events are created asynchronously and <b>processed separately from single event (non-bulk) endpoint</b>. To make sure events are tracked in order, send them all to the same endpoint (either bulk or non-bulk). <br/><br/>There is a soft limit (default is 8,000) on the number of unique fields a custom event can have. For events of the same name, identically named data fields must be of the same type.<br/><br/>Learn about <a href="https://support.iterable.com/hc/articles/29156459027348">identifying users by <code>userId</code> and <code>email</code></a>.<br/><br/><b>Rate limit</b>: 2000 requests/second, per project.<br/><br/>

## Request body

- TrackRequest
  - `campaignId` integer — Campaign tied to conversion
  - `createNewFields` boolean — Whether new fields should be ingested and added to the schema. Defaults to project's setting to allow or drop unrecognized fields.
  - `createdAt` integer — Time event happened. Set to the time event was received if unspecified. Expects a unix timestamp.
  - `dataFields` object — Additional data associated with event (i.e. item amount, item quantity). For events of the same name, identically named data fields must be of the same type.
  - `email` string — An email address that identifies a user profile in Iterable. Provide an <code>email</code> or a <code>userId</code> (but not both), depending on <a href="https://support.iterable.com/hc/articles/29156459027348">how your project identifies users</a>.
  - `eventName` string, required — Name of event
  - `id` string — Optional event id. If an event exists with that id, the event will be updated. If none is specified, a new id will automatically be generated and returned. Note that this ID cannot be longer than 512 bytes.
  - `templateId` integer — Template id
  - `userId` string — A user ID that identifies a user profile in Iterable. Provide an <code>email</code> or a <code>userId</code> (but not both), depending on <a href="https://support.iterable.com/hc/articles/29156459027348">how your project identifies users</a>.

## Response `200`

successful operation

## Other responses

- `400` — Invalid parameters
- `401` — Invalid API key

---

[API](https://skmtc.net/iterable/apis/iterable-api.md) · [All operations](https://skmtc.net/iterable/apis/iterable-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/iterable/iterable-api/revisions/afaab604b58c/schema)
