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>"
}Body
application/json
Response
Feature updated
Feature.