Developer Documentation

SMS API Integration in IndiaRESTful API. Authentication. Delivery-status reporting.

Review the bulk SMS API for your application in India. Send transactional, promotional and OTP messages with a documented REST workflow, authentication guidance and delivery-status endpoints.

Free 100 test credits No credit card DLT compliant 99.9% uptime
// Quick Start

Plan Your SMS API Integration

Follow the documented steps to prepare authentication, message templates and delivery-status handling.

01

Review Authentication

Confirm the account credentials and Authorization header format required by your integration.

02

Prepare Message Details

Confirm the sender, message category and template details that apply to your Indian SMS workflow.

03

Send and Monitor

Call the relevant endpoint, handle the response and use delivery-status reporting in your application.

// Code Samples

Integration Examples

Copy-paste ready code in your preferred language. Send personalized SMS with variable substitution.

curl -X POST https://api.bharatbulksms.com/v2/sms/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": ["919876543210"],
    "sender_id": "BHARAT",
    "message": "Hello {{name}}, your OTP is {{otp}}. Valid for 5 minutes.",
    "variables": {
      "919876543210": { "name": "Rajesh", "otp": "482910" }
    },
    "route": "transactional",
    "template_id": "1107161234567890123"
  }'

Success Response (200 OK)

{
  "status": "success",
  "message": "SMS queued successfully",
  "data": {
    "message_id": "msg_7f3a2b1c9d4e5f6a",
    "credits_used": 2,
    "recipients": 2,
    "route": "transactional",
    "scheduled": false
  }
}
// Endpoints

API Reference

Complete list of available endpoints. Click to expand parameters and details.

// Authentication

API Authentication

Bearer Token Authentication

All API requests must include your API key in the Authorization header. Your API key carries full account privileges โ€” keep it secure and never expose it in client-side code.

Authorization: Bearer YOUR_API_KEY

Base URL

https://api.bharatbulksms.com/v2

Content Type

application/json
// Rate Limits

Rate Limits & Quotas

Rate limits vary by plan. Contact us for custom enterprise limits.

PlanAPI RequestsBulk Batch SizeConcurrent
Starter100 req/min10,000 SMS/batch5 connections
Business500 req/min50,000 SMS/batch20 connections
Enterprise2,000 req/min1,00,000 SMS/batch100 connections

Rate limit headers are included in every response: X-RateLimit-Remaining, X-RateLimit-Reset. Implement exponential backoff when you receive a 429 response.

// Error Handling

HTTP Status Codes

Standard HTTP status codes indicate success or failure of API requests.

200SuccessRequest processed successfully
400Bad RequestInvalid parameters or missing required fields
401UnauthorizedInvalid or expired API key
402Insufficient CreditsAccount balance too low to process request
403ForbiddenDLT template not approved or sender ID not registered
404Not FoundInvalid endpoint or message ID not found
429Rate LimitedToo many requests. Retry after the time specified in Retry-After header
500Server ErrorInternal server error. Contact support if persistent
503Service UnavailableTemporary maintenance. Retry with exponential backoff
// Webhooks

Delivery Status Webhooks

Receive real-time delivery reports via HTTP POST to your callback URL.

Webhook Payload

When a message delivery status changes, we send a POST request to your registered callback URL with the following JSON payload. Respond with HTTP 200 to acknowledge receipt.

{
  "event": "delivery_report",
  "message_id": "msg_7f3a2b1c9d4e5f6a",
  "to": "919876543210",
  "status": "delivered",
  "delivered_at": "2026-07-17T10:30:45+05:30",
  "error_code": null,
  "credits_refunded": 0
}
delivered

Message delivered to handset

failed

Delivery failed (DND, invalid number)

pending

Message in transit to operator

// SDKs & Libraries

Official SDKs

Pre-built libraries for popular languages. Install and start sending in minutes.

๐Ÿ

Python

pip install bharatbulksms
๐ŸŸข

Node.js

npm install bharatbulksms
๐Ÿ˜

PHP

composer require bharatbulksms/sdk
โ˜•

Java

Maven: com.bharatbulksms:sdk
๐Ÿ’Ž

Ruby

gem install bharatbulksms
๐Ÿ”ท

.NET

dotnet add package BharatBulkSMS

Ready to Integrate?

Review the API reference and contact our team when you are ready to discuss an integration workflow.