---
title: "Track a customer event"
method: POST
path: "/api/v1/customers/{identifier}/events"
tags: ["Track Events"]
---

# Track a customer event

`POST /api/v1/customers/{identifier}/events`

Send an event associated with a person, referenced by the identifier in the path. There are three defined event `type` values: `page`, `screen` and `event`. Page and screen events represent website page views and mobile app screen views respectively; the `name` for these event types is intended to be the page or screen a person visited or viewed. Any other event, is given the `event` type.

We automatically trim leading and trailing spaces from event names.

**Reserved Properties**

There are a few important values which, if sent with the events that trigger automations, will override your automation settings:

* `from_address`
* `recipient`
* `reply_to`

When using the Javascript snippet to track events, you must call the Behavioral Tracking API call after identifying the customer or the event will not associate with the customer’s profile.

## Request body

- union
  - object
    - `name` string, required — The name of the event. This is how you'll reference the event in automations or segments.
    - `id` string, ulid — A [ULID](https://github.com/ulid/spec) we use to deduplicate events. If an event repeats a value we've already received, we ignore the duplicate. Our Python and Ruby libraries don't pass this ID.
    - `type` 'event' — Sets the event type. If your event isn't a `page` or `screen` type event, we automatically set this property to `event`.
    - `timestamp` integer — The unix timestamp when the event took place. If you don't provide this value, we use the date-time when we receive the event. **NOTE**: Events with a timestamp in the past 72 hours can trigger automations.
    - `data` object — Additional information that you might want to reference in a message using liquid or use to set attributes on your customer (referenced by `customer_id`).
      - `recipient` string — The recipient address for an action.
      - `from_address` string, email — The address you want to trigger messages from, overriding the `from` field in emails triggered by the event.
      - `reply_to` string — The address that receives replies for the message, if applicable.
  - object
    - `name` string, required — The name of the event. This is how you'll reference the event in automations or segments.
    - `id` string, ulid — A [ULID](https://github.com/ulid/spec) we use to deduplicate events. If an event repeats a value we've already received, we ignore the duplicate. Our Python and Ruby libraries don't pass this ID.
    - `type` 'page', required — Indicates that the event represents a page view. See ["page view" events](/integrations/data-in/connections/javascript/legacy-js/events/#page-view-events), for more information.
    - `timestamp` integer — The unix timestamp when the event took place. If you don't provide this value, we use the date-time when we receive the event.
    - `data` object — Additional information that you might want to reference in a message using liquid or use to set attributes on your customer (referenced by `customer_id`).
  - object
    - `anonymous_id` string, required — An identifier for an anonymous event, like a cookie. If set as an attribute on a person, any events bearing the same anonymous value are associated with this person. This value must be unique and is not reusable.
    - `name` string, required — The screen or deep link path the person viewed, so you can segment your audience or trigger automations from this event. Trim any leading and trailing spaces.
    - `id` string, ulid — A [ULID](https://github.com/ulid/spec) we use to deduplicate events. If an event repeats a value we've already received, we ignore the duplicate. Our Python and Ruby libraries don't pass this ID.
    - `type` 'screen', required — Indicates that the event represents a mobile screen view. You can also capture screen events directly with [our iOS SDK](/integrations/sdk/ios/track-events/#screen-view-events).
    - `timestamp` integer — The unix timestamp when the event took place. If you don't provide this value, we use the date-time when we receive the event.
    - `data` object — Additional information that you might want to reference in a message using liquid or use to set attributes on your customer (referenced by `customer_id`).

## Response `200`

A successful request returns an empty object response.

## Other responses

- `400` — Invalid or malformed request.
- `401` — Unauthorized request. Make sure that you provided the right credentials.

---

[API](https://skmtc.dev/customer/apis/customer-io-journeys-api-reference.md) · [All operations](https://skmtc.dev/customer/apis/customer-io-journeys-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/customer/customer-io-journeys-api-reference/revisions/4b391af7cb06/schema)
