Commet
  • Pricing
Log InTry out
Add quota POSTList quota allowances GETGet quota allowance GETRemove quota DELETESet quota PUT
DocumentationKnowledge BaseBuild with AIAPI ReferenceWebhooks

Add quota

Add to a customer's quota allowance for a feature. Defaults to 1 if count is omitted.

Update promo code PUT

Update a promo code's redemption limits, expiration, active status, or plan restrictions.

List quota allowances GET

Get all quota allowances for a customer across every quota feature in their plan.

POST
/usage/quota

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

customerId?string
Length1 <= length <= 200
externalId?string
Length1 <= length <= 200
featureCode*string
Match^[a-z0-9_]+$
Length1 <= length <= 50
count?integer
idempotencyKey?string
Length1 <= length <= 200

Response Body

application/json

application/json

curl -X POST "https://commet.co/api/v1/usage/quota" \  -H "Content-Type: application/json" \  -d '{    "featureCode": "string"  }'

application/json

Customer public ID. Provide this or externalId.

Your own customer identifier. Provide this or customerId.

Feature code. Lowercase letters, numbers, and underscores only.

Amount to apply. Optional for add/remove (defaults to 1); required for set.

Add to a customer's quota allowance for a feature. Defaults to 1 if count is omitted.

{
  "success": true,
  "data": {
    "livemode": true,
    "id": "string",
    "customerId": "string",
    "featureCode": "string",
    "previousBalance": 0,
    "newBalance": 0,
    "ts": "2019-08-24T14:15:22Z",
    "createdAt"

{
  "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"
  }
}
:
"2019-08-24T14:15:22Z"
}
}