> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: About HTTP Function Extensions

## Article: About API Extensions

## Article Link: https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/apis/http-functions/about-http-function-extensions.md

## Article Content:

# About Backend API Extensions

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](https://dev.wix.com/docs/build-apps/develop-your-app/develop-an-app-with-the-cli/about-the-wix-cli.md) | [HTTP endpoints](https://dev.wix.com/docs/build-apps/develop-your-app/develop-an-app-with-the-cli/supported-extensions/backend/http-endpoints/about-http-endpoints.md) |
| [Wix Blocks](https://dev.wix.com/docs/build-apps/develop-your-app/develop-an-app-with-blocks/about-wix-blocks.md) and the [Legacy Wix CLI for Apps](https://dev.wix.com/docs/wix-cli/legacy-clis/legacy-wix-cli-for-apps/about-the-legacy-wix-cli-for-apps.md) | [Web methods](#web-methods) or [HTTP functions](#http-functions) |

## HTTP endpoints

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](https://dev.wix.com/docs/build-apps/develop-your-app/develop-an-app-with-the-cli/supported-extensions/backend/http-endpoints/about-http-endpoints.md).

## Web methods

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](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/web-methods/about-web-method-extensions.md#web-method-permissions) (`Anyone`, `Admin`, `SiteMember`).

You can use web methods when extending [websites](https://dev.wix.com/docs/develop-websites/articles/getting-started/about-developing-websites.md), [Wix Blocks](https://dev.wix.com/docs/build-apps/develop-your-app/develop-an-app-with-blocks/about-wix-blocks.md) apps, and apps in the legacy Wix CLI for Apps. In the Wix CLI, use HTTP endpoints instead.

Learn more about [web method extensions](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/web-methods/about-web-method-extensions.md).

## HTTP functions

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](https://dev.wix.com/docs/build-apps/develop-your-app/develop-an-app-with-blocks/code-in-blocks/expose-a-blocks-app-api-with-http-functions.md). In the Wix CLI, use HTTP endpoints instead.

## Web methods vs HTTP functions

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.

## See also

- [About HTTP Endpoints](https://dev.wix.com/docs/build-apps/develop-your-app/develop-an-app-with-the-cli/supported-extensions/backend/http-endpoints/about-http-endpoints.md)
- [About Web Method Extensions](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/web-methods/about-web-method-extensions.md)
- [Web Methods API](https://dev.wix.com/docs/sdk/core-modules/web-methods/introduction.md)