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 s podporou HTTP požadavků pro rychlou integraci

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 tvořeno pro pohodlí vývojářů každý API požadavek může obsahovat vlastní JSON data, aby bylo možné doručenky nebo příchozí odpovědi snadno spárova.t

Developerský portál s příklady volání a detailním popisem API struktury.

Sandbox a možnost vyzkoušení developerský portál obsahuje functionality pro real-time vyzkoušení a validaci požadavků. Díky tomu své napojení připravíte velmi rychle.

Ukázky v mnoha jazycích - PHP, JavaScript, Node.js, Python, Java, Go, Ruby, .NET, ...

Quick start

Send a message

{
"body": "Vaše první SMS přes 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

Pro odesílání zpráv budete vždy potřebovat API klíč.

Pokud budete používat standardní JSON API, bude potřeba vždy hlavičku požadavku obohatit o x-api-key a správně definovat Content-Type: application/json.

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

JSON API Endpoint

Naše JSON API je navrženo tak, aby bylo stabilní a výkonné.

Odpověď od našeho API vždy znamená potvrzení přijetí požadavku (a přidělení ID). Nikoliv odslání zprávy. Pro skutečné ověření stavu zprávy využijte REST API v rámci kterého poskytujeme detailní stav zpráv.

Protože využíváme JSON strukturu, upravujeme a přidáváme funkcionalitu přímo do jednotlivých verzí API.

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

Pokud již máte implementované naše API, můžete snadno rozšířit odesílání zpráv také na WhatsApp. Máte pod kontrolou pořadí odesílaných zpráv i obsah zprávy, která se odešle v SMS.

Díky chytré kombinaci SMS a WhatsApp zpráv můžete zásadně snížit náklady na odesílání zpráv.

{
"flow":[
{
"whatsapp_template": {
"template_name": "welcome",
"language": "cs",
"sender": "987651234567890"
}
},
{
"sms": {
"body": "Pokud nemáte WhatsApp, dostanete 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.