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 visibility PUTUpdate plan feature PUTUpdate plan price PUTUpdate plan PUTUpsert regional prices PUT
DocumentationKnowledge BaseBuild with AIAPI ReferenceWebhooks

Create plan

Create a new plan with optional consumption model, visibility, and plan group assignment.

Add price to plan POST

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

Delete plan price DELETE

Remove a price from a plan.

POST
/plans/manage

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name*string
Length1 <= length
code*string
Match^[a-z0-9_]+$
Length1 <= length
description?string
consumptionModel?string
Value in"metered" | "credits" | "balance"
isPublic?boolean
isFree?boolean
blockOnExhaustion?boolean
planGroupId?string
metadata?

Response Body

application/json

curl -X POST "https://commet.co/api/v1/plans/manage" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "code": "string"  }'

application/json

application/json

application/json

Plan name

Unique code (lowercase, underscores only)

Consumption model for the plan

Public ID of the plan group to assign

Create a new plan with optional consumption model, visibility, and plan group assignment.

{
  "success": true,
  "data": {
    "object": "plan",
    "livemode": true,
    "id": "string",
    "name": "string",
    "code": "string",
    "description": "string",
    "consumptionModel": "string",
    "isPublic"












{
  "success": false,
  "error": {
    "type": "validation_error",
    "code": "string",
    "message": "string",
    "doc_url": "string",
    "param": "string"
  }
}
{
  "success": false,
  "error": {
    "type": "validation_error",
    "code": "string",
    "message": "string",
    "doc_url": "string",
    "param": "string"
  }
}
{
  "success": false,
  "error": {
    "type": "validation_error",
    "code": "string",
    "message": "string",
    "doc_url": "string",
    "param": "string"
  }
}
:
true
,
"isDefault": true,
"isFree": true,
"blockOnExhaustion": true,
"sortOrder": 0,
"planGroupId": "string",
"metadata": {
"property1": null,
"property2": null
},
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
}