PUT /v1/tenants/{product_slug}/limits replaces a direct child tenant’s entire allocation set in one call — idempotent, with no partial-state ambiguity. Only a key whose product_slug is this tenant’s parent_product_slug may call this.
Endpoint
Path Parameter
string
required
A direct child tenant’s slug.
Request Body
array
required
The full list of allocations to set — this replaces whatever was there before, it does not merge. Pass an empty array to clear all allocations (equivalent to
DELETE /v1/tenants/{product_slug}/limits). Each entry:type(string, required) —credits,contacts, oraccountsvalue(number, required) — in natural units fortypeperiod(string, required) —billing_period,month,week,day, orlifetimeis_enforced(boolean, defaulttrue) — setfalseto track usage against the cap without blocking the tenant
Example Request
Response
Returns the newly-set allocations with usage, same shape as Get Tenant Limits:Behavior notes
- Lowering a limit below current usage takes effect immediately — the tenant is blocked on its next check (bounded by the block-status cache TTL, a few minutes).
- Over-allocating across children is allowed by design — Knock2 does not enforce that the sum of every child’s allocation stays under your own plan’s credit limit. Use
GET /v1/tenants’sallocated_total_credits/plan_creditsto monitor the ratio yourself. - Values must always be in natural units — never store a credits-denominated number under
type: "contacts"or"accounts"; the API converts to credits internally for theequivalent_creditsfield. - Subscribe to the
tenant.limit_reachedwebhook event to be notified when a child exhausts an allocation (see the Webhooks guide).
Required Scope
Requirestenants:write.