ConfigurationList rules

GET /v1/projects/{project}/rules

List a project's custom bot rules in evaluation order.

curl https://api.botect.ai/v1/projects/123/rules \
  -H "Authorization: Bearer YOUR_ACCOUNT_TOKEN"
[
  {
    "id": 7,
    "project_id": 123,
    "name": "Protect login from bots",
    "expression_source": "score < 30 AND path == "/login" AND NOT verified_bot",
    "action": "block",
    "is_active": true,
    "sort_order": 10,
    "created_at": "2026-06-14T10:00:00Z",
    "updated_at": "2026-06-14T10:00:00Z"
  }
]

Returns the project's custom rules, ordered by sort_order ascending — the same order they're evaluated in.

GET https://api.botect.ai/v1/projects/{project}/rules

Authentication

Account API token via Authorization: Bearer <token>. The project must belong to the token's account. See Authentication.

Path parameters

Example

Response fields

Each rule object includes:

idinteger
Required
The rule ID.
namestring
Required
Human-readable label, shown in verdict reasons.
expression_sourcestring
Required
The original expression text (for display/edit). The compiled AST is stored internally.
actionstring
Required
block, challenge, allow, log, or delay.
is_activeboolean
Required
Whether the rule is evaluated.
sort_orderinteger
Required
Evaluation order (ascending).

Errors

StatuscodeWhen
401UNAUTHENTICATEDMissing / bad account token
403Project does not belong to the token's account