Autumn's V2 API is live in beta. We recommend using this version.
import { Autumn } from 'autumn-js';
const autumn = new Autumn();
const { data, error } = await autumn.entities.create('customer_id', { id: 'id', feature_id: 'feature_id' });{
"id": "seat_123",
"name": "John Doe's Seat",
"customer_id": "org_123",
"created_at": 1762971906762,
"env": "sandbox",
"products": [
{
"id": "pro_plan",
"name": "Pro Plan",
"group": null,
"status": "active",
"canceled_at": null,
"started_at": 1762971923843,
"is_default": false,
"is_add_on": false,
"version": 1,
"current_period_start": 1762971905000,
"current_period_end": 1765563905000,
"items": [
{
"type": "feature",
"feature_id": "messages",
"feature_type": "single_use",
"included_usage": 30,
"interval": "month",
"reset_usage_when_enabled": true,
"entity_feature_id": null,
"display": {
"primary_text": "10 Messages"
}
}
],
"quantity": 1
}
],
"features": {
"messages": {
"id": "messages",
"type": "single_use",
"name": "Messages",
"interval": "month",
"interval_count": 1,
"unlimited": false,
"balance": 10,
"usage": 0,
"included_usage": 30,
"next_reset_at": 1765563905000,
"overage_allowed": false
}
}
}import { Autumn } from 'autumn-js';
const autumn = new Autumn();
const { data, error } = await autumn.entities.create('customer_id', { id: 'id', feature_id: 'feature_id' });{
"id": "seat_123",
"name": "John Doe's Seat",
"customer_id": "org_123",
"created_at": 1762971906762,
"env": "sandbox",
"products": [
{
"id": "pro_plan",
"name": "Pro Plan",
"group": null,
"status": "active",
"canceled_at": null,
"started_at": 1762971923843,
"is_default": false,
"is_add_on": false,
"version": 1,
"current_period_start": 1762971905000,
"current_period_end": 1765563905000,
"items": [
{
"type": "feature",
"feature_id": "messages",
"feature_type": "single_use",
"included_usage": 30,
"interval": "month",
"reset_usage_when_enabled": true,
"entity_feature_id": null,
"display": {
"primary_text": "10 Messages"
}
}
],
"quantity": 1
}
],
"features": {
"messages": {
"id": "messages",
"type": "single_use",
"name": "Messages",
"interval": "month",
"interval_count": 1,
"unlimited": false,
"balance": 10,
"usage": 0,
"included_usage": 30,
"next_reset_at": 1765563905000,
"overage_allowed": false
}
}
}Documentation Index
Fetch the complete documentation index at: https://docs-v1.useautumn.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The unique identifier of the entity.
The name of the entity.
Unix timestamp (in milliseconds) when the entity was created.
sandbox, live The customer ID this entity belongs to.
The feature ID this entity belongs to.
The products this entity has access to.
Show child attributes
The features this entity has access to.
Show child attributes
The invoices for this entity. Returned only if 'invoices' is passed into the expand parameter.
Show child attributes