> 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`). > - 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: Add HTTP Function Extensions with the CLI ## Article: Add API Extensions with the CLI ## Article Link: https://dev.wix.com/docs/wix-cli/legacy-clis/legacy-wix-cli-for-apps/supported-extensions/backend-extensions/api/http-functions/add-http-function-extensions-with-the-cli.md ## Article Content: # Add HTTP Function Extensions with the Wix CLI for Apps
**CLI Documentation Notice** We've released a [new Wix CLI](https://dev.wix.com/docs/wix-cli/guides/about-the-wix-cli.md). Continue here if your project uses the Wix CLI for Apps. [Determine which CLI your project uses](https://dev.wix.com/docs/wix-cli/guides/development/determine-which-cli-your-project-uses.md).[HTTP function extensions](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/apis/http-functions/about-http-function-extensions.md) allow you to define HTTP functions that can be called from your frontend code. The CLI handles the setup and hosting of the backend code for you, simplifying the development process. These HTTP functions can be invoked from any frontend component in your CLI project. Follow the instructions below to: 1. Create a backend HTTP function extension for your app. 1. Test the backend HTTP function extension on a site. 1. Deploy your app with the backend HTTP function extension. Once these tasks are complete, your app will have a backend HTTP function extension that can be called from your frontend code. > **Note:** [Web method extensions](https://dev.wix.com/docs/wix-cli/legacy-clis/legacy-wix-cli-for-apps/supported-extensions/backend-extensions/api/web-methods/add-web-method-extensions-with-the-cli.md) require less boilerplate code than HTTP function extensions, as you don't have to manually extract values from a request, serialize responses, or handle HTTP headers and query parameters. Consider using web methods if you don't require HTTP-specific features, like header codes. ## Step 1 | Create the extension In the terminal: 1. Navigate to your project repo. 1. Run the following command: ```tsx npm run generate -- --type=HTTP_FUNCTION ``` 1. The CLI will display a menu of extensions to generate. 1. The CLI will prompt you to name the HTTP function. You can only have one HTTP function extension with a given name. 1. The CLI will prompt you to choose a method. Upon completion, the HTTP function extension files will be created in your project directory with the following structure: ```tsx . └──
**Tip:** In the CLI, press `L` to view the full logs, `C` to clear the logs, `ESC` to exit the log view, and use the up and down arrow keys to navigate.## Step 3 | Build and deploy your app Once your app is ready for production, you can build it and release a version in the app dashboard. 1. Run the following command to build your app: ```bash npm run build ``` 2. Run the following command and follow the prompts to release an app version: ```bash npm run release ``` An app version allows you to publish an app to the [Wix App Market](https://www.wix.com/app-market) or install it on a site with a direct install URL. For more information about building and deploying your app, see [Build and Deploy an App with the CLI](https://dev.wix.com/docs/wix-cli/legacy/wix-cli-for-apps/app-development/build-and-deploy-an-app-with-the-cli.md). ## Delete an API extension To delete an API from your app, delete the subfolder under `src/backend/api` that contains your HTTP function extension files. ## See also - [About HTTP Function Extensions](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/apis/http-functions/about-http-function-extensions.md)