wix-cli-backend-api

Creates HTTP endpoints for Wix CLI apps using Astro API routes.

Updated Feb 21, 2026
One-click install
npx skills add https://github.com/ESSSoWhat/live-translate-realtime-dubbing --skill wix-cli-backend-api-esssowhat
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wix-cli-backend-api
Source: https://github.com/ESSSoWhat/live-translate-realtime-dubbing/tree/main/wix-app/np/.agents/skills/wix-cli-backend-api
Command: npx skills add https://github.com/ESSSoWhat/live-translate-realtime-dubbing --skill wix-cli-backend-api-esssowhat

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires astro, @wix/essentials.

What problem does it solve? Building server-side logic for Wix CLI apps requires knowing the correct file conventions, HTTP method exports, and response patterns. This Skill guides the creation of backend HTTP endpoints in src/pages/api/ so requests are handled correctly with proper status codes, headers, and validation. ## Core Features & Use Cases - REST Endpoint Creation: Generates TypeScript files in src/pages/api/ with typed APIRoute handlers for GET, POST, and other HTTP methods. - Dynamic Routing: Supports bracket-based dynamic segments like [id].ts for parameterized URLs such as /api/users/:id. - Request and Response Handling: Covers path parameters, query strings, JSON body parsing, headers, and standardized status codes (200, 201, 204, 400, 404, 500). - Use Case: A developer needs a backend endpoint to receive form submissions from a Wix app frontend; the Skill produces a validated POST handler that parses the JSON body and returns proper error responses. ## Quick Start Create a backend HTTP endpoint for my Wix CLI app that accepts POST requests with a title and content field and returns the created item as JSON.

Frequently Asked Questions about wix-cli-backend-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a backend HTTP endpoint in a Wix CLI app?

Create a TypeScript file in src/pages/api/ and export named functions for each HTTP method, typed with APIRoute from astro. The file path determines the endpoint URL, and endpoints are auto-discovered without extension registration.

How do I add dynamic route parameters to Wix API endpoints?

Use square brackets in the filename, such as src/pages/api/users/[id].ts, which maps to /api/users/:id. Access the value through the params object passed to your APIRoute handler.

How do I call a Wix backend endpoint from the frontend?

Use httpClient.fetchWithAuth() from @wix/essentials with the endpoint URL derived from import.meta.url origin. It supports GET and POST requests with JSON bodies and handles authentication automatically.

Can Wix CLI HTTP endpoints be generated with npm run generate?

No, HTTP endpoints cannot be added via npm run generate. You create the files directly under src/pages/api/, and they are automatically discovered from the file system without appearing on the Extensions page.

How do I deploy Wix CLI HTTP endpoints to production?

Run the build command, optionally create preview URLs for testing, then use the release command. Once released, endpoints handle live traffic at production URLs; deleting the file and releasing again removes the endpoint.