Esper integrations collect request context at an application or edge boundary, send it to the runtime decision API, and apply the returned action at that boundary. Use these guides when you want Esper to sit at a boundary you already control, such as:Documentation Index
Fetch the complete documentation index at: https://docs.esperr.com/llms.txt
Use this file to discover all available pages before exploring further.
- Vercel
- Cloudflare Workers
- AWS Lambda
- Google Cloud Functions
- Heroku
Recipes Back These GuidesEach integration page is based on the recipe source shipped in this repository
under
recipes/. The docs explain what to configure, what the recipe is doing,
and where it fits in the broader Esper workflow.What every integration must send
Customers should not need to guess what Esper needs. At a minimum, every integration should preserve the original request context well enough for Esper to evaluate policy and return one immediate action consistently.Primary Runtime ContractFor
cloud, the integration should call POST /api/v1/runtime/mitigation with:x-esper-api-key- request context
- observed timestamp
- optional return URL for challenge handoff
- any request fields your policy depends on
- client IP
- user agent
- method
- path
- query params
- request headers
- cookies when relevant
Which Esper headers matter
Different runtime paths need different Esper-owned identifiers. The goal is to keep customer-facing contracts small and stable.| Flow | What customer sends | Why it matters |
|---|---|---|
| Runtime decision | x-esper-api-key | Authenticates the synchronous /api/v1/runtime/mitigation request |
| Managed challenge follow-up | X-Esper-Decision-ID | Used only when a lower-level challenge flow is started outside the runtime wrapper |
| Local mitigation enforcement | X-Esper-Hybrid-Key | Lets local enforcement identify the active mitigation record without exposing internal Esper ids |
What to preserve from the original request
Regardless of platform, the integration should preserve these fields whenever they are available:- client IP, including trusted forwarded IP headers from your platform
- user agent
- request method
- request path
- query string parameters
- relevant request headers
- cookies if your rules or entity model depend on them
How to choose an integration
- Choose Vercel if your application already runs on Vercel and you want a simple serverless entry point.
- Choose Cloudflare Workers if you want a low-overhead edge wrapper that
verifies managed challenge returns, asks Esper for one runtime decision, and
applies
allow,challenge, orblockbefore origin. - Choose AWS Lambda if your traffic enters through API Gateway and Lambda.
- Choose Google Cloud Functions if your traffic enters through an HTTP Cloud Function or Cloud Run function.
- Choose Heroku if you want a simple app-process proxy with minimal infrastructure work.
What each integration does
At a high level, each recipe:- receives the incoming request
- gathers request context such as IP, path, method, user agent, headers, and query params
- asks Esper for a mitigation decision
- applies the result at that boundary
- forwards traffic or telemetry as needed
Integration checklist by mode
Runtime decision
- Send
x-esper-api-key - Call
POST /api/v1/runtime/mitigation - Preserve original request context in the request body
- Make sure client IP and user agent survive platform forwarding
Managed Esper challenge
- Let the integration consume Esper’s
challengeaction directly - Use the returned
redirect_urlimmediately - Treat separate challenge-start calls as lower-level plumbing, not the primary customer flow
Local mitigation enforcement
- Preserve or inject
X-Esper-Hybrid-Keywhere your local enforcement path requires it today - Keep the same entity mapping inputs stable between ingest and enforcement
- Do not invent a second actor identity model at the edge
Generic monitor / block / challenge handling
- Forward enough request context for Esper to make the right decision
- Apply only the returned action:
allowchallengeblock
- Keep policy evaluation and mitigation handling at the same traffic boundary when possible
What to expect from the recipes today
- They are practical starting points for adapting the recipe code.
- They keep setup code small enough to review and adapt.
- They make the request boundary explicit, which is the key place where Esper receives context and returns a decision.