TypeScript
import { Autumn } from 'autumn-js';
const autumn = new Autumn();
const { data, error } = await autumn.usage({
customer_id: 'x',
feature_id: 'feature_id',
value: 0,
});{
"success": true
}Features
Set Feature Usage
Set usage for a feature. This is similar to /track instead of incrementing usage, it sets the usage value to exactly what is provided.
POST
/
usage
TypeScript
import { Autumn } from 'autumn-js';
const autumn = new Autumn();
const { data, error } = await autumn.usage({
customer_id: 'x',
feature_id: 'feature_id',
value: 0,
});{
"success": true
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The ID of the customer.
The ID of the feature to set usage for.
The value you want to set this customer's usage of the feature to.
The ID of the entity to set usage for.
Customer details to set when creating a customer
Show child attributes
Show child attributes
Response
200 - application/json
⌘I

