Commet
  • Precios
Iniciar SesiónRegistrarse
Activate add-on POSTCreate add-on POSTDeactivate add-on DELETEDelete add-on DELETEGet add-on GETList active add-ons GETList add-ons GETUpdate add-on PUT
DocumentaciónRecursosConstruir con AIAPI ReferenceWebhooks

Create add-on

Create a new add-on linked to a feature. Each feature can only be assigned to one add-on.

Activate add-on POST

Activate an add-on on a subscription. Charges a prorated amount for the current billing period.

Deactivate add-on DELETE

Deactivate an add-on from a subscription.

POST
/addons

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 <= 100
description?string
Lengthlength <= 255
basePrice*integer
Range0 <= value
featureId*string
Length1 <= length
consumptionModel*string
Value in"boolean" | "metered" | "credits" | "balance"
includedUnits?integer
Range0 <= value
overageRate?integer
Range0 <= value
creditCost?integer
Range0 <= value

Response Body

application/json

curl -X POST "https://commet.co/api/v1/addons" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "basePrice": 0,    "featureId": "string",    "consumptionModel": "boolean"  }'

application/json

application/json

application/json

Feature public ID or code

Create a new add-on linked to a feature. Each feature can only be assigned to one add-on.

{
  "success": true,
  "data": {
    "object": "addon",
    "livemode": true,
    "id": "string",
    "name": "string",
    "slug": "string",
    "description": "string",
    "basePrice": 0,
    "consumptionModel"








{
  "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"
  }
}
:
"boolean"
,
"featureCode": "string",
"featureName": "string",
"includedUnits": 0,
"overageRate": 0,
"creditCost": 0,
"createdAt": "string",
"updatedAt": "string"
}
}