Developer Documentation Developer Documentation
Help Center (opens new window)
Help Center (opens new window)
  • WhatsApp

  • International SMS

    • International SMS
    • Messenger

    • LINE API

    • Operations Support

    • Message Product API
    • International SMS
    Sobot
    2023-12-29
    Menus

    International SMS

    # International SMS

    # Send SMS

    API URL: https://sg.sobot.com/sms-server/api/sendSms

    Request method: POST

    Request param (header):

    Param Type Required Description
    Authorization String Yes API access credential. Please refer to Obtain the Authentication Token
    Content-type String Yes application/json;charset=UTF-8
    language String No Language tag: en - English, zh - Chinese

    Request param (query string)

    Param Type Required Description
    smsPhone String Yes Phone no. Multiple phone nos. should be separated by ","
    tplId String Yes Template ID
    tplValue json array No Variable. If tplId field is not blank, tplValue is a required param [{"name":"age","value":"1"}]
    senderId String No Sender ID
    outId String No 3rd-party business ID

    Request example:

    curl  https://sg.sobot.com/sms-server/api/sendSms
    -X POST 
    -H 'language: zh'
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhcHAiOiJkY2MyZWU2ZjBhZjg0YmU4ODIzYTBjYzUwYmNmOGU5MSIsImFnZW50SWQiOiIiLCJzZXJ2aWNlRW1haWwiOm51bGwsImlzcyI6InNvYm90IiwidHlwZSI6ImNyZWF0ZVRva2VuVm8uZ2V0UmxtKCkiLCJybG0iOiJ0aGlyZCIsImNvbXBhbnlJZCI6ImMxMmFhODdiN2QzODQ1NDM4ZWFiZjFiYTExNjZhOWE3IiwibmJmIjowLCJ6b25lIjpudWxsLCJleHAiOjE3MDM4NDM1NjA0MDEsImlhdCI6MTcwMzc1NzE2MDQwMSwiYWlkIjoiIiwiY2lkIjoiYzEyYWE4N2I3ZDM4NDU0MzhlYWJmMWJhMTE2NmE5YTcifQ.35sscEHafNwOVb81eWUIw0H-4ugjIU1zqCgL5fpk9bM' 
    -d '{
            "tplId": "303017a88d2a4873ae6ee6654c1b3fc8",
            "mobile": "8618031672790",
            "tplValue":[{"name":"age","value":"6"}],
            "outId": "123"
        }'
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10

    Return param

    Param Type Required Description
    retCode String Yes Return Code
    retMsg String Yes Return Message
    content json Array Yes SMS ID List
    content
    Param Type Required Description
    sendId String Yes Message ID
    sendStatus String Yes SMS status code
    reason String No Error code
    reasonDescription String No Error description
    smsPhone String Yes Mobile No.

    Response example:

    {
        "content": [
            {
                "sendId": "5e2382ed31a16N4bdbCa6bcS810c1f31764e",
                "smsPhone": "8618031672790",
                "reason": "0",
                "reasonDescription": "Submission Successful",
                "sendStatus": "2"
            }
        ],
        "retCode": 200,
        "retMsg": "Submission Successful"
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13

    # Query SMS records

    API URL: https://sg.sobot.com/sms-server/api/smsRecord

    Request method: POST

    Request param (header):

    Param Type Required Description
    Authorization String Yes API access credential. Please refer to Obtain the Authentication Token
    Content-type String Yes application/json;charset=UTF-8
    language String No Language tag: en - English, zh - Chinese

    Request param (query string)

    Param Type Required Description
    sendStatus Integer No Sending status (1: Sent, 0 Failed, 2 Approving)
    tplIdList String array No Template ID
    ruleCodeList String array No Channel list
    smsPhone String No Phone No.
    startTime long No Start time, timestamp (ms).When startTime and endTime fields are blank, data of recent 30 days will be returned by default
    endTime long No End time, timestamp (ms). When startTime and endTime fields are blank, data of recent 30 days will be returned by default
    outId String No 3rd-party business ID
    pageNo Integer Yes Pages
    pageSize Integer Yes Pieces

    Request example:

    curl  https://sg.sobot.com/sms-server/api/smsRecord
    -X POST 
    -H 'language: zh'
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhcHAiOiJkY2MyZWU2ZjBhZjg0YmU4ODIzYTBjYzUwYmNmOGU5MSIsImFnZW50SWQiOiIiLCJzZXJ2aWNlRW1haWwiOm51bGwsImlzcyI6InNvYm90IiwidHlwZSI6ImNyZWF0ZVRva2VuVm8uZ2V0UmxtKCkiLCJybG0iOiJ0aGlyZCIsImNvbXBhbnlJZCI6ImMxMmFhODdiN2QzODQ1NDM4ZWFiZjFiYTExNjZhOWE3IiwibmJmIjowLCJ6b25lIjpudWxsLCJleHAiOjE3MDM4NDM1NjA0MDEsImlhdCI6MTcwMzc1NzE2MDQwMSwiYWlkIjoiIiwiY2lkIjoiYzEyYWE4N2I3ZDM4NDU0MzhlYWJmMWJhMTE2NmE5YTcifQ.35sscEHafNwOVb81eWUIw0H-4ugjIU1zqCgL5fpk9bM' 
    -d '{
            "pageNo":1,
            "pageSize":50,
            "startTime":1703692800000,
            "endTime":1703779199999
        }'
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10

    Return param

    Param Type Required Description
    retCode String Yes Return Code
    retMsg String Yes Return Message
    content json Array No

    content Return Param

    Param Type Required Description
    list jsonarray Yes
    pageNo Integer Yes Pages
    pageSize Integer Yes Pieces on Each Page
    pageCount Integer Yes Total Pages
    totalCount Integer Yes Total Pieces
    list Return Param
    Param Type Required Description
    sendId String Yes Message ID
    smsContent String Yes SMS Content
    smsPhone String Yes Mobile No.
    reasonDescription String Yes Failure reason
    applyName String Yes Channel Name
    sendStatus String Yes SMS status code
    smsTemplateName String Yes SMS Template
    sendTime long No Sending Time
    smsFeeNum Integer No Billing Quantity
    smsWordCount Integer No SMS chars
    companyId String Yes Company id
    createTime Long Yes Creation time
    sendTime Long No Sending time
    smsType Integer No SMS type 1 Notification 2 Marketing 3 Verification Code
    extensions Json No Extensions field
    areaId String No Area id
    areaName String No Area Name
    senderId String No senderId

    Response example:

    {
        "content": {
            "pageNo": 1,
            "pageSize": 1,
            "pageCount": 22,
            "totalCount": 22,
            "list": [
                {
                    "sendId": "db7a16c3312dcN4153Caff0S7aa5a862adb1",
                    "smsContent": "Hello, Mr. Jason. We have noticed that your membership with our store is about to expire. If needed, please contact your account manager promptly to renew your membership",
                    "smsPhone": "8618031672790",
                    "companyId": "c12aa87b7d3845438eabf1ba1166a9a7",
                    "reason": "E200019",
                    "sendStatus": 0,
                    "sendTime": 1703764945163,
                    "createTime": 1703764929289,
                    "updateTime": 1703764950011,
                    "smsFeeNum": 0,
                    "smsWordCount": 43,
                    "smsTemplateName": "XX Membership",
                    "smsType": 1,
                    "reasonDescription": "E200019",
                    "extensions": null,
                    "areaName": "Singapore",
                    "areaId": "853100",
                    "senderId": null
                }
            ],
            "sumInfo": {},
            "dateInfo": []
        },
        "retCode": 200,
        "retMsg": "Submission Successful"
    }
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35

    # webhook pushes sending results

    • If the first push fails, it will be pushed every other 30 mins and pushed 3 times thereafter
    Param Type Required Description
    sendId String Yes Message ID
    sendStatus String Yes SMS status code
    reason String No Error code
    reasonDescription String No Error description
    smsPhone String Yes Mobile No.
    smsNum Integer Yes SMS number
    outId String Yes 3rd-party business ID
    receiveTime long No Receiving timestamp (ms)

    Response example:

    [
            {
                "sendId": "5e2382ed31a16N4bdbCa6bcS810c1f31764e",
                "smsPhone": "8618031672790",
                "reason": "E200019",
                "reasonDescription": "Failure",
                "sendStatus": "0",
                "outId": "0001",
                "receiveTime": 1703764950011,
                "smsNum": 1
            }
        ]
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    Last Updated: 11/15/2024, 3:29:25 PM

    ← WhatsApp API Facebook Messenger API→

    Update Date
    01
    Operations Support API
    04-03
    02
    CRM Docking Scheme
    12-05
    03
    AI Agent API
    09-09
    More Articles>
    Theme by Vdoing
    • Follow Sys
    • Line
    • Dark
    • Read