Send SMS over SOAP

WSDL: https://api.bsms.viamobile.sk/soap?wsdl
Endpoint: https://api.bsms.viamobile.sk/soap
Method: SendSms


HTTP Basic Authorization

HTTP header Value
Authorization Basic base64(username:password)
POST https://api.bsms.viamobile.sk/soap HTTP/1.1 Content-Type: text/xml;charset=UTF-8 SOAPAction: "http://bsms.viamobile.sk/SendSms" Authorization: Basic dGVzdDp0ZXN0 Host: api.bsms.viamobile.sk

Error codes

Code Name Description
1000 Unauthorized Unknown username or password
1011 Unknown network Carrier not permitted
1012 Unknown sender Sender not permitted
1013 Message too long Message is too long
1014 ID not integer ID of message is not numeric
2001 SMS sending disabled SMS sending is not allowed, please contact Via Mobile to enable this funcionality
2002 Not enough credit Unknown username or password
1.1 Send SMS

Send SMS - request

Parameter Required Type Description
/sender
Optional String(11) Sender name, max. 11 characters
Default: InfoSMS
/encoding
Optional Enum gsm/utf8
gsm - standard SMS message (default, GSM7 alphabet).
Text with max. 160 characters will be sent as 1 SMS, text over 160 characters will be sent as ceil(length(text)/153) SMSs

utf8 - unicode message (UTF8 alphabet).
Text with max. 70 characters will be sent as 1 SMS, text over 70 characters will be sent as ceil(length(text)/67) SMSs
/time_to_send
Optional ISO timestamp ISO timestamp in format YYYY-MM-DD HH:mm:ss, e.g. 2019-01-01T21:00:00
Default: now
/message/id
Required Int64 Unique message ID
/message/msisdn
Required Int64 Recipient MSISDN in international format without + or 00. E.g. 421903123456
/message/text
Required String(480) Message text
POST https://api.bsms.viamobile.sk/soap HTTP/1.1 Content-Type: text/xml;charset=UTF-8 SOAPAction: "http://bsms.viamobile.sk/SendSms" Authorization: Basic dGVzdDp0ZXN0 Host: api.bsms.viamobile.sk <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bsms="http://bsms.viamobile.sk/"> <soapenv:Header/> <soapenv:Body> <bsms:messages> <sender>InfoSMS</sender> <encoding>gsm</encoding> <time_to_send>2020-01-01T00:00:01</time_to_send> <bsms:message> <id>1</id> <msisdn>421903123456</msisdn> <text>Test message</text> </bsms:message> <bsms:message> <id>2</id> <msisdn>421903123456</msisdn> <text>Veeeeeeeeeeeeeeeery long SMS. Veeeeeeeeeeeeeeeery long SMS. Veeeeeeeeeeeeeeeery long SMS. Veeeeeeeeeeeeeeeery long SMS. Veeeeeeeeeeeeeeeery long SMS. Veeeeeeeeeeeeeeeery long SMS. </text> </bsms:message> </bsms:messages> </soapenv:Body> </soapenv:Envelope>

Send SMS - response

Parameter Required Type Description
/messageSentStatus/id Required Int64 Unique message ID
/messageSentStatus/status Required String send status: ok - sent
blacklist - MSISDN blacklisted
error - could not send/error
notAllowed - MSISDN not permitted for testing
network_disabled - destination network forbidded
/messageSentStatus/duplicate Optional Boolean Duplicate flag.
/messageSentStatus/price Optional Decimal Message price (message can be divided into several multipart SMSs).
Null, if price not configured.
/messageSentStatus/parts Required Int32 Count of multipart SMSs.
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://bsms.viamobile.sk/"> <SOAP-ENV:Body> <ns1:messageSentStatuses> <ns1:messageSentStatus> <id>1</id> <status>ok</status> <duplicate>true</duplicate> <price>0.05</price> <parts>1</parts> </ns1:messageSentStatus> <ns1:messageSentStatus> <id>2</id> <status>ok</status> <duplicate>false</duplicate> <price>0.1</price> <parts>2</parts> </ns1:messageSentStatus> </ns1:messageSentStatuses> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
1.2 Send Unicode SMS

Send Unicode SMS - request

Parameter Required Type Description
/sender
Optional String(11) Sender name, max. 11 characters
Default: InfoSMS
/encoding
Optional Enum gsm/utf8
gsm - standard SMS message (default, GSM7 alphabet).
Text with max. 160 characters will be sent as 1 SMS, text over 160 characters will be sent as ceil(length(text)/153) SMSs

utf8 - unicode message (UTF8 alphabet).
Text with max. 70 characters will be sent as 1 SMS, text over 70 characters will be sent as ceil(length(text)/67) SMSs
/time_to_send
Optional ISO timestamp ISO timestamp in format YYYY-MM-DD HH:mm:ss, e.g. 2019-01-01T21:00:00
Default: now
/message/id
Required Int64 Unique message ID
/message/msisdn
Required Int64 Recipient MSISDN in international format without + or 00. E.g. 421903123456
/message/text
Required String(480) Message text
POST https://api.bsms.viamobile.sk/soap HTTP/1.1 Content-Type: text/xml;charset=UTF-8 SOAPAction: "http://bsms.viamobile.sk/SendSms" Authorization: Basic dGVzdDp0ZXN0 Host: api.bsms.viamobile.sk <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bsms="http://bsms.viamobile.sk/"> <soapenv:Header/> <soapenv:Body> <bsms:messages> <sender>InfoSMS</sender> <encoding>gsm</encoding> <time_to_send>2020-01-01T00:00:01</time_to_send> <bsms:message> <id>1</id> <msisdn>421903123456</msisdn> <text>Text sms - ľščťžýáíé</text> </bsms:message> <bsms:message> <id>2</id> <msisdn>421903123456</msisdn> <text>Very long SMS with accent - ľščťžýáíé ľščťžýáíé ľščťžýáíé ľščťžýáíé ľščťžýáíé </text> </bsms:message> </bsms:messages> </soapenv:Body> </soapenv:Envelope>

Send Unicode SMS - response

Parameter Required Type Description
/messageSentStatus/id Povinný Int64 Unique message ID
/messageSentStatus/status Povinný String send status: ok - sent
blacklist - MSISDN blacklisted
error - could not send/error
notAllowed - MSISDN not permitted for testing
network_disabled - destination network forbidded
/messageSentStatus/duplicate Optional Boolean Duplicate flag.
/messageSentStatus/price Optional Decimal Message price (message can be divided into several multipart SMSs).
Null, if price not configured.
/messageSentStatus/parts Required Int32 Count of multipart SMSs.
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://bsms.viamobile.sk/"> <SOAP-ENV:Body> <ns1:messageSentStatuses> <ns1:messageSentStatus> <id>1</id> <status>ok</status> <duplicate>true</duplicate> <price>0.05</price> <parts>1</parts> </ns1:messageSentStatus> <ns1:messageSentStatus> <id>2</id> <status>ok</status> <duplicate>false</duplicate> <price>0.1</price> <parts>2</parts> </ns1:messageSentStatus> </ns1:messageSentStatuses> </SOAP-ENV:Body> </SOAP-ENV:Envelope>