SMS HTTP API

Request format

GET — HTTP

http://smpp.scarpeltele.com:8001/api?username=<username>&password=<password>&ani=<ani>&dnis=<dnis>&message=<message>&command=submit&serviceType=<serviceType>&longMessageMode=<longMessageMode>

GET — HTTPS

https://smpp.scarpeltele.com:8002/api?username=<username>&password=<password>&ani=<ani>&dnis=<dnis>&message=<message>&command=submit&serviceType=<serviceType>&longMessageMode=<longMessageMode>

POST — credentials in the URL query string

curl -H 'Content-Type: application/json' -X POST \ -d '{"ani":"ani","dnis":"dnis","message":"test"}' \ 'http://smpp.scarpeltele.com:8001/api?command=submit&username=username&password=password'

POST — credentials in the JSON body

curl -H 'Content-Type: application/json' -X POST \   -d '{"username":"username","password":"password","command":"submit","ani":"ani","dnis":"dnis","message":"test"}' \ 'http://smpp.scarpeltele.com:8001/api?'

NOTE: To send multiple SMS messages, add several comma-separated DNIS values to the dnis field.

ParameterValueRequired
commandRequest type. Possible values: "submit","query", "mo". To send a message over HTTP, specify command=submit.Yes
dnisDestination number. Must be sent in international E.164 format (up to 15 digits allowed).

If the field length exceeds 2048 symbols or 100 numbers, the incoming message will be rejected with: 400 Bad Request (Destination number is too long).

Multiple DNIS's cannot be used for longMessageMode=split_or_payload

If multiple identical numbers are transferred in the field, duplicates will not be sent further, even though message IDs will be issued for all successfully routed messages.
Yes
messageMessage textYes
passwordPasswordYes
serviceTypeService type, provided by the System owner for the registered interconnection. Can be blank. The maximum length is 9 bytesYes
usernameLoginYes
aniCaller ID. Technical limitation: alpha-numeric up to 32 symbols. Additional limitations can be caused by destination route peculiaritiesNo
dataCodingData coding scheme for sending the SMPP to the vendor. Format: integer. Optional. Allowed values:
0: SMSC Default Alphabet (SMPP 3.4)/MC Specific (SMPP 5.0)
1: IA5 (CCITT T.50)/ASCII (ANSI X3.4)
3: Latin 1 (ISO-8859-1)
6: Cyrillic (ISO-8859-5)
7: Latin/Hebrew (ISO-8859-8)
8: UCS2 (ISO/IEC-10646)
10: ISO-2022-JP (Music Codes)
14: KS C 5601
No
esmClasscorresponds to the same name parameter in SMPP. Format: integer. Optional. Allowed values: 0-255No
flashFlag that indicates a flash message. Allowed values:

0 (regular message)

1 (flash message that is shown on the screen and is not stored in the device memory).

Note that the flag is merely written to the EDR (Technical details field) and does not change the message data coding. The flag value can be transmitted for MT message sending. The flag can also be changed with the help of translation rules.
No
longMessageModeType of long message processing. Allowed values:

cut: trims message text to 140 bytes (sends only the first 140 bytes). This is the default value.

split: splits the message using a UDH header.

split_sar: splits the message using a SAR header.

single_id_split: split the message but return the message ID common for all segments

payload: uses the message_payload field to send the message text.

split_or_payload: serves for sending long messages received over HTTP to SMPP vendors. Not supported if several numbers have been received in the dnis parameter within a single request. When the Send text in payload option is enabled in the vendor channel, the message will be sent in the payload field as a single submit_sm packet. A single delivery report is expected for it, whereas the client will be sent as many reports as the number of received parts. A single EDR will be written; therefore, the bill by segments option must be set in the client product for correct billing.

Splitting logic (options split / split_sar) depends on dataCoding:

dataCoding = 0, 1 or 3: up to 160 bytes per message; if more: segment count = message length in symbols / 153.

dataCoding 2, 4 - 7: up to 140 bytes per message; if more: segment count = message length in symbols / 134.

dataCoding 8: up to 140 bytes per message; if more: segment count = message length in symbols / 67 (1 symbol = 2 bytes, i.e. message length in bytes / 134).
No
incMsgId (inc_msg_id)Client message ID (64 symbols maximum). Can be used for incoming HTTP requests with longMessageMode=cut, split, split_sar, or no longMessageMode (which equals longMessageMode=cut).

When the SMS switch receives this parameter it will use its value as a client ID. This allows clients to use their ID to request information on the message if, for example, no routes are available.

For long messages (longMessageMode=split or  split_sar) inc_msg_id iwill be the same for the entire message, while the SMS switch will split the message into parts using the same ID with a part number appended.

For example, if a message has two parts and inc_msg_id=1gfc4dd56cbndcj741xs the switch will process the messages with IDs1gfc4dd56cbndcj741xs-1 and 1gfc4dd56cbndcj741xs-2.
No
srcTon, srcNpi, dstTon, dstNpiThe respective parameters for Sender ID and Destination number. Format: integer. OptionalNo
priorityFlagCorresponds to the same name parameter in SMPP. Format: integer. Optional. Allowed values are: 0 and 1.No
registeredDeliveryCorresponds to the same name parameter in SMPP. Format: integer. Optional. Allowed values are: 0 and 1.No
replaceIfPresentFlagCorresponds to the same name parameter in SMPP. Format: integer. Optional. Allowed values are: 0 and 1.No
silentFlag that allows sending silent SMS (arrives with no sound, not displayed on the screen).
Allowed values: 0 (NOT silent), 1 (silent). Any non-zero value is treated as silent: for example, silent=false is interpreted as silent=1.

Whether the SMS arrives as silent depends on the vendor and carriers involved.
No

Response format

In case of successful processing, the status in the header of the HTTP response is 200 OK. Response body contains the message_id.

Single DNIS — success

HTTP/1.1 200 OK
Content-Type: application/json

{"message_id":"alss-a1b2c3d4-e5f67890"}

When the request contains more than one DNIS (comma-separated) or longMessageMode=split/split_sar with a message longer than 160 / 70 symbols (GSM / Unicode), the response will look as follows:
Multiple DNIS or long message split — success

HTTP/1.1 200 OK
Content-Type: application/json
[ {"dnis":"34511121","message_id":"5b4c46a8-8dc9-44b4-f55f-3bef56819305", "segment_num":"1"}, {"dnis":"34511121", "message_id":"5b4c46a8-46bc-7ee6-4a16-7d4e5a0d14af","segment_num":"2"} ]

400 Bad Request — no routes

HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=UTF-8

NO ROUTES

401 Unauthorized

HTTP/1.1 401 Unauthorized
Content-Type: text/html; charset=UTF-8

not authorized (check login and password)

400 Bad Request — invalid service type

HTTP/1.1 400 Bad request
Content-Type: text/html; charset=UTF-8

Service type is invalid

508 Loop Detected

HTTP/1.1 508 Loop Detected
Content-Type: text/html; charset=UTF-8

loop detected

SMS status request

The links below are intended for request of delivery reports over HTTP from the client side.

Request format

http://smpp.scarpeltele.com:8001/api?username=<username>&password=<password>&messageId=<messageId>&command=query

https://smpp.scarpeltele.com:8002/api?username=<username>&password=<password>&messageId=<messageId>&command=query
ParameterValue
username:Login
password:Password
messageId:Message identifier received with the submission response
command:Request type. Must be set to "query".

All parameters are required.

Status Values

StautsDescription
ENROUTEMessage is in routing stage. Returned when message is in SENT status.
DELIVRDMessage is delivered to the subscriber.
EXPIREDMessage storage period expired.
DELETEDMessage was deleted.
UNDELIVMessage cannot be delivered.
ACCEPTDMessage is accepted by SMSC.
UNKNOWNUnknown message status. Information on statuses is stored in the in-memory database for 24 hours (by default). Returned when the status was already removed from memory.
REJECTDMessage was rejected by SMSc. Also returned for internal failed statuses, e.g. NO ROUTES.
IM_EXPDDelivery report was not received from the IM provider within the im_ttl timeout.

Response sample — success

HTTP/1.1 200 OK
Content-Type: application/json

{"status":"DELIVRD","delivery_time":"20210922093309","mccmnc":"214099","error_code":"000","system_delivery_time":"210922093309"}

Where: delivery_time — done date from the vendor (empty if not received); mccmnc — E212 code;error_code — delivery error code; system_delivery_time — delivery report receipt time by the system (format: YYMMDDHHMMSS).

The status can be requested within 24 hours after the message submission.

Response sample — message ID not found

HTTP/1.1 200 OK
Content-Type: application/json

{"status": "UNKNOWN","delivery_time": "","mccmnc": ""}

401 Unauthorized

HTTP/1.1 401 Unauthorized
Content-Type: text/html; charset=UTF-8

not authorized (check login and password)

Allowed marker names for outgoing HTTP callbacks

This section contains allowed marker names for outgoing HTTP callbacks (sending of delivery reports with the help of cURL in a generated script).

It is possible to specify the _noencode suffix for markers to transmit text without URL encoding. Example:

curl

'http://smpp.scarpeltele.com/api/callback/api?msgid=$message_id$&state=$delivery_status$&reasoncode=$result_code$&to=$dnis$&time=$done_date_noencode$&msgid=$messageId$&mcc=$mcc$&mnc=$mnc$'

Deliver markers

ParameterDescriptionFormatAllowed Values
aniDestination addressstring
app_msg_idIdentifier of the submit that was sent to the client in thesubmit_sm_resp or HTTP responsestring
clientChannelIdVendor channel ID used to receive the deliver_sminteger
country_nameCountry NamestringIf not defined, the marker is replaced by "Undefined"
currencyClient account's currencystring
delivery_statusDelivery status based on outgoing translations for the client sidestring
delivery_timeTime when the delivery report was generated by the switchstringDate format: YYMMDDHHMMSS
dlvrResultCodeDescrResponse code descriptionstring
dnisSender IDstring
done_dateTime value from the "done date:" field of the delivery report received from the vendorstringDate format: YYMMDDHHMMSS.

Depending on the date format in the source delivery report, the SS may be 00.

Example: 2019-11-12Z08:06:18
done_date_tSame as done_date but with Z delimiter replaced by T. Delivery time in system timezone with unrounded seconds.stringExample: 2019-11-12T08:06:18
messageDelivery report text generated by the switchstring
message_idMessage identifier, including the common ID of a concatenated message if concatenation was correctly detected and assembledstring
mccMCCstring
mccmncMCCMNCstring
mncMNCstring
mnc_no_zeroMNC without leading zerosstring
net_nameNetwork namestringif not defined, the marker is replaced by "Undefined"
part_amountNumber of message partsstringnumber, from 1 and above
rateMessage cost in the client's currencystringnumber; up to 5 decimal places are allowed
reportingKeyreporting key received in an Oracle Responsys requeststring
result_codeError code from the delivery report received from the vendorstringThe default value is "000"
serviceTypeFor POIs with service string type='*' it is replaced with the service type received from the client in the initial submit requeststring
system_delivery_timeDelivery report send time to the clientstringDate format: YYMMDDHHMMSS

Last updated: 23 April 2026