wix-cli-backend-api

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

Updated Mar 20, 2026
One-click install
npx skills add https://github.com/thisisjaymehta/login-with-email-test --skill wix-cli-backend-api-thisisjaymehta
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wix-cli-backend-api
Source: https://github.com/thisisjaymehta/login-with-email-test/tree/main/.agents/skills/wix-cli-backend-api
Command: npx skills add https://github.com/thisisjaymehta/login-with-email-test --skill wix-cli-backend-api-thisisjaymehta

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building server-side logic for Wix CLI apps requires knowing the file-based routing conventions, Astro endpoint patterns, and Wix-specific deployment workflow. This Skill provides the exact patterns for creating backend HTTP endpoints without guesswork. ## Core Features & Use Cases - File-Based Endpoint Creation: Generates TypeScript handlers in src/pages/api/ with support for dynamic routes like [id].ts and all HTTP methods (GET, POST, PUT, DELETE). - Request & Response Patterns: Provides typed handlers using APIRoute from Astro, covering path parameters, query strings, JSON bodies, headers, and proper status codes. - Frontend Integration: Shows how to call endpoints from frontend components using Wix's httpClient.fetchWithAuth(). - Use Case: A developer building a Wix app needs a REST endpoint to handle form submissions. This Skill generates a validated POST handler at src/pages/api/submissions.ts with error handling and correct response codes. ## Quick Start Create a backend HTTP endpoint for my Wix CLI app that accepts POST requests with JSON data at /api/contact.

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 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 parameter via the params object in your APIRoute handler.

Can I call Wix backend endpoints from my frontend components?

Yes, use httpClient.fetchWithAuth() from @wix/essentials to call your endpoints. Build the URL from import.meta.url origin plus your /api/ path, and pass method and body options for POST requests.

Why is my Wix HTTP endpoint not appearing in the app dashboard?

HTTP endpoints do not appear on the Extensions page and require no registration. They are auto-discovered from src/pages/api/ and become live only after you build and release the project.

How do I deploy or delete a Wix CLI backend endpoint?

Run the build command, optionally preview, then release the project to make endpoints live. To delete an endpoint, remove its file from src/pages/api/ and release again.