Commet
  • Pricing
Log InTry out
Create credit pack POSTDelete credit pack DELETEList credit packs GETPurchase credits POSTUpdate credit pack PUT
DocumentationKnowledge BaseBuild with AIAPI ReferenceWebhooks

Update credit pack

Update a credit pack's name, description, credits, price, or active status.

Purchase credits POST

Purchase a credit pack for a subscription. Charges the customer and adds credits to their balance.

Batch create customers POST

Create up to 100 customers in a single request.

PUT
/credit-packs/{id}

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.

name?string
Length1 <= length <= 100
description?string
Lengthlength <= 255
credits?integer
Range1 <= value
price?integer
Range0 <= value
isActive?boolean

Response Body

application/json

application/json

curl -X PUT "https://commet.co/api/v1/credit-packs/string" \  -H "Content-Type: application/json" \  -d '{}'

application/json

application/json

Update a credit pack's name, description, credits, price, or active status.

Credit pack public ID

{
  "success": true,
  "data": {
    "object": "credit_pack",
    "livemode": true,
    "id": "string",
    "name": "string",
    "description": "string",
    "credits": 0,
    "price": 0,
    "isActive"



{
  "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
,
"createdAt": "string",
"updatedAt": "string"
}
}