Commet
  • Pricing
Log InTry out
Add feature to plan POSTAdd price to plan POSTCreate plan POSTDelete plan price DELETEDelete plan DELETEDelete regional prices DELETEGet plan GETList plans GETRemove feature from plan DELETESet default price PUTSet plan regional pricing PUTSet plan visibility PUTUpdate plan feature PUTUpdate plan price PUTUpdate plan PUTUpsert regional prices PUT
DocumentationKnowledge BaseBuild with AIAPI ReferenceWebhooks

Add feature to plan

Attach a feature to a plan with limits, overage, and credits configuration.

POST
/plans/{id}/features

Attach a feature to a plan with limits, overage, and credits configuration.

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

featureId*string
enabled*boolean
includedAmount*integer
unlimited*boolean
overage*
creditsPerUnit?|null
pricingMode*string
margin?|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/plans/string/features" \  -H "Content-Type: application/json" \  -d '{    "featureId": "string",    "enabled": true,    "includedAmount": 0,    "unlimited": false,    "overage": {      "enabled": false,      "unitPrice": 0    },    "pricingMode": "fixed"  }'
{  "success": true,  "data": {    "planId": "string",    "featureId": "string",    "enabled": true,    "includedAmount": -9007199254740991,    "unlimited": true,    "overage": {      "enabled": true,      "unitPrice": -9007199254740991    },    "creditsPerUnit": -9007199254740991,    "pricingMode": "fixed",    "margin": -9007199254740991,    "object": "plan",    "livemode": true  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}

Update plan group PUT

Update a plan group's name, description, or visibility.

Add price to plan POST

Add a billing interval price to a plan with optional trial days and included balance/credits.