Skip to main content

SMS API

API for SMS gateway

SMS gateway is a general term for a service offering message sending. With our robust API you can automate communication, send bulk messages - not just SMS but also WhatsApp messages.

JSON API

Simple JSON API for easy integration into any application

Ready-made SDK

Existing libraries for PHP, Node.js, Ruby, Java a Perl for even faster implementation

Sandbox environment

Testing environment with real-time request testing and validation capabilities

One API connection for all use-cases:

SMS gateway API connection

SMS API is a programming interface that facilitates communication between your application and mobile operators' SMS gateway. It allows you to send and receive SMS messages using simple HTTP requests, without the need for direct connection to telecommunications infrastructure.

Easy integration

JSON API with HTTP request support for fast integration

High reliability

The service runs 24/7 thanks to AWS Cloud infrastructure and backup operator connections

Delivery speed

Messages delivered within seconds. Even faster when using the priority queue

Global coverage

Sending to 200+ countries worldwide and we help you meet all necessary requirements for each destination

Detailed reports

Real-time sending progress information via webhooks and access to logs

API first

All features are built primarily for API, making it easy to integrate our services into any system

Why SmsManager?

API built for developer comfort each API request can contain custom JSON data so that delivery receipts or incoming replies can be easily matched.

Developer portal with call examples and a detailed description of the API structure.

Sandbox and testing option the developer portal includes functionality for real-time testing and request validation. Thanks to that you can prepare your integration very quickly.

Examples in many languages - PHP, JavaScript, Node.js, Python, Java, Go, Ruby, .NET, ...

Quick start

Send a message

{
"body": "Your first SMS via API!",
"to": [{"phone_number": "+420777123456"}]
}

API response

{
"request_id": "c3917016-4540-4a26-b2f9-f96028788dbe",
"accepted": [{
"key": "0",
"message_id": "8c8e93ce-3fdd-4f9a-8918-cf8b0b40502a"
}],
"rejected": []
}

Authentication

To send messages you will always need an API key.

If you use the standard JSON API, you will always need to enrich the request header with x-api-key and correctly define Content-Type: application/json.

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

JSON API Endpoint

Our JSON API is designed to be stable and high-performing.

A response from our API always means confirmation that the request has been received (and an ID assigned). Not that the message has been sent. To truly verify a message's status, use the REST API through which we provide detailed message status.

Because we use a JSON structure, we adjust and add functionality directly into individual API versions.

Usage examples

<?php

$apikey = 'your-api-key-here'; // Replace with your actual API key
$number = 'phone-number-here'; // Replace with the target phone number
$text = 'message-text-here'; // Replace with the message text

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.smsmngr.com/v2/message');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array(
'to' => array(array('phone_number' => $number)),
'body' => $text
)));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'x-api-key:' . $apikey
));

// Execute the request and capture the response
$response = curl_exec($ch);
curl_close($ch);

// Process the response
$response = json_decode($response, true);

if ($response['accepted'] && $response['accepted'][0]) { // SMS was sent successfully
echo 'Status: Accepted';
echo 'ID: ' . $response['accepted'][0]['message_id'];
} else {
echo 'Status: Rejected';
}

Ready to send WhatsApp messages too?

Send a message

If you have already implemented our API, you can easily extend message sending to WhatsApp as well. You have control over the order of sent messages as well as the content of the message sent via SMS.

Thanks to a smart combination of SMS and WhatsApp messages you can significantly reduce your messaging costs.

{
"flow":[
{
"whatsapp_template": {
"template_name": "welcome",
"language": "cs",
"sender": "987651234567890"
}
},
{
"sms": {
"body": "If you don't have WhatsApp, you'll get an SMS!"
}
}
],
"to": [{"phone_number": "+420777123456"}]
}

API response

{
"request_id": "c3917016-4540-4a26-b2f9-f96028788dbe",
"accepted": [{
"key": "0",
"message_id": "8c8e93ce-3fdd-4f9a-8918-cf8b0b40502a"
}],
"rejected": []
}

Start using our SMS gateway API today

Ready to start reaching your customers through the most effective communication channel? The process is quick and simple. Sign up in a minute, get your API key and send your first SMS today with our simple API.