freshandsunny / labzbz-sms-sdk
Official PHP SDK for the labzbz SMS Platform Public API. Send SMS, manage contacts, and receive delivery webhooks against the brand-scoped /public/v1/* surface. See https://docs.labzbz.com/public-api for the full developer guide, HMAC signing spec, and webhook payload reference.
Requires
- php: ^8.1
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
This package is not auto-updated.
Last update: 2026-04-28 19:17:22 UTC
README
Official PHP SDK for the labzbz SMS Platform Public API at apisms.labzbz.com.
Install
composer require freshandsunny/labzbz-sms-sdk
Available on Packagist: https://packagist.org/packages/freshandsunny/labzbz-sms-sdk
Quick start
<?php
require 'vendor/autoload.php';
use SmsPlatformSdk\Configuration;
use SmsPlatformSdk\Api\PublicMessagesApi;
use SmsPlatformSdk\Model\SendTransactionalDto;
use GuzzleHttp\Client;
$config = Configuration::getDefaultConfiguration()
->setHost('https://apisms.labzbz.com/public/v1')
->setAccessToken(getenv('LABZBZ_API_KEY'));
$api = new PublicMessagesApi(new Client(), $config);
$dto = new SendTransactionalDto([
'to' => '+15551234567',
'text' => 'Your code is 1234',
'sender_id' => 'ACME',
]);
$result = $api->sendTransactional($dto);
echo $result->getMessageId();
Authentication
Brand-scoped API keys are issued from the brand-admin portal at
https://app.labzbz.com/brand-admin/public-api. Each key carries:
brandId— every request is scoped to that brandscopes[]— what the key is allowed to dosandboxMode— when true, gateway dispatch is skipped and synthetic DLRs are delivered ~2s later- optional
signingSecret— when set, every request must carry anx-signatureHMAC-SHA256 header (algorithm:sha256(${ts}.${rawBody})) - optional
ipAllowlist,rateLimitPerMinute,expiresAt
Docs
- API reference: https://apisms.labzbz.com/public/v1/docs
- Developer guide: https://docs.labzbz.com/public-api
- Webhook payloads: https://docs.labzbz.com/public-api/webhook-payloads
- Scopes: https://docs.labzbz.com/public-api/scopes
Versioning
Semantic versioning. Pre-1.0 minor bumps may include breaking changes —
pin to a specific ^0.x.y in production. Stability commitment lands at 1.0.
License
MIT