Guide API reference API reference: Spending cap

API reference: Spending cap

On this page

PUT /v1/companies/{companyId}/billing/cap

Parameter In Type Required Notes
companyId path string (uuid) yes

Body (application/json): CapRequest

Answers 200 with BillingAccount.

Types

CapRequest

Field Type Required Notes
monthlyCap number

BillingAccount

Field Type Required Notes
companyId string (uuid) yes
currency string yes
balance number yes
plan Plan
nextPlan Plan
periodStart string (date-time)
periodEnd string (date-time)
actionsUsed integer (int64) yes
llmUsed number yes
emailsUsed integer (int64) yes
overageCharged number yes
monthlyCap number
refusal string
paymentInstructions string
storageBytes integer (int64) yes
extraStoragePrice number
owed number yes
grants list of CreditGrant yes
packages list of CreditPackage yes
trialEndsAt string (date-time)
trialRefused string

CreditGrant

Field Type Required Notes
id string (uuid) yes
kind PAID | BONUS | FREE | TRIAL yes
amount number yes
remaining number yes
expiresAt string (date-time)
packageName string
note string
createdAt string (date-time) yes

CreditPackage

Field Type Required Notes
id string (uuid) yes
name string yes
price number yes
baseCredits number yes
bonusPercent number
bonusValidDays integer (int32)
active boolean yes
createdAt string (date-time) yes
updatedAt string (date-time) yes
totalCredits number yes
bonusCredits number yes

This page is made from /docs/v1/api/spending-cap.md, the Markdown that AI assistants read. Questions: hi@determesh.com.