API shield and rate limits
The Scepter
The Scepter rate-limits, authenticates, and validates your APIs at the edge. Pair it with Portcullis to keep credential stuffing off login routes. This is a Cloudflare Cloudflare API Shield / Rate Limiting alternative included on every Zipper plan.
Cloudflare analogue: Cloudflare API Shield / Rate Limiting
What it is
The Scepter rate-limits, authenticates, and validates your APIs at the edge. Pair it with Portcullis to keep credential stuffing off login routes.
Cloudflare analogue: Cloudflare API Shield / Rate Limiting. SLA 99.95% · p99 6ms. Operators write policies. Admins set the default quota.
- ▸Token auth
- ▸Per-route quotas
- ▸Schema validation
- ▸Abuse lists
How it works
Default quota applies to unmatched API paths. Route policies override it per method and path.
Actions: throttle, block, or challenge via Portcullis.
Use cases
Concrete ways teams use this service on day one.
Public JSON API
GET /api/v1/public/* should be generous; POST /api/v1/auth/* should not.
- Publish a GET policy: 600 / 60s throttle.
- Publish an auth policy: 20 / 60s challenge.
Set it up in the dashboard
Dashboard → Services → The Scepter. Add a route quota. Match the most specific path first.
API
Control-plane: GET|POST|DELETE /api/v1/scepter/policies. Send Authorization: Bearer tz_live_YOUR_TOKEN.
Creates count against the plan quota. A 402 plan_limit means you are at the cap — upgrade or delete an unused resource.
Publish a quota
curl -sS -X POST https://tinyzipper.com/api/v1/scepter/policies \
-H "Authorization: Bearer tz_live_YOUR_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"name":"Auth","path":"/api/v1/auth/*","method":"POST","limit_count":20,"window_seconds":60,"action":"challenge"}'List the same resource in JavaScript
const res = await fetch("https://tinyzipper.com/api/v1/scepter/policies", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.ZIPPER_TOKEN}`,
"Content-Type": "application/json"
}
});
const json = await res.json();
if (!res.ok) throw new Error(json.error ?? res.statusText);
console.log(json);Tips
Free includes a handful of policies. Starter is enough for a typical product API.
- ▸SOC 2
- ▸OWASP API
Runbook
Pair with Portcullis on login routes. Quotas are per path.
Next: The Watchtower · All docs · Create a free account