Skip to content

Limit.create

POST /{namespace}/limits

Creates a Limit.

Noun
Limit
Mode
do
Event
Limit.created

Create makes a new Limit from the inputs below. It is inherited: every Noun has get, list, create, update and delete.

Inputs

InputTypeRequiredDescription
amountmoneyThe most money it allows.
countintegerThe most calls or units it allows.
periodstringThe window a rate resets over, such as a month.
percentnumberThe largest share off a reference amount it allows, such as 15 percent off list Price.
resetsstringOne of calendar, rolling: a calendar Limit resets at the start of each period, a rolling one counts the last period from now.

Outputs

OutputTypeRequiredDescription
limitLimitrequiredThe Limit.

Effects

  • Emits Limit.created.
  • Two-way: try, send, do.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.Limit.create

When it waits

GateDefault
Decision classLow: two-way, nothing at stake
Delay windowNone: it runs once review passes.
LimitThe call Limit of the Permission it runs under.
Over the LimitIt waits pending for an Approval from the Founder. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled.