SDKs
Official SDKs for TypeScript/JavaScript, PHP and Python, generated from the API's OpenAPI document. Every API operation has a matching method, grouped by area: pbx.extensions.create(...), pbx.calendars.force(...), pbx.live.stream(...).
Download
| Language | Requirements | Archive |
|---|---|---|
| TypeScript / JavaScript | Node.js 18+ or modern browsers, no dependencies | typescript.zip |
| PHP | PHP 8.1+, curl and json extensions, no dependencies | php.zip |
| Python | Python 3.10+, httpx | python.zip |
Each archive contains sources, a README, ready-to-run examples and tests. Current version: 1.0.0.
Installation
# Nessuna installazione: cURL e la chiave API in una variabile d'ambiente
export EXOPBX_API_KEY="exo_live_..."// npm install ./exopbx-sdk-typescript (archivio typescript.zip)
import { ExoPBX } from '@exobyte/exopbx-sdk';
const pbx = new ExoPBX({ apiKey: process.env.EXOPBX_API_KEY });// composer config repositories.exopbx path ./exopbx-sdk-php && composer require exobyte/exopbx-sdk
require 'vendor/autoload.php';
use Exobyte\ExoPBX\Client;
$pbx = new Client(['apiKey' => getenv('EXOPBX_API_KEY')]);# pip install ./exopbx-sdk-python
import os
from exopbx import ExoPBX
pbx = ExoPBX(api_key=os.environ["EXOPBX_API_KEY"]) # oppure ExoPBX() legge EXOPBX_API_KEY- TypeScript:
npm install ./exopbx-sdk-typescript(the archive includes the build indist/with types). - PHP: with Composer, add the folder as a
pathrepository and requireexobyte/exopbx-sdk; without Composer, a PSR-4 autoload of thesrc/folder is enough (namespaceExobyte\ExoPBX). - Python:
pip install ./exopbx-sdk-python.
Common features
| Feature | TypeScript | PHP | Python |
|---|---|---|---|
API key (X-API-Key) | apiKey | apiKey | api_key / EXOPBX_API_KEY |
| API address | baseUrl | baseUrl | base_url |
Tenant (X-Tenant-Id) | tenantId | tenantId | tenant_id |
| Retries on 429 and transient errors | maxRetries | maxRetries | max_retries |
| Pagination | pbx.paginate(...) | $pbx->paginate(...) | pbx.paginate(...) |
| Automatic Idempotency-Key on POST | yes | yes | yes |
| Typed errors | ExoPBXError | ApiException | ExoPBXError |
| SSE events with reconnection | pbx.live.stream() | $pbx->live->stream() | pbx.live.stream() |
| WebSocket events | pbx.live.websocket() | — | — |
| Webhook signature verification | constructWebhookEvent() | Webhook::constructEvent() | construct_event() |
The default address is defined in a single constant per SDK (DEFAULT_BASE_URL in TypeScript and Python, Defaults::BASE_URL in PHP), currently https://centralino.exovoip.it/api.
export EXOPBX_BASE_URL="https://centralino.exovoip.it/api"
curl -s "$EXOPBX_BASE_URL/health"const pbx = new ExoPBX({
apiKey: process.env.EXOPBX_API_KEY,
baseUrl: 'https://centralino.exovoip.it/api', // predefinito: DEFAULT_BASE_URL
});$pbx = new Client([
'apiKey' => getenv('EXOPBX_API_KEY'),
'baseUrl' => 'https://centralino.exovoip.it/api', // predefinito: Defaults::BASE_URL
]);pbx = ExoPBX(base_url="https://centralino.exovoip.it/api") # predefinito: exopbx.DEFAULT_BASE_URLMethod names
- TypeScript and PHP:
group.operationin camelCase, as in the "SDK method" column of the guides (pbx.ringGroups.create,$pbx->ringGroups->create). - Python: the same names in snake_case (
pbx.ring_groups.create); query parameters are keyword arguments (pbx.cdr.list(from_="2026-11-01", limit=100)). - Path parameters (
:id,:extensionId) come first, then the body (or filters), and finally the per-request options.
Types (TypeScript)
All request bodies and responses are typed from the API schemas: your editor suggests fields and allowed values and flags errors before you run the code. Types are also exported as Schemas:
import type { Schemas } from '@exobyte/exopbx-sdk';
type Extension = Schemas.ExtensionsGetResponse['extension'];Updates
The SDKs are regenerated with every API change. Download the new version from this page; existing methods remain compatible within version v1 of the API.
