PHPackages                             voicetel/sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. voicetel/sdk

ActiveLibrary[API Development](/categories/api)

voicetel/sdk
============

Official PHP SDK for the VoiceTel REST API (v2.2.10).

2.2.10(3w ago)00MITPHPPHP ^8.1

Since May 19Pushed yesterdayCompare

[ Source](https://github.com/voicetel/php-sdk)[ Packagist](https://packagist.org/packages/voicetel/sdk)[ Docs](https://voicetel.com)[ RSS](/packages/voicetel-sdk/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (3)Versions (2)Used By (0)

📞 VoiceTel PHP SDK
==================

[](#-voicetel-php-sdk)

The official PHP client for the [VoiceTel REST API](https://voicetel.com/docs/api/v2.2/) — provision numbers, place orders, validate e911, send messages, and manage your account, with modern PHP 8.1+ ergonomics and battle-tested Guzzle transport.

[![Version](https://camo.githubusercontent.com/fc0151192eb9cd33bc8a5e1b08ef8215f176bc58124d35ee1711c896f5c0c1c4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d322e322e31302d626c7565)](https://camo.githubusercontent.com/fc0151192eb9cd33bc8a5e1b08ef8215f176bc58124d35ee1711c896f5c0c1c4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d322e322e31302d626c7565)[![PHP](https://camo.githubusercontent.com/ba4a50cd793cc30e8cd283e7df69644e79e2efacd6710e1b402d3ec5222ed1e3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d254532253839254135382e312d626c7565)](https://camo.githubusercontent.com/ba4a50cd793cc30e8cd283e7df69644e79e2efacd6710e1b402d3ec5222ed1e3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d254532253839254135382e312d626c7565)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)[![Coverage](https://camo.githubusercontent.com/fe5c7e352b78254d38aeafcd25e0286a9a3385d27f38f1b5de145a181eaa63f7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d39342532352d627269676874677265656e)](https://camo.githubusercontent.com/fe5c7e352b78254d38aeafcd25e0286a9a3385d27f38f1b5de145a181eaa63f7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d39342532352d627269676874677265656e)

📚 Table of Contents
-------------------

[](#-table-of-contents)

- [Features](#-features)
- [Installation](#-installation)
- [Quickstart](#-quickstart)
- [Authentication](#-authentication)
- [Resource Reference](#-resource-reference)
- [Error Handling](#-error-handling)
- [Rate Limits](#-rate-limits)
- [Development](#-development)
- [API Documentation](#-api-documentation)
- [Contributors](#-contributors)
- [Sponsors](#-sponsors)
- [License](#-license)

✨ Features
----------

[](#-features)

### 🛡️ Modern PHP, Strictly Typed

[](#️-modern-php-strictly-typed)

- **PHP 8.1+** end-to-end — readonly properties, native enums, named arguments, typed everywhere.
- **`ErrorKind` enum** for HTTP error classification: `BadRequest`, `Authentication`, `PermissionDenied`, `NotFound`, `Conflict`, `RateLimit`, `Server`, `Unknown`.
- **PSR-4 autoloading** under `VoiceTel\Sdk\`, plays nicely with Symfony, Laravel, and every other Composer-aware framework.
- **PHPStan level 8 clean** across the entire `src/` tree.

### 🔁 Production-Grade Transport

[](#-production-grade-transport)

- Built on **Guzzle 7** — the de-facto HTTP client in the PHP ecosystem.
- **Automatic retry** with exponential backoff on 429 / 5xx — honors `Retry-After` headers, capped at 8s.
- **Configurable timeout** per client (defaults to 30s).
- **Bearer auth** managed for you; the password → key exchange is one method call (`$client->login(...)`).
- **Structured `ApiError`** with typed `kind` so you can `match ($e->kind) { ErrorKind::RateLimit => ... }` without parsing HTTP status codes.
- **Envelope-aware** — strips the `{"status":"success","data": ...}` wrapper before returning the inner payload.

### 📞 Complete API Coverage (73 operations)

[](#-complete-api-coverage-73-operations)

- **Numbers** — list, get, add, remove, route, translate, CNAM, LIDB, fax, forward, SMS, messaging campaigns, port-out PIN, account moves.
- **Account** — profile, sub-accounts, CDRs, credits, payments, MRC, registration, password recovery.
- **e911** — record provisioning, address validation, lookup, removal.
- **Gateways** — list, create, update, delete, view bound numbers.
- **Messaging** — SMS &amp; MMS sending, message history, 10DLC brand and campaign registration, per-number messaging state.
- **Lookups** — CNAM and LRN dips.
- **iNumbering** — inventory search, coverage queries, number orders, port-in submissions, port-out availability checks.
- **Support** — ticket create / read / update / delete, threaded messages, replies.
- **ACL** — IP allowlist management with structured 409 conflict bodies.
- **Authentication** — switch between Digest, IP-only, or hybrid modes; rotate passwords.

### 🧪 Battle-Tested

[](#-battle-tested)

- **101 unit tests** at **94%+ line coverage** with PHPUnit 10.
- **Mocked Guzzle** via `GuzzleHttp\Handler\MockHandler` — every method and every error path exercised, no network in CI.
- **Read-only integration scaffolding** gated by `VOICETEL_USERNAME` / `VOICETEL_PASSWORD` env vars.

### 📦 Clean Distribution

[](#-clean-distribution)

- Zero codegen footprint — every byte hand-written.
- Single Composer package, single namespace, no surprise transitive deps beyond Guzzle.

🚀 Installation
--------------

[](#-installation)

```
composer require voicetel/sdk
```

Requires PHP 8.1 or later and the `json` extension (bundled with PHP).

🏁 Quickstart
------------

[](#-quickstart)

```
