Frontend code runs in the browser, where anyone can read it. Backend code runs on a server, where secrets, third-party credentials, and sensitive logic can live safely. Most non-trivial projects need both sides to talk to each other.
When both your frontend and backend run on Wix infrastructure, the platform provides a managed mechanism for connecting them. Which one you use is determined by how your project is built:
Note: When one or both sides run outside Wix, as with self-managed apps and headless projects, neither applies, and you implement the transport and identity handling yourself.
A web method is a backend function wrapped with a platform-provided helper that makes it callable from the frontend code of the same site. On sites and in Blocks apps, web methods live in files with a .web.js extension, and each declares a permission level, such as anyone, site members only, or admins only. The platform serializes the call, enforces that permission level against the caller, runs the function, and returns the response.
Web methods aren't publicly exposed. A web method is reachable only from the frontend of the same site. The platform also attaches the caller's identity to the invocation, so platform methods that depend on caller identity, such as the Get Current Member method, work without any extra effort on your part.
An HTTP endpoint is a server-side route in a Wix-managed app or headless project that handles HTTP requests. The same route can be called both by the project's own frontend and by external systems, so identity isn't guaranteed: a call that arrives without a token is treated as anonymous.
When the project's own frontend calls the endpoint, the Wix CLI's authenticated fetch helper (httpClient.fetchWithAuth() from @wix/essentials) attaches the caller's access token to the request as an Authorization header. The endpoint reads that token to act on the caller's behalf, including making calls the caller couldn't make directly.
Note: The same endpoint mechanism also serves external callers. For that side, see Exposing APIs.
The development path determines which mechanism applies. Self-managed paths don't use either, so the transport is yours to choose.
Last updated: 22 July 2026