Getting Started Guides
Build your first HTTP proxy route and confirm that the gateway rewrites and forwards traffic correctly. This guide covers defining a server alias, creating a
Build your first HTTP proxy route and confirm that the gateway rewrites and forwards traffic correctly. This guide covers defining a server alias, creating a wildcard proxy path, and verifying the round-trip response. Start here if you have an existing backend and want to front it with the gateway.
Last reviewed: 2026-03-06
When to use this
Use these quickstart guides when you are setting up Serverless API Gateway for the first time or adding a new integration pattern. Each guide walks through one isolated concern so you can deploy incrementally instead of configuring everything at once.
Key concepts
Every quickstart produces a deployable
wrangler.tomland JSON config pair -- you can runwrangler deployat the end of each guide.Guides are ordered from simplest (health endpoint) to most complex (Auth0/Supabase passwordless), so earlier guides serve as prerequisites for later ones.
Config can come from a local file, Cloudflare KV, or the
SAG_API_CONFIG_JSONenvironment variable -- choose based on your deploy workflow.All guides use the same JSON config schema, so patterns you learn in one guide transfer directly to others.
Repo-grounded example
{
"servers": [
{ "alias": "upstream", "url": "https://api.example.com/base" }
],
"paths": [
{
"method": "GET",
"path": "/proxy/{.+}",
"integration": {
"type": "http_proxy",
"server": "upstream"
}
}
]
}This snippet defines a single upstream server and a wildcard proxy route. The server field references the alias defined in the servers array, and the {.+} pattern forwards any subpath to the upstream URL.
Troubleshooting
If
wrangler deployfails with a config error, validate your JSON against the schema file (api-config.schema.json) before investigating further.If the health endpoint returns 404, confirm that your
wrangler.tomlpoints to the correct main entrypoint and that the config file is being loaded.If JWT or Auth0 routes return 500, check that all required environment variables and secrets are set in your Cloudflare dashboard or
.dev.varsfile.Use
wrangler tailto stream live logs from the deployed worker and see the exact error message the gateway produces.
Related docs
Last updated