1. Home
  2. Gateway
  3. HTTP Api
  4. 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:


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 is deactivated

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
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
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
flash Send SMS as Flash SMS. These are displayed directly in the receiver’s display (only available with Direct SMS). 1
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
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
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 ID
0 = Only status code (default)
label You can optionally set a separate label for each SMS so that you can assign it to your statistics. Max. 100 chars, allowed characters: a-z, A-Z, 0-9, .-_@. Customer_1
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 enabled
0 – 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

File attachments

You can send file attachments directly via API. To do this, you need to pass in the files parameter as an associative array the respective files.

Parameter Description Examples
name Filename. This must be inserted exactly like this in the SMS text as a placeholder. Here it would be [[document.pdf]] document.pdf
contents Contents of the file encoded as base64. iVBORw0KGgoAAAANSUhEUgAAAdoAAACWCAYAAAB5CUk.......
validity (optional) Validity in days 3
password (optional) Wanted access password to the file password123

For example, here would be files[0][name]=document.pdf, files[0][contents]=iVBORw0KGgoAAAANSUhEUgAAAdoAAACWCAYAAAB5CUk......., files[0][validity]=3 and files[0][password]=password123.

In the SMS text, please enter the respective placeholder at the desired position: Here is the file: [[document.pdf]]


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
903 Server IP is wrong

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.


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:



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

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 3 No 1