Skip to main content

Swyx Web Extension SDK Documentation

Welcome to the Swyx Web Extension SDK documentation! This is the complete guide to using the TypeScript SDK for Swyx WebExtension integrations.

What is Swyx Web Extension SDK?

The SDK provides typed APIs for building web-based applications that integrate with Swyx PBX systems. It enables you to:

  • Control calls — Dial, hold, transfer, and manage active calls
  • Monitor presence — Track user availability and presence states
  • Access phonebooks — Search and browse contact directories
  • Handle events — React to real-time server-pushed notifications
  • Manage voice messages — View and manage voice message workflows

Requirements

  • A compatible SwyxWare server (version 15.00 or higher)
  • Node.js 16 or later (for development)
  • Basic knowledge of TypeScript/JavaScript

Key Concepts

Connection Model

The SDK uses a request/response + event model:

  • Requests flow from client to server via the main hub (IWebExtensionHub)
  • Events flow from server to client via the back-channel (IWebExtensionHubBack)
  • Both require an active IWebExtensionConnection

Public Surface

All public APIs are exported from the main index.ts:

  • Factory functions to create connection, hub, and event handler instances
  • Enums for states (CallState, UserState, LineState, etc.)
  • Type definitions for complex objects (UserAppearance, LineDetails, etc.)
  • Internal APIs are excluded from this SDK; only the WebExtension interface is exposed

Next: Start with Getting Started to install and use the SDK.