Wix Integration with External Services via API
Wix is closed platform — can't add arbitrary server code or change infrastructure. Integrations are built through two mechanisms: Velo (formerly Corvid) — built-in JavaScript runtime environment based on Node.js, and Wix Headless API — REST/GraphQL API for working with website data externally.
Velo: Server Code Inside Wix
Velo allows writing server functions (jsw files) that execute on Wix servers and can access external APIs:
// backend/crmIntegration.jsw
import { fetch } from 'wix-fetch';
import { getSecret } from 'wix-secrets-backend';
export async function syncContactToCRM(contactData) {
const apiKey = await getSecret('CRM_API_KEY');
const response = await fetch('https://api.yourcrm.com/v1/contacts', {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
email: contactData.email,
name: contactData.name,
phone: contactData.phone,
source: 'wix_website',
}),
});
if (!response.ok) {
throw new Error(`CRM sync failed: ${response.status}`);
}
return response.json();
}
Keys are stored in wix-secrets-backend — built-in secrets store, not in code. jsw functions are called from frontend through import:
// Client page code
import { syncContactToCRM } from 'backend/crmIntegration';
$w('#submitButton').onClick(async () => {
try {
await syncContactToCRM({
email: $w('#emailInput').value,
name: $w('#nameInput').value,
phone: $w('#phoneInput').value,
});
$w('#successMessage').show();
} catch (err) {
console.error('Sync error:', err);
}
});
Wix Automations + HTTP Requests
Without Velo, for simple scenarios: Wix Automations (triggers on form events, orders, registration) support "HTTP request" action. Allows sending POST/GET to external URL on event. This is zero-code option for sending to CRM, Zapier, or n8n.
Limitations: no response handling, no conditional logic, no retry on error.
Wix Headless API: Working with Website Data Externally
Wix provides REST API for accessing data collections, orders, contacts. Authentication via OAuth 2.0:
# Get token
curl -X POST https://www.wixapis.com/oauth2/token \
-H "Content-Type: application/json" \
-d '{
"clientId": "YOUR_CLIENT_ID",
"clientSecret": "YOUR_CLIENT_SECRET",
"grantType": "client_credentials"
}'
// Reading data collection via API
$response = Http::withToken($accessToken)
->post('https://www.wixapis.com/wix-data/v2/items/query', [
'dataCollectionId' => 'Products',
'query' => [
'filter' => ['active' => true],
'sort' => [['fieldName' => 'createdDate', 'order' => 'DESC']],
'paging' => ['limit' => 50],
],
]);
$items = $response->json('dataItems');
Typical case: external CRM or ERP reads orders from Wix for processing, or writes data to custom website collections.
Webhooks from Wix
Wix supports outgoing webhooks for events: new contact, new order, order status change. Setup in developer panel (Wix Developers → Webhooks). On event, Wix sends POST to specified URL.
Signature verification — via JWT with Wix public key:
import { verify } from 'jsonwebtoken';
import jwksClient from 'jwks-rsa';
const client = jwksClient({
jwksUri: 'https://www.wix.com/.well-known/jwks.json',
});
async function verifyWixWebhook(token) {
const decoded = verify(token, async (header, cb) => {
const key = await client.getSigningKey(header.kid);
cb(null, key.getPublicKey());
});
return decoded;
}
Platform Limitations
Velo has execution time limits (about 14 seconds) and memory limits. For long operations (bulk export, large catalog sync), need external service that Wix calls via webhook, not vice versa.
Also no ability to install npm packages arbitrarily — only Wix-approved packages. List available in Velo editor.
Typical Integrations
- Sending leads from Wix forms to amoCRM/Bitrix24 via jsw function
- Syncing Wix Store products with external accounting system via Headless API
- Notifications of new orders to Telegram/Slack via Automations → HTTP request
Simple one-way integration (form → CRM) setup takes 2–4 hours. Bidirectional catalog or order sync via Headless API — 1–3 business days.







