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 the current revision.

SDK 0.0.1Updated

Make the request

The trusted server sets customer or Entity limits, notification thresholds and overage policies using the current revision.

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 published price mappings before checkout. Redirects do not confirm payment.
request.shShell
curl -X POST "$GROOVE_BASE_URL/api/v1/billing/controls/manage" \  -H "Authorization: Bearer $GROOVE_SECRET_KEY" \  -H "X-Groove-Project: $GROOVE_PROJECT_ID" \  -H "X-Groove-Environment: sandbox" \  -H "Content-Type: application/json" \  -d '{  "customerId": "00000000-0000-4000-8000-000000000001",  "command": {    "entitlementId": "00000000-0000-4000-8000-000000000001",    "entityId": null,    "interval": "month",    "basis": "usage",    "revision": 0,    "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
entitlementIduuid | uuid | uuidRequired

The entitlementId 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.

intervalenum | enumOptional

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

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.

revisioninteger | integer | integerRequired

Revision returned by profile reads; updates use it to detect concurrent changes.

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.

entitlementVersionIduuid | uuidRequired

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

currencyenum | enumRequired

Currency code supported by the published price.

maxAmountMinorPerPeriodstring | stringRequired

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

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.

maxPurchasesPerDayintegerOptional

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

min: 1 · max: 1000

purchaseLimitsobjectOptional

The purchaseLimits 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.

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.

revisionintegerRequired

Revision returned by profile reads; updates use it to detect concurrent changes.

min: 0 · max: 9007199254740991

limitsarrayRequired

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

maxItems: 100

Show child fields
entitlementIduuidRequired

The entitlementId 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"

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.

revisionintegerRequired

Revision returned by profile reads; updates use it to detect concurrent changes.

min: 0 · max: 9007199254740991

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
entitlementIduuidRequired

The entitlementId 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"

revisionintegerRequired

Revision returned by profile reads; updates use it to detect concurrent changes.

min: 1 · max: 9007199254740991

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
entitlementIduuidRequired

The entitlementId 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"

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.

revisionintegerRequired

Revision returned by profile reads; updates use it to detect concurrent changes.

min: 0 · max: 9007199254740991

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"

orderIduuid | nullRequired

The orderId 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.

purchasesTodayintegerRequired

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

min: 0 · max: 9007199254740991

amountMinorThisMonthstringRequired

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

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

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