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

const autumn = new Autumn();

const feature = await autumn.features.update('feature_id');

console.log(feature.id);
{
  "id": "tokens",
  "name": "Tokens",
  "type": "single_use",
  "display": {
    "singular": "token",
    "plural": "tokens"
  },
  "credit_schema": null,
  "archived": false
}

Authorizations

Authorization
string
header
required

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

Path Parameters

feature_id
string
required

Body

application/json
id
string

The ID of the feature. This is used to refer to it in other API calls like /track or /check.

name
string

The name of the feature.

type
enum<string>

The type of the feature. 'single_use' features are consumed, like API calls, tokens, or messages. 'continuous_use' features are allocated, like seats, workspaces, or projects. 'credit_system' features are schemas that unify multiple 'single_use' features into a single credit system.

Available options:
static,
boolean,
single_use,
continuous_use,
credit_system
display
object

Singular and plural display names for the feature in your user interface.

credit_schema
object[]

A schema that maps 'single_use' feature IDs to credit costs. Applicable only for 'credit_system' features.

archived
boolean

Whether the feature is archived. Archived features are hidden from the dashboard and list features endpoint.

Response

200 - application/json
id
string
required

The ID of the feature, used to refer to it in other API calls like /track or /check.

type
enum<string>
required
Available options:
boolean,
single_use,
continuous_use,
credit_system
name
string | null

The name of the feature.

display
object | null

Singular and plural display names for the feature.

credit_schema
object[] | null

Credit cost schema for credit system features.

archived
boolean | null

Whether or not the feature is archived.