An HTTP endpoint is a backend route that handles HTTP requests and returns a response, such as JSON data for your project's frontend code. This reference is the shared contract for an endpoint. It covers where the file goes, how its path maps to a route, and the handler Wix calls.
A Studio Two site, a Wix CLI app, and a Wix-managed headless project each define an endpoint as a single TypeScript file, with one exported handler per HTTP method. The file's location sets the route, so an endpoint has no configuration file and isn't registered in extensions.ts. Where the file goes depends on the project:
src/api/, and the route has no /api prefix. The handler type comes from @wix/custom-extensions/types.src/pages/api/, and the route starts with /api. The handler type comes from astro.Self-managed apps and headless projects run their own backend instead of these files.
Last updated: 2 November 2026