Skip to main content
POST
/
v1
/
features
Node.js
import { PriceOS } from "priceos";
import type { MyFeatures } from "./priceos.types";

const priceos = new PriceOS<MyFeatures>(process.env.PRICEOS_API_KEY!);

const feature = await priceos.features.create({
  name: "API Calls",
  featureKey: "api_calls",
  type: "limit",
  tracksUsage: true,
  usageResetInterval: "month",
  usageResetAnchor: "calendar",
});
{
  "id": "feat_123",
  "featureKey": "api_calls",
  "name": "API Calls",
  "description": "Monthly API request limit.",
  "type": "limit",
  "tracksUsage": true,
  "usageResetInterval": "month",
  "usageResetAnchor": "calendar",
  "isArchived": false,
  "archivedAt": null,
  "archivedReason": null
}

Documentation Index

Fetch the complete documentation index at: https://docs.priceos.com/llms.txt

Use this file to discover all available pages before exploring further.

Headers

x-api-key
string
required

API key from your PriceOS dashboard.

Body

application/json
name
string
required

Feature name.

featureKey
string
required

Feature key.

type
enum<string>
required

Feature access type.

Available options:
boolean,
limit
description
string | null

Feature description.

tracksUsage
boolean

Whether this limit feature tracks usage.

usageResetInterval
enum<string>

Usage reset interval.

Available options:
never,
day,
week,
month,
year
usageResetAnchor
enum<string>

Usage reset anchor.

Available options:
billing_period,
calendar

Response

Feature created

Feature.

id
string
required

Feature ID.

featureKey
string
required

Feature key.

name
string
required

Feature name.

description
string | null
required

Feature description.

type
enum<string>
required

Feature access type.

Available options:
boolean,
limit
tracksUsage
boolean
required

Whether the feature tracks usage.

usageResetInterval
enum<string>
required

Usage reset interval.

Available options:
never,
day,
week,
month,
year
usageResetAnchor
enum<string>
required

Usage reset anchor.

Available options:
billing_period,
calendar
isArchived
boolean
required

Whether the feature is archived.

archivedAt
string | null
required

When the feature was archived.

archivedReason
string | null
required

Why the feature was archived.