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:
Parameter | Description | Examples |
---|---|---|
to |
Recipient number – possible are numbers and address book entries (groups and contacts). Multiple recipients can be specified separated by commas | 0049171999999999 |
text |
Text message | Up 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
Parameter | Description | Examples |
---|---|---|
from |
Sender number. It may contain a maximum of 11 alphanumeric or 16 numeric characters. | Sender |
debug |
If activated no SMS will be sent or calculated. | 1 |
delay |
Date/time for time-delayed SMS | Optional Unix-Timestamp or format yyyy-mm-dd hh:ii e.g. 1141511104 or 2016-03-04 23:25:04 |
no_reload |
Switch 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 |
unicode |
Transmission 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 |
flash |
Send SMS as Flash SMS. These are displayed directly in the receiver’s display (only available with Direct SMS). | 1 0 |
udh |
Only 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) |
utf8 |
Forces the detection as a UTF8 character set and overrides automatic recognition of the API. | 1 0 |
ttl |
Specifies the validity period of the SMS in minutes. | 2880 48h (default)60 1h |
details |
Shows numerous details to the sent SMS. Handy for debugging. | 1 0 |
return_msg_id |
If this parameter is set, the ID of the SMS is output in the second line after the status code. | 1 = return ID0 = Only status code (default) |
label |
You 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 |
json |
The output is more detailed in JSON format. | 1 – output as JSON |
performance_tracking |
Enable Performance Tracking for URLs found in the message text | 1 – Performance Tracking enabled0 – Performance Tracking disabled (default) |
foreign_id |
Provide your own ID for this message. You will get the foreign_id in return back in DLR callbacks etc. Max. 64 chars, allowed characters: a-z, A-Z, 0-9, .-_@ |
id12345 |
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 code | Description |
---|---|
100 | SMS was sent successfully |
101 | Transmission to at least one recipient failed |
201 | Sender invalid. A maximum of 11 alphanumeric or 16 numeric characters are allowed. |
202 | Recipient number invalid |
301 | Variable to not set |
305 | Variable text not set |
401 | Variable text is too long |
402 | Reload Lock – this SMS has already been sent within the last 180 seconds |
403 | Max. limit per day reached for this number |
500 | Too little credit available |
600 | Carrier delivery failed |
700 | Unknown error |
900 | Authentication failed. Please check your api key |
902 | http API disabled for this account |
903 | Server IP is wrong |
11 | SMS 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&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&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