Logo

Get Click Media

AI Communication Platform

Trusted by 10,000+ businesses

Bulk SMS

REST SMS API Guide: Endpoints, Authentication & Response Formats (2026)

Complete REST SMS API reference for Indian businesses. Covers base URLs, API key authentication, request and response schemas, error codes, rate limits, delivery report webhooks, and production best practices.

Get Click Media6 min read
REST SMS API Guide: Endpoints, Authentication & Response Formats (2026)

A REST SMS API provides a standardised, language-agnostic interface for integrating SMS messaging into any application. This guide documents the full API surface — endpoints, authentication, request/response schemas, error handling, webhooks, and rate limits — so your team can move from sandbox to production in hours, not days.

Base URL and API Versioning

All API requests are made over HTTPS to prevent credential interception. The current API version is v1.

Base URL: https://api.getclickmedia.com/v1

Never call HTTP (non-secure) endpoints in production. Requests to the HTTP base URL are rejected with a 301 Redirect pointing to the HTTPS equivalent.

Authentication

The API uses API Key authentication. Pass your key in the x-api-key request header on every call.

x-api-key: gcm_live_xxxxxxxxxxxxxxxxxxxxxxxx

API Key Types

Key PrefixEnvironmentDescription
gcm_live_ProductionSends real SMS; charges apply
gcm_test_SandboxSimulates responses; no actual delivery

Always develop and test with a sandbox key. Switch to the live key only at deployment time.

How to Obtain Your API Key

Log in to the Get Click Media dashboard → SettingsAPI KeysGenerate New Key. Keys are shown only once at creation — copy and store them securely.

Endpoints Reference

POST /sms/send — Send a Single SMS

Sends one SMS to a single recipient.

Request Headers

Content-Type: application/json
x-api-key: gcm_live_xxxx

Request Body

{
  "to": "919876543210",
  "message": "Your order ORD-9921 has been confirmed. Expected delivery: 25 Jun. — GCMDIA",
  "senderId": "GCMDIA",
  "templateId": "1007161234567890123",
  "type": "transactional"
}
FieldTypeRequiredDescription
tostringYesRecipient mobile in E.164 format (91 + 10-digit number)
messagestringYesFull message text matching the DLT template exactly
senderIdstringYesDLT-registered 6-character header
templateIdstringYesDLT template ID from your approved template
typestringYestransactional or promotional
unicodebooleanNoSet true for non-ASCII characters (regional languages)
scheduleAtstringNoISO 8601 datetime to schedule delivery; omit for immediate

Success Response — HTTP 200

{
  "messageId": "gcm_msg_1a2b3c4d5e",
  "to": "919876543210",
  "status": "queued",
  "queuedAt": "2026-06-23T10:30:00Z",
  "credits": 1
}

POST /sms/bulk — Send Bulk SMS

Sends the same message to multiple recipients in a single call. Accepts up to 10,000 recipients per request.

Request Body

{
  "recipients": [
    "919876543210",
    "918765432109",
    "917654321098"
  ],
  "message": "Flash Sale! 40% off sitewide till midnight. Shop now: https://example.com — GCMDIA",
  "senderId": "GCMDIA",
  "templateId": "1007161234567890124",
  "type": "promotional",
  "scheduleAt": "2026-06-24T09:00:00+05:30"
}

Success Response — HTTP 200

{
  "batchId": "gcm_batch_xyz789",
  "total": 3,
  "queued": 3,
  "failed": 0,
  "scheduledAt": "2026-06-24T09:00:00+05:30",
  "estimatedCredits": 3
}

GET /sms/status/{messageId} — Get Delivery Status

Retrieves the delivery status of a single message.

Request

GET /v1/sms/status/gcm_msg_1a2b3c4d5e
x-api-key: gcm_live_xxxx

Response

{
  "messageId": "gcm_msg_1a2b3c4d5e",
  "to": "919876543210",
  "status": "delivered",
  "queuedAt": "2026-06-23T10:30:00Z",
  "sentAt": "2026-06-23T10:30:01Z",
  "deliveredAt": "2026-06-23T10:30:02Z",
  "operator": "Jio",
  "credits": 1
}

Status Values

StatusMeaning
queuedAccepted, waiting in gateway queue
dispatchedSubmitted to carrier
deliveredConfirmed receipt by handset
failedDelivery failed; check failReason
rejectedBlocked at operator — template mismatch or DLT issue

GET /sms/batch/{batchId} — Get Batch Status

Returns aggregate delivery stats for a bulk campaign.

Response

{
  "batchId": "gcm_batch_xyz789",
  "total": 1000,
  "delivered": 967,
  "failed": 18,
  "pending": 15,
  "deliveryRate": "96.7%",
  "completedAt": null
}

GET /account/balance — Check Credit Balance

GET /v1/account/balance
x-api-key: gcm_live_xxxx

Response

{
  "credits": 48250,
  "plan": "Growth",
  "expiresAt": "2026-12-31"
}

DELETE /sms/schedule/{batchId} — Cancel a Scheduled Batch

Cancels a scheduled bulk send before the scheduleAt time.

DELETE /v1/sms/schedule/gcm_batch_xyz789
x-api-key: gcm_live_xxxx
{ "cancelled": true, "batchId": "gcm_batch_xyz789" }

Webhooks — Real-Time Delivery Reports

Instead of polling, configure a webhook URL in your dashboard. The API POSTs a delivery receipt for every status change.

Webhook Payload Structure

{
  "event": "sms.delivered",
  "messageId": "gcm_msg_1a2b3c4d5e",
  "batchId": null,
  "to": "919876543210",
  "status": "delivered",
  "operator": "Airtel",
  "queuedAt": "2026-06-23T10:30:00Z",
  "deliveredAt": "2026-06-23T10:30:02Z"
}

Webhook Event Types

EventTrigger
sms.queuedMessage accepted by gateway
sms.dispatchedSent to carrier
sms.deliveredConfirmed delivered to handset
sms.failedDelivery failed
sms.rejectedBlocked — template or DLT issue

Verify Webhook Authenticity (HMAC)

All webhook requests include an x-gcm-signature header. Validate it:

import crypto from "crypto";

const isValidWebhook = (payload, signature) => {
  const expected = crypto
    .createHmac("sha256", process.env.GCM_WEBHOOK_SECRET)
    .update(JSON.stringify(payload))
    .digest("hex");
  return crypto.timingSafeEqual(
    Buffer.from(expected),
    Buffer.from(signature)
  );
};

Error Codes Reference

HTTP CodeError CodeCause
400INVALID_NUMBERPhone number fails E.164 validation
400MISSING_FIELDRequired field absent from request body
401INVALID_API_KEYKey not found or revoked
403ROUTE_FORBIDDENAccount not authorised for this message type
422TEMPLATE_MISMATCHMessage text doesn't match DLT template
422SENDER_NOT_REGISTEREDSender ID not in approved state on DLT
429RATE_LIMIT_EXCEEDEDToo many requests; honour Retry-After header
500GATEWAY_ERRORUpstream carrier issue; retry with backoff

Error Response Body

{
  "error": {
    "code": "TEMPLATE_MISMATCH",
    "message": "The message body does not match DLT template 1007161234567890123. Check variable count and static text.",
    "requestId": "req_abc123"
  }
}

Rate Limits

PlanRequests/SecondBulk Recipients/Request
Starter10 RPS1,000
Growth100 RPS5,000
Enterprise500+ RPS10,000

When a 429 is returned, read the Retry-After response header (seconds) before retrying.

SDK Quick Start

Get Click Media provides official SDKs to eliminate boilerplate:

npm install @getclickmedia/sms-sdk      # Node.js
pip install getclickmedia               # Python
composer require getclickmedia/sms-php  # PHP
import { SmsClient } from "@getclickmedia/sms-sdk";

const client = new SmsClient({ apiKey: process.env.GCM_API_KEY });

const result = await client.send({
  to: "919876543210",
  message: "Your OTP is 482910. Valid for 10 minutes. — GCMDIA",
  senderId: "GCMDIA",
  templateId: process.env.GCM_TEMPLATE_ID,
  type: "transactional",
});

Summary

The Get Click Media REST SMS API follows industry-standard conventions: HTTPS-only, API key authentication, JSON payloads, and webhook delivery reports. Single-message and bulk endpoints cover all use cases from OTP delivery to million-recipient campaigns. Start with the sandbox environment, validate your DLT templates, then flip to production — the same code runs unchanged.

Generate your API key or read the full API reference.

REST SMS API IndiaSMS API endpoints IndiaSMS API authenticationSMS API request response formatSMS API error codesSMS REST API documentation IndiaSMS API rate limitsSMS gateway REST API

Frequently Asked Questions

A REST SMS API is a web service that follows REST (Representational State Transfer) conventions — using standard HTTP verbs (GET, POST, DELETE), JSON request/response bodies, and stateless authentication — to send, receive, and track SMS messages programmatically. It is the most widely adopted interface for integrating SMS into web and mobile applications.

Most SMS REST APIs use API key authentication. You pass a unique API key in the request header — typically as 'x-api-key: YOUR_KEY' or 'Authorization: Bearer YOUR_KEY'. Some providers also support Basic Auth (base64-encoded username:password). API keys should be stored as environment variables and never committed to source code.

Sending an SMS uses an HTTP POST request. The recipient number, message body, sender ID, template ID, and message type are passed as a JSON payload in the request body. GET requests are used for status lookups and account balance checks.

A successful SMS API response returns HTTP 200 with a JSON body containing a unique messageId, a status field (typically 'queued'), and timestamps. The messageId is used to poll for delivery status or correlate webhook callbacks. Error responses include an HTTP 4xx/5xx status and a JSON body with an error code and descriptive message.

Rate limits vary by provider and plan. Entry-level plans typically allow 10–50 requests per second (RPS). High-volume enterprise plans support 500+ RPS. For bulk campaigns, use the batch send endpoint which accepts up to 10,000 recipients per request and manages throughput internally.

Related Articles

SMPP SMS Gateway Guide for India (2026) — Protocol, Bindings & Best Practices
Bulk SMS

SMPP SMS Gateway Guide for India (2026) — Protocol, Bindings & Best Practices

Learn how the SMPP protocol works for high-volume SMS delivery in India. Covers SMPP bind types, PDU structure, session management, throughput tuning, DLT compliance over SMPP, and when to choose SMPP over REST API.

7 min read
SMS API CRM Integration Guide (2026) — Salesforce, HubSpot, Zoho & Custom CRMs
Bulk SMS

SMS API CRM Integration Guide (2026) — Salesforce, HubSpot, Zoho & Custom CRMs

Step-by-step guide to integrating an SMS API with popular CRMs including Salesforce, HubSpot, Zoho CRM, and custom systems. Covers webhooks, contact sync, automated workflows, DLT compliance, and two-way SMS from your CRM.

7 min read
SMS API for E-commerce in India (2026) — Orders, Cart Recovery & OTP
Bulk SMS

SMS API for E-commerce in India (2026) — Orders, Cart Recovery & OTP

How Indian e-commerce businesses use SMS APIs for order confirmations, live delivery tracking, abandoned cart recovery, OTP verification, and flash sale campaigns. Includes code examples, DLT setup, and conversion benchmarks.

7 min read