Skip to content
masterclass Buddy

Arcjet · Method

aj.withRule

aj.withRule adds a route-specific rule to an existing Arcjet client. Chain it to add multiple rules, then call protect on the returned client.

Last updated

Syntax

client.withRule(rule)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • protect
  • fixedWindow
  • detectBot
  • shield
  • isDenied
  • Arcjet client

Source: Arcjet Node.js SDK reference | Arcjet Docs. Checked 2026-11-03.