Skip to main content
POST
/
usage
TypeScript
import { Autumn } from 'autumn-js';

const autumn = new Autumn();

const response = await autumn.usage({ customer_id: 'x', feature_id: 'feature_id', value: 0 });

console.log(response.success);
{
  "success": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
customer_id
string
required

The ID of the customer.

feature_id
string
required

The ID of the feature to set usage for.

value
number
required

The value you want to set this customer's usage of the feature to.

entity_id
string

The ID of the entity to set usage for.

customer_data
object

Used to add customer details like name or email when auto-creating a customer.

Response

200 - application/json
success
boolean
required