API Documentation

Complete guide to integrating with our communication APIs

Get Started

Introduction

Welcome to our Communication API documentation. This API provides a unified interface to send messages across multiple channels including RCS, SMS, Email, and WhatsApp.

Base URL

https://multichannel.insignsms.com/api/v1

Getting Started

To get started, you'll need an API key. Sign up for an account and generate your API key from the dashboard.

  1. Sign up for a developer account
  2. Verify your email address
  3. Generate your API key from the dashboard
  4. Start making requests to the API

Rate Limits

API requests are limited to 1000 requests per hour per API key. If you exceed this limit, you'll receive a 429 Too Many Requests response.

Quick Start

Test the API with this simple cURL request:

curl -X GET "https://multichannel.insignsms.com/v1/health" \
  -H "Authorization: Bearer YOUR_API_KEY"
API Status
RCS API: Operational
SMS API: Operational
Email API: Operational
WhatsApp API: Operational

Authentication

All API requests must be authenticated using a Bearer token included in the Authorization header.

How to Authenticate

Include your API key in the Authorization header as a Bearer token:

GET /api/endpoint
Authorization: Bearer YOUR_API_KEY_HERE
Content-Type: application/json

Getting Your API Key

You can generate API keys from your account dashboard. We recommend using different keys for different environments (development, staging, production).

Keep your API keys secure! Do not expose them in client-side code or public repositories.
Code Examples
curl -X GET "https://multichannel.insignsms.com/v1/credit" \
  -H "Authorization: Bearer YOUR_API_KEY"
const axios = require('axios');

const response = await axios.get('https://multichannel.insignsms.com/v1/credit', {
  headers: {
    'Authorization': `Bearer YOUR_API_KEY`
  }
});
import requests

url = "https://multichannel.insignsms.com/v1/credit"
headers = {
    "Authorization": "Bearer YOUR_API_KEY"
}

response = requests.get(url, headers=headers)
print(response.json())
Response
{

  "username": "John Doe",
  "total_assigned": "1000",
  "used": "756"
  "available": "244"
}

Error Handling

The API uses conventional HTTP response codes to indicate the success or failure of an API request.

HTTP Status Codes

Code Description
200 OK - The request was successful
201 Created - Resource was successfully created
400 Bad Request - The request was invalid
401 Unauthorized - API key missing or invalid
403 Forbidden - You don't have permission
404 Not Found - The resource doesn't exist
429 Too Many Requests - Rate limit exceeded
500 Server Error - We had a problem with our server

Error Response Format

{
    "error": {
        "code": "invalid_request",
        "message": "The request was invalid",
        "details": {
            "param": "email",
            "reason": "invalid_format"
        }
    }
}

Create SMS Template

This endpoint allows you to create and save a new SMS template. Templates include details like template name, entity ID, template ID, content, and sender ID. Each template is associated with a user and cost is calculated automatically based on SMS parts.

HTTP Request

POST /api/sms/storeTemplate

Request Parameters

Parameter Type Required Description
template_name String Yes Name of the SMS template (max 255 characters).
entity_id String Yes Entity ID assigned by DLT.
template_id String Yes Template ID assigned by DLT.
content String Yes Message body of the SMS. May include placeholders for personalization.
sender_id String Yes Sender ID (must exist in sms_header table).

Request Payload

{
  "template_name": "otp_alert",
  "entity_id": "1234567890",
  "template_id": "DLT12345",
  "content": "Hello { name }, your OTP is { otp }.",
  "sender_id": "ABCDEF"
}
Code Examples
curl -X POST 'https://multichannel.insignsms.com/api/sms/storeTemplate' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "template_name": "otp_alert",
  "entity_id": "1234567890",
  "template_id": "DLT12345",
  "content": "Hello { name }, your OTP is { otp }.",
  "sender_id": "ABCDEF"
}'
const axios = require('axios');

const data = {
  template_name: "otp_alert",
  entity_id: "1234567890",
  template_id: "DLT12345",
  content: "Hello { name }, your OTP is { otp }.",
  sender_id: "ABCDEF"
};

axios.post('https://multichannel.insignsms.com/api/sms/storeTemplate', data, {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
})
.then(res => console.log(res.data))
.catch(err => console.error('API Error:', err.response.data));
import requests
import json

url = "https://multichannel.insignsms.com/api/sms/storeTemplate"
payload = json.dumps(
  "template_name": "otp_alert",
  "entity_id": "1234567890",
  "template_id": "DLT12345",
  "content": "Hello { name }, your OTP is { otp }. ",
  "sender_id": "ABCDEF"
})
headers = {
  'Authorization': 'Bearer YOUR_API_KEY',
  'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers, data=payload)
print(response.json())
Response
Success Response (201 Created)
{
  "success": true,
  "message": "Template saved successfully.",
  "template": {
    "id": 1,
    "template_name": "otp_alert",
    "entity_id": "1234567890",
    "template_id": "DLT12345",
    "template_content": "Hello { name }, your OTP is { otp }.",
    "sender_id": "ABCDEF",
    "userId": 7,
    "cost": 0.25,
    "char_count": 32,
    "sms_units": 1,
    "encoding": "GSM-7",
    "has_url": false
  }
}
Error Response (422 Validation Failed)
{
  "success": false,
  "message": "The given data was invalid.",
  "errors": {
    "template_name": ["The template_name field is required."],
    "entity_id": ["The entity_id field is required."]
  }
}

Send SMS

This endpoint allows you to send SMS messages to one or more recipients. It supports both non-personalized (bulk) and personalized (customized per recipient) messages. Unicode messages (e.g., Hindi, Tamil) are also supported.

HTTP Request

POST /api/sms/sendMessage

Request Parameters

Parameter Type Description
senderid String (max: 6) Registered sender ID used for sending SMS.
message String (max: 1000) The message text to be sent. Supports placeholders (e.g., {{ name }}).
unicode Integer (0 or 1) 0 = English (default), 1 = Unicode (multi-language).
personalized Integer (0 or 1) 0 = Non-personalized (same message to all), 1 = Personalized (custom per recipient).
numbers Array Non-personalized: Array of phone numbers (max 300).
Personalized: Array of objects with number and dynamic fields.

Request Payload Examples

{
  "senderid": "ABCDEF",
  "message": "Hello! This is a bulk test message.",
  "unicode": 0,
  "personalized": 0,
  "numbers": ["9876543210", "9123456780"]
}
{
  "senderid": "ABCDEF",
  "message": "Hello {{ name }}, your OTP is {{ otp }}.",
  "unicode": 0,
  "personalized": 1,
  "numbers": [
    { "number": "9876543210", "name": "Sanjay", "otp": "123456" },
    { "number": "9123456780", "name": "Amit", "otp": "654321" }
  ]
}
Code Examples
curl -X POST 'https://multichannel.insignsms.com/api/sms/sendMessage' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "senderid": "ABCDEF",
  "message": "Hello! This is a test message.",
  "unicode": 0,
  "personalized": 0,
  "numbers": ["9876543210", "9123456780"]
}'
const axios = require('axios');
const data = {
  senderid: "ABCDEF",
  message: "Hello! This is a test message.",
  unicode: 0,
  personalized: 0,
  numbers: ["9876543210", "9123456780"]
};

axios.post('https://multichannel.insignsms.com/api/sms/sendMessage', data, {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
}).then(response => {
  console.log(response.data);
}).catch(error => {
  console.error(error.response.data);
});
import requests, json

url = "https://multichannel.insignsms.com/api/sms/sendMessage"
payload = {
  "senderid": "ABCDEF",
  "message": "Hello! This is a test message.",
  "unicode": 0,
  "personalized": 0,
  "numbers": ["9876543210", "9123456780"]
}
headers = {
  'Authorization': 'Bearer YOUR_API_KEY',
  'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers, data=json.dumps(payload))
print(response.json())
Response
Success Response (200 OK)
{
  "success": true,
  "message": "Message submitted successfully.",
  "reference_id": "GATEWAY_REF_12345"
}
Error Response (422)
{
  "success": false,
  "message": "Maximum 300 numbers allowed in non-personalized mode."
}

SMS List Report

This endpoint retrieves the delivery report of a previously sent SMS batch. You must provide the gateway_ref_id (returned when sending SMS) to fetch the associated logs for each recipient.

HTTP Request

GET /api/sms/reports/{gateway_ref_id}

Path Parameter

Parameter Type Description
gateway_ref_id String The unique reference ID returned by the SMS gateway when the message batch was submitted.

Example Request

curl -X GET 'https://multichannel.insignsms.com/api/sms/reports/GATEWAY_REF_12345' \
--header 'Authorization: Bearer YOUR_API_KEY'
Response
Success Response (200 OK)
[
  {
    "recipient_number": "9876543210",
    "status": "delivered",
    "sent_at": "2025-09-02T12:34:56Z"
  },
  {
    "recipient_number": "9123456780",
    "status": "failed",
    "sent_at": "2025-09-02T12:34:56Z"
  }
]
Error Response (404)
{
  "success": false,
  "message": "Report not found."
}

Create RCS Template

This endpoint allows you to create a new Rich Communication Services (RCS) template. Supported types include: plain text, standalone card, and carousel. Templates must be approved before use.

HTTP Request

POST /api/storeTemplate

Request Parameters

Parameter Type Description
template_name String Unique name for the template.
template_type String Template type (plain_text, standalone, carousel).
data.content Object Main content object. Structure varies by template type.

Request Payload Example (Plain Text)

{
  "template_name": "welcome_text_01",
  "template_type": "plain_text",
  "data": {
    "content": {
      "plainText": "Welcome to our service! Enjoy your experience."
    }
  }
}

Request Payload Example (Standalone)

{
  "template_name": "promo_card_01",
  "template_type": "standalone",
  "data": {
    "content": {
      "richCardDetails": {
        "standalone": {
          "cardOrientation": "VERTICAL",
          "content": {
            "cardTitle": "Big Sale!",
            "cardDescription": "Up to 70% off electronics.",
            "cardMedia": {
              "mediaHeight": "MEDIUM",
              "contentInfo": {
                "fileUrl": "https://example.com/sale.png"
              }
            },
            "suggestions": [
              { "type": "REPLY", "text": "Shop Now" },
              { "type": "URL", "url": "https://example.com/store" }
            ]
          }
        }
      }
    }
  }
}

Request Payload Example (Carousel)

{
  "template_name": "carousel_offer_01",
  "template_type": "carousel",
  "data": {
    "content": {
      "richCardDetails": {
        "carousel": {
          "cardWidth": "MEDIUM",
          "contents": [
            {
              "cardTitle": "Item 1",
              "cardDescription": "Best gadget at best price.",
              "cardMedia": {
                "mediaHeight": "MEDIUM",
                "contentInfo": {
                  "fileUrl": "https://example.com/item1.png"
                }
              },
              "suggestions": [
                { "type": "URL", "url": "https://example.com/item1" }
              ]
            },
            {
              "cardTitle": "Item 2",
              "cardDescription": "Don’t miss this deal!",
              "cardMedia": {
                "mediaHeight": "SHORT",
                "contentInfo": {
                  "fileUrl": "https://example.com/item2.png"
                }
              },
              "suggestions": [
                { "type": "URL", "url": "https://example.com/item2" }
              ]
            }
          ]
        }
      }
    }
  }
}
Code Examples
curl -X POST 'https://multichannel.insignsms.com/api/storeTemplate' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "template_name": "welcome_text_01",
  "template_type": "plain_text",
  "data": {
    "content": {
      "plainText": "Welcome to our service! Enjoy your experience."
    }
  }
}'
const axios = require('axios');
const payload = {
  template_name: "welcome_text_01",
  template_type: "plain_text",
  data: {
    content: {
      plainText: "Welcome to our service! Enjoy your experience."
    }
  }
};
axios.post('https://multichannel.insignsms.com/api/storeTemplate', payload, {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
}).then(res => console.log(res.data))
  .catch(err => console.error(err.response.data));
import requests, json

url = "https://multichannel.insignsms.com/api/storeTemplate"
payload = {
  "template_name": "welcome_text_01",
  "template_type": "plain_text",
  "data": {
    "content": {
      "plainText": "Welcome to our service! Enjoy your experience."
    }
  }
}
headers = {
  "Authorization": "Bearer YOUR_API_KEY",
  "Content-Type": "application/json"
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
print(response.json())
Response
Success Response (200 OK)
{
  "success": true,
  "message": "Template stored successfully",
  "template_id": 42
}
Error Response (400)
{
  "success": false,
  "message": "Invalid template structure. Missing required fields."
}

List Templates

This endpoint retrieves stored Rich Communication Services (RCS) templates. You can fetch all templates or a specific template by passing its {id}. Supported types include plain_text, standalone, and carousel.

HTTP Request

GET /api/templates/{id?}

{id} is optional. If provided β†’ returns single template. If omitted β†’ returns list of templates.

Response Fields

Field Type Description
template_id Integer Unique template ID
template_name String Name of the template
template_type String Type of template (plain_text, standalone, carousel)
status String Status (pending, approved, rejected)
rejected_reason String Reason if template is rejected (only for status = rejected)
data.content Object Template payload content (differs by type)

Example Response – Plain Text

{
  "success": true,
  "data": {
    "template_id": 101,
    "template_name": "welcome_msg",
    "template_type": "plain_text",
    "status": "approved",
    "data": {
      "content": {
        "plainText": "Hello {{ name }}, welcome aboard!",
        "suggestions": [
          { "type": "REPLY", "text": "Thanks" }
        ]
      }
    }
  }
}

Example Response – Standalone

{
  "success": true,
  "data": {
    "template_id": 102,
    "template_name": "promo_card",
    "template_type": "standalone",
    "status": "approved",
    "data": {
      "content": {
        "richCardDetails": {
          "standalone": {
            "cardOrientation": "VERTICAL",
            "content": {
              "cardTitle": "Big Sale!",
              "cardDescription": "Up to 70% off electronics.",
              "cardMedia": {
                "mediaHeight": "MEDIUM",
                "contentInfo": {
                  "fileUrl": "https://example.com/sale.png"
                }
              },
              "suggestions": [
                { "type": "REPLY", "text": "Shop Now" },
                { "type": "URL", "url": "https://example.com/store" }
              ]
            }
          }
        }
      }
    }
  }
}

Example Response – Carousel

{
  "success": true,
  "data": {
    "template_id": 103,
    "template_name": "product_carousel",
    "template_type": "carousel",
    "status": "approved",
    "data": {
      "content": {
        "richCardDetails": {
          "carousel": {
            "cardWidth": "MEDIUM",
            "contents": [
              {
                "cardTitle": "Laptop",
                "cardDescription": "Powerful and portable.",
                "cardMedia": {
                  "mediaHeight": "MEDIUM",
                  "contentInfo": {
                    "fileUrl": "https://example.com/laptop.png"
                  }
                },
                "suggestions": [
                  { "type": "URL", "url": "https://example.com/laptop" }
                ]
              },
              {
                "cardTitle": "Smartphone",
                "cardDescription": "Latest Android device.",
                "cardMedia": {
                  "mediaHeight": "MEDIUM",
                  "contentInfo": {
                    "fileUrl": "https://example.com/phone.png"
                  }
                },
                "suggestions": [
                  { "type": "URL", "url": "https://example.com/phone" }
                ]
              }
            ]
          }
        }
      }
    }
  }
}
Code Examples
# List all templates
curl -X GET 'https://multichannel.insignsms.com/api/templates' \
--header 'Authorization: Bearer YOUR_API_KEY'

# Get single template by ID
curl -X GET 'https://multichannel.insignsms.com/api/templates/102' \
--header 'Authorization: Bearer YOUR_API_KEY'
const axios = require('axios');

// List all templates
axios.get('https://multichannel.insignsms.com/api/templates', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
}).then(res => console.log(res.data));

// Get single template
axios.get('https://multichannel.insignsms.com/api/templates/102', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
}).then(res => console.log(res.data));
import requests

headers = { "Authorization": "Bearer YOUR_API_KEY" }

# List all
res = requests.get("https://multichannel.insignsms.com/api/templates", headers=headers)
print(res.json())

# Single template
res = requests.get("https://multichannel.insignsms.com/api/templates/102", headers=headers)
print(res.json())
Error Response
{
  "success": false,
  "message": "Template not found"
}

Send RCS Message

This endpoint allows you to send an RCS message using an approved template. Messages can be sent to multiple contacts (up to 50 numbers per request).

HTTP Request

POST /api/rcs/sendMessage

Request Parameters

Parameter Type Description
templateId Integer ID of the approved RCS template to use.
messageId String Custom identifier for tracking the message.
contacts Array[String] List of recipient mobile numbers (10-digit, max 50).

Request Payload

{
    "templateId": 123,
    "messageId": "msg_001",
    "contacts": ["9876543210", "9123456780"]
}
Code Examples
curl -X POST "https://multichannel.insignsms.com/api/rcs/sendMessage" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
  "templateId": 123,
  "messageId": "msg_001",
  "contacts": ["9876543210", "9123456780"]
}'
const axios = require("axios");

axios.post("https://multichannel.insignsms.com/api/rcs/sendMessage", {
  templateId: 123,
  messageId: "msg_001",
  contacts: ["9876543210", "9123456780"]
}, {
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  }
}).then(res => {
  console.log(res.data);
}).catch(err => {
  console.error("API Error:", err.response.data);
});
import requests
import json

url = "https://multichannel.insignsms.com/api/rcs/sendMessage"
payload = {
  "templateId": 123,
  "messageId": "msg_001",
  "contacts": ["9876543210", "9123456780"]
}
headers = {
  "Authorization": "Bearer YOUR_API_KEY",
  "Content-Type": "application/json"
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
Response
Success Response (202 Accepted)
{
    "status": "accepted",
    "referenceId": "c6b9d8e4-12f3-4b9c-9f8a-abcdef123456"
}
Error Response (422)
{
    "errors": {
        "contacts": [
            "Each contact must be a valid 10-digit number."
        ]
    }
}