curl --request POST \
  --url https://api.useautumn.com/v1/events \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "customer_id": "john-123",
  "event_name": "user_login"
}'

This endpoint is for sending usage events to Autumn, required for tracking your metered features. Events can aggregated via:

  • COUNT: Counts the number of times an event happened (eg. number of users created).

  • SUM: Sums a value sent in the event properties (eg. total compute time)

    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
Event to send
event_name
string
required

Name of the event

customer_id
string
required

ID which you provided when creating the customer

idempotency_key
string

Unique identifier for the event. If the same event is sent multiple times, it will be ignored.

properties
object

Event properties. Can be used to send a value when using SUM aggregation.

customer_data
object

Properties for new customers. If a customer with the provided customer_id already exists, this object is ignored. Otherwise, a new customer will be created with these properties. Alternatively, use the /customers endpoint.