Send Message v2

🚧

API Endpoint and Authentication

  • Your API endpoint varies based on where your imiconnect account is hosted. Visit Know Your API Endpoint section to know more.

  • You can use either Service Key or JSON Web Tokens (JWT) for authentication. If you use both JWT authentication and Service Key in an API request, JWT authentication takes priority, and the Service Key is ignored.

The messaging API supports batching. You can send personalized messages to a maximum of 1000 destinations at once (subject to your TPS limits). E.g., if your messaging API TPS configuration is 10 you can send messages to up to 10 destinations at once.

Prerequisites

ChannelPrerequisite
SMSSender ID - A Sender ID is a name or number that an SMS appears to come from (β€˜from address’) when you receive a message on your phone.

A sender ID can be alpha-numeric or a short-code or a long-code depending on demographical restrictions
EmailYou will need to set up an Email app within imiconnect and verify your domain before you are able to send emails.

Please contact the Support team for any assistance in setting up Email app
RCSRCS chatbot needs to be created on all operators in geography before RCS messages can be sent.

This setup takes at least 7 days after submission on the UI under the apps section of imiconnect

Messaging API v2 - Samples

{
	"appid":"<channel asset specific App ID available in Assets page>", //This is required only for Push, In-App, Messenger, WhatsApp, Twitter DMs, WeChat, and Apple Messages for Business
  "channel":"<channel name - v2 API currently supports sms, email and rcs",
	"from":"<from address for the message, for SMS this will be a senderID, for email the sender address and for all OTT channels it will be appId available on the UI>",
	"to":[
		{
			"msisdn/email":[
				"single/multiple destination objects of the same type"
			],
      	],
		   "gtrId":["rcsgtrid"]
      //"gtrids must match the number of destination objects "
			"correlationId":"<correlationId for this array of destination objects>",
			"substitutions":{
				"parameter1":"<substitutions for this array of destination objects> ",
				"parametern":"<substitutions for this array of destination objects> "
			}
		},
		// Pass multiple objects in a single destination array for bulk messaging
 
                // Pass one object in each destination array for personalized messaging		
                 {
			"msisdn/email":[
				"single/multiple destination objects of the same type"
			],
			"correlationId":"<correlationId for this array of destination objects>",
			"substitutions":{
				"parameter1":"<substitutions for this array of destination objects> ",
				"parametern":"<substitutions for this array of destination objects> "
			}
		}
	],
	// Global substitutions
   "substitutions":{
		"parameterx":"<global replaceable parameters, destination level parameters take precendence",

	},
	// Message scheduling
   "sendAt":"<ISO8601 date/time>",
//max 7 days from current time
   // Only 1 of these 2 can be used. If both come then it's a 400 Bad request
 "expireAt":"<ISO8601 date/time>",
 "validity":"time period in seconds",
// Channel specific message options
    "options":{
		object(smsOptions)||object(emailOptions)||Object(rcsOptions)
	},
	// Call-backs
 "callbackData":"<notify data>",
"notifyUrl":"https://notify.example.com",
"requestedReceipts":[
		"DELIVERED",
		"READ"
	],
 // Union field message can be only one of content or template
   "content":{
    object(smsMessage)||object(emailMessage)||object(rcsMessage)
   },
	"template":{
		"id":"<unique template ID fom the UI"
	}
   //Optional array if you want to use Contact Policy 
  "contact policy": [
        {
             β€œcontactPolicyGroup” : GroupID, //the GroupID to be applied. Required if any of the following options are included and set to true

             β€œchannelCheckConsent” : true, //optional, assumed false, set to true to require opt-in before sending the message

             β€œchannelRequirePreference” : true, //optional, assumed false, set to true to require channel preference before sending the message

            β€œchannelApplyFrequencyCap” : true //optional, assumed false, set to true to enforce group frequency cap for that channel
        }
      ],     
}
{
   "channel":"sms",
   "from":"CNNECT",
 
   
   "to":[
      {
         "msisdn":[
          
            +1647XXXXXXX",  //E.164 format required/recommended. Older tenants might still accept other formats.
         ]
    
       
      }
     
   ],

    "smartlinks":[
   {
     "smartlinkId": 5,
     "validity": 30
   }
   ],

   "substitutions":{
      "name":"abc",
      "value":"123"
   },
 
   "options":{
      "trackClicks":"true",
      "shortenLinks":"true",
      "domain":"https://domainname",
      "extras":{
          "dlt_templateid":"123456789"
          
          
          
      }
      
      
   },
   
 
   "callbackData":"CallBackdata",
   "notifyUrl":"https://requestinspector.com/inspect/01evrfdrr7jc662279wjskfbk6",
   
   
   "requestedReceipts": [
       "SENT",
        "DELIVERED","Clicked"
        
    ],
   "content":{
      "type":"text",
      "text":"Hi user, there is an outage in your area $(area) for the next $(value)"
}
{
	"channel":"email",
	"from":"[email protected]",
	"to":[
		{
			"email":[
				"[email protected]",
				"[email protected]"
			],
			"correlationId":"na1b2b1i1",
			"substitutions":{
				"area":"EC1M 4BH",
				"accountNumber":"38S189"
			}
		},
		{
			"email":[
				"[email protected]"
			],
			"correlationId":"na1b2b1i1",
			"substitutions":{
				"area":"NW10 2QD",
				"accountNumber":"SA129"
			}
		}
	],
	"substitutions":{
		"offerName":"Big OFFER",
		"value":"123"
	},
	"cc":[
		"[email protected]"
	],
	"bcc":[

	],
	"callbackData":"<notify data>",
	"notifyUrl":"https://webhook.site/d50dd211-8c06-440f-ba49-36f88e5eb6e4",
	"options":{
		"trackClicks":true,
		"trackOpens":true,
		"fromName":"Brand Name"
	},
	"content":{
		"type":"html",
		"subject":"Food",
		"replyTo":"[email protected]",
		"attachments":[
			{
				"mimeType":"image/png",
				"name":"wings",
				"mediaUrl":"https://i.imgur.com/y5GjuE8.jpg"
			}
		],
		"text":"This is a new email",
		"html":"<a no-track-connect href=\"http://example.com\">link text</a><footer><a data-mce-href='$(unsubscribe)' href='$(unsubscribe)' target='_blank' rel='noopener'><span st-unsubscribe='' style='text-decoration: none; color: #0088cc;' data-mce-style='text-decoration: none; color: #0088cc;'>unsubscribe</span></a></footer>"
	}
}
{ 
	"channel":"rcs",
	"from":"a_156887855308557980",
	"to":[
		{
			"msisdn":[
				"+916304451252"
			],
			"correlationId":"na1b2b1i1",
			"substitutions":{
				"name":"John",
				"company":"IMI"
			}
		}
	],
	"substitutions":{				//Please note that substitutions apply only to text field.
		"company":"Mobile"
	},
	"callbackData":"abc",
	},
	"notifyUrl":"https://requestinspector.com/inspect/01dp3d028s11zeetkqbvp562st",
	"requestedReceipts":[
		"DELIVERED"
	],
	"content":{
		"type":"standalone",
		"richCard":{
			"title":"The Card Title",
			"description":"The description",
			"orientation":"VERTICAL/HORIZONTAL",
			"thumbnailAlignment":"LEFT",
			"media":{
				"height":"SHORT/MEDIUM/TALL",
				"url":"https://bit.ly/2J5i2x0",
        "fileSize":1212 //in Bytes
			},
			"suggestions":[
				{
					"type":"reply",
					"displayText":"Yes",
					"postbackData":"usr_msg_yes"
				},
				{
					"type":"viewLocation",
					"address":"+14165551234",
					"displayText":"Mobile Office",
					"latitude":43.649269,
					"longitude":-79.378423,
					"postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
				}
			]
		},
		"suggestions":[
			{
				"type":"reply",
				"displayText":"Yes",
				"postbackData":"usr_msg_yes"
			},
			{
				"type":"viewLocation",
				"address":"+14165551234",
				"displayText":"Mobile Office",
				"latitude":43.649269,
				"longitude":-79.378423,
				"postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
			}
		]
	}
}

Postman Collection

Here is a Postman collection to test our APIs. Make sure you change the key in the header to your service key.

Latest Collection: Run in Postman

Archived Collection: Old Link

Download Postman from here

πŸ‘

Generating the JWT Token

Connect uses a subset of the JWT fields, described here:

alg
A string used in the header, identifying the algorithm used to encode the payload. The alg value is always HS256 when exchanging messages with Business Chat.

iss
A claim that is a string identifying the principal that issued the JWT. The value is always the Service ID when exchanging messages with API V2.

iat
A claim that is a numeric dateβ€”that is, an integerβ€”identifying the time at which the JWT was issued. The value is the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date and time, ignoring leap seconds. For more information, see the Terminology section in RFC 7519.

A Service Secret that is a Base64-encoded string. Decode the string before using the key to sign the JWT

A decoded JWT token should contain the following -

header
{
  "alg": HS256,
}
claims
{
  "iss": <Service ID>,
  "iat": <issued at unix-timestamp (in seconds)>
}

Body Parameters

ParameterTypeMandatoryDescription
channelenumyes sms
email
* rcs
fromstringyes sms - Sender ID
email - [email protected] (domain needs to be registered in apps)
* rcs - app ID generated on the UI
toJSONArrayyesarray of destination JSON objects that contain the channel specific destination and personalized substitutions for each destination object

Channel wise destinations -
sms - msisdn
email - email
* rcs - msisdn
substitutionsJSONObjectnoa JSON object with global substitutions. If a variable exists both in personalized substitutions and global substitutions, the personalized substitution takes preference
sendAtdate/timenoIS08601 time format for when the message has to be delivered (max 7 days)

For example,
2021-06-26T13:47:18.000Z - UTC
2021-06-26T13:47:18.000+05:30 - with timezone
* 1624782447 - epoch timestamp
expireAtdate/timenoIS08601 time format for when the message has to be expired and failed if not delivered

For example,
2021-06-26T13:47:18.000Z - UTC
2021-06-26T13:47:18.000+05:30 - with timezone
* 1624782447 epoch timestamp
validitystringnoTime period in seconds. E.g., 60 for sixty seconds.

Only one of expireAt or validity should be sent in the request. The request will not be accepted if both values are present in the payload.

If both sendAt and validity parameters are present in the same request, the validity time period will be added to the sendAt time to decide the expiry time.
optionsJSONObjectnoa JSON object that contains additional channel specific options in API. More information under each channel below
callbackDatastringnoA string that is returned with each outbound web-hook for the message (delivery, failed etc). Maximum number of characters allowed in callbackData including any spaces is 2000.
notifyUrlstringnoa HTTPS endpoint for message delivery web-hooks
requestedReceiptsJSONArraynoa JSON array that can filter message delivery web-hooks to the notifyURL.

Can contain one or more of the following for each channel
sms - ": "channel",
"h-0": "Parameter",
"
email - "Parameter",
"h-1": "Type",
"h-2": "Mandatory",
"h-3": "Descriptio
* rcs - ": "Type",
"h-2": "Mandatory",

Check Outbound Webhooks for more information on receipts
contentJSONObjectyes, if template is not providedcontains the content of the message for each channel. see below for more examples
templateJSONObjectyes, if content is not providedcontains the template id for each channel that's configured on the UI

SMS Channel

smsOptions

parametertypedescription
shortenLinksbooleanWhen enabled, this shortens any https links found in the body the message request
domainstringDomain configuration for shortening the links. Needs to be configured through Support team.
trackClicksbooleanWhen shortenLinks is true, you can receive CLICKED receipts on your notifyUrl if trackClicks is true. Clicked format available here
{
	"shortenLinks":true, //shortens any https links found in the body of the request
	"domain":"https://me.co.uk", //domain for the shorternedLink  must be preconfigured.Please reach out to the support team.
        "trackClicks":true //when shorten links is true, clicks can be tracked

}

smsMessage

parametertypemandatorydescription
typestringyestext or unicode
textstringyesbody of the message upto 1024 chars

πŸ“˜

Note

If +E.164 format is enabled for your tenant - all the numbers in the To field should follow the "+E.164" format.

This format displays the number with a "+" followed by the country code and the phone number.

+E.164 format is not applicable to the numbers in the From field.

Steps for configuring branded / short URLs for using 'shortenLinks' capability:

  • Work with your IT team to procure the short URL you want to use.
  • Add a CNAME record with relevant redirection based on your Webex Connect tenant location (table below).
  • If you need HTTPS redirection (highly recommended), reach out to Webex Connect customer support team and provide the domain certificate to add to the Certificate Manager (ACM) for this purpose. This typically requires some lead time hence we recommend you to plan ahead of time for getting this set-up done and leave some time for end-to-end testing.
  • Once the backend set-up has been completed by Webex Connect team, you will be notified over email post which you can start using this.

πŸ“˜

Please note that usage of short domains for SMS links can have an impact on deliverability in some cases. Operators and aggregators implement various firewalls and fraud mitigation services in order to protect customers from fraud. This means URL shortening techniques can sometimes be blocked with no warning, particularly if the words around them seem fraudulent or related to a popular brand or financial entities.

Existing APIs (these APIs will continue to work for existing tenants):

Webex Connect RegionCNAMERedirect To
AWS Canadastar-1176184099.ca-central-1.elb.amazonaws.comhttps://track.imiconnect.ca:443/ump-sltrack/TrackServlet?p=https://#{host}/#{path}
AWS Irelandstar-1747495833.eu-west-1.elb.amazonaws.comhttps://track.imiconnect.io:443/ump-sltrack/TrackServlet?p=https://#{host}/#{path}
AWS Londonstar-1656037958.eu-west-2.elb.amazonaws.comhttps://track.imiconnect.eu:443/ump-sltrack/TrackServlet?p=https://#{host}/#{path}
AWS Oregonstar-1571873968.us-west-2.elb.amazonaws.comhttps://track.us.webexconnect.io:443/ump-sltrack/TrackServlet?p=https://#{host}/#{path}
Azure (US)52.138.107.55 (A Record)https://track.imiconnect.us/ump-sltrack/TrackServlet?p=https://#{host}
AWS Mumbaistar-64546195.ap-south-1.elb.amazonaws.comhttps://track.imiconnect.in:443/ump-sltrack/TrackServlet?p=https://#{host}/#{path}
AWS Sydneystar-131871454.ap-southeast-2.elb.amazonaws.comhttps://track.imiconnect.com.au:443/ump-sltrack/TrackServlet?p=https://#{host}/#{path}

New API endpoints (we recommend you use these for new tenants and services post v6.0 release):

Webex Connect RegionCNAMERedirect To
AWS Canadastar-1176184099.ca-central-1.elb.amazonaws.comhttps://track.imiconnect.ca/ump-sltrack/TrackServlet?p=https://#{host}/#{path}
AWS Irelandstar-1747495833.eu-west-1.elb.amazonaws.comhttps://track.imiconnect.io/ump-sltrack/TrackServlet?p=https://#{host}/#{path}
AWS Londonstar-1656037958.eu-west-2.elb.amazonaws.comhttps://track.imiconnect.eu/ump-sltrack/TrackServlet?p=https://#{host}/#{path}
AWS Oregonstar-1571873968.us-west-2.elb.amazonaws.comhttps://track-us.imiconnect.io/ump-sltrack/TrackServlet?p=https://#{host}/#{path}
Azure (US)52.138.107.55 (A Record)https://track.imiconnect.us/ump-sltrack/TrackServlet?p=https://#{host}
AWS Mumbaistar-64546195.ap-south-1.elb.amazonaws.comhttps://track.imiconnect.in/ump-sltrack/TrackServlet?p=https://#{host}/#{path}
AWS Sydneystar-131871454.ap-southeast-2.elb.amazonaws.comhttps://track.imiconnect.com.au/ump-sltrack/TrackServlet?p=https://#{host}/#{path}

smsMessage

parametertypemandatorydescription
typestringyestext or unicode
textstringyesbody of the message upto 1024 chars
{
	"type":"text or unicode",
	"text":"Hi $(name), this is a text message ${field2}" //body of the message with variables represented as $(variable)
}

Email Channel

emailMessage

{
    "channel": "email",
    "from": "{{fromEmailAddress}}",

    "to": [
        {
            "email": [
                "{{toEmailAddress}}"
            ],
            "correlationId": "{{correlationId}}",
            "substitutions": {
                "{{param1}}": "{{param1Value}}",
                "{{param2}}": "{{param2Value}}"
            }
        }
    ],
    "substitutions": {
        "{{param3}}": "{{param3Value}}",
        "{{param4}}": "{{param4Value}}"
    },
    "cc": [],
    "bcc": [],
    "options": {
        "fromName": "{{emailSendername}}",
        "trackClicks": true,
        "trackOpens": true
    },
    "content": {
        "type": "text",
        "encoding": "utf-8",
        "subject": "{{subject}}",
        "replyTo": "{{replyToEmailAddress}}",
        "text": "Simple text content"
    },
      "requestedReceipts": ["submitted", "delivered", "not verified", "invalid", "bounce", "complaint", "read", "failed"],
        
      "correlationid": "",
    "callbackData": "",
    "notifyurl": ""
}
{
    "channel": "email",
    "from": "{{fromEmailAddress}}",
    "to": [
        {
            "email": [
                "{{toEmailAddress}}"
            ],
            "correlationId": "{{correlationId}}",
            "substitutions": {
                "{{param1}}": "{{param1Value}}",
                "{{param2}}": "{{param2Value}}"
            }
        }
    ],
    "substitutions": {
        "{{param3}}": "{{param3Value}}",
        "{{param4}}": "{{param4Value}}"
    },
    "cc": [],
    "bcc": [],
    "options": {
        "fromName": "{{emailSendername}}",
        "trackClicks": true,
        "trackOpens": true
    },
    "content": {
        "type": "html",
        "encoding": "utf-8",
        "subject": "{{subject}}",
        "replyTo": "{{replyToEmailAddress}}",
        "text": "Fallback text in the event the email client does not support HTML emails",
        "html": "<a track_enable href=\"http://example.com\">link text</a><footer><a data-mce-href='$(unsubscribe)' href='$(unsubscribe)' target='_blank' rel='noopener'><span st-unsubscribe='' style='text-decoration: none; color: #0088cc;' data-mce-style='text-decoration: none; color: #0088cc;'>unsubscribe</span></a></footer>"
    },
        "requestedReceipts": ["submitted", "delivered", "not verified", "invalid", "bounce", "complaint", "read", "failed"],
        
      "correlationid": "",
    "callbackData": "",
    "notifyurl": ""
}
{
    "channel": "email",
    "from": "[email protected]",
    "notifyUrl": "https://webhook.site/f023c932-6d17-4a45-9a43-822e8c6e6f97",
    "multipleToRecipients": true,
    "requestedReceipts": [],
    "to": [
        {
            "email": [
                "[email protected]",
                "[email protected]"
            ],
            "correlationId": "",
            "substitutions": {
                "area": "",
                "accountNumber": ""
            }
        }
    ],
    "substitutions": {
        "offerName": "",
        "value": ""
    },
    "cc": [
        ""
    ],
    "bcc": [
        ""
    ],
    "options": {
        "fromName": "apiv2",
        "trackClicks": true,
        "trackOpens": true,
        "bypassSuppression": false
    },
    "content": {
        "type": "html",
        "encoding": "utf-8",
        "subject": "We are reaching you through web 465 because",
        "replyTo": "",
        "text": "We are reaching you for next SSL genre if",
        "html": ""
    }
}

πŸ“˜

Multiple 'To' Recipients

  • You have the ability to send emails to multiple β€˜To’ recipients in a single email transaction using Messaging API v2. This would require you to pass an additional parameter β€˜multipleToRecipients’ to be passed as part of the request with its value set to β€˜true’. When multiple email IDs are mentioned in the β€œEmail” parameter of the β€œTo” block, Webex Connect submits a single request to AWS SES or to SMTP server to send the concerned email to all - To, CC, and BCC. In this case, the API response will contain only one transaction ID for all recipients. Refer API reference for more information.
  • When Webex Connect is used to send emails to multiple email recipients (To, CC, BCC), the message submitted count reflects the total number of emails sent (counting each of the recipient in To, CC, and BCC fields individually). These changes will reflect in the β€˜Reports’ and in the β€˜Usage’ sections for email transactions.
  • For email transactions with multiple recipients, the Status field in Debug Console and Export Logs, and Error Codes details, will only be updated for entries with the β€˜Submitted’ Status. Email delivery status for each of the individual recipients will need to be tracked using Outbound Webhooks. Separate outbound notifications will be sent for email delivery or failure to each of the recipients mentioned in To, CC, and BCC sections with the same transaction ID. For outbound email transactions, destination will contain an email ID for scenarios where only one email ID has been mentioned (that can in be in either of to, bcc, or cc fields but overall one email ID is mentioned in one outbound request).
parametertypemandatorydescription
typestringyesText or HTML
subjectstringyesSubject of the email
replyTostringnoReply path for the email when the customer responds
attachmentsJSONArraynoAttachment sizes are subject to overall email message size limitations mentioned below.
textstringyes, when type=text
optional, when type=html
Text content of the email
htmlstringyes, when type=htmlRaw HTML for the email. Up to 350 kbps in size.
multipleTorecipientsbooleanno When the flag is set to true, the platform sends a single email to multiple recipients in the 'To' field list.
When the flag is set to false, the platform sends separate emails to multiple recipients in the 'To' field list.

πŸ“˜

Email Size Limitations

The default email size limit for AWS SES based email assets in Webex Connect is 10 MB. This is the overall email size limit including (including the email text, images, attachments and the MIME encoding). Please note that the size increases post MIME encoding. If you attach a 5MB file in your email, the attachment size after MIME encoding will be ~6.85MB (about 137% of the original file size).

emailOptions

{
	"trackClicks":true, //to track clicks in the email
	"trackOpens":true, //to track email opens
	"fromName":"IMI UK", //from name that appears in the email inbox
}
parametertypedescription
trackClicksbooleanWhen enabled, this tracks all links in the HTML body unless a link is tagged as no-track-connect within the anchor tags
trackOpensbooleanWhen enabled, this tracks opens of the email
fromNamestringA string that will appear next to the from address in most email inboxes

RCS Channel

πŸ‘

Best Practices

  • Send one of textMessage, fileMessage, audioMessage, richcardMessage, or richCardCarousel to a subscriber at a time, allowing for necessary delivery and response time between messages.
    • One and only one suggestedChipList can be used together with one and only one of textMessage, fileMessage, audioMessage, geolocationPushMessage, or richcardMessage. Note that suggestion actions available today are reply, calendar, map location, open URL, and dial. Different suggestion action types can be combined in a single suggestedChipList.
    • A suggestedChipList shall not be sent without an accompanying message.
    • Single rich card messages can be configured as short, medium, or tall with a suggestion. Rich card carousels are limited to short or medium rich cards with a suggestion.
    • Some mobile network RCS service providers wait for a delivery receipt for a text message prior to sending any related suggestion. Ensure your test plans include each carrier your program will terminate to.
    • The fileMessage and richCardMessage parameter fileSize requested is related to image and videos contained in URLs. The measurement shall be in bytes and while not all MaaPs require an accurate fileSize, the size shall not be 0.
    • If +E.164 format is enabled for your tenant - all the numbers in the To (Destination) field should follow the "+E.164" format.
      This format displays the number with a "+" followed by the country code and the phone number.
      +E.164 format is not applicable to the numbers in the From field.
    • Please note that substitutions apply only to text field.

rcsOptions

parametertypedescription
carrierIdstringif you already know the carrier of the end customer, you can pass this as an optional parameter.

increases the throughput of RCS outbound messages

for list of carrierIds, check here
{
	 "carrierId":"12"
}

rcsMessage

parametertypemandatorydescription
typestringyestext, media, standalone, carousel, agentEvent
textstringyes, if type = textup to 3072 chars
mediaContentUrlstringyes, if type = mediaa publicly accessible direct media Url ending in the attachment mimeType
richCardJSONObjectyes, if type = standalonea JSON object containing rich card data and suggestions
widthstringyes, if type = carousela parameter that indicates the width of carousel cards
cardsJSONArrayyes, if type = carousela JSON array containing carousel card objects and their suggestions
eventstringyes, if type = agentEventa typing or a read event to be sent to the customer
suggestionsJSONArraynoa JSON array that can contain upto 10 suggestions with a message, 2 when within a carousel and 4 when within a richcard
reply
viewLocation
shareLocation
openUrl
calendarEvent
dialPhone
{
    "type": "text",
    "text": "This is the message.  Reply Yes or No.",
    "suggestions": [
        {
            "type": "reply",
            "displayText": "Yes",
            "postbackData": "usr_msg_yes"
        },
        {
            "type": "viewLocation",
            "address": "+14165551234",
            "displayText": "Mobile Office",
            "latitude": 43.649269,
            "longitude": -79.378423,
            "postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
        },
        {
            "type": "shareLocation",
            "displayText": "Office",
            "postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
        },
        {
            "type": "openUrl",
            "displayText": "Mobile",
            "url": "http://www.imimobile.com",
            "postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
        },
        {
            "type": "calendarEvent",
            "displayText": "Mobile",
            "startTime": "2017-03-14T00:00:00Z",
            "endTime": "2017-03-14T00:00:00Z",
            "meetingTitle": "http://www.imimobile.com",
            "meetingDescription": "http://www.imimobile.com",
            "postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
        },
        {
            "type": "dialPhone",
            "displayText": "Call Us!",
            "phone": "+14163688400",
            "postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
        }
    ]
}
{
    "type": "media",
    "mediaContentUrl":"https://asset.com/asset.jpg",
    "fileSize":1148279
    "suggestions": [
        {
            "type": "reply",
            "displayText": "Yes",
            "postbackData": "usr_msg_yes"
        },
        {
            "type": "viewLocation",
            "address": "+14165551234",
            "displayText": "Mobile Office",
            "latitude": 43.649269,
            "longitude": -79.378423,
            "postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
        },
        {
            "type": "shareLocation",
            "displayText": "Office",
            "postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
        },
        {
            "type": "openUrl",
            "displayText": "Mobile",
            "url": "http://www.imimobile.com",
            "postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
        },
        {
            "type": "calendarEvent",
            "displayText": "Mobile",
            "startTime": "2017-03-14T00:00:00Z",
            "endTime": "2017-03-14T00:00:00Z",
            "meetingTitle": "http://www.imimobile.com",
            "meetingDescription": "http://www.imimobile.com",
            "postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
        },
        {
            "type": "dialPhone",
            "displayText": "Call Us!",
            "phone": "+14163688400",
            "postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
        }
    ]
}
{
	"type":"standalone",
	"richCard":{
		"title":"The Card Title",
		"description":"The description",
		"orientation":"VERTICAL/HORIZONTAL",
		"thumbnailAlignment":"LEFT",
		"media":{
			"height":"SHORT/MEDIUM/TALL",
			"url":"https://bit.ly/2J5i2x0",
      "fileSize":1148279 //in Bytes
		},
		"suggestions":[
			{
				"type":"reply",
				"displayText":"Yes",
				"postbackData":"usr_msg_yes"
			},
			{
				"type":"viewLocation",
				"address":"+14165551234",
				"displayText":"Mobile Office",
				"latitude":43.649269,
				"longitude":-79.378423,
				"postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
			}
		]
	},
	"suggestions":[
		{
			"type":"reply",
			"displayText":"Yes",
			"postbackData":"usr_msg_yes"
		},
		{
			"type":"viewLocation",
			"address":"+14165551234",
			"displayText":"Mobile Office",
			"latitude":43.649269,
			"longitude":-79.378423,
			"postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
		}
	]
}
{
    "type": "carousel",
    "suggestions": [
        {
            "type": "reply",
            "displayText": "Yes",
            "postbackData": "usr_msg_yes"
        },
        {
            "type": "viewLocation",
            "address": "+14165551234",
            "displayText": "Mobile Office",
            "latitude": 43.649269,
            "longitude": -79.378423,
            "postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
        },
        {
            "type": "shareLocation",
            "displayText": "Office",
            "postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
        },
        {
            "type": "openUrl",
            "displayText": "Mobile",
            "url": "http://www.imimobile.com",
            "postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
        },
        {
            "type": "calendarEvent",
            "displayText": "Mobile",
            "startTime": "2017-03-14T00:00:00Z",
            "endTime": "2017-03-14T00:00:00Z",
            "meetingTitle": "http://www.imimobile.com",
            "meetingDescription": "http://www.imimobile.com",
            "postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
        },
        {
            "type": "dialPhone",
            "displayText": "Call Us!",
            "phone": "+14163688400",
            "postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
        }
    ],
    "width": "SMALL/MEDIUM",
    "cards": [
    {
        "title": "The first card",
        "description": "The first card description",
        "media": {
             "height": "SHORT/MEDIUM/TALL",
             "url": "https://bit.ly/2J5i2x0",
             "fileSize":1148279
        },
 "suggestions": [
        {
            "type": "reply",
            "displayText": "Yes",
            "postbackData": "usr_msg_yes"
        },
        {
            "type": "viewLocation",
            "address": "+14165551234",
            "displayText": "Mobile Office",
            "latitude": 43.649269,
            "longitude": -79.378423,
            "postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
        }
    ],
    },
    {
        "title": "The second card",
        "description": "The second card description",
        "media": {
            "height": "SHORT/MEDIUM/TALL",
            "url": "https://bit.ly/2P5Q9dK",
            "fileSize":1148279
        },
 "suggestions": [
        {
            "type": "reply",
            "displayText": "Yes",
            "postbackData": "usr_msg_yes"
        },
        {
            "type": "viewLocation",
            "address": "+14165551234",
            "displayText": "Mobile Office",
            "latitude": 43.649269,
            "longitude": -79.378423,
            "postbackData":"e460dd65-e69b-4f86-a5af-458683248f2d_url_google"
        }
    ]
    } ]
}
{
    "type": "agentEvent",
    "event": "IS_TYPING"
}
{
    "type": "agentEvent",
    "event": "READ",
    "messageId": "3682cb0f-5dae-42fe-9a75-2aea271efeff
}

πŸ“˜

Suggestions

reply
Suggested replies help your chatbot guide users through conversations by providing responses that the chatbot knows how to react to. Your agent sends replies in suggestion chip lists or rich cards.

viewLocation
The View location action displays a location in the user's default map app. You can specify the location either by latitude and longitude or with a query based on the user's current location. You can also set a custom label for the pin that displays in the map app.

shareLocation
The Share location action lets the user send a location to your chatbot.

openUrl
The Open URL action opens the user's web browser to the specified URL. If an app is registered as a default handler for the URL, the app opens instead, and the icon for the action is the app's icon.

calendarEvent
The Create calendar event action opens the user's calendar app and begins to create a new event with the specified information.

dialPhone
The Dial action guides the user to dial a phone number that your chatbot specifies.

Language
Authorization
Header