Skip to content
Indiana
Dashboard
Docs
Browse docs / Manage usage billing limits

Manage usage billing limits

POST/api/v1/billing/controls/manage

The trusted server sets customer or Entity limits, notification thresholds and overage policies using an idempotent requestId.

API v1Updated

Make the request

The trusted server sets customer or Entity limits, notification thresholds and overage policies using an idempotent requestId.

Credential
Server API key only. Call from your trusted backend.
Permission
billing:write
Set the base URL and App ID from SDK setup. These examples use placeholders and do not execute requests. Never put a server key in browser code.
For this Web Beta, configure the Stripe Sandbox test account and fixed Product Prices before checkout. Redirects do not confirm payment.
request.shShell
curl -X POST "$INDIANA_BASE_URL/api/v1/billing/controls/manage" \  -H "Authorization: Bearer $INDIANA_SECRET_KEY" \  -H "X-Indiana-Project: $INDIANA_PROJECT_ID" \  -H "X-Indiana-Protocol: 0.5" \  -H "X-Indiana-Environment: sandbox" \  -H "Content-Type: application/json" \  -d '{  "customerId": "00000000-0000-4000-8000-000000000001",  "command": {    "internal_feature_id": "00000000-0000-4000-8000-000000000001",    "entityId": null,    "interval": "month",    "basis": "usage",    "limit": "1000",    "thresholds": [      0.8,      1    ],    "requestId": "00000000-0000-4000-8000-000000000001"  }}'

The response tab lists field types, not an example payload. Actual values depend on customer state.

Request parameters

JSON body

customerIduuidRequired

Indiana customer ID mapped from a verified identity on the server. Omit for customer-token calls, which use the token-bound customer.

commandobject | object | objectRequired

The command value for this operation. Its accepted type and constraints are listed above and below.

Show child fields
internal_feature_iduuid | uuid | uuidRequired

The internal_feature_id value for this operation. Its accepted type and constraints are listed above and below.

entityIduuid | null | uuid | null | uuid | nullRequired

Entity ID within the current customer scope, for configured entity and license features.

intervalenumOptional

The interval value for this operation. Its accepted type and constraints are listed above and below.

Show allowed values

"day""week""month""year"

anchorenumOptional

The anchor value for this operation. Its accepted type and constraints are listed above and below.

Show allowed values

"billing_cycle""utc"

basisenumOptional

The basis value for this operation. Its accepted type and constraints are listed above and below.

Show allowed values

"usage""credits"

filterobjectOptional

The filter value for this operation. Its accepted type and constraints are listed above and below.

limitstring | nullOptional

Maximum records per page, subject to the contract limit.

thresholdsarrayOptional

The thresholds value for this operation. Its accepted type and constraints are listed above and below.

maxItems: 8

includedThresholdsarrayOptional

The includedThresholds value for this operation. Its accepted type and constraints are listed above and below.

maxItems: 8

absoluteThresholdsarrayOptional

The absoluteThresholds value for this operation. Its accepted type and constraints are listed above and below.

maxItems: 8

requestIduuid | uuid | uuidRequired

Business request UUID. Reuse for retries of one operation; generate a new value for a new operation.

control"overage" | "overage"Optional

The control value for this operation. Its accepted type and constraints are listed above and below.

action"set" | "remove"Optional

Business action. Target fields and quantity requirements vary by action; see the request structure and example.

allowedboolean | nullOptional

Whether this feature is allowed at evaluation time. Use for display; your backend still authorizes business operations.

overageLimitstring | nullOptional

Cap only units beyond included allowances within the window; reservations consume capacity. null means no cap, zero prevents new overage.

skipOverageBillingbooleanOptional

Waive cash charges with explicit overage permission while retaining usage records and unit caps.

Response fields

Successful responses include requestId and scope. Use the actual business status or accepted field to determine the result. Optional fields are omitted when unavailable.

HTTP 200 · application/json

requestIduuidRequired

Server-generated HTTP request UUID. Include it when reporting a failed request.

scopeobjectRequired

The App and environment of this response. Headers only verify scope; they cannot switch key scope.

Show child fields
projectIdstringRequired

App ID bound to the credential.

minLength: 1

environmentenumRequired

Separate data scope: sandbox or live.

Show allowed values

"sandbox""live"

controlsobjectRequired

The controls value for this operation. Its accepted type and constraints are listed above and below.

Show child fields
authorizationsarrayRequired

The authorizations value for this operation. Its accepted type and constraints are listed above and below.

maxItems: 100

Show child fields
iduuidRequired

The id value for this operation. Its accepted type and constraints are listed above and below.

termsobject | objectRequired

The terms value for this operation. Its accepted type and constraints are listed above and below.

Show child fields
productVersionIduuid | uuidRequired

The productVersionId value for this operation. Its accepted type and constraints are listed above and below.

internal_feature_iduuid | uuidRequired

The internal_feature_id value for this operation. Its accepted type and constraints are listed above and below.

currencyenum | enumRequired

Currency code supported by the published price.

kind"auto_topup" | "postpaid"Required

The kind value for this operation. Its accepted type and constraints are listed above and below.

thresholdobjectOptional

The threshold value for this operation. Its accepted type and constraints are listed above and below.

quantityobjectOptional

Use the declared field type for business quantity. Credit operations use decimal strings to avoid floating-point error. quote/reserve/confirm/refund require positive quantities; consume can record zero-cost events.

purchaseLimitobjectOptional

The purchaseLimit value for this operation. Its accepted type and constraints are listed above and below.

purchaseAmountMinorstringOptional

The purchaseAmountMinor value for this operation. Its accepted type and constraints are listed above and below.

pattern: ^(?:[1-9]\d{0,7}|1\d{8}|200000000)$

purchaseUnitsobjectOptional

The purchaseUnits value for this operation. Its accepted type and constraints are listed above and below.

maxAmountMinorPerPeriodstringOptional

The maxAmountMinorPerPeriod value for this operation. Its accepted type and constraints are listed above and below.

pattern: ^(?:[1-9]\d{0,7}|1\d{8}|200000000)$

maxOutstandingMinorstringOptional

The maxOutstandingMinor value for this operation. Its accepted type and constraints are listed above and below.

pattern: ^(?:[1-9]\d{0,7}|1\d{8}|200000000)$

cashPriceobjectOptional

The cashPrice value for this operation. Its accepted type and constraints are listed above and below.

statusenumRequired

The status value for this operation. Its accepted type and constraints are listed above and below.

Show allowed values

"prepared""active""revoked""blocked"

createdAtdate-timeRequired

ISO 8601 UTC time when the record was created.

acceptedAtdate-time | nullRequired

The acceptedAt value for this operation. Its accepted type and constraints are listed above and below.

effectiveAtdate-time | nullRequired

The effectiveAt value for this operation. Its accepted type and constraints are listed above and below.

revokedAtdate-time | nullRequired

The revokedAt value for this operation. Its accepted type and constraints are listed above and below.

limitsarrayRequired

The limits value for this operation. Its accepted type and constraints are listed above and below.

maxItems: 100

Show child fields
internal_feature_iduuidRequired

The internal_feature_id value for this operation. Its accepted type and constraints are listed above and below.

entityIduuid | nullRequired

Entity ID within the current customer scope, for configured entity and license features.

intervalenumRequired

The interval value for this operation. Its accepted type and constraints are listed above and below.

Show allowed values

"day""week""month""year"

anchorenumOptional

The anchor value for this operation. Its accepted type and constraints are listed above and below.

Show allowed values

"billing_cycle""utc"

basisenumRequired

The basis value for this operation. Its accepted type and constraints are listed above and below.

Show allowed values

"usage""credits"

filterobjectOptional

The filter value for this operation. Its accepted type and constraints are listed above and below.

limitobject | nullRequired

Maximum records per page, subject to the contract limit.

thresholdsarrayRequired

The thresholds value for this operation. Its accepted type and constraints are listed above and below.

maxItems: 8

includedThresholdsarrayOptional

The includedThresholds value for this operation. Its accepted type and constraints are listed above and below.

maxItems: 8

absoluteThresholdsarrayOptional

The absoluteThresholds value for this operation. Its accepted type and constraints are listed above and below.

maxItems: 8

overagesarrayOptional

The overages value for this operation. Its accepted type and constraints are listed above and below.

maxItems: 100

Show child fields
internal_feature_iduuidRequired

The internal_feature_id value for this operation. Its accepted type and constraints are listed above and below.

entityIduuid | nullRequired

Entity ID within the current customer scope, for configured entity and license features.

allowedboolean | nullRequired

Whether this feature is allowed at evaluation time. Use for display; your backend still authorizes business operations.

overageLimitobject | nullRequired

Cap only units beyond included allowances within the window; reservations consume capacity. null means no cap, zero prevents new overage.

skipOverageBillingbooleanRequired

Waive cash charges with explicit overage permission while retaining usage records and unit caps.

intervalenumRequired

The interval value for this operation. Its accepted type and constraints are listed above and below.

Show allowed values

"day""week""month""year"

startsAtdate-timeRequired

The startsAt value for this operation. Its accepted type and constraints are listed above and below.

endsAtdate-timeRequired

The endsAt value for this operation. Its accepted type and constraints are listed above and below.

usedstringRequired

Usage in the current metering period.

pattern: ^(0|[1-9]\d{0,23})(\.\d{1,6})?$

reservedstringRequired

The reserved value for this operation. Its accepted type and constraints are listed above and below.

pattern: ^(0|[1-9]\d{0,23})(\.\d{1,6})?$

remainingstring | nullRequired

Remaining allowance at evaluation time. It is not reserved and does not guarantee later consumption.

windowsarrayRequired

The windows value for this operation. Its accepted type and constraints are listed above and below.

maxItems: 200

Show child fields
internal_feature_iduuidRequired

The internal_feature_id value for this operation. Its accepted type and constraints are listed above and below.

entityIduuid | nullRequired

Entity ID within the current customer scope, for configured entity and license features.

intervalenumRequired

The interval value for this operation. Its accepted type and constraints are listed above and below.

Show allowed values

"day""week""month""year"

anchorenumOptional

The anchor value for this operation. Its accepted type and constraints are listed above and below.

Show allowed values

"billing_cycle""utc"

basisenumRequired

The basis value for this operation. Its accepted type and constraints are listed above and below.

Show allowed values

"usage""credits"

filterobjectOptional

The filter value for this operation. Its accepted type and constraints are listed above and below.

startsAtdate-timeRequired

The startsAt value for this operation. Its accepted type and constraints are listed above and below.

endsAtdate-timeRequired

The endsAt value for this operation. Its accepted type and constraints are listed above and below.

usedstringRequired

Usage in the current metering period.

pattern: ^(0|[1-9]\d{0,12})(\.\d{1,12})?$

reservedstringRequired

The reserved value for this operation. Its accepted type and constraints are listed above and below.

pattern: ^(0|[1-9]\d{0,12})(\.\d{1,12})?$

limitobject | nullRequired

Maximum records per page, subject to the contract limit.

thresholdsarrayRequired

The thresholds value for this operation. Its accepted type and constraints are listed above and below.

maxItems: 8

notifiedThresholdsarrayRequired

The notifiedThresholds value for this operation. Its accepted type and constraints are listed above and below.

maxItems: 1024

includedThresholdsarrayOptional

The includedThresholds value for this operation. Its accepted type and constraints are listed above and below.

maxItems: 8

includedAllowancestringOptional

The includedAllowance value for this operation. Its accepted type and constraints are listed above and below.

pattern: ^(0|[1-9]\d{0,17})(\.\d{1,12})?$

notifiedIncludedThresholdsarrayOptional

The notifiedIncludedThresholds value for this operation. Its accepted type and constraints are listed above and below.

maxItems: 1024

absoluteThresholdsarrayOptional

The absoluteThresholds value for this operation. Its accepted type and constraints are listed above and below.

maxItems: 8

notifiedAbsoluteThresholdsarrayOptional

The notifiedAbsoluteThresholds value for this operation. Its accepted type and constraints are listed above and below.

maxItems: 1024

autoTopupsarrayRequired

The autoTopups value for this operation. Its accepted type and constraints are listed above and below.

maxItems: 100

Show child fields
authorizationIduuidRequired

The authorizationId value for this operation. Its accepted type and constraints are listed above and below.

statusenumRequired

The status value for this operation. Its accepted type and constraints are listed above and below.

Show allowed values

"idle""pending""blocked"

taskIduuid | nullRequired

The taskId value for this operation. Its accepted type and constraints are listed above and below.

invoiceIduuid | nullRequired

The invoiceId value for this operation. Its accepted type and constraints are listed above and below.

hostedInvoiceUrluri | nullRequired

The hostedInvoiceUrl value for this operation. Its accepted type and constraints are listed above and below.

purchaseCountintegerRequired

The purchaseCount value for this operation. Its accepted type and constraints are listed above and below.

min: 0 · max: 9007199254740991

purchaseWindowEndsAtdate-time | nullRequired

The purchaseWindowEndsAt value for this operation. Its accepted type and constraints are listed above and below.

attemptCountintegerRequired

The attemptCount value for this operation. Its accepted type and constraints are listed above and below.

min: 0 · max: 9007199254740991

failedAttemptCountintegerRequired

The failedAttemptCount value for this operation. Its accepted type and constraints are listed above and below.

min: 0 · max: 9007199254740991

suspendedAtdate-time | nullRequired

The suspendedAt value for this operation. Its accepted type and constraints are listed above and below.

nextAttemptAtdate-time | nullRequired

The nextAttemptAt value for this operation. Its accepted type and constraints are listed above and below.

failureReasonstring | nullRequired

The failureReason value for this operation. Its accepted type and constraints are listed above and below.

limitedbooleanRequired

The limited value for this operation. Its accepted type and constraints are listed above and below.

Handle errors

Common failures
CodeRecovery
UNAUTHENTICATEDVerify the key or refresh the expired customer token once.
FORBIDDENCheck current key permissions and customer access.
INVALID_REQUESTCheck field types, UUIDs, decimal strings and mutually exclusive fields.
SCOPE_MISMATCHUse the App and environment bound to the credential.

Common failures

  • UNAUTHENTICATED

    Recovery
    Verify the key or refresh the expired customer token once.
  • FORBIDDEN

    Recovery
    Check current key permissions and customer access.
  • INVALID_REQUEST

    Recovery
    Check field types, UUIDs, decimal strings and mutually exclusive fields.
  • SCOPE_MISMATCH

    Recovery
    Use the App and environment bound to the credential.

Related:All request and error conventions·Back to endpoint index