Skip to main content
POST
cURL
Saves the customer’s own controls, or one entity’s with entityId. Each kind you send (usageLimits, usageAlerts, overage) replaces that kind’s entries at this level; a kind you leave out is untouched; null clears it back to the plan’s. A customer’s entry replaces the plan’s entry with the same key whole: a usage limit by its target, interval and filter; an alert by its target and name; an overage entry by its target. Every level’s usage limit applies at once: an entity’s own limit counts only that entity, inside the customer’s. Refusals: 400 invalid_usage_limit (a limit on a held or boolean feature, a duplicate), invalid_alert (a percentage alert without an allowance, an alert on a boolean feature), invalid_overage_control (an entry on a credits, held or boolean feature, or allowed: true without an overage price or freeUnits), each with issues; 404 customer_not_found, entity_not_found. The response is what Get a customer’s controls returns. Needs the Customers permission.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

customerId
string
required

Your ID for the customer, such as your user ID.

Required string length: 1 - 255
entityId
string

One of the customer's entities: its own entries, beside the customer's.

Required string length: 1 - 255

Body

application/json
usageLimits
object[] | null

Replaces this level's usage limits; null clears them back to the plan's. Left out: unchanged.

Maximum array length: 50
usageAlerts
object[] | null

Replaces this level's usage alerts; null clears them back to the plan's. Left out: unchanged.

Maximum array length: 50
overage
object[] | null

Replaces this level's overage entries; null clears them back to the plan's. Left out: unchanged.

Maximum array length: 50

Response

Saved; the controls now in force

customerId
string
required
entityId
string | null
required
usageLimits
object[]
required
usageAlerts
object[]
required
overage
object[]
required