curl --request PUT \
--url https://api.paywithlocus.com/api/credits/tenants/me/spend-controls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"monthlyLimitUsd": "5000.00",
"alertThresholdUsd": "4000.00"
}
'{
"success": true,
"controls": {
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"spentUsd": "<string>",
"pendingUsd": "<string>",
"committedUsd": "<string>",
"remainingUsd": "<string>",
"monthlyLimitUsd": "<string>",
"alertThresholdUsd": "<string>",
"lowBalanceAlertUsd": "<string>",
"lowBalanceAlertSentAt": "2023-11-07T05:31:56Z",
"hardLimitReached": true,
"alert": {
"status": "pending",
"triggeredAt": "2023-11-07T05:31:56Z",
"sentAt": "2023-11-07T05:31:56Z",
"lastError": "<string>"
}
}
}Set or clear account spend and balance controls
Sets the monthly hard ceiling, monthly spend-email threshold, and/or low-balance email threshold. Send at least one field; omitted fields keep their current value and an explicit null clears one. Amounts are positive USD with at most 6 decimal places, up to 1000000000, and alertThresholdUsd may not exceed monthlyLimitUsd. Once committed spend reaches the ceiling, burns are denied with TENANT_MONTHLY_SPEND_LIMIT_EXCEEDED until the window resets — the limit bounds new spend and never cancels in-flight calls. Personal changes require the account owner on a session authenticated within the last ten minutes; enterprise changes require the workspace owner with MFA or passkey step-up in that window.
curl --request PUT \
--url https://api.paywithlocus.com/api/credits/tenants/me/spend-controls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"monthlyLimitUsd": "5000.00",
"alertThresholdUsd": "4000.00"
}
'{
"success": true,
"controls": {
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"spentUsd": "<string>",
"pendingUsd": "<string>",
"committedUsd": "<string>",
"remainingUsd": "<string>",
"monthlyLimitUsd": "<string>",
"alertThresholdUsd": "<string>",
"lowBalanceAlertUsd": "<string>",
"lowBalanceAlertSentAt": "2023-11-07T05:31:56Z",
"hardLimitReached": true,
"alert": {
"status": "pending",
"triggeredAt": "2023-11-07T05:31:56Z",
"sentAt": "2023-11-07T05:31:56Z",
"lastError": "<string>"
}
}
}Authorizations
Locus Pro dashboard session (Cognito).
Body
Hard monthly ceiling, or null to remove it.
^\d+(?:\.\d{1,6})?$Monthly spend email trigger, or null to remove it. Lowering it below current spend triggers the alert immediately.
^\d+(?:\.\d{1,6})?$Remaining prepaid-balance threshold for a one-time email, or null to remove it. The alert re-arms after the balance recovers above the threshold.
^\d+(?:\.\d{1,6})?$Response
Updated controls