Skip to content

Create a spend-cap

POST
/spend-caps
object
data
object
organisation
required
One of:

DocumentId reference to api::organisation.organisation

string
soft_cap_eur
required

Alert threshold in EUR — sends notification when current_period_spend crosses this value.

number
hard_cap_eur
required

Hard block threshold in EUR — blocks non-safety-critical actions when current_period_spend + estimated_cost exceeds this value.

number
current_period_spend

Accumulated spend for the current billing period in EUR. Reset monthly by cron.

number
period_start

Start of the current billing period (UTC).

string format: date-time
period_end

End of the current billing period (UTC).

string format: date-time
is_active

Whether spend-cap enforcement is active for this organisation.

boolean
last_alert_at

Timestamp of last soft-cap alert notification — used for 1h deduplication.

string format: date-time
notifications_email

Comma-separated list of email addresses to notify when soft cap is reached.

string
safety_override_count

Number of times a safety-critical action bypassed the hard cap. Incrementing for audit trail — safety actions must never be blocked.

integer

Created

object
data
object
organisation
required
One of:

DocumentId reference to api::organisation.organisation

string
soft_cap_eur
required

Alert threshold in EUR — sends notification when current_period_spend crosses this value.

number
hard_cap_eur
required

Hard block threshold in EUR — blocks non-safety-critical actions when current_period_spend + estimated_cost exceeds this value.

number
current_period_spend

Accumulated spend for the current billing period in EUR. Reset monthly by cron.

number
period_start

Start of the current billing period (UTC).

string format: date-time
period_end

End of the current billing period (UTC).

string format: date-time
is_active

Whether spend-cap enforcement is active for this organisation.

boolean
last_alert_at

Timestamp of last soft-cap alert notification — used for 1h deduplication.

string format: date-time
notifications_email

Comma-separated list of email addresses to notify when soft cap is reached.

string
safety_override_count

Number of times a safety-critical action bypassed the hard cap. Incrementing for audit trail — safety actions must never be blocked.

integer
documentId
string
id
integer
createdAt
string format: date-time
updatedAt
string format: date-time
publishedAt
string format: date-time
nullable

Validation error

Missing or invalid authentication

Not authorized (tenant scope or capability)