Backend API extensions let you expose server-side logic that your app's frontend can call — for example, to read or write data, call external services, or run business logic that shouldn't run in the browser.
The mechanism you use depends on your development framework:
| Framework | Backend API mechanism |
|---|---|
| Wix CLI | HTTP endpoints |
| Wix Blocks and the Legacy Wix CLI for Apps | Web methods or HTTP functions |
HTTP endpoints are the backend API mechanism in the Wix CLI. Each endpoint is a file that you place in your project's src/api/ folder to handle incoming HTTP requests. The file's path sets the endpoint's route, so src/api/orders.ts is served at /orders. In the Wix CLI, HTTP endpoints replace web methods and HTTP functions.
Learn more about HTTP endpoints.
Web methods let you define backend functions that you import and call from your frontend like any other function. Wix handles the client-server communication under the hood, with strong typing and simple error handling. Web methods also support a permissions model (Anyone, Admin, SiteMember).
You can use web methods when extending websites, Wix Blocks apps, and apps in the legacy Wix CLI for Apps. In the Wix CLI, use HTTP endpoints instead.
Learn more about web method extensions.
HTTP function extensions let you define HTTP endpoints in your backend that you call from your frontend, with access to HTTP-specific features such as custom headers and status codes.
You can use HTTP functions in the legacy Wix CLI for Apps. In Wix Blocks, the equivalent is Blocks App APIs. In the Wix CLI, use HTTP endpoints instead.
For most cases, prefer web methods: they require less boilerplate, give you type-safe calls between frontend and backend, and let you handle errors by throwing exceptions instead of parsing HTTP responses. Use HTTP functions when you need low-level HTTP control, such as custom headers or status codes.
Last updated: 11 November 2026