track events (usage and behavior, with optional entitlement enforcement) and identify events (company/user upserts). It is the same API the React SDK’s useTrack and the Node SDK’s track()/identify() methods call.
Ingest an event
POST /api/v1/events accepts a single event object with an event_type of track or identify.
Auth
Authorization: Bearer api_…(legacy key) — for server-side ingestion- Embed access token — for browser-side ingestion from an identified session
- Dashboard session cookie — for listing (see below)
The event ingestion endpoint does not currently accept
sk_…/rk_… prefixes. Use a legacy api_… key or an embed access token. See the endpoint auth matrix.Track event
string
required
Must be
track or identify.string
required
Event name. If it matches a configured feature flag’s
featureKey or eventKey, ArcenPay enforces the flag’s entitlement rules against the company (see below).object
Resolves the company for the event. At least one of
id, wallet, or email required to associate usage. Unknown companies are upserted.object
Resolves the user for the event. At least one of
id, clerk_user_id, wallet, or email required.object
Arbitrary key-value properties attached to the event.
string
Unique key for the logical event. Prevents double-counting on retries. Maximum 128 characters.
Entitlement enforcement on track
When the eventname matches a feature flag’s featureKey or eventKey, ArcenPay runs the resolved entitlement check before recording the event:
- Metered features (credit-backed or with an allocation) consume one unit via
consumeMeteredEntitlement. If the company is out of quota or credits, the request returns402(“Insufficient credits”) or429(“Limit reached”). - Boolean features block the event with
429if the feature is not enabled.
track into a billable usage call: your server can fire usage events and ArcenPay meters them against the customer’s plan.
Identify event
identify event upserts the company and user records (merging traits) without recording a track event or consuming anything.
Success response
List events
GET /api/v1/events lists ingested track events for the active dashboard environment. Auth: dashboard session with catalog:read role.
Event object
Using events with SDKs
Related
- Entitlements & flags API — the underlying enforcement engine
- Feature flags — how track events map to feature checks
- React SDK hooks —
useTrackanduseConsumeEntitlement

