About Web Method Extensions

Web method extensions allow you to define functions in your app's backend that you can call from your frontend code.

You can import web methods into frontend files as you would any other function in your project. Wix handles the communication between your frontend and backend under the hood.

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.

Web method permissions

Web methods allow you to specify the permissions required to call the function from the frontend.

Permission types:

  • Permissions.Anyone: Any site visitor can call the function.
  • Permissions.Admin: Only site admins can call the function.
  • Permissions.SiteMember: Only site members can call the function.

These are versions of the site visitor and site member identity types.

Be careful when selecting a permission, as exposing a function with the wrong permissions can create security risks.

Web methods vs HTTP function extensions

Web methods provide several advantages over using HTTP function extensions to call your app's backend:

  • Strongly typed communication between client and server.
    • Type safety.
    • Auto complete for function names and parameters.
  • Intuitive, high-level communication between frontend and backend:
    • You can call your backend the same way you call functions in your frontend. You don't have to manually extract values from a request, serialize responses, or handle HTTP headers and query parameters as you would with API extensions.
    • Easier error handling. Instead of handling HTTP errors, you can throw exceptions like you would for any other function.
    • In the legacy Wix CLI for Apps, hot module reloading of backend changes in your local preview.

See also

Last updated: 11 November 2026

Did this help?