POST
/
track
import { Autumn as autumn } from 'autumn-js';

await autumn.track({
  customer_id: 'user_123',
  feature_id: 'messages',
  value: 3
});
{
  "id": "evt_2w5dzidzFD1cESxOGnn9frVuVcm",
  "code": "event_received",
  "customer_id": "user_123",
  "feature_id": "messages"
}

This endpoint is for tracking usage events in Autumn, so feature usage can be limited or billed for.

If the customer_id you send doesn’t already exist, Autumn will automatically create a new customer. You can optionally set the properties of this new customer through the customer_data field.

Authorizations

Authorization
string
header
required

Your secret key must be used as the Bearer token for this endpoint.

Body

application/json

Response

200 - application/json

The response is of type object.