Send JSON Message

Inga Supranovich Updated by Inga Supranovich

Endpoint to use Send JSON message

https://api.mobilemonkey.com/public/contacts/{contact_id}/send_json_message

  • Where contact_id is MobileMonkey numeric id, which could be taken from Look up users endpoint.
  • And json_message supports the following data structure:

Text message:

{    
"json_message":{      
 "text":"hello, world!"   
}
}

Quick Question with Multiple options to reply:

{"json_message":{
"text": "Would you like to know more about our special offers?",
"quick_replies": [
{
"content_type": "text",
"title": "Yes",
"payload": "Yes|GOTO_PAGE_ID:146057|BID:43414"
},
{
"content_type": "text",
"title": "No",
"payload": "No|GOTO_PAGE_ID:146062|BID:43431"
},
{
"content_type": "text",
"title": "Maybe",
"payload": "Maybe|GOTO_PAGE_ID:146058|BID:43432"
}
]
}
}

Image message:

{ 
"json_message":{
"attachment":{
"type":"image",
"payload":{
"url":"https://mm-image-processed-pre-staging.s3.amazonaws.com/users/575/resized/size-800/5496746dbc4b79cb70bc189929fe447e.jpg",
"is_reusable":true
}
}
}
}

Video message:

{ 
"json_message":{
"attachment":{
"type":"video",
"payload":{
"url":"https://mm-video-source-pre-staging.s3.amazonaws.com/users/575/cfade61488b06af469d6635293f394bd.mp4",
"is_reusable":true
}
}
}
}

Gallery message:

{ 
"json_message":{
"attachment":{
"type":"template",
"payload":{
"template_type":"generic",
"image_aspect_ratio":"horizontal",
"elements":[
{
"title":"AC/DC Concert",
"subtitle":"Be there 20/12/2020!",
"image_url":"https://mm-image-source-pre-staging.s3.amazonaws.com/users/575/4e1aeedad74b7b3506bab70874b635f1.jpg",
"default_action":{
"type":"web_url",
"url":"https://acdc.com"
},
"buttons":[
{
"type":"phone_number",
"payload":"+14842012017",
"title":"Book Ticket"
},
{
"type":"web_url",
"url":"https://acdc.com",
"title":"Visit Website",
"webview_height_ratio":"tall"
}
]
}
]
}
}
}
}

How did we do?

Using the MobileMonkey API Documentation

Contact