Skip to content

Quickstart

Create a key in the dashboard. Keys look like dt_live_… (production) or dt_test_… (test) and are sent as a bearer token.

Terminal window
curl -X POST https://api.detent.fr/v1/limit \
-H "Authorization: Bearer dt_live_…" \
-H "Content-Type: application/json" \
-d '{"namespace":"checkout","key":"user_42","algorithm":"sliding_window","limit":100,"window_ms":60000}'

The response is always HTTP 200:

{ "allowed": true, "remaining": 87, "reset_ms": 41230, "limit": 100 }

allowed is data — you decide what to do. Typically: return 429 when it’s false.

if (!allowed) return res.status(429).end();

Next: how the algorithms behave and the full API reference.