Set or clear the monthly usage budget
PUT
/organization/{id}/billing/budget
Requires billing:manage. Audited `billing.budget.set`. 409 usage_billing_off for an amount while the organization is not billed for usage.
Path Parameters
idstring
required·
Organization id (org_…).
curl -X PUT 'https://api.elaichi.ai/organization/<id>/billing/budget' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json'const response = await fetch('https://api.elaichi.ai/organization/<id>/billing/budget', {
method: 'PUT',
headers: {
'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);import os
import requests
url = "https://api.elaichi.ai/organization/<id>/billing/budget"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
response = requests.put(url, headers=headers)
print(response.json())