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

Create credit pack

Create a new credit pack.

List API keys GET

List API keys with cursor-based pagination. Keys are returned without the full secret.

Delete credit pack DELETE

Soft-delete a credit pack.

POST
/credit-packs/manage

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name*string
1 <= length <= 100
description?string
length <= 255
credits*integer
1 <= value
price*integer
0 <= value
isActive?boolean
Length
Length
Range
Range

Response Body

application/json

application/json

curl -X POST "https://commet.co/api/v1/credit-packs/manage" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "credits": 1,    "price": 0  }'

application/json

Create a new credit pack.

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