Introduction

InfoSMS.online provides a simple REST API for sending and receiving SMS messages. The API supports JSON and XML formats and is compatible with the SMSGateway standard.

Base URL

https://infosms.online

Supported formats

  • JSON — preferred format, header Content-Type: application/json
  • XML — compatibility with older integrations
  • form-data — for simple POST requests
ℹ️
You can obtain your API key in the client portal after registration. Resellers with multiple SIM cards will find the account API key in the portal section 🔑 API kľúč.

Authentication

InfoSMS.online distinguishes two types of API keys by purpose:

1. Sender API key (akey) — for SMS Gateway and simple SIM Hosting

Assigned to a specific sender or SIM card. Find it in the admin panel for the specific SIM account (mdl_user.akey). Used with parameters username + password (or directly as akey instead of password if it has more than 30 characters).

ParameterTypeDescription
username string required Login email
password string required API key (sender akey of the SIM card)

2. Account API key (account_akey) — for reseller multi-sender bulk

Belongs to the entire client account (not a single SIM card). Find it in the portal under the 🔑 API Key section. Allows sending bulk SMS via API — you can assign a different sender to each message. Used with parameters username + account_akey.

ParameterTypeDescription
username string required Client account login email
account_akey string required Account API key (generated in the portal, section 🔑 API Key)
ℹ️
Endpoints /api/bulk/, /api/balance/ and /api/status/ use shortened parameter names user (= username) and pass (= account_akey) for the same account key — it is the same key as above.
⚠️
Never pass the API key in the URL as a GET parameter. Always use the POST body. Keys are sensitive — treat them like passwords.

Request format

The API accepts requests in JSON or XML format. Responses are returned in the same format as the request.

Phone numbers

The recipient number (to) must be in international format with country code, including the + sign:

FormátPríkladPodporovaný
Medzinárodný ++421905123456✅ Áno

Other formats (without +, local formats like 0905123456 or 905123456) are not accepted — a request with such a number will be rejected with error INVALID_NUMBER.

Message encoding

By default, diacritics are automatically normalized (á→a, č→c...). For Unicode SMS set parameter unicode=1 — pricing applies the Unicode limit (70 characters/SMS).

Error codes

SMS gateway endpoints (/api/bulk/, /api/sim/send.php, /api/balance/, /api/account/...) return errors in a unified format {"status":"ERR"|"ERROR","msg"|"message":"error description"} (or equivalent XML element <status>ERR</status>). HTTP status code 200 is also returned on partial failure within a bulk send (see the errors field).

HTTPstatusDescription
200OKSuccessful processing (including partial failure in the errors field)
400ERR / ERRORMissing or invalid parameters (e.g. missing text, empty numbers)
401ERR / ERRORInvalid credentials (user/pass)
200ERRInsufficient credit — the error text contains the current balance
200errors[]Invalid phone number in a bulk send — other numbers are sent normally
404ERRRecord not found (e.g. /api/status/ — non-existent msgid)

Send SMS

POST /api/bulk/

Sends an SMS to one or more recipients. The endpoint is the same for a single SMS and for bulk sending — the only difference is the number of entries in the numbers field (for a single SMS, a one-element array is sufficient).

Parameters

ParameterTypeDescription
userstringrequired Login email
passstringrequired API key (account_akey, section 🔑 API Key in the portal)
numbersarrayrequired Array of phone numbers — for a single SMS a one-element array is sufficient (max 1,000)
textstringrequired Message text
fromstringoptional Sender ID (max 11 characters, alphanumeric). Defaults to the company name from the portal.
💡
The endpoint supports JSON and XML — the format is detected automatically from the Content-Type header (application/json or application/xml / text/xml). The response is returned in the same format as the request.
💡
You can assign a custom msgid to each number (e.g. an order ID) to look up delivery status via Delivery status. If you do not send msgid, we generate and return a unique ID.

Example request (single SMS)

JSON
XML
POST /api/bulk/
Content-Type: application/json

{
  "user":    "vas@email.sk",
  "pass":    "vas-api-kluc",
  "numbers": [{ "number": "+421905123456", "msgid": "objednavka-1234" }],
  "text":    "Vaša objednávka č. 1234 je pripravená na vyzdvihnutie.",
  "from":    "MojaFirma"
}
POST /api/bulk/
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<request>
  <credential>
    <user>vas@email.sk</user>
    <pass>vas-api-kluc</pass>
  </credential>
  <message>
    <text>Vasa objednavka c. 1234 je pripravena na vyzdvihnutie.</text>
    <from>MojaFirma</from>
    <numbers>
      <number msgid="objednavka-1234">+421905123456</number>
    </numbers>
  </message>
</request>

Response (success)

JSON
XML
200 OK
{
  "status":  "OK",
  "sent":    1,
  "failed":  0,
  "credit":  4.2350,
  "results": [
    { "number": "+421905123456", "msgid": "objednavka-1234" }
  ]
}
200 OK
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>OK</status>
  <sent>1</sent>
  <failed>0</failed>
  <credit>4.2350</credit>
  <results>
    <result><number>+421905123456</number><msgid>objednavka-1234</msgid></result>
  </results>
</response>

For sending to multiple recipients at once (max 1,000 numbers) and a description of partial failure see the Bulk send section.

Bulk send

POST /api/bulk/

Sends the same message to multiple numbers at once. Maximum 1,000 numbers per request.

Parameters

ParameterTypeDescription
userstringrequired Login email
passstringrequired API key (account_akey)
numbersarrayrequired Array of phone numbers (max 1,000)
textstringrequired Message text
fromstringoptional Sender ID
💡
The endpoint supports JSON and XML — the format is detected automatically from the Content-Type header (application/json or application/xml / text/xml). The response is returned in the same format as the request.
💡
Each element in numbers can be either a plain string (phone number) or an object {"number": "...", "msgid": "..."} with a custom message ID. If you do not send msgid, we generate and return a unique ID — in both cases you will find it in results[].msgid and can use it to query via Delivery status.

Example request

JSON
XML
POST /api/bulk/
Content-Type: application/json

{
  "user":    "vas@email.sk",
  "pass":    "vas-api-kluc",
  "numbers": [
    { "number": "+421905111111", "msgid": "klient-1001" },
    { "number": "+421905222222", "msgid": "klient-1002" },
    "+421905333333"
  ],
  "text":    "Akcia: -30% na všetky produkty do konca týždňa!",
  "from":    "MojaFirma"
}
POST /api/bulk/
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<request>
  <credential>
    <user>vas@email.sk</user>
    <pass>vas-api-kluc</pass>
  </credential>
  <message>
    <text>Akcia: -30% na vsetky produkty do konca tyzdna!</text>
    <from>MojaFirma</from>
    <numbers>
      <number msgid="klient-1001">+421905111111</number>
      <number msgid="klient-1002">+421905222222</number>
      <number>+421905333333</number>
    </numbers>
  </message>
</request>

Response (success)

JSON
XML
200 OK
{
  "status":  "OK",
  "sent":    3,
  "failed":  0,
  "credit":  3.9850,
  "results": [
    { "number": "+421905111111", "msgid": "klient-1001" },
    { "number": "+421905222222", "msgid": "klient-1002" },
    { "number": "+421905333333", "msgid": "11087" }
  ]
}
200 OK
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>OK</status>
  <sent>3</sent>
  <failed>0</failed>
  <credit>3.9850</credit>
  <results>
    <result><number>+421905111111</number><msgid>klient-1001</msgid></result>
    <result><number>+421905222222</number><msgid>klient-1002</msgid></result>
    <result><number>+421905333333</number><msgid>11087</msgid></result>
  </results>
</response>

Response (partial failure)

If a number is invalid or a message fails to send, the response will include an errors field with the reason for each failed number — other numbers in the batch are sent normally.

JSON
XML
200 OK
{
  "status":  "OK",
  "sent":    2,
  "failed":  1,
  "credit":  3.9850,
  "errors": [
    { "number": "+421900111222", "msg": "Neplatné telefónne číslo: +421900111222" }
  ]
}
200 OK
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>OK</status>
  <sent>2</sent>
  <failed>1</failed>
  <credit>3.9850</credit>
  <errors>
    <error><number>+421900111222</number><msg>Neplatné telefónne číslo: +421900111222</msg></error>
  </errors>
</response>

Delivery status

GET /api/status/?user=&pass=&msgid=

Returns the current delivery status of an SMS by msgid — values from results[].msgid in the Send SMS / Bulk send response (your own ID or our generated one).

Parameters

ParameterTypeDescription
userstringrequired Login email
passstringrequired API key (account_akey)
msgidstringrequired Message ID from results[].msgid when sending
delivery_statusDescription
pendingWaiting to be sent / status not yet confirmed
acceptedAccepted by the operator network (SMSC)
deliveredDelivered to recipient
failedFailed to deliver
expiredMessage validity expired
errorRouting error

Example request

GET /api/status/?user=vas@email.sk&pass=vas-api-kluc&msgid=objednavka-1234

Response (success)

200 OK
{
  "status":          "OK",
  "msgid":           "objednavka-1234",
  "delivery_status": "delivered",
  "number":          "421905123456",
  "sent_at":         "2026-06-07T14:30:00+02:00",
  "delivered_at":    "2026-06-07 14:32:10"
}

Response (not found)

404
{
  "status": "ERR",
  "msg":    "Správa s daným msgid nebola nájdená."
}

Credit balance

GET /api/balance/?user=&pass=

Returns the current available credit on your account. The user parameter is the login email, pass is the account API key (account_akey, section 🔑 API Key in the portal).

200 OK
{
  "status":  "OK",
  "balance": 12.4500,
  "currency":"EUR"
}
ℹ️
Legacy XML mode (VetSoftPro / older integrations): the endpoint also accepts POST with parameters username (email) + password (account password) and returns an XML response:
<response><status>1</status><balance>12.4500</balance>...</response>

Send via SIM Hosting

POST /api/sim/send.php

Sends an SMS directly via your SIM card. The message must be without diacritics (automatically normalized). Requires an active SIM Hosting account.

💡
SIM Hosting SMS are sent from your own phone number — the recipient sees your number, not a text sender ID. The price per SMS is set on the SIM card (typically 0.008–0.01 €).

The endpoint accepts JSON and form-data (application/x-www-form-urlencoded).

ParameterTypeDescription
userstringrequired Login email
passstringrequired API key (sender akey of the SIM card)
tostringrequired Phone number in international format (+421...)
textstringrequired Message text. Diacritics will be automatically normalized.

Example request

POST /api/sim/send.php
Content-Type: application/json

{
  "user": "vas@email.sk",
  "pass": "vas-api-kluc",
  "to":   "+421905123456",
  "text": "Dobry den, vasa objednavka je pripravena."
}

Response (success)

200 OK
{
  "status": "OK",
  "idsms": 12345
}

Response (error)

200 / status: ERR
{
  "status": "ERR",
  "msg":    "Nedostatok kreditu. Zostatok: 0.0000 EUR"
}

Incoming SMS (SIM)

SMS received on your SIM card (server transmitter, self_hosted=0) cannot be retrieved by polling — the server immediately forwards each received SMS as a webhook to the callback URL configured on the SIM card (parameter curl, see the SIM Management API section). Technical details are in the Webhook section.

💡
If one account has multiple SIM cards (reseller / multi-sender), or you are receiving replies from a bulk survey, multiple SMS may arrive at once — each is sent as a separate webhook (in parallel).

Webhook

The callback URL is set per SIM card via the curl parameter in the SIM Management API (/api/account/sim.php, see the SIM Management — update section). The server sends a GET request with query parameters to this URL for two event types, distinguished by the event parameter:

eventWhenParameters
incoming A new SMS arrived on your SIM card id, from, sim, text, received_at
delivery A sent SMS was delivered (or failed) idsms, status (delivered / failed), number, gw_id

Example — incoming SMS

GET https://vas-server.sk/callback?event=incoming&id=1042&from=%2B421905999888&sim=%2B421000000000&text=Ahoj%2C+aky+je+termin+dodania%3F&received_at=2026-06-07+09%3A14%3A22

Example — delivery status

GET https://vas-server.sk/callback?event=delivery&idsms=12345&status=delivered&number=%2B421905123456&gw_id=...
ℹ️
The webhook is sent once (no retry), with a 5-second timeout. If multiple SMS arrive/are delivered at once, they are sent in parallel — each as a separate request.

Bulk multi-sender (Reseller)

POST /api/account/bulk-send.php

Sends bulk SMS via SIM Hosting where each message can have its own sender (SIM card). Intended for resellers who operate multiple SIM cards under one account. Authentication is via account API key (account_akey) — one key for the whole account, no need to switch between sender keys.

💡
The endpoint supports JSON and XML — the format is detected automatically from the Content-Type header (application/json or application/xml). The response is returned in the same format. Maximum number of messages per request: 2,000.
🔒
Each sender is verified against your own SIM accounts — it is not possible to send a message under a number that does not belong to you. Messages with an unknown sender are rejected individually (others are sent normally).

Request parameters

ParameterTypeDescription
usernamestringrequired Client account login email
account_akeystringrequired Account API key (from the portal, API Key section)
messagesarrayrequired Array of messages, max 2,000. Each element contains recipient, message and optionally sender.

Parameters of each message (messages[])

ParameterTypeDescription
recipientstringrequired Recipient phone number in international format (+421900123456)
messagestringrequired SMS text. Diacritics will be automatically normalized.
senderstringoptional Sender SIM card number (must belong to your account). If missing, the first/default SIM card is used.

Example request

JSON
XML
POST /api/account/bulk-send.php
Content-Type: application/json

{
  "username":     "vas@email.sk",
  "account_akey": "vas-uctovy-api-kluc",
  "messages": [
    {
      "recipient": "+421900111222",
      "sender":    "421947932736",
      "message":   "Dobry den, vasa objednavka je pripravena."
    },
    {
      "recipient": "+421900333444",
      "sender":    "421948700708",
      "message":   "Upomienka: termin stretnutia zajtra o 10:00."
    },
    {
      "recipient": "+421900555666",
      "message":   "Tato sprava ide cez predvoleneho sendera."
    }
  ]
}
POST /api/account/bulk-send.php
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<request>
  <credential>
    <username>vas@email.sk</username>
    <account_akey>vas-uctovy-api-kluc</account_akey>
  </credential>
  <messages>
    <message>
      <recipient>+421900111222</recipient>
      <sender>421947932736</sender>
      <text>Dobry den, vasa objednavka je pripravena.</text>
    </message>
    <message>
      <recipient>+421900333444</recipient>
      <sender>421948700708</sender>
      <text>Upomienka: termin stretnutia zajtra o 10:00.</text>
    </message>
  </messages>
</request>

Response (success)

JSON
XML
200 OK
{
  "status":  "OK",
  "sent":    2,
  "failed":  1,
  "results": [
    { "recipient": "+421900111222", "sender": "421947932736", "status": "OK",  "idsms": 12345 },
    { "recipient": "+421900333444", "sender": "421948700708", "status": "OK",  "idsms": 12346 },
    { "recipient": "+421900555666", "sender": "421947932736", "status": "ERR", "msg": "Nedostatok kreditu" }
  ]
}
200 OK
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>OK</status>
  <sent>2</sent>
  <failed>1</failed>
  <results>
    <result><recipient>+421900111222</recipient><sender>421947932736</sender><status>OK</status><idsms>12345</idsms></result>
    <result><recipient>+421900333444</recipient><sender>421948700708</sender><status>OK</status><idsms>12346</idsms></result>
    <result><recipient>+421900555666</recipient><sender>421947932736</sender><status>ERR</status><msg>Nedostatok kreditu</msg></result>
  </results>
</response>

SIM Management API (Reseller)

POST /api/account/sim.php

Programmatic management of SIM accounts — create, list, update and delete. Designed for resellers who distribute SIM cards to their own clients and need to automate this process. No limit on the number of SIM accounts (the limit of 10 applies only to self-registration from the portal).

💡
Authentication uses the same account API key (account_akey) as for bulk SMS sending. Find the key in the portal under the 🔑 API Key section.
⚠️
The endpoint supports JSON and XML — the format is detected automatically from the Content-Type header. The response is returned in the same format as the request.

Action overview

actionDescriptionKey parameters
listList all SIM accounts including akey
createCreate one or more SIM accounts, returns akeysims[]
updateChange number, price, status or transmitter typesim_id
deleteDelete a SIM accountsim_id

Common parameters for every request

ParameterTypeDescription
usernamestringrequiredClient account login email
account_akeystringrequiredAccount API key (from the portal, API Key section)
actionstringrequiredlist / create / update / delete

SIM Management — list

Returns a list of all SIM accounts assigned to the account, including their akey (needed for Android app setup).

JSON
XML
{
  "username":     "vas@email.sk",
  "account_akey": "vas-uctovy-api-kluc",
  "action":       "list"
}
<?xml version="1.0" encoding="UTF-8"?>
<request>
  <credential>
    <username>vas@email.sk</username>
    <account_akey>vas-uctovy-api-kluc</account_akey>
  </credential>
  <action>list</action>
</request>
200 OK
{
  "status": "OK",
  "count":  2,
  "sims": [
    { "id": 41, "myphone": "421947932736", "sim_price": 0.008, "active": 1, "self_hosted": 1, "akey": "a1b2c3..." },
    { "id": 42, "myphone": "421948700708", "sim_price": 0.010, "active": 1, "self_hosted": 0, "akey": "d4e5f6..." }
  ]
}

SIM Management — create

Creates one or more SIM accounts at once. For each successfully created account, returns the generated akey — which must be entered into the Android app.

Parameters for each record in sims[]

ParameterTypeDescription
myphonestringrequiredSIM card number — digits only, international format without + (e.g. 421900123456)
self_hostedintoptional1 = Client transmitter — app on the client's phone (default); 0 = Server transmitter — SIM card on your server
sim_pricefloatoptionalPrice per SMS in EUR. Default 0.008.
activeintoptional1 = active (default), 0 = inactive
contact_emailstringoptionalContact email for notifications. Default = account email.
curlstringoptionalWebhook URL for server transmitter (self_hosted=0) — incoming SMS and delivery status, see the Webhook section.
JSON
XML
{
  "username":     "vas@email.sk",
  "account_akey": "vas-uctovy-api-kluc",
  "action":       "create",
  "sims": [
    {
      "myphone":    "421900111222",
      "self_hosted": 1,
      "sim_price":  0.008
    },
    {
      "myphone":       "421900333444",
      "self_hosted":   0,
      "sim_price":     0.010,
      "contact_email": "klient@example.sk",
      "curl":          "https://vas-server.sk/callback"
    }
  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<request>
  <credential>
    <username>vas@email.sk</username>
    <account_akey>vas-uctovy-api-kluc</account_akey>
  </credential>
  <action>create</action>
  <sims>
    <sim>
      <myphone>421900111222</myphone>
      <self_hosted>1</self_hosted>
      <sim_price>0.008</sim_price>
    </sim>
    <sim>
      <myphone>421900333444</myphone>
      <self_hosted>0</self_hosted>
      <sim_price>0.010</sim_price>
      <curl>https://vas-server.sk/callback</curl>
    </sim>
  </sims>
</request>
200 OK
{
  "status":  "OK",
  "created": 2,
  "failed":  0,
  "results": [
    { "myphone": "421900111222", "status": "OK", "id": 42, "akey": "a1b2c3d4...", "self_hosted": 1, "sim_price": 0.008, "active": 1 },
    { "myphone": "421900333444", "status": "OK", "id": 43, "akey": "e5f6g7h8...", "self_hosted": 0, "sim_price": 0.010, "active": 1 }
  ]
}

SIM Management — update

Updates the details of an existing SIM account. Only send the fields you want to change — others remain unchanged.

ParameterTypeDescription
sim_idintrequiredSIM account ID (from list or create)
myphonestringoptionalNew SIM card number
sim_pricefloatoptionalNew price per SMS
activeintoptional1 = activate, 0 = deactivate
self_hostedintoptional0 = Server, 1 = Client
curlstringoptionalNew callback URL
contact_emailstringoptionalNew contact email
JSON
XML
{
  "username":     "vas@email.sk",
  "account_akey": "vas-uctovy-api-kluc",
  "action":       "update",
  "sim_id":       42,
  "active":       0,
  "sim_price":    0.012
}
<?xml version="1.0" encoding="UTF-8"?>
<request>
  <credential>
    <username>vas@email.sk</username>
    <account_akey>vas-uctovy-api-kluc</account_akey>
  </credential>
  <action>update</action>
  <sim_id>42</sim_id>
  <active>0</active>
  <sim_price>0.012</sim_price>
</request>
200 OK
{
  "status":      "OK",
  "id":          42,
  "myphone":     "421900111222",
  "sim_price":   0.012,
  "active":      0,
  "self_hosted": 1
}

SIM Management — delete

Permanently deletes a SIM account. This action is irreversible.

⚠️
After deleting a SIM account, the Android app with the corresponding akey will stop working. All SMS in the send queue for this account will also be deleted.
ParameterTypeDescription
sim_idintrequiredSIM account ID to delete
JSON
XML
{
  "username":     "vas@email.sk",
  "account_akey": "vas-uctovy-api-kluc",
  "action":       "delete",
  "sim_id":       42
}
<?xml version="1.0" encoding="UTF-8"?>
<request>
  <credential>
    <username>vas@email.sk</username>
    <account_akey>vas-uctovy-api-kluc</account_akey>
  </credential>
  <action>delete</action>
  <sim_id>42</sim_id>
</request>
200 OK
{
  "status":     "OK",
  "deleted_id": 42,
  "myphone":    "421900111222"
}

Example: PHP

SMS Gateway — single SMS

<?php
$ch = curl_init('https://infosms.online/api/bulk/');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_POSTFIELDS     => json_encode([
        'user'    => 'vas@email.sk',
        'pass'    => 'vas-api-kluc',
        'numbers' => ['+421905123456'],
        'text'    => 'Vasa objednavka je pripravena.',
        'from'    => 'MojaFirma',
    ]),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ['Content-Type: application/json'],
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
echo $result['status'] === 'OK' ? "Odoslaných: {$result['sent']}" : $result['msg'];

Reseller — SIM Management (create + list)

<?php
function simApi($action, $payload) {
    $ch = curl_init('https://infosms.online/api/account/sim.php');
    curl_setopt_array($ch, [
        CURLOPT_POST           => true,
        CURLOPT_POSTFIELDS     => json_encode(array_merge([
            'username'     => 'vas@email.sk',
            'account_akey' => 'vas-uctovy-api-kluc',
            'action'       => $action,
        ], $payload)),
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER     => ['Content-Type: application/json'],
    ]);
    $r = json_decode(curl_exec($ch), true);
    curl_close($ch);
    return $r;
}

// Vytvorenie dvoch SIM kont
$res = simApi('create', [
    'sims' => [
        ['myphone' => '421900111222', 'self_hosted' => 1],
        ['myphone' => '421900333444', 'self_hosted' => 1],
    ]
]);
foreach ($res['results'] as $s) {
    echo "{$s['myphone']} — akey: {$s['akey']}\n";
}

// Zoznam všetkých SIM kont
$list = simApi('list', []);
foreach ($list['sims'] as $s) {
    echo "{$s['myphone']} — active: {$s['active']}\n";
}

Reseller — bulk multi-sender via SIM Hosting

<?php
$ch = curl_init('https://infosms.online/api/account/bulk-send.php');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_POSTFIELDS     => json_encode([
        'username'     => 'vas@email.sk',
        'account_akey' => 'vas-uctovy-api-kluc',
        'messages'     => [
            ['recipient' => '+421900111222', 'sender' => '421947932736', 'message' => 'Text pre prveho.'],
            ['recipient' => '+421900333444', 'sender' => '421948700708', 'message' => 'Text pre druheho.'],
        ],
    ]),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ['Content-Type: application/json'],
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
echo "Odoslaných: {$result['sent']}, chýb: {$result['failed']}";

Example: Python

import requests

# Odoslanie SMS cez InfoSMS.online API

url  = 'https://infosms.online/api/bulk/'
data = {
    'user':    'vas@email.sk',
    'pass':    'vas-api-kluc',
    'numbers': ['+421905123456'],
    'text':    'Vaša objednávka je pripravená.',
    'from':    'MojaFirma',
}

response = requests.post(url, json=data)
result   = response.json()

if result['status'] == 'OK':
    print(f"Odoslaných: {result['sent']}, zostatok: {result['credit']}")
else:
    print(f"Chyba: {result['msg']}")

Example: cURL

# Odoslanie SMS (SMS Brána)
curl -X POST https://infosms.online/api/bulk/ \
  -H "Content-Type: application/json" \
  -d '{"user":"vas@email.sk","pass":"vas-api-kluc","numbers":["+421905123456"],"text":"Test SMS","from":"MojaFirma"}'

# Reseller — hromadné multi-sender (JSON)
curl -X POST https://infosms.online/api/account/bulk-send.php \
  -H "Content-Type: application/json" \
  -d '{
    "username":     "vas@email.sk",
    "account_akey": "vas-uctovy-api-kluc",
    "messages": [
      {"recipient":"+421900111222","sender":"421947932736","message":"Text 1"},
      {"recipient":"+421900333444","sender":"421948700708","message":"Text 2"}
    ]
  }'

# Reseller — hromadné multi-sender (XML)
curl -X POST https://infosms.online/api/account/bulk-send.php \
  -H "Content-Type: application/xml" \
  -d '<?xml version="1.0"?><request><credential><username>vas@email.sk</username><account_akey>vas-uctovy-api-kluc</account_akey></credential><messages><message><recipient>+421900111222</recipient><sender>421947932736</sender><text>Text 1</text></message></messages></request>'

# Zostatok kreditu
curl "https://infosms.online/api/balance/?user=vas@email.sk&pass=vas-api-kluc"

Example: Node.js

// Odoslanie SMS cez InfoSMS.online API
// npm install node-fetch

import fetch from 'node-fetch';

const url  = 'https://infosms.online/api/bulk/';
const data = {
  user:    'vas@email.sk',
  pass:    'vas-api-kluc',
  numbers: ['+421905123456'],
  text:    'Vaša objednávka je pripravená.',
  from:    'MojaFirma',
};

const res    = await fetch(url, {
  method:  'POST',
  headers: { 'Content-Type': 'application/json' },
  body:    JSON.stringify(data),
});
const result = await res.json();

if (result.status === 'OK') {
  console.log(`Odoslaných: ${result.sent}, zostatok: ${result.credit}`);
} else {
  console.error(`Chyba: ${result.msg}`);
}