FITSMS v4 Documentation

Build business SMS into your application

Install the official FITSMS PHP SDK, initialize your v4 credentials, send messages, check account balance and query delivery status from PHP or Laravel applications.

Install SDK
composer require global-cloud-media/fitsms
01

Getting started

The current FITSMS v4 integration uses the official PHP package. Before you start, create a FITSMS account, obtain your v4 API token and make sure the Sender ID you intend to use is available for your account.

Requirements

  • A FITSMS account
  • A valid v4 API token
  • A Sender ID configured for your account
  • PHP / Laravel with Composer
Composer installation
composer require global-cloud-media/fitsms
02

Authentication & client setup

Initialize the SDK with your v4 API token and Sender ID. Keep API tokens on the server side and load them from environment variables in production rather than placing live credentials directly in source code.

Initialize FITSMS
use GlobalCloudMedia\FitSMS\FitSMS;

$apiToken = 'YOUR_V4_API_TOKEN';
$senderId = 'YourBrand';

$sms = new FitSMS($apiToken, $senderId);

API token

Treat the token as a secret. Do not expose it in browser-side JavaScript, public repositories or screenshots.

Sender ID

Use a Sender ID that is configured and approved for the intended message type and route.
03

Send an SMS

Use send() with the destination mobile number and message text. Store the returned response from successful sends; delivery-status workflows can use the message reference returned by the platform.

Send SMS
$response = $sms->send(
    '0761234567',
    'Hello from FITSMS!'
);

Before sending

Confirm the destination number, available balance, Sender ID and message content before triggering production traffic. Use a test account/message first when integrating a new workflow.
04

Check account balance

Use getBalance() before large or automated sends when your application needs to verify available SMS units.

Account balance
$balance = $sms->getBalance();
echo $balance['data']['sms_unit'];
05

Check delivery status

Use getStatus() with the FITSMS message reference (RUID) and destination number to reconcile a sent message.

Delivery status
$status = $sms->getStatus(
    'YOUR_RUID',
    '0761234567'
);
06

Delivery webhooks

FITSMS documentation in this project references delivery-status webhook support. The exact webhook payload and verification fields are not defined in the current website source, so this page does not invent a payload schema. Confirm the active webhook format in your FITSMS account/API resources before implementing production parsing.

Use HTTPS

Point callbacks to a secure HTTPS endpoint that your application controls.

Respond quickly

Keep callback processing lightweight and queue heavier business logic where appropriate.

Keep references

Store the FITSMS message reference so callbacks and manual status checks can be reconciled with your application record.
07

Integration checklist & troubleshooting

Authentication

Verify that the v4 API token loaded by your server is the intended credential.

Sender ID

Check that the Sender ID is configured for the account and message purpose.

Destination

Validate the customer mobile number before submitting an SMS request.

Balance

Use getBalance() when an automated workflow needs to confirm available SMS units.

Message reference

Save the response/reference from sent messages so delivery status can be reconciled later.

Production safety

Do not log live API tokens or expose credentials in frontend code or public repositories.

Ready to integrate FITSMS?

Explore the SMS API solution, review the official PHP SDK or contact the FITSMS team for integration support.

FitsMS.lk logo

FitSMS.lk is your reliable SMS marketing platform—perfect for businesses of any size to connect, engage, and grow with powerful bulk SMS solutions.

2026 © Copyrights by FIT SMS. Developed by Global Cloud Media (Pvt) Ltd