The JSON format allows you to specify different message content for different subscription protocols, including Default, SMS, HTTP, HTTPS, DMS, and Email. The message content you specify will be sent to subscription endpoints using applicable protocols.
{ "default": "Dear Sir or Madam, this is a default message.", "email": "Dear Sir or Madam, this is an email message.", "http": "{'message':'Dear Sir or Madam, this is an HTTP message.'}", "https": "{'message':'Dear Sir or Madam, this is an HTTPS message.'}", "sms": "This is an SMS message." "dms":"Dear Sir or Madam, this is a DMS message." }
It is recommended that you specify general message content for all subscription types in the Default protocol and enter customized content for specific protocols.
In the following example, you enter a shorter message for the SMS protocol because of the length limit on SMS messages. SMS subscribers in the topic receive the message "This is an SMS message.", while other types of subscribers (email, DMS, HTTP, and HTTPS) receive "Dear Sir or Madam, this is a default message."
{ "sms": "This is an SMS message.", "default": "Dear Sir or Madam, this is a default message." }
The total size of a JSON message, including braces, quotation marks, spaces, line breaks, and message content, cannot exceed 256 KB. The size of a JSON message generated for each protocol may vary.
For example, message content "This is a default message." contains 26 bytes.
The system automatically adds the Default protocol when generating a JSON message.
{ "default": "This is a default message.", "protocol1": "This is a default message.", "protocol2": "This is a default message.", ... }
The total number of protocols is N, including the Default protocol and those you selected.
Total size = 36N + 9 + Bytes of selected protocols
For example, you selected the HTTP, HTTPS, and email protocols, and the message is as follows:
{ "default": "This is a default message.", "email": "This is a default message.", "http": "This is a default message.", "https": "This is a default message." }
The system adds a Default protocol, and therefore the value of N is 4. The size of your JSON messages is:
The total size is 167 bytes (153 + 4 + 5 + 5 = 167).