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

Set quota

Set a customer's quota allowance for a feature to an exact value.

Remove quota DELETE

Remove from a customer's quota allowance for a feature. Defaults to 1 if count is omitted. Returns 400 insufficient_balance if the balance would go negative.

Add seats POST

Add seats to a customer's subscription. Prorates charges for the current billing period.

PUT
/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 PUT "https://commet.co/api/v1/usage/quota" \  -H "Content-Type: application/json" \  -d '{    "featureCode": "string",    "count": 0  }'

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.

The exact value to set the quota balance to.

Set a customer's quota allowance for a feature to an exact value.

{
  "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"
}
}