Commet
  • Precios
Iniciar SesiónRegistrarse
Add quota POSTList quota allowances GETGet quota allowance GETRemove quota DELETESet quota PUT
DocumentaciónRecursosConstruir con AIAPI ReferenceWebhooks

Add quota

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

POST
/usage/quota

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

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
Range0 < value <= 9007199254740991
Default1
idempotencyKey?string
Length1 <= length <= 200

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/usage/quota" \  -H "Content-Type: application/json" \  -d '{    "featureCode": "string",    "count": 1  }'
{  "success": true,  "data": {    "id": "string",    "customerId": "string",    "featureCode": "string",    "previousBalance": -9007199254740991,    "newBalance": -9007199254740991,    "ts": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z",    "object": "usage_quota",    "livemode": true  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}

Create claim link POST

Issue a fresh claim link for an organization that was provisioned headlessly and has not been claimed yet. Any previously issued link stops working.

List quota allowances GET

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