PHPackages                             origyns/terrareach-sms-php - 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. origyns/terrareach-sms-php

ActiveLibrary

origyns/terrareach-sms-php
==========================

Official PHP SDK for the TerraReach SMS Gateway.

v1.1.0(3mo ago)02MITPHPPHP ^8.0

Since Jan 30Pushed 3mo agoCompare

[ Source](https://github.com/OrigynCompany/terrareach-sms-php)[ Packagist](https://packagist.org/packages/origyns/terrareach-sms-php)[ RSS](/packages/origyns-terrareach-sms-php/feed)WikiDiscussions main Synced 1mo ago

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

TerraReach PHP SDK
==================

[](#terrareach-php-sdk)

[![Latest Stable Version](https://camo.githubusercontent.com/9317f829d0a4b139f8f89f85db0987c3cc44cfaf00ad23e920130eda289e1f67/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f726967796e732f746572726172656163682d736d732d7068702e737667)](https://packagist.org/packages/origyns/terrareach-sms-php)[![License](https://camo.githubusercontent.com/cfec5b988d45c8fa000ebd50c196d1c818b821b27188f7a495b4d9a6e80dd728/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6f726967796e732f746572726172656163682d736d732d7068702e737667)](https://packagist.org/packages/origyns/terrareach-sms-php)

**SMS for Developers and Marketers.** The official PHP SDK for the [TerraReach](https://terrareach.com) SMS Gateway, built for speed, simplicity, and reliability in the Sri Lankan market.

---

Features
--------

[](#features)

- **Single SMS:** Send high-priority messages to individuals.
- **Bulk SMS:** Send to thousands of recipients in a single API call.
- **Account Stats:** Real-time balance and usage monitoring.
- **Minimalist Design:** Clean PSR-4 implementation with a short, readable namespace.

---

Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require origyns/terrareach-sms-php
```

---

Quick Start
-----------

[](#quick-start)

### 1. Initialize the Client

[](#1-initialize-the-client)

You need your API Key and your approved Sender ID (Mask).

```
require 'vendor/autoload.php';

use TerraReach\Client;

$apiKey = 'your_api_key_here';
$mask = 'SenderID';

$terra = new Client($apiKey, $mask);
```

### 2. Send a Single SMS

[](#2-send-a-single-sms)

```
```php
$response = $terra->sendSms('94771234567', 'Hello from TerraReach!');

// You can also override the default mask for a specific message
$response = $terra->sendSms('94771234567', 'OTP: 1234', 'OTPMASK');

if ($response['status'] === 'success') {
    echo "Message sent!";
}
```

### 3. Send Bulk SMS

[](#3-send-bulk-sms)

Pass an array of phone numbers. The SDK automatically handles the plural payload requirements.

```
$numbers = ['94771234567', '94777654321', '94711223344'];
$terra->sendBulkSms($numbers, 'This is a broadcast message.');
```

### 4. Check Balance &amp; Stats

[](#4-check-balance--stats)

```
$stats = $terra->getStats();
echo "Your current balance is: " . $stats['balance'];
```

---

API Reference
-------------

[](#api-reference)

MethodParametersDescription`sendSms()``$phoneNumber`, `$message`, `$mask`Sends a single SMS to a string phone number.`sendBulkSms()``array $phoneNumbers`, `$message`, `$mask`Sends SMS to an array of phone numbers.`getStats()`noneReturns account usage and balance.---

Security
--------

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

---

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

---

Made with ❤️ by ORIGYN

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance80

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

106d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d9a86256c1ac1e7ad5683caf96507c1105242c9998047540468cd7c1ba2794b?d=identicon)[chameera](/maintainers/chameera)

---

Top Contributors

[![chameerapre](https://avatars.githubusercontent.com/u/67196778?v=4)](https://github.com/chameerapre "chameerapre (2 commits)")

### Embed Badge

![Health badge](/badges/origyns-terrareach-sms-php/health.svg)

```
[![Health](https://phpackages.com/badges/origyns-terrareach-sms-php/health.svg)](https://phpackages.com/packages/origyns-terrareach-sms-php)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
