Skip to main content
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

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

Unique identifier (eg, serial number) to detect duplicate customers and prevent free trial abuse

Response

200 - application/json
success
boolean
required