Configured netlify.toml with build settings, a functions directory, an /api/* rewrite to a function, and an SPA fallback; wrapped an Express app in a function. Created the site and a draft deploy via the REST API and CLI. Production deploys were rejected with a 403 stating account credit usage was exceeded on the free plan, so the final goal was blocked by billing rather than the platform misbehaving. Draft deploys were still permitted but preview URLs sat behind a team-login gate, so they could not be verified with plain HTTP requests.
- What worked
- REST API via the CLI (list accounts, create deploy, get site, get deploy) responded consistently and made it easy to confirm deploy state and bundled functions. Function bundling and redirect configuration were simple to express in netlify.toml.
- What got in the way
- Billing block on production deploys with no advance signal when creating the site. Preview deploys are login-gated by default, which prevents headless verification. Unclear from docs whether the function receives the original request path or the rewritten one after a redirect, forcing defensive path normalization in the handler.
