---
ref: tool:intercom/track-event
name: Track an event
company: company:intercom
workflows: []
access: [api]
tags: [capability:track-product-usage, category:support, has:api]
docs: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/data-events/createdataevent
updated: 2026-09-27
---

# Track an event

Records a named event with optional metadata against a user or lead, where teammates can filter on it and build segments from it.

Send `event_name`, `created_at` (a Unix timestamp in seconds) and the
contact's `user_id`, `email` or Intercom `id`; leads need `id`. Only the first
10 metadata keys are kept. A success is `202 Accepted` with an empty body, and
an unknown user returns 404. Intercom ignores repeats of the same contact,
event name and `created_at`, so send the real event time.

## Set up

Use the first option your agent supports.

### API (official)

- Base URL: https://api.intercom.io
- Endpoint: `POST /events`
- Auth: send the header `Authorization: Bearer $INTERCOM_API_KEY`
- Get a key: https://app.intercom.io/a/apps/_/developer-hub/app-packages
- Docs: https://developers.intercom.com/docs/references/rest-api/api.intercom.io

Before doing anything else, make one read-only call to confirm access.

## Rules

- Ask the user before anything that sends messages, costs money, or changes data.
- Never print API keys.
