Set a cost threshold
Sets what one person may spend per month on a usage type: for the organization, for a team (teamId), or for one user (userId). A new amount replaces the scope's current one on that usage type.
VOICE is international calling: once a user's spend reaches the threshold, international calls and SMS on their lines are paused until the next month, where their market offers the pause; elsewhere the threshold warns only. Other usage types answer 422 until the platform can enforce them.
The amount is in the team's cost-center currency, else the organization's primary; read it back from the response. The threshold opens now, so this month's spend counts against it at once, unless someone in scope has already spent more than the new amount: then it opens next month and appliesFromNextMonth says so. Raising it above a paused user's spend lifts their pause in the same call.
Scope: policies:write, and teams:read when a team is named.
Request
- Base URLhttps://api.telgea.com
- AuthAPI key in header x-api-key
Headers
A value unique to this request, of 1 to 255 printable ASCII characters — a UUID is the usual choice. Retry with the same key within 24 hours and you get the original response back, even if it was a failure, and nothing is done twice. Send a new key whenever you change the request. Keys are private to your API key and organisation.
Request body
Example request
{
"usageType": "VOICE",
"teamId": "2f6b0d3a-8c1e-4a7f-9b2d-1e3c4d5f6a70",
"userId": "9c1f2a6e-3b7d-4e0a-8f21-5d6c7b8a9e01",
"maxAmount": 50
}Response
The threshold as written, and what it did on the way in.
Example response
{
"threshold": {
"id": "5d0b2c1e-7f3a-4b6c-9e8d-2a1f0c3b4d5e",
"usageType": "VOICE",
"scope": "team",
"teamId": "2f6b0d3a-8c1e-4a7f-9b2d-1e3c4d5f6a70",
"maxAmount": 50,
"currency": "EUR",
"period": "monthly",
"validFrom": "2026-10-01T00:00:00.000Z"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.