About the Wix JavaScript SDK

Share your feedback
Your feedback helps us improve the development experience! Join the Devs on Wix Discord community to discuss features, give feedback, and connect with our growing community of developers.

The Wix JavaScript SDK allows you access to Wix business solutions and site data from JavaScript code. For example, you can use the @wix/stores package to interact with the Wix Stores product catalog and handle site orders.

Uses

The Wix JavaScript SDK can be used with:

  • Wix Headless: Take advantage of Wix functionality from any app or site you create, on any platform.

    You can use the SDK to code external sites or apps that access an existing Wix site's business data, or you can create a new project on Wix that takes advantage of Wix's advanced business solutions for managing bookings, eCommerce, events, and more.

    With Wix Headless, several apps and sites can be connected to the same Wix project, with or without a Wix site created in the Wix Editor.

    Learn more about Wix Headless.

  • Wix apps: Develop an app that can be installed on Wix sites.

    You can use the SDK to code a Wix app that communicates with sites it's installed on and can access and manage the business solutions installed on the site.

    To use Wix APIs in Apps, site owners must grant you explicit permission for the operations you perform, either when installing the app on their site, or by providing an API key.

    Important: Use of Wix APIs when building Wix apps are subject to the Wix App Market Guidelines.

    Learn more about building an app.

Webhooks

Wix apps can subscribe to webhooks to respond to specific app and site events. The SDK streamlines webhook integration by providing methods to register a callback function as an event handler. For more information, see Handle Events With Webhooks.

Service plugins

Service plugins allow your Wix app to extend the functionality of a Wix site by injecting custom logic into existing app flows or introducing entirely new flows. Learn how to implement a self-hosted service plugin.

SDK packages

The SDK includes a universal npm package @wix/sdk which manages authentication and communication with the Wix platform.

Each domain, such as Contacts or Stores, also has its own npm package, with the naming convention @wix/{domain}. To work with any domain, you need both the universal SDK package and the package for the domain you wish to work with. For example, to work with Contacts, you need both @wix/sdk and @wix/contacts.

These packages are fully typed, making the structure of parameters and fields predictable and easy to work with. Package versioning follows SemVer convention, for convenient dependency management.

Was this helpful?
Yes
No