Create or update company budget
curl --request PUT \
--url https://paradigm.lighton.ai/api/v3/billing/budget \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount_eur": "<string>"
}
'import requests
url = "https://paradigm.lighton.ai/api/v3/billing/budget"
payload = { "amount_eur": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount_eur: '<string>'})
};
fetch('https://paradigm.lighton.ai/api/v3/billing/budget', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"is_enabled": true,
"amount_eur": "<string>",
"current_cycle_start": "<string>",
"next_cycle_start": "<string>",
"monthly_spend_eur": "<string>",
"available_eur": "<string>",
"currency": "EUR",
"alerts": [
{
"id": 123,
"is_enabled": true,
"threshold_type": "<string>",
"threshold_value": "<string>"
}
]
}{
"is_enabled": true,
"amount_eur": "<string>",
"current_cycle_start": "<string>",
"next_cycle_start": "<string>",
"monthly_spend_eur": "<string>",
"available_eur": "<string>",
"currency": "EUR",
"alerts": [
{
"id": 123,
"is_enabled": true,
"threshold_type": "<string>",
"threshold_value": "<string>"
}
]
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Budget
Create or update company budget
Set or update the company’s monthly spend budget. Requires CompanyAdmin role. Creates the budget on first call; updates it on subsequent calls.
PUT
/
api
/
v3
/
billing
/
budget
Create or update company budget
curl --request PUT \
--url https://paradigm.lighton.ai/api/v3/billing/budget \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount_eur": "<string>"
}
'import requests
url = "https://paradigm.lighton.ai/api/v3/billing/budget"
payload = { "amount_eur": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount_eur: '<string>'})
};
fetch('https://paradigm.lighton.ai/api/v3/billing/budget', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"is_enabled": true,
"amount_eur": "<string>",
"current_cycle_start": "<string>",
"next_cycle_start": "<string>",
"monthly_spend_eur": "<string>",
"available_eur": "<string>",
"currency": "EUR",
"alerts": [
{
"id": 123,
"is_enabled": true,
"threshold_type": "<string>",
"threshold_value": "<string>"
}
]
}{
"is_enabled": true,
"amount_eur": "<string>",
"current_cycle_start": "<string>",
"next_cycle_start": "<string>",
"monthly_spend_eur": "<string>",
"available_eur": "<string>",
"currency": "EUR",
"alerts": [
{
"id": 123,
"is_enabled": true,
"threshold_type": "<string>",
"threshold_value": "<string>"
}
]
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Response
Whether this budget is actively enforced.
Monthly budget cap in EUR.
Pattern:
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$First day of the current billing cycle (ISO date).
First day of the next billing cycle (ISO date).
Current month's spend in EUR.
Pattern:
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$Remaining budget for the current cycle in EUR.
Pattern:
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ISO 4217 currency code.
Alert thresholds.
Show child attributes
Show child attributes