Serverless API Gateway
For public HTTP APIs and webhooks on serverless functions—route-level auth, path parameters, CORS, rate limits, and instant routing without a separate ingress layer.
Skip a dedicated ingress stack—publish HTTPS routes that map straight to functions, apply policies per path, and go live at /gw/{workspace}/{path} without an extra gateway deploy or DNS cutover.
- For APIs — typed paths and HTTP methods, per-route auth (none, API key, or Bearer), CORS rules, and parameters like /users/:id flowing into your handler.
- For webhooks — stable public URLs on your workspace, ingress auth you control, and the same function handoff model as the rest of your HTTP surface.
- For agent tools — one HTTPS route per tool or action, the same serverless deploy, secrets, and observability as your other gateway-backed handlers.
Related guides and docs
How it works
How serverless API routing works
Define a route
Map any HTTP method and path to a function. Supports wildcards and path parameters like /users/:id.
Set authentication
Choose none, API key, or Bearer token auth per route. Each route can have its own policy.
Go live instantly
Your route is immediately available at /gw/{workspace}/{path}. No deploy step, no DNS changes.
Features
API gateway features for APIs and webhooks
Path parameters
/users/:id → event.pathParameters.id. Wildcards with /admin/* also supported.
Rate limiting
Cap requests per minute per route. Protect your functions from abuse.
CORS configuration
Set allowed origins and headers per route. Fine-grained control per endpoint.
Any HTTP method
Route GET, POST, PUT, DELETE independently — or use ANY to catch them all.
Example
Example route config and function handler
// Route configuration { "method": "GET", "path": "/users/:id", "functionId": "get-user", "auth": "api-key", "rateLimit": 100, "cors": { "allowedOrigins": ["https://myapp.com"] } }
export async function handler(event, context) { const id = event.pathParameters?.id; if (!id) { return { statusCode: 400, body: JSON.stringify({ error: 'missing id' }) }; } const user = await db.users.findById(id); return { statusCode: 200, body: JSON.stringify(user), }; }
Get started free
Deploy your first function in minutes. No credit card required.