Skip to main content
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, or accounts
  • value (number, required) — in natural units for type
  • period (string, required) — billing_period, month, week, day, or lifetime
  • is_enforced (boolean, default true) — set false to 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’s allocated_total_credits/plan_credits to 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 the equivalent_credits field.
  • Subscribe to the tenant.limit_reached webhook event to be notified when a child exhausts an allocation (see the Webhooks guide).

Required Scope

Requires tenants:write.

Error Responses