Iby Intercom
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.
Description
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.
track-event.md
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.
Built from these files in the repository
The layout and the rules come from lib/catalog/render-markdown.ts, the set-up wording from lib/catalog/render-access.ts.
Ways in
| Route | Source | Call | Required | Docs |
|---|---|---|---|---|
| Official | POST /events | API key in $INTERCOM_API_KEY | Docs |