Set or clear the paid overage limit (OWNER only)
PATCH
/organizations/current/overage-limit
const url = 'https://api.invogi.com/v1/organizations/current/overage-limit';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"limit_units":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.invogi.com/v1/organizations/current/overage-limit \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "limit_units": 1 }'By default a paid plan’s overage is automatic: invoices above the included volume keep being analyzed and are billed after the period closes. Set limit_units to cap it at that many invoice units above the included volume per billing period (annual plans use the pooled annual period); 0 never goes over the included volume. Once the limit is reached, new invoices are refused with USAGE_LIMIT_EXCEEDED (429) until an owner raises it or the period renews. null removes the limit.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
limit_units
required
integer | null
Example generated
{ "limit_units": 1}Responses
Section titled “Responses”Setting updated and audit event recorded
Media typeapplication/json
object
overage_limit_units
required
integer | null
Example generated
{ "overage_limit_units": 1}Invalid request
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Example
{ "error": { "code": "NOT_FOUND" }}Missing or invalid API key
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Example
{ "error": { "code": "NOT_FOUND" }}API key lacks required scope/role
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Example
{ "error": { "code": "NOT_FOUND" }}