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.update("api_calls", {
name: "Monthly API Calls",
});curl -X PUT "https://api.priceos.com/v1/features/api_calls" \
-H "x-api-key: PRICEOS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Monthly API Calls"
}'{
"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
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Features
Update Feature
Partially update a feature by feature key.
PUT
/
v1
/
features
/
{featureKey}
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.update("api_calls", {
name: "Monthly API Calls",
});curl -X PUT "https://api.priceos.com/v1/features/api_calls" \
-H "x-api-key: PRICEOS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Monthly API Calls"
}'{
"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
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Headers
API key from your PriceOS dashboard.
Path Parameters
Feature key.
Body
application/json
Feature name.
Feature key.
Feature access type.
Available options:
boolean, limit Feature description.
Whether this limit feature tracks usage.
Usage reset interval.
Available options:
never, day, week, month, year Usage reset anchor.
Available options:
billing_period, calendar Response
Feature updated
Feature.
Feature ID.
Feature key.
Feature name.
Feature description.
Feature access type.
Available options:
boolean, limit Whether the feature tracks usage.
Usage reset interval.
Available options:
never, day, week, month, year Usage reset anchor.
Available options:
billing_period, calendar Whether the feature is archived.
When the feature was archived.
Why the feature was archived.