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 usage-based features.

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 to create a new customer. If a customer with the provided customer_id already exists, this object is ignored. Alternatively, use the /customers endpoint.

Response

200

Event sent