Use
telnyx-edge v0.4.0 or later. Earlier versions may upload an invalid [[ratelimits]] block instead of rejecting it locally, and do not generate the binding’s type.1. Start from a project
This walkthrough uses atelnyx.toml project, where the runtime serves your fetch handler. new-func --actor scaffolds one:
It works in a
func.toml project too — keep your own HTTP server and reach the binding with import { env } from "@telnyx/edge-runtime".2. Declare a rate limiter
Add a[[ratelimits]] block to telnyx.toml, alongside whatever else the project declares:
3. Check the limit in your handler
Generate the binding’s type first, soenv.API_LIMIT is typed for you. It is written into telnyx-env.d.ts alongside every other binding the manifest declares, so a project that also hosts an actor gets both in one Env:
429 response automatically.
4. Ship and test
200 responses followed by a 429: