1. Home
  2. Docs
  3. Gateway
  4. HTTP Api
  5. Send SMS

Send SMS

Use this API to send SMS with numerous functions to one or more recipients at the same time.

Please direct your request to the following URL:

https://gateway.sms77.io/api/sms

Required parameters

In addition to authentication, the following parameters are required:

ParameterDescriptionExamples
toRecipient number – possible are numbers and address book entries (groups and contacts). Multiple recipients can be specified separated by commas0049171999999999
0171999999999
49171999999999
Group1
textText messageUp to 1520 characters
(If more than 160 characters are used, the text is distributed over several SMSs, each SMS is calculated individually)

Optional parameters

1 = parameter is activated
0 = parameter inaktive

ParameterDescriptionExamples
typeSMS type according to the SMS types on sms77.io. Please use the type Direct for important SMS. For Economy SMS, there may be technical reasons for delayed or missing transmission.economy
direct
fromSender number. It may contain a maximum of 11 alphanumeric or 16 numeric characters.Sender
01761234567890
CompanyABC
debugIf activated no SMS will be sent or calculated.1
0
delayDate/time for time-delayed SMSOptional Unix-Timestamp or format yyyy-mm-dd hh:ii
e.g. 1141511104
oder
2016-03-04 23:25:04
no_reloadSwitch off reload lock. This lock prevents the sending of the same SMS (text, type and recipient alike) within 180 seconds. You can deactivate this lock permanently in your login under Settings > SMS.1
0
unicodeTransmission as Unicode SMS (Cyrillic, Arabic etc characters). The SMS length is thereby reduced to 70 characters. Please note that our Gatway recognizes the coding automatically. This parameter is therefore not necessary. You can, however, force a certain transmission method hereby. Only Direct SMS support unicode messages.1
0
flashSend SMS as Flash SMS. These are displayed directly in the receiver’s display (only available with Direct SMS).1
0
udhOnly for Direct SMS. Individual User Data Header (UDH) of the SMS. If specified and variable text contains Hexcode, the message will be sent as 8-bit binary SMS.050003CC0201 (Concatenated message: reference number 204, part 1 of 2 parts)
utf8Forces the detection as a UTF8 character set and overrides automatic recognition of the API.1
0
ttlSpecifies the validity period of the SMS in milliseconds. Only available with Direct SMS.86400000 24h (default)
300000 5min
detailsShows numerous details to the sent SMS. Handy for debugging.1
0
return_msg_idIf this parameter is set, the ID of the SMS is output in the second line after the status code.1 = return ID
0 = Only status code (default)
labelYou can optionally set a separate label for each SMS so that you can assign it to your statistics. Allowed characters: a-z, A-Z, 0-9, .-_@Customer_1
Marketing_22.02.2018
Splittest17
jsonThe output is more detailed in JSON format.1 – output as JSON
performance_trackingEnable Performance Tracking for URLs found in the message text1 – Performance Tracking enabled
0 – Performance Tracking disabled (default)

Return

In response to your request, you will receive a numeric return value and the Msg ID of the message sent. You can later use the ID to assign e.g status reports.
If you specify the parameter details you will receive a lot of additional information – amongst other things the credit balance and the booked credit.
The return is done as a simple text with each value separated by \n in a line.

Following return codes are possible:

Status codeDescription
100SMS was sent successfully
101Transmission to at least one recipient failed
201Sender invalid. A maximum of 11 alphanumeric or 16 numeric characters are allowed.
202Recipient number invalid
300Variable p is not specified
301Variable to not set
304Variable type not set
305Variable text not set
400type invalid. See allowed values ​​above.
401Variable text is too long
402Reload Lock – this SMS has already been sent within the last 180 seconds
403Max. limit per day reached for this number
500Too little credit available
600Carrier delivery failed
700Unknown error
900Authentication failed. Please check user and api key
902http API disabled for this account
903Server IP is wrong
11SMS carrier temporarily not available

Character set

SMS support a very own 7-bit character set (GSM 0338), which contains some UTF-8 characters such as e.g. German umlauts, but not e.g. ó or Chinese, Arabic, Cyrillic characters, etc. For this, a unicode SMS would have to be sent, which is coded with 8 bits and therefore requires only 70 characters space per SMS. A Unicode SMS with e.g. 120 characters would hence cost twice as a normal SMS.

Here you can learn more about the specifications of the SMS character set and see the complete list of allowed characters in normal (not unicode) SMS: https://en.wikipedia.org/wiki/GSM_03.38#GSM_7-bit_default_alphabet_and_extension_table_of_3GPP_TS_23.038_.2F_GSM_03.38.

Examples

1. Simple sending of SMS

The call of the following URL sends an SMS with the content my first message as a Direct SMS with the sender sms77.io to the phone number 49160999999999:

Request:
https://gateway.sms77.io/api/sms?p=api-key&to=49160999999999&text=my%20first%20message&type=direct&from=sms77.io&return_msg_id=1

Response:
100
123456789

The SMS has been transmitted successfully – the Msg ID is 123456789.

2. Debug mode with detailed output

This call doesn’t send an SMS due to the set parameter debug, but it shows a lot of details about the message.

Request: http://gateway.sms77.io/api/sms?p=api-key&to=Group1&type=direct&text=Test+SMS&from=SMS&flash=0&details=1&debug=1

Response:
100
booked: 0
price: 0.089
credit: 27.38
text: Test SMS
SMS type: direct
Flash SMS: off
Encoding: ASCII
GSM0338: true
Debug: true

Was this article helpful to you? Yes 1 No
Menu