SendMessage

Overview

  • API URL: /api/v1/zoloz/globalchatapp/sendmessage
  • API Description: This interface is uesd to send specified SMS content to a designated phone number through designated Chatapp channel.

Request Parameter

Field name

Data type

Max length

Mandatory

Default value

Description

Sample value

channelType

String

32

Y

-

Channel type. The fixed value is VIBER.

"VIBER"

sender

String

64

Y

-

Designated message sender.

"ZOLOZViber"

mobile

String

32

Y

-

Recipient phone number. The format is International dialing code + number.

"6321245567****"

contentType

String

32

Y

-

Message type.

  • template: When sending Chatapp Messages, a pre-approved message template must be used.

"template"

templateCode

String

64

N

null

Message template code.

"VIBER_10000691"

templateLanguage

String

32

N

null

Message template language.

"en_US"

templateParams

Java.util.Map

-

N

null

Message template variables and values.

Refer to Request Sample

field

String

-

N

null

Sub-type of templateParams.

Refer to Request Sample

group

Long

-

Y

-

Product Rule ID. For details, contact the ZOLOZ integration team.

60006

Response Parameter

Field name

Data type

Mandatory

Description

Sample value

result

Result

Y

API request result, including result statu, result code, and result message.

{

"resultStatus": "S", "resultCode": "SUCCESS", "resultMessage": "Success"

}

transactionId

String

N

Unique transaction ID generated by ZOLOZ server.

Note: The transactionId is only returned when transaction enters the processing stage. If an error occurs before the transaction is processed, the transactionId will not be returned. This includes but is not limited to the following scenarios:

  • Invalid request parameters (e.g., format errors or missing required parameters).
  • Request fails to reach the server (e.g., network issues or gateway failures).
  • System rate limiting causes the request to be rejected.

"G0062000061MT20230325dAqiXBpQUbVB9h****"

Result

Response Actions Based on API Request Result:

  • When result.resultStatus is S, the call to the ZOLOZ Global Chatapp SendMessage API is successful.
  • When result.resultStatus is F, the call to the ZOLOZ Global Chatapp SendMessage API failed. Please check error code to obtain detailed information about the error, and analyze the root cause of the failure.

API Common Result Codes

For the complete list of common result codes, see API Common Result Codes.

Sample

Request Sample

copy
{
    "channelType": "VIBER", 
    "sender": "ZOLOZViber", 
    "mobile": "6321245567****", 
    "contentType": "template", 
    "templateCode": "VIBER_10000691", 
    "templateLanguage": "en_US", 
    "templateParams": {
        "params1": "This is the specific value of the variable params1", 
        "params2": "This is the specific value of the variable params2", 
        "verificationCode": "1234"
    }, 
    "group": 60006
}

Response Sample

copy
{
    "result": {
        "resultStatus": "S", 
        "resultCode": "SUCCESS", 
        "resultMessage": "Success"
    }, 
    "transactionId": "G0062000061MT20230325dAqiXBpQUbVB9h****"
}