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

Create a flow-control key

Creates a key in the calling credential’s environment. Names and runtime limits are independent between environments.

POST/api/v2/flow-control
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
keystringrequired
min length 1 · max length 100 · matches ^[a-zA-Z0-9_:-]+$
rateLimitinteger
min 1 · max 10000
rateLimitWindowinteger

Required with rateLimit; seconds per rate window.

min 1 · max 3600
parallelisminteger
min 1 · max 1000
Responses
201

Flow-control key created.

successbooleanrequired
Allowed:true
dataFlowControlKeyrequired
Show properties
flowControlKeyIdstringrequired
matches ^fck_
keystringrequired
rateLimitinteger | nullrequired
min 1
rateLimitWindowinteger | nullrequired
min 1
parallelisminteger | nullrequired
min 1
isPausedbooleanrequired
isPinnedbooleanrequired
activeCountintegerrequired

Live Redis count.

min 0
waitlistCountintegerrequired

Live Redis count.

min 0
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
402

Payment Required - Usage quota exceeded

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
409

The request conflicts with current resource state or a concurrent decision.

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/flow-control' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "key": "string",
  "rateLimit": 1,
  "rateLimitWindow": 1,
  "parallelism": 1
}'
Response
{
  "success": true,
  "data": {
    "flowControlKeyId": "string",
    "key": "string",
    "rateLimit": 1,
    "rateLimitWindow": 1,
    "parallelism": 1,
    "isPaused": true,
    "isPinned": true,
    "activeCount": 0,
    "waitlistCount": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}