This request sets the automatic AI top-up of a customer (portal: customer details, under AI product): an AI top-up product that the API buys by itself every time one of the customer's AI resources (transcription, summary, text to speech) reaches 80 % of what is available for the month - so the allowance never runs out. Send null to stop buying automatically.
How it works:
notified). It is claimed atomically, and only on current numbers. A single request that jumps straight past 100 % triggers it too.aiAutoTopUp:lock:<customer id>, 60 s expiry), and every purchase is decided on the usage and limit as they are right then - so overlapping requests never buy more than the usage needs. Nothing is bought into the next month for a crossing at the end of a month.AI top-up (automatisk), and the change log entry AI top-up bought automatically names the employee who set the automatic top-up up, impersonated by the system.notifyOnGeneralUsageLimit on the customer, notifyOnGeneralUsageLimitReseller on the reseller) get the e-mail ai_auto_topup.html / ai_auto_topup_reseller.html - what was bought, how many times, the price of one and the usage after it - instead of the 80 % / 100 % warning, which the raised limit has made untrue.ai-auto-topup: … failed) and the ordinary 80 % / 100 % warning is sent as before. Quota status reports such a top-up with available: false.
The product must be one the user could buy for the customer right now: it must be among the Top-up products for this user and customer (so a customer OWNER cannot choose a reseller-only product, a RESELLER can). The setting is stored as finance.aiAutoTopUp on Customers and is never taken from a customer update.
| URL | https://api.telecomx.dk/ai/quota/autotopup | |
|---|---|---|
| Method | PUT | |
| Access level | OWNER for the user's own customer, with write access to it. RESELLER, RESELLER_ADMIN or ADMIN, who may also name another customer with customer. |
|
| Query | customer | [optional] Id of the customer to set it for. Only honoured for RESELLER and up, and write access to the customer is checked. Defaults to the user's own customer. |
| JSON body | ||
|---|---|---|
| product | Id | [required] Id of the AI_TOP_UP product to buy automatically, or null to stop buying automatically. |
{ "product": "650000000000000000000420" } { "product": null }
| JSON object | ||
|---|---|---|
| success | Boolean | True on success. |
| autoTopUp | Object | The automatic top-up as Quota status reports it, null when it was removed. |
{ "success": true, "autoTopUp": { "_id": "650000000000000000000420", "name": "AI top-up: 5 hours transcription", "price": 199.00, "aiTopUp": { "sttSeconds": 18000, "llmTokens": 0, "ttsCharacters": 0 }, "from": "2026-10-25T12:00:00.000Z", "available": true } }
| Error code | Message | Description |
|---|---|---|
| 422 | product | Product id is invalid |
| 404 | product | No product in the body, or the product is not a top-up this user may buy for the customer |
| 422 | customer | Customer id is invalid |
| 404 | customer | Customer not found |
| 403 | access_denied | Insufficient access level, or no write access to the customer |
| 500 | internal_error | <Unspecified> |