Skip to content

Examples

Sending messages

Plain text

To send a plain text message set coding to 0.
Maximum length of a plain text message is 153 characters a single non concatenated message (instead of 160, see introduction section).
For concatenated messages please see concatenated messages section for more details

GET /v2/sms/send

curl -X GET -G API_URL \
-d token=TOKEN \
-d from=123 \
-d to=445555555555 \
--data-urlencode text='my plain text message' \
-d coding=0 \
-d dlr-mask=31 \
--data-urlencode dlr-url='http[s]://mydomain.com/deliveryReports?&msgid=123123&status=%d&to=%p&from=%P&ts=%T&price=%price'

Unicode

To send a unicode (GSM-7) message set coding to 2 and encode your text to HEX UTF8 encoding.
Maximum allowed length of a unicode (GSM-7) message is 67 characters for a single non concatenated message (instead of 70, see introduction section).
For concatenated messages please see concatenated messages section for more details

Examples:
For the following arabic plain text ابت your encoded message should like so: %D8%A7%D8%A8%D8%AA
For the following hebrew plain text אבג your encoded message should like so: %D7%90%D7%91%D7%92
For the following greek plain text αβγ your encoded message should like so: %CE%B1%CE%B2%CE%B3

GET /v2/sms/send (Send arabic unicode message ابت encoding %D8%A7%D8%A8%D8%AA)

curl -X GET -G API_URL \
-d token=TOKEN \
-d from=123 \
-d to=445555555555 \
-d text='%D7%90%D7%91%D7%92' \
-d coding=2 \
-d dlr-mask=31 \
--data-urlencode dlr-url='http[s]://mydomain.com/deliveryReports?&msgid=123123&status=%d&to=%p&from=%P&ts=%T&price=%price'