# Send events with the SDK

Push what happens inside your product straight into CoreX. This is the source to
use when the behaviour you care about is not visible to a billing provider.

## Get a token

The app’s **Connect** page, under API keys, issues an ingestion token. The raw token is shown once,
at creation, so copy it then. CoreX stores only a hash of it, which means a
leaked database never yields a working key. Revoke a token at any time and calls
using it stop working immediately.

Send it on every request as the `X-CoreX-Token` header.

## Identify a customer

`POST /api/customers/identify` tells CoreX who someone is, so events can be
attributed to a customer rather than an anonymous id.

## Track usage

- `POST /api/usage/events` for a single event
- `POST /api/usage/events/batch` when you have several to send at once

An event carries a name and a free-form set of properties. Include an `email` and
CoreX resolves it to an existing contact, or creates a lightweight one, so a
person's activity is grouped from their first event onwards.

Repeated deliveries of the same event are ignored, so retrying after a network
error cannot inflate your numbers.

## Name your activation event

One of your events is the moment a customer first gets value from the product —
the first job published, the first claim resolved, the first theme scheduled.
Name it on the app (**Usage → activation event**) and CoreX starts measuring
time to first value, activation rate, and the merchants who installed but never
arrived. Until an app names one, those numbers have nothing to count and read
zero no matter how many events you send.

Pick the earliest event that means the customer got what they came for, not the
one that means they signed up.

## What it powers

- [Usage events](../behavioural/usage-events.md) and
  [Usage metrics](../behavioural/usage-metrics.md)
- [Segments](../customers/segments.md) and [Churn risk](../customers/churn-risk.md),
  which read real product usage rather than billing alone
- [Flows](../flows/overview.md): every tracked event can trigger automation, so
  `usage:<your_event_name>` starts a flow

## Rate limits

The ingestion endpoints are rate limited. Batch where you can, and treat a
throttled response as retryable.

## Related

- [Integrations overview](../integrations/overview.md)
- [Connect Stripe](connect-stripe.md)
- [Usage events](../behavioural/usage-events.md)
