SDKs overview

Wix provides developers with Software Development Kits (SDKs) and libraries designed to simplify interaction with its extensive RESTful API. These tools abstract away the complexities of HTTP requests, authentication, and response parsing, allowing developers to focus on integrating Wix functionalities into their applications or custom website components. The primary focus of Wix's official SDK offerings is JavaScript, catering to both server-side Node.js environments and client-side development within the Velo by Wix platform.

The SDKs facilitate a wide range of operations, including managing website content, processing e-commerce orders, handling bookings, and interacting with user data. They are built upon the Wix API, which supports various business solutions offered by Wix, such as Wix Stores, Wix Bookings, and Wix Events. By utilizing these SDKs, developers can extend the capabilities of Wix sites beyond the standard editor functionalities, creating highly customized user experiences and integrating with external systems.

Effective use of the Wix API and its SDKs requires understanding authentication mechanisms, primarily OAuth 2.0 for secure access and API keys for specific server-to-server interactions. The SDKs manage token refreshing and request signing, streamlining the development process. Developers can find detailed documentation for various API endpoints and SDK methods within the official Wix API documentation.

Official SDKs by language

Wix officially supports an SDK primarily for JavaScript, reflecting its strong ecosystem for web development and its Velo by Wix platform for extending site functionality. This SDK provides comprehensive access to various Wix services, allowing developers to integrate features such as data storage, e-commerce operations, booking management, and user authentication directly into their applications.

The JavaScript SDK is designed to be versatile, usable in both browser-based environments (especially within Velo by Wix) and server-side Node.js applications. It modularizes access to different Wix API domains, ensuring developers can import only the necessary components for their specific use case. This modularity helps in optimizing application performance and reducing bundle sizes when deployed. The SDK is maintained by Wix and regularly updated to reflect new API capabilities and improvements.

Official SDKs Table

Language Package Name Installation Command Maturity
JavaScript @wix/api-client npm install @wix/api-client or yarn add @wix/api-client Stable, Actively Maintained
JavaScript (Velo) Built-in modules (e.g., wix-data, wix-crm) No explicit install; available in Velo environment Stable, Core Platform

The @wix/api-client package offers a unified way to interact with the Wix REST APIs from a Node.js environment or a client-side JavaScript application outside of Velo. For development within the Wix editor using Velo, many common API interactions are handled via built-in modules like wix-data or wix-crm, which provide a direct, simplified interface without requiring explicit npm installations. These Velo modules are tightly integrated with the Wix platform, offering optimized performance and simplified data binding within the site editor.

Installation

Installing the Wix API JavaScript SDK primarily involves using a package manager like npm or yarn. This process applies to projects developed outside the Velo by Wix editor, such as custom Node.js backend services or external client-side applications that interact with Wix APIs.

Prerequisites:

  • Node.js and npm (Node Package Manager) or yarn installed on your development machine. For detailed installation instructions, refer to the official Node.js website.
  • A Wix developer account and relevant API permissions for your application. Access keys and OAuth applications can be managed via the Wix Developers Center.

Installation Steps for @wix/api-client:

  1. Initialize your project (if not already done):
    npm init -y
    This command creates a package.json file in your project directory.
  2. Install the Wix API Client:
    npm install @wix/api-client
    Alternatively, using yarn:
    yarn add @wix/api-client
    This command downloads the package and its dependencies and adds them to your project's node_modules directory.
  3. Import and use in your code: After installation, you can import the necessary modules into your JavaScript or TypeScript files.
    import { createClient, OAuthStrategy } from '@wix/api-client';
    // Further code to initialize and use the client

For Velo by Wix Development:

When developing directly within the Wix Editor using Velo by Wix, explicit SDK installation is not required. Velo provides built-in global modules (e.g., wix-data, wix-crm, wix-members) that are pre-integrated into the environment. Developers can directly import and utilize these modules in their client-side and backend Velo code files without running npm install. For example:

import wixData from 'wix-data';

async function fetchData() {
  const items = await wixData.query("MyCollection").find();
  console.log(items.items);
}

This seamless integration simplifies development within the Wix platform, as the environment handles dependencies and module availability automatically.

Quickstart example

This quickstart example demonstrates how to use the @wix/api-client in a Node.js environment to fetch a list of products from a Wix Store. This example assumes you have already installed the package as described in the installation section and have obtained your Wix API Key and instance ID from the Wix Developers Center. For authentication, a ClientCredentialsStrategy is used, which is suitable for server-side applications.

Example: Fetching Products from a Wix Store (Node.js)

First, ensure your environment variables are configured for secure access:

# .env file example
WIX_CLIENT_ID="your_api_key_client_id"
WIX_CLIENT_SECRET="your_api_key_client_secret"
WIX_ACCOUNT_ID="your_wix_account_id"
WIX_SITE_ID="your_wix_site_id"

Then, create a JavaScript file (e.g., getProducts.js) with the following content:

import { createClient, OAuthStrategy } from '@wix/api-client';
// Import specific API services you need
import { products } from '@wix/api-client/build/cjs/wix-stores-v2';

// Load environment variables (e.g., using dotenv package)
import 'dotenv/config';

const { WIX_CLIENT_ID, WIX_CLIENT_SECRET, WIX_ACCOUNT_ID, WIX_SITE_ID } = process.env;

async function fetchWixProducts() {
  if (!WIX_CLIENT_ID || !WIX_CLIENT_SECRET || !WIX_ACCOUNT_ID || !WIX_SITE_ID) {
    console.error('Missing Wix environment variables. Please check your .env file.');
    return;
  }

  try {
    const wixClient = createClient({
      modules: {
        products, // Register the products module
      },
      auth: OAuthStrategy({ // Use OAuth for secure server-side interaction
        clientId: WIX_CLIENT_ID,
        clientSecret: WIX_CLIENT_SECRET,
        // The scope defines what permissions your app requests
        // 'wix_stores.products.query' allows reading product information
        scope: ['wix_stores.products.query'],
        // The token management is typically handled by the Wix API Client itself
        // For production, you would handle token storage and refresh securely
        accessToken: {
          // In a real application, you'd load / store refresh and access tokens
          // For this quickstart, we'll let the client handle initial token acquisition
          get: async () => ({ accessToken: '', refreshToken: '' }),
          set: async () => {}, // No-op for quickstart, handle token storage in production
        },
        // For server-to-server, often a dummy redirect URI is sufficient if not actually redirecting
        redirectUri: 'http://localhost:3000/callback', // Example callback URI
      }),
      // Define the site and account context for the API calls
      siteId: WIX_SITE_ID,
      accountId: WIX_ACCOUNT_ID,
    });

    // You might need an initial authorization step for OAuth to get the first tokens.
    // In a server-side app, this might involve a one-time consent flow or pre-authorized access.
    // For this example, we assume the client is configured to obtain tokens.

    console.log('Fetching products...');

    // Call the products API to query products
    const productResponse = await wixClient.products.queryProducts({
      query: {
        paging: { limit: 10, offset: 0 },
      },
    });

    console.log('Successfully fetched products:');
    productResponse.products.forEach(product => {
      console.log(`- ${product.name} (ID: ${product.id})`);
    });
  } catch (error) {
    console.error('Error fetching products:', error.message);
    // Log specific error details for debugging
    if (error.response) {
      console.error('API Error Response:', error.response.data);
    }
  }
}

fetchWixProducts();

To run this example:

  1. Save the code as getProducts.js.
  2. Create a .env file in the same directory and populate it with your Wix API credentials.
  3. Run npm install dotenv to handle environment variables.
  4. Execute from your terminal: node getProducts.js

This will output a list of your Wix products to the console. For advanced use cases, such as managing authentication tokens securely or handling pagination, refer to the Wix API authentication guide.

Community libraries

While Wix primarily provides and maintains its official JavaScript SDK, the open-source community can contribute libraries and tools that extend or simplify interactions with the Wix API. These community-driven efforts often emerge to address specific niche requirements not directly covered by official SDKs, offer alternative programming language bindings, or provide higher-level abstractions for common use cases.

Community libraries can be particularly useful for:

  • Alternative Languages: Developers working in languages other than JavaScript might create wrappers or client libraries to integrate with Wix APIs using their preferred language.
  • Specific Use Cases: Libraries might focus on particular domains, such as advanced analytics integration, specialized CRM workflows, or custom UI components that consume Wix data.
  • Framework Integrations: Community efforts sometimes provide integrations with popular frontend or backend frameworks (e.g., React, Vue, Python/Django) to streamline Wix API usage within those ecosystems.
  • Development Tools: Utility libraries might emerge to assist with API key management, webhook processing, or local development simulations for Wix-connected applications.

Discovering community libraries typically involves searching package repositories like npm for JavaScript packages or GitHub for open-source projects. Keywords like "Wix API," "Wix SDK," or specific Wix service names (e.g., "Wix Stores API") can help identify relevant projects. Developers should evaluate community libraries based on their activity, documentation quality, license, and community support before integrating them into production environments, as they are not officially supported by Wix.

As of May 2026, the official JavaScript SDK remains the most comprehensive and supported method for programmatic interaction with the Wix API. However, the ecosystem is dynamic, and new community contributions may arise. Developers are encouraged to consult the Wix Developer Documentation for the most up-to-date best practices and supported tools.