API Documentation

G K G Guru - Complete integration guide with code examples for all major programming languages

Getting Started

Welcome to the G K G Guru SMS Gateway API documentation. This guide will help you integrate our SMS services into your application.

Base URLs

  • Advanced API v2: https://whitelabled.securesmsc.com/api/v2
  • Legacy API: https://whitelabled.securesmsc.com/secure_api

Rate Limiting

API requests are rate limited per API key. Default limits are 60 requests per minute and 10,000 requests per day.

Authentication

All API requests require authentication using an API key. You can obtain an API key from your account dashboard.

Authorization Header
Authorization: Bearer YOUR_API_KEY

Send SMS

Send a single SMS message using the Advanced API v2.

POST https://whitelabled.securesmsc.com/api/v2/sms/send
Request Body (JSON)
{
  "sender_id": "SENDER",
  "recipient": "1234567890",
  "message": "Your message here",
  "route": "transactional",
  "dlt_entity_id": "1234567890123",
  "dlt_template_id": "1234567890123456789"
}
Response
{
  "success": true,
  "message": "SMS queued successfully",
  "data": {
    "message_id": "12345",
    "queue_id": "67890",
    "status": "queued",
    "estimated_delivery": "2025-10-26T10:30:00Z"
  }
}

Send Bulk SMS

Send SMS messages to multiple recipients in a single API call.

POST https://whitelabled.securesmsc.com/api/v2/sms/send-bulk
Request Body (JSON)
{
  "sender_id": "SENDER",
  "recipients": ["1234567890", "0987654321", "1122334455"],
  "message": "Bulk message to all recipients",
  "route": "promotional"
}

Code Examples

Ready-to-use code examples for sending SMS in different programming languages:

PHP Python JavaScript Node.js Java C# Ruby Go cURL
import requests
import json

url = "https://whitelabled.securesmsc.com/api/v2/sms/send"
api_key = "{{ YOUR_API_KEY }}"

headers = {
    "Authorization": f"Bearer {api_key}",
    "Content-Type": "application/json"
}

data = {
    "sender_id": "SENDER",
    "recipient": "1234567890",
    "message": "Your message here",
    "route": "transactional"
}

response = requests.post(url, headers=headers, json=data)
result = response.json()
print(json.dumps(result, indent=2))
const url = "https://whitelabled.securesmsc.com/api/v2/sms/send";
const apiKey = "{{ YOUR_API_KEY }}";

const data = {
    sender_id: "SENDER",
    recipient: "1234567890",
    message: "Your message here",
    route: "transactional"
};

fetch(url, {
    method: "POST",
    headers: {
        "Authorization": `Bearer ${apiKey}`,
        "Content-Type": "application/json"
    },
    body: JSON.stringify(data)
})
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.error("Error:", error));
const axios = require('axios');

const url = "https://whitelabled.securesmsc.com/api/v2/sms/send";
const apiKey = "{{ YOUR_API_KEY }}";

const data = {
    sender_id: "SENDER",
    recipient: "1234567890",
    message: "Your message here",
    route: "transactional"
};

axios.post(url, data, {
    headers: {
        'Authorization': `Bearer ${apiKey}`,
        'Content-Type': 'application/json'
    }
})
.then(response => {
    console.log(response.data);
})
.catch(error => {
    console.error('Error:', error.response.data);
});
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
import java.nio.charset.StandardCharsets;

public class SendSMS {
    public static void main(String[] args) throws Exception {
        String url = "https://whitelabled.securesmsc.com/api/v2/sms/send";
        String apiKey = "{{ YOUR_API_KEY }}";
        
        String jsonData = "{\"sender_id\":\"SENDER\",\"recipient\":\"1234567890\",\"message\":\"Your message here\",\"route\":\"transactional\"}";
        
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .header("Authorization", "Bearer " + apiKey)
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(jsonData))
            .build();
        
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

class Program {
    static async Task Main(string[] args) {
        string url = "https://whitelabled.securesmsc.com/api/v2/sms/send";
        string apiKey = "{{ YOUR_API_KEY }}";
        
        var data = new {
            sender_id = "SENDER",
            recipient = "1234567890",
            message = "Your message here",
            route = "transactional"
        };
        
        using var client = new HttpClient();
        client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiKey}");
        
        var json = JsonConvert.SerializeObject(data);
        var content = new StringContent(json, Encoding.UTF8, "application/json");
        
        var response = await client.PostAsync(url, content);
        var result = await response.Content.ReadAsStringAsync();
        Console.WriteLine(result);
    }
}
require 'net/http'
require 'json'
require 'uri'

url = URI("https://whitelabled.securesmsc.com/api/v2/sms/send")
api_key = "{{ YOUR_API_KEY }}"

data = {
    sender_id: "SENDER",
    recipient: "1234567890",
    message: "Your message here",
    route: "transactional"
}

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request['Authorization'] = "Bearer #{api_key}"
request['Content-Type'] = 'application/json'
request.body = data.to_json

response = http.request(request)
puts JSON.parse(response.body)
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
)

func main() {
    url := "https://whitelabled.securesmsc.com/api/v2/sms/send"
    apiKey := "{{ YOUR_API_KEY }}"
    
    data := map[string]interface{}{
        "sender_id": "SENDER",
        "recipient": "1234567890",
        "message": "Your message here",
        "route": "transactional",
    }
    
    jsonData, _ := json.Marshal(data)
    
    req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
    req.Header.Set("Authorization", "Bearer " + apiKey)
    req.Header.Set("Content-Type", "application/json")
    
    client := &http.Client{}
    resp, _ := client.Do(req)
    defer resp.Body.Close()
    
    var result map[string]interface{}
    json.NewDecoder(resp.Body).Decode(&result)
    fmt.Println(result)
}
curl -X POST "https://whitelabled.securesmsc.com/api/v2/sms/send" \
  -H "Authorization: Bearer {{ YOUR_API_KEY }}" \
  -H "Content-Type: application/json" \
  -d '{
    "sender_id": "SENDER",
    "recipient": "1234567890",
    "message": "Your message here",
    "route": "transactional"
  }'

Detailed Language Guides

Click on any language below to view comprehensive integration guides with advanced examples:

PHP

Complete PHP examples using cURL, Guzzle, and Laravel integration.

View PHP Guide
Python

Python examples with requests library, Django, and Flask integration.

View Python Guide
JavaScript

JavaScript examples using Fetch API and modern async/await.

View JS Guide
Node.js

Node.js examples using Axios and Express.js integration.

View Node.js Guide
Java

Java examples using HttpClient and Spring Boot integration.

View Java Guide
C# .NET

C# examples using HttpClient and ASP.NET Core integration.

View C# Guide
Ruby

Ruby examples using Net::HTTP and Ruby on Rails integration.

View Ruby Guide
Go

Go examples using the standard net/http package.

View Go Guide
cURL

Command-line examples and bash scripts for quick testing.

View cURL Guide
Swift

Swift examples using URLSession for iOS and macOS integration.

View Swift Guide
Kotlin

Kotlin examples using OkHttp and Retrofit for Android integration.

View Kotlin Guide
Rust

Rust examples using reqwest and tokio for async HTTP requests.

View Rust Guide
TypeScript

TypeScript examples with type definitions and modern async patterns.

View TypeScript Guide
Perl

Perl examples using LWP::UserAgent and legacy Perl 5 integration.

View Perl Guide
VB.NET

Visual Basic .NET examples using HttpClient and ASP.NET integration.

View VB.NET Guide
Scala

Scala examples using Akka HTTP and Play Framework integration.

View Scala Guide
R

R examples using httr and RCurl packages for data science workflows.

View R Guide
Dart

Dart examples using http package for Flutter and web applications.

View Dart Guide
Lua

Lua examples using LuaSocket and Lua-cURL for embedded systems.

View Lua Guide
PowerShell

PowerShell examples using Invoke-RestMethod for Windows automation.

View PowerShell Guide
Bash

Bash shell script examples using curl for Linux/Unix automation.

View Bash Guide
Objective-C

Objective-C examples using NSURLSession for legacy iOS/macOS apps.

View Objective-C Guide

Functional Languages

Elixir

Elixir examples using HTTPoison for Phoenix and OTP applications.

View Elixir Guide
F#

F# examples using FSharp.Data for functional .NET development.

View F# Guide
Haskell

Haskell examples using http-client for pure functional programming.

View Haskell Guide
OCaml

OCaml examples using Cohttp for strongly-typed functional code.

View OCaml Guide
Clojure

Clojure examples using clj-http for Lisp-based JVM integration.

View Clojure Guide
Erlang

Erlang examples using httpc for highly concurrent systems.

View Erlang Guide
Racket

Racket examples using net/http-client for Scheme-based development.

View Racket Guide
Prolog

Prolog examples using http_client for logic programming.

View Prolog Guide

JVM Languages

Groovy

Groovy examples using HTTPBuilder for JVM scripting.

View Groovy Guide

Systems & Low-Level Languages

Crystal

Crystal examples using HTTP::Client for fast compiled code.

View Crystal Guide
Nim

Nim examples using httpclient for efficient systems code.

View Nim Guide
Zig

Zig examples using std.http for modern systems programming.

View Zig Guide

Scientific Computing

Julia

Julia examples using HTTP.jl for data science workflows.

View Julia Guide
MATLAB

MATLAB examples using webwrite for engineering applications.

View MATLAB Guide
LabVIEW

LabVIEW integration using HTTP VIs for test & measurement.

View LabVIEW Guide

Enterprise & Legacy

COBOL

COBOL integration for mainframe SMS functionality.

View COBOL Guide
Fortran

Fortran examples using cURL bindings for HPC environments.

View Fortran Guide
ABAP

ABAP examples using HTTP_CLIENT for SAP systems.

View ABAP Guide
Apex

Apex examples for native Salesforce development.

View Apex Guide

Blockchain & Web3

Solidity

Trigger SMS from smart contracts using oracles.

View Solidity Guide

Application & Plugin Integration Guides

Click on any application or plugin below to view comprehensive integration guides with step-by-step instructions:

Salesforce

Salesforce integration using Apex classes and Flow automation.

View Salesforce Guide
WordPress

WordPress plugin development and integration with WooCommerce.

View WordPress Guide
Shopify

Shopify app integration using webhooks and Liquid templates.

View Shopify Guide
Magento

Magento 2 extension development and module integration.

View Magento Guide
WooCommerce

WooCommerce plugin for order notifications and customer SMS.

View WooCommerce Guide
Drupal

Drupal module development for SMS notifications and alerts.

View Drupal Guide
Joomla

Joomla extension for SMS integration and user notifications.

View Joomla Guide
PrestaShop

PrestaShop module for order confirmations and customer SMS.

View PrestaShop Guide
OpenCart

OpenCart extension for SMS notifications and marketing campaigns.

View OpenCart Guide
Zendesk

Zendesk app integration for ticket notifications via SMS.

View Zendesk Guide
HubSpot

HubSpot integration for marketing automation and SMS campaigns.

View HubSpot Guide
Mailchimp

Mailchimp integration for SMS marketing and customer engagement.

View Mailchimp Guide
Zapier

Zapier integration for automated workflows and SMS triggers.

View Zapier Guide
Power Automate

Microsoft Power Automate integration for business process automation.

View Power Automate Guide
IFTTT

IFTTT applet integration for SMS automation and triggers.

View IFTTT Guide
Slack

Slack app integration for SMS notifications and alerts.

View Slack Guide
Discord

Discord bot integration for SMS notifications and commands.

View Discord Guide
Telegram

Telegram bot integration for SMS alerts and notifications.

View Telegram Guide
WhatsApp

WhatsApp Business API integration and migration guide.

View WhatsApp Guide
Twilio

Migration guide from Twilio to our SMS API platform.

View Twilio Guide
Microsoft Dynamics

Microsoft Dynamics CRM integration for SMS notifications.

View Dynamics Guide
SAP

SAP integration for enterprise SMS notifications and alerts.

View SAP Guide
Oracle

Oracle Cloud integration for SMS notifications and workflows.

View Oracle Guide
NetSuite

NetSuite SuiteScript integration for SMS notifications.

View NetSuite Guide
QuickBooks

QuickBooks integration for invoice and payment SMS notifications.

View QuickBooks Guide
Xero

Xero integration for accounting SMS notifications and alerts.

View Xero Guide
Monday.com

Monday.com integration for project management SMS notifications.

View Monday.com Guide
Asana

Asana integration for task management SMS notifications.

View Asana Guide
Trello

Trello Power-Up integration for board SMS notifications.

View Trello Guide

Cloud Platforms

AWS

Lambda, SNS, and CloudWatch integration for SMS alerts.

View AWS Guide
Google Cloud

Cloud Functions and Pub/Sub SMS integration.

View GCP Guide
Azure

Azure Functions and Logic Apps SMS integration.

View Azure Guide
Firebase

Cloud Functions for mobile backend SMS integration.

View Firebase Guide
Supabase

Database triggers and Edge Functions for SMS.

View Supabase Guide
Vercel

Serverless and Edge Functions for SMS notifications.

View Vercel Guide

DevOps & CI/CD

GitHub Actions

CI/CD pipeline notifications via SMS.

View GitHub Guide
GitLab CI

Pipeline and deployment SMS notifications.

View GitLab Guide
Jenkins

Build status and deployment SMS alerts.

View Jenkins Guide
Jira

Issue tracking and sprint SMS notifications.

View Jira Guide
Confluence

Page updates and mentions via SMS.

View Confluence Guide

Monitoring & Observability

Datadog

Infrastructure monitoring SMS alerts.

View Datadog Guide
PagerDuty

On-call and incident alerts via SMS.

View PagerDuty Guide
Grafana

Dashboard alerts and metric notifications via SMS.

View Grafana Guide
Prometheus

Alertmanager integration for metric-based SMS alerts.

View Prometheus Guide
Elasticsearch

Log-based alerts using Watcher and SMS.

View Elasticsearch Guide

CRM & Sales

Zoho CRM

Sales notifications and customer engagement via SMS.

View Zoho Guide
Pipedrive

Deal notifications and sales pipeline SMS updates.

View Pipedrive Guide
Freshdesk

Customer support ticket notifications via SMS.

View Freshdesk Guide
Intercom

Customer messaging with SMS fallback.

View Intercom Guide

Marketing & Email

ActiveCampaign

Marketing automation with SMS campaigns.

View ActiveCampaign Guide
SendGrid

Email + SMS multi-channel messaging.

View SendGrid Guide

Productivity & Collaboration

Airtable

Database automation with SMS notifications.

View Airtable Guide
Notion

Workspace automation with SMS alerts.

View Notion Guide
ClickUp

Project management with SMS notifications.

View ClickUp Guide

Payments & Finance

Stripe

Payment confirmations and subscription alerts.

View Stripe Guide
PayPal

IPN notifications and payment alerts via SMS.

View PayPal Guide
Square

POS notifications and receipts via SMS.

View Square Guide
Razorpay

Indian payment notifications via SMS.

View Razorpay Guide

Automation Platforms

Make (Integromat)

Advanced automation scenarios with SMS.

View Make Guide
n8n

Self-hosted workflow automation with SMS.

View n8n Guide

Scheduling & Forms

Calendly

Meeting reminders and booking confirmations.

View Calendly Guide
Typeform

Form submission notifications via SMS.

View Typeform Guide
Google Sheets

Spreadsheet automation with Apps Script SMS.

View Google Sheets Guide

Extended API v2 Endpoints

Additional API v2 endpoints for template management, contact groups, bulk jobs, and real-time account status.

Template Management

GET https://whitelabled.securesmsc.com/api/v2/templates/list

List all templates for the authenticated user.

Query Parameters
per_pageItems per page (default: 25, max: 100)
statusFilter by status (pending, approved, rejected)
GET https://whitelabled.securesmsc.com/api/v2/templates/{id}

Get a specific template by ID.

POST https://whitelabled.securesmsc.com/api/v2/templates

Create a new template (draft — requires admin approval).

{
  "name": "Welcome Template",
  "content": "Hello {#var#}, welcome to our service!",
  "dlt_template_id": "1234567890123456789",
  "entity_id": "1234567890123"
}

Contact Group Management

GET https://whitelabled.securesmsc.com/api/v2/groups

List all contact groups for the authenticated user.

POST https://whitelabled.securesmsc.com/api/v2/groups

Create a new contact group.

{
  "name": "VIP Customers",
  "description": "Premium tier customers"
}
DELETE https://whitelabled.securesmsc.com/api/v2/groups/{id}

Delete a contact group.

GET https://whitelabled.securesmsc.com/api/v2/groups/{id}/contacts

List contacts in a specific group. Supports pagination.

Query Parameters
per_pageItems per page (default: 50, max: 200)

Bulk SMS Jobs

GET https://whitelabled.securesmsc.com/api/v2/jobs

List all bulk SMS jobs for the authenticated user.

GET https://whitelabled.securesmsc.com/api/v2/jobs/{id}

Get detailed job status with delivery summary.

{
  "status": "success",
  "data": {
    "job": { "id": 1, "status": "completed", "batch_id": "..." },
    "delivery_summary": {
      "total": 1000,
      "delivered": 950,
      "failed": 30,
      "pending": 20
    }
  }
}

Real-time Status

GET https://whitelabled.securesmsc.com/api/v2/account/status

Get real-time account status including today's stats, credit balance, and pending items.

{
  "status": "success",
  "data": {
    "credit_balance": 5000,
    "today": {
      "total_sent": 250,
      "delivered": 230,
      "failed": 10,
      "credits_used": 250.0
    },
    "pending": {
      "templates": 2,
      "sender_ids": 1
    },
    "account_status": "active",
    "server_time": "2026-03-07T16:00:00+00:00"
  }
}
GET https://whitelabled.securesmsc.com/api/v2/delivery/{messageId}

Get delivery report for a specific message.

{
  "status": "success",
  "data": {
    "message_id": "abc123",
    "mobile": "1234567890",
    "status": "delivered",
    "delivery_time": "2026-03-07T16:01:30Z",
    "sent_time": "2026-03-07T16:00:00Z",
    "sender_id": "SENDER",
    "credit": 1.0,
    "route": "transactional"
  }
}

Keyword Management

GET https://whitelabled.securesmsc.com/api/v2/keywords

List all keywords for the authenticated user.

GET https://whitelabled.securesmsc.com/api/v2/keywords/{id}

Get a specific keyword with its received entries.

POST https://whitelabled.securesmsc.com/api/v2/keywords

Create a new keyword (pending approval).

{
  "key": "INFO",
  "response_type": "static",
  "static_message": "Thanks for your inquiry!"
}

Credit Management

GET https://whitelabled.securesmsc.com/api/v2/credits

Get detailed credit balance, usage, and flood status.

{
  "status": "success",
  "data": {
    "balance": 5000,
    "international_credit": 200,
    "today_used": 150.0,
    "month_used": 3200.0,
    "flood_current": 50,
    "flood_limit": 10000,
    "recent_credits": [...]
  }
}
GET https://whitelabled.securesmsc.com/api/v2/credits/history

Get daily credit usage history.

Query Parameters
daysNumber of days (default: 30, max: 90)
POST https://whitelabled.securesmsc.com/api/v2/credits/transfer

Transfer credits to another user.

{
  "recipient_username": "john_doe",
  "amount": 500,
  "description": "Monthly allocation"
}
GET https://whitelabled.securesmsc.com/api/v2/sender-ids/list

List all sender ID requests for the authenticated user.

HTTP API (Legacy Compatible)

These endpoints use the same URL format as the original platform. You can switch your API base URL from dev.smsc.biz to www.whitelabled.securesmsc.com without any other code changes.

Authentication: All HTTP API endpoints use username + password query parameters, or an api_key / apikey parameter.

Send SMS

GET POST /httpapi/send
Parameters
ParameterRequiredDescription
usernameYes*Account username
passwordYes*Account password
api_keyYes*API key (alternative to username/password)
sender_idYesApproved sender ID (e.g. SMSCIN) or PROMOTIONAL
routeYesT (Transactional), P (Promotional), PS (Promo with SID), I (International), V (Voice)
phonenumberYes10-digit mobile number (India). Comma-separated for multiple.
messageYesURL-encoded message text (approved template for transactional)
typeNo2 for Unicode (message must be UTF-16BE hex)
textNoAlternative to message — hybrid mode, supports URL-encoded Unicode
scheduleNoSchedule time in YYYY-MM-DD HH:MM:SS format

* Either username+password or api_key is required.

Example — Transactional SMS
GET https://www.whitelabled.securesmsc.com/httpapi/send?username=USERNAME&password=PASSWORD&sender_id=SMSCIN&route=T&phonenumber=9876543210&message=Your%20OTP%20is%20123456
Example — Scheduled SMS
GET https://www.whitelabled.securesmsc.com/httpapi/send?username=USERNAME&password=PASSWORD&sender_id=SMSCIN&route=T&schedule=2026-03-08%2010:00:00&phonenumber=9876543210&message=Scheduled%20message
Example — Promotional SMS
GET https://www.whitelabled.securesmsc.com/httpapi/send?username=USERNAME&password=PASSWORD&sender_id=PROMOTIONAL&route=P&phonenumber=9876543210&message=Special%20offer%20for%20you
Response
Success: 123_abc456def_1709830000  (Broadcast ID)
Error:   -7  (Authentication failed)

Get Credit Balance

GET /api/getcredits
Parameters

username + password, or api_key

Example
GET https://www.whitelabled.securesmsc.com/api/getcredits?username=USERNAME&password=PASSWORD
Response
49250

Delivery Status (DLR)

GET /api/smsdlr
Parameters
ParameterDescription
username / passwordAccount credentials
phonenumberRecipient mobile number
broadcastidBroadcast ID from send response
dateDate in YYYYMMDD format
Response
delivered | submitted | failed | -15 (not found)

Get Templates

GET /httpapi/gettemplate

username + password — Returns JSON array of approved templates.

Create Template

GET POST /api/template
Parameters
ParameterDescription
username / passwordAccount credentials
sender_idApproved sender ID
template_nameTemplate name
template_messageTemplate message content
dlt_template_idDLT template ID
notesNotes (optional)
Response
123_456  (user_id + template_id)

User Status & MIS Report

GET /httpapi/getuserstatus

Returns account status: active, inactive, blocked

GET /httpapi/getmisreport

Returns JSON array of MIS report records. Supports limit, offset, sender_id filters.

XML API

POST /xmlapi/send

Send SMS via XML payload. POST raw XML in xmlstring form parameter.

XML Format
<pushsms>
  <username>USERNAME</username>
  <password>PASSWORD</password>
  <senderid>SMSCIN</senderid>
  <messages>
    <message pno="9876543210" msg="Hello from XML API"></message>
    <message pno="9876543211" msg="Second message"></message>
  </messages>
</pushsms>

Voice SMS API

GET /voicecall/v1/send
Parameters
ParameterDescription
apikeyYour API key
fromSender number (approved)
toRecipient phone number
textMessage text (text-to-speech)
Example
GET https://www.whitelabled.securesmsc.com/voicecall/v1/send?apikey=YOUR_KEY&from=9876543210&to=9876543211&text=Your%20OTP%20is%20123456
Alternative Endpoints
  • POST /voicecall/v1/post/send — Same parameters via POST
  • POST /voicecall/v1/jpost/send — JSON body format

Email API

POST /httpemailapi/v1/send
Parameters (POST)
ParameterDescription
api_keyYour API key
fromSender name and email (approved domain)
toRecipient email address
ccCC recipients (optional)
subjectEmail subject
htmlEmail body content (HTML)
attachmentFile attachment (optional, multipart)

Webhooks & Callbacks

Receive real-time delivery notifications and status updates via webhooks.

Delivery Reports

Configure a webhook URL in your dashboard to receive delivery status updates:

{
  "event": "delivery_report",
  "message_id": "12345",
  "status": "delivered",
  "delivered_at": "2025-01-07T10:30:00Z",
  "recipient": "1234567890"
}
Inbound SMS

Receive incoming SMS messages on your virtual numbers:

{
  "event": "inbound_sms",
  "from": "1234567890",
  "to": "9876543210",
  "message": "Reply message content",
  "received_at": "2025-01-07T10:35:00Z"
}
Webhook Security: All webhooks include a signature header (X-SMS-Signature) for verification. Use your API secret to validate the HMAC-SHA256 signature.

Official SDKs & Libraries

Use our official SDKs for faster integration with your preferred programming language:

PHP SDK

Composer package with Laravel support

composer require smsgateway/php-sdk View on GitHub
Python SDK

PyPI package with async support

pip install smsgateway-sdk View on GitHub
Node.js SDK

NPM package with TypeScript types

npm install @smsgateway/sdk View on GitHub
Java SDK

Maven/Gradle package

com.smsgateway:sdk:1.0.0 View on GitHub
Ruby Gem

Ruby gem with Rails integration

gem install smsgateway View on GitHub
Go Module

Go module with context support

go get github.com/smsgateway/go-sdk View on GitHub

Testing & Sandbox

Test your integration without sending real SMS messages.

Sandbox Mode

Enable sandbox mode by adding the sandbox parameter to your requests:

{
  "sender_id": "SENDER",
  "recipient": "1234567890",
  "message": "Test message",
  "sandbox": true
}
  • No actual SMS is sent
  • No credits are deducted
  • Full response simulation
  • Webhook callbacks are still triggered
Test Numbers

Use these test numbers to simulate different scenarios:

Number Simulated Result
+1555000001 Delivered
+1555000002 Pending
+1555000003 Failed
+1555000004 Bounced
Important: Sandbox mode is only available on test API keys. Production API keys will always send real messages.

Error Codes

All API endpoints return these standard error codes as plain text responses:

SMS API Error Codes

Code Type Description
-1APIMissing User ID / API Key
-2APIMissing Password
-3APIReserved
-4APIMissing Sender ID
-5APIMissing / Invalid Mobile Number
-6APIMissing Message Text
-7APIAuthentication Failed
-8APIContent Not Allowed
-9XML APIMalformed XML Data Received
-10APIInvalid Sender ID or Route
-11APIMobile Number in DND
-12APICredit Not Available
-13APIFlood Limit Not Sufficient
-14APIInternal Error
-15DLR APIInvalid Broadcast ID / Phone Number
-16APIUser Account Locked
-17APIInvalid Route ID (T/P/PS/I/V)
-18APIInvalid Route or Sender ID Mapping
-19APIRoute or Sender ID Not Approved
-20APIInternational SMS Not Enabled
-21APIInternational Credit Not Available
-22APIPromo with Sender ID Not Enabled
-31APIDLT Entity ID Not White-listed
-32APIDLT Header ID Not White-listed
-40HybridUnicode not allowed in message param — use text param or type=2 with UTF-16BE

Voice SMS Error Codes

Code Description
-1Missing API Key
-4Missing Sender (From)
-5Missing Mobile Number (To)
-6Missing Message Text
-7Authentication Failed
-10Invalid Sender or Route
-12Credit Not Available
-14Internal Error
Get Started
Start Your SMS Journey
Instant Setup
200+ Countries
99.9% Uptime
Start Free Trial No credit card required • 100 free SMS
10,000+ Developers
1M+ SMS/Day
4.9/5 Rating

Wait! Don't Miss Out

Get 100 free SMS credits when you sign up today!

No credit card required
5-minute integration
24/7 developer support
Claim Your Free Credits

Or call us: +1-555-0123

How can we help?

Sales
Support
CAPTCHA
Type the 4 characters shown in the image