Smarthub Api En
  1. Sms Service
  • Overview
    • Global Description
  • SIM Card Management
    • Retrieve SIM detail information
      GET
    • Retrieve list of SIMs detail information
      GET
    • Retrieve state change history of SIMs
      GET
    • Retreive custom field of SIM
      GET
    • Edit custom field of SIM
      PUT
    • Activate SIM
      POST
    • Suspend SIM
      POST
    • Retire SIM
      POST
    • SIM subscribe to supplimentary rate plan
      POST
    • Change SIM basic rate plan
      PUT
    • Change SIM apn status
      PUT
  • SIM Card Batch Operation
    • Batch SIM activate
      POST
    • Batch SIM suspend
      POST
    • Batch SIM retire
      POST
    • Batch change SIM basic rate plan
      POST
    • Retrieve batch job information
      GET
  • Sms Service
    • Send SMS to terminal
      POST
    • Query SMS delivery status
      GET
    • MO SMS Push
      POST
    • Push MT SMS Status Report
      POST
  • Subscription Notification
    • Push Cycle Usage Tracking Event Notification
      POST
    • Push Imei Change Event Notification
      POST
    • Push No Session Connection Event Notification
      POST
    • Push Prepaid Service Package Expired Event Notification
      POST
    • Push Prepaid Service Package Traffic Tracking Event Notification
      POST
    • Push Sim Status Change Event Notification
      POST
    • Push Sim Apn Status Change Event Notification
      POST
  • Share Pool
    • Get share pool information
  • Enterprise Information
    • Get enterprise information
    • Get account information
    • Get servicePackages information
  • SIM Card Statistics
    • Get the country code traffic and number of cards for SIM card statistics
  1. Sms Service

Send SMS to terminal

POST
/mt-sms
Asynchronize operation to send SMS to terminal. API call success indicated the request has been accepted by the platform. When status field is DELIVERED to indicate
message has been successfully delivered to terminal.
toGiccid & messageText is mandatory in the message.
coding format:
Encoding FormatDescription
0default coding, operation's network coding
1ASCII IA5 (CCITT T.50)/ASCII (ANSI X3.4)
4Binary

Message Effectivity#

The length of time that message will be kept in the SMSC. SMSC will try to deliver the message to terminal before time expired.
If the message still not able to deliver to terminal on expiry (terminal switched off or not in service area), message will be discarded.
tpvp expiry date supports range of 5 minute to 63 weeks. Use GSM 03.40 defined TP-VP relative format:
TPVP ValueValid TimePossible Valid Time value
0-143(tpvp+1) * 5 Minutes5、10、15,…715, 720 (Minute))
144-167(12+(tpvp-143)/2) Hours12:30,13:00,…23:30,24:00 (Hour)
168-196(tpvp – 166) Days2, 3, 4, …30 Days
197-255(tpvp – 192) Week5, 6, 7, …63 Week
Return value status defines as follow:
StatusDescription
DELIVEREDDelivered
PENDINGPending
FAILEDFailed
UNKNOWNUnknown

Request

Header Params

Body Params application/json

Example
{
    "requestId": "150aa0f9bc6441378938a1e6c6e222f9",
    "toGiccid": "8986011805021000040",
    "messageEncoding": "LITERAL",
    "dataCoding": 0,
    "messageText": "测试短信",
    "pushAck": 0,
    "tpvp": 0
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/mt-sms' \
--header 'X-API-Key;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "requestId": "150aa0f9bc6441378938a1e6c6e222f9",
    "toGiccid": "8986011805021000040",
    "messageEncoding": "LITERAL",
    "dataCoding": 0,
    "messageText": "测试短信",
    "pushAck": 0,
    "tpvp": 0
}'

Responses

🟢200OK
application/json
SMS delivery success
Body

Example
{
    "smsMsgId": "fa68483a97614af7afe95211941ef1e4",
    "requestId": "150aa0f9bc6441378938a1e6c6e222f9",
    "status": "DELIVERED",
    "toGiccid": "8986011805021000040",
    "dateSent": "2018-10-10T10:32:50+0000",
    "dateReceived": "2018-10-10T10:33:50+0000"
}
Modified at 2024-11-06 08:54:48
Previous
Retrieve batch job information
Next
Query SMS delivery status
Built with