Skip to content
Anlyon
Esc
↑↓navigate↵open⌘Jpreview

Create an impact limit

Cap money (one currency, integer minor units), resource_mutations, or a workspace-declared unit such as emails for the whole environment, optionally narrowed to one action and/or a resource prefix, per day, month or total. Shared by every agent, session and key: none of them is part of a limit’s identity. A limit in a declared unit applies to actions that declare an impact in that unit. A declared action’s resource key is http:<host><path>, so resourcePrefix can scope a limit to a path prefix. Needs impact-limits:write, which no key receives by default.

POST/api/v2/impact-limits
Authorization
AuthorizationBearer token (Anlyon API key) · headerrequired

Workspace API key sent as Authorization: Bearer <key>.

or
better-auth.session_tokenAPI key · cookierequired

Browser session used by dashboard-only operations.

Header parameters
X-Request-Idstring

Optional caller correlation ID. Unsafe or oversized values are replaced.

max length 128
Request body
requiredapplication/json
namestringrequired
min length 1 · max length 120
dimensionstringrequired

money, resource_mutations, or a workspace-declared unit such as emails. A declared unit caps the actions that declare an impact in that unit.

matches ^[a-z][a-z0-9_]{0,31}$
currencystring

Required for money.

matches ^[a-z]{3}$
unitstring

Optional. The currency for money, the dimension name for every other dimension. It is implied by dimension and currency, and refused when it disagrees with them.

matches ^[a-z][a-z0-9_]{0,31}$
actionNamestring | null
min length 1 · max length 100
resourcePrefixstring | null
min length 1 · max length 500
periodstringrequired
Allowed:daymonthtotal
amountintegerrequired
min 0
Responses
201

Impact limit returned.

successbooleanrequired
Allowed:true
dataImpactLimitrequired
Show properties
idstringrequired
namestringrequired
dimensionstringrequired

money, resource_mutations, or a workspace-declared unit such as emails.

matches ^[a-z][a-z0-9_]{0,31}$
currencystring | nullrequired
unitstringrequired

What the amounts count. The currency for money, the dimension name for every other dimension.

scopeobjectrequired
Show properties
environmentIdstring<uuid>required
actionNamestring | nullrequired
resourcePrefixstring | nullrequired
periodstringrequired
Allowed:daymonthtotal
limitintegerrequired
min 0
currentPeriodstringrequired
consumedintegerrequired
min 0
reservedintegerrequired
min 0
unknownExposureintegerrequired
min 0
availableintegerrequired
min 0
archivedbooleanrequired
createdAtstring<date-time>required
updatedAtstring<date-time>required
400

Bad Request - Invalid input data

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
401

Unauthorized - Invalid or missing API key

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
403

Authenticated credential lacks the required scope or workspace access.

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
429

Too Many Requests - Rate limit exceeded

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.anlyon.com/api/v2/impact-limits' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "dimension": "money",
  "currency": "usd",
  "unit": "usd",
  "actionName": "string",
  "resourcePrefix": "github:acme/fixtures@",
  "period": "day",
  "amount": 0
}'
Response
{
  "success": true,
  "data": {
    "id": "lim_01JABCDEF",
    "name": "string",
    "dimension": "money",
    "currency": "string",
    "unit": "usd",
    "scope": {
      "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563",
      "actionName": "string",
      "resourcePrefix": "string"
    },
    "period": "day",
    "limit": 0,
    "currentPeriod": "month:2026-09",
    "consumed": 0,
    "reserved": 0,
    "unknownExposure": 0,
    "available": 0,
    "archived": true,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}