Headers


Request HeaderDescription
Content-Typeapplication/json
keyService Key

Response


Response CodeMessageDescription
1001QueuedReturned when the request is accepted by IMIconnect.
7000Invalid JSONReturned when an invalid JSON request is sent.
7001Authentication failedReturned when an invalid service key or profile key is provided in the request.
7002Service key missingReturned when the parameter key is missing in the message request.
7003Mandatory parameters missingReturned when the mandatory parameters configured in custom event are missing.
7004Invalid parametersReturned when the parameters are invalid.
7006Internal error occurredReturned when an internal error occurs.
7007Service inactiveReturned when the service is in inactive state.
7009Max number of destinationsReturned when an API request exceeds the limit (1000) to send messages using messaging API.

Body Parameters


The following are the parameters of the request body:

ParameterTypeMandatoryDescription
deliverychannelStringYeswa for WhatsApp
destinationJSONArrayYesThe destination parameter is an array of up to 1,000 entries. Messages can be sent to single or multiple recipients in a single request. For more details, refer to destination array.
channelsJSONArrayYesFor more details, refer to channels array.
expiryStringNoExpiry time in UTC format, after which messages will not be pushed. For example, 2015-04-12T13:00:19.456Z or 2015-04-12T18:30:19.456+5:30.
correlationidStringNoA client-side identifier chosen by the Service Provider to correlate requests and their subsequent responses. The correlationid can be up to 50 bytes long.
notifyurlStringNoThe IMIconnect platform will send notifications to the URL specified in the notifyurl parameter. The URL is used to retrieve the status of the message sent. The notifyurl can also be configured while creating a service. If the URL is specified in both the service and the messaging API, preference will be given to the messaging API request.
callbackDataStringNoAn identifier or data that will be sent alongside notifications to the notifyurl. This can serve as identifying notifications.

Channels

The channels parameter block configures channel communication parameters for channel-specific features

"channels":{
        "AppleBusinessChat":{
            "type":"text",
            "text":"Text Message"
        }
    }
"channels":{  
        "AppleBusinessChat":{  
            "type":"text",
            "text":"plain mt text message\uFFFC",
            "attachments":[  
                {  
                    "url":"https://4.img-dpreview.com/files/p/E~TS590x0~articles/3925134721/0266554465.jpeg",
                    "mimeType":"image/jpeg"
                }
            ]
        }
    }
"channels":{
        "AppleBusinessChat":{
            "type":"richLink",
            "richLinkData":{
                "url":"https://youtu.be/gM0qOa_H-rs",
                "title":"Mpbile Testing",
                "assets":{
                    "video":{
                        "url":"https://youtu.be/gM0qOa_H-rs",
                        "mimeType":"video/mp4"
                    }
                }
            }
        }
    }
"channels":{
        "AppleBusinessChat":{
            "type":"interactive",
            "interactiveData":{
                "data":{
                    "version":"1.0",
                    "requestIdentifier":"21d4a1c4-327c-ba35-45b1-36a050b15ad2",
                    "images":[
                        {
                            "identifier":"6de6a59c-846f-45d8-a1d7-24382d9919db",
                            "url":"http://drohnemieten.dein-betrieb.com/wp-content/uploads/2017/05/maxresdefault.jpg"
                        },
                        {
                            "identifier":"c020521e-cc3c-41fa-876e-a445237a6f83",
                            "url":"https://www.lens-rumors.com/wp-content/uploads/2014/10/Nikon-AF-S-DX-Nikkor-18-140mm-f3.5-5.6G-ED-VR-sample-images1.jpg"
                        },
                        {
                            "identifier":"b70de3eb-a412-4fdd-a4b1-cb4eef853ded",
                            "url":"http://www.tompetty.com/sites/g/files/g2000007521/f/sample1_1.jpg"
                        }
                    ],
                    "listPicker":{
                        "sections":[
                            {
                                "items":[
                                    {
                                        "style":"default",
                                        "title":"iPhone X",
                                        "imageIdentifier":"c020521e-cc3c-41fa-876e-a445237a6f83",
                                        "subtitle":"So immersive the device itself disappears into the experience",
                                        "order":0,
                                        "identifier":"0"
                                    },
                                    {
                                        "style":"default",
                                        "title":"iPhone 8",
                                        "imageIdentifier":"b70de3eb-a412-4fdd-a4b1-cb4eef853ded",
                                        "subtitle":"iPhone 8 introduces an all new glass design",
                                        "order":1,
                                        "identifier":"1"
                                    },
                                    {
                                        "style":"default",
                                        "title":"iPhone SE",
                                        "imageIdentifier":"6de6a59c-846f-45d8-a1d7-24382d9919db",
                                        "subtitle":"A big step for small",
                                        "order":2,
                                        "identifier":"2"
                                    }
                                ],
                                "title":"Available offers!",
                                "multipleSelection":true,
                                "order":0
                            }
                        ]
                    }
                },
                "useLiveLayout":true,
                "receivedMessage":{
                    "style":"small",
                    "title":"The best deals on new iPhones!",
                    "subtitle":"Upgrade to a brand new iPhone this summer",
                    "imageIdentifier":"6de6a59c-846f-45d8-a1d7-24382d9919db"
                }
            }
        }
    }

Text

ParameterMandatoryDescription
typeYesOptions: text, richlink, interactive
textYesThe text of the text message, which can contain URLs and formatting
attachmentsNoContains the attachment object
  • The attachments object
ParameterMandatoryDescription
urlYesPublicly accessible URL that is a direct link to the media
mimeTypeYesThe MIME type

Richlinks

ParameterMandatoryDescription
typeYesOptions: text, richlink, interactive
richlinkDataYesRich link object
  • The rich link object
ParameterMandatoryDescription
urlYesPublicly accessible URL that is a direct link to the media
titleYesTitle of the rich link message
assetsYesContains image or video asset
"assets":{
    "image":{
        "url":"https://4.img-dpreview.com/files/p/E~TS590x0~articles/3925134721/0266554465.jpeg",
        "mimeType":"image/jpeg"
    }
}
"assets":{
    "video":{
        "url":"https://youtu.be/gM0qOa_H-rs",
        "mimeType":"video/mp4"
    }
}

List Picker

ParameterMandatoryDescription
typeYesOptions: text, richlink, interactive
interactiveDataYesContains the list/date picker data
  • The interactiveData object
ParameterMandatoryDescription
versionYesA string representing the version number of the message extension schema. Should be 1.0.
requestIdentifierYesA string that representing a unique identifier for the request. IMIconnect returns the ID in the response it sends back to the client application
imagesYesAn array of image dictionaries
listPickerYes if you want to send list pickerA dictionary that tells Messages how the list picker should behave and what content it should show to the customer.
eventYes if want to send date pickerA dictionary that tells Messages how the date picker should behave and what content it should show to the customer.
  • images
ParameterMandatoryDescription
dataYesDirect link to the image
identifierYesA string containing the image identifier, which must be unique within the list of images.
  • list picker
"listPicker":{
                        "sections":[
                            {
                                "items":[
                                    {
                                        "style":"default",
                                        "title":"iPhone X",
                                        "imageIdentifier":"c020521e-cc3c-41fa-876e-a445237a6f83",
                                        "subtitle":"So immersive the device itself disappears into the experience",
                                        "order":0,
                                        "identifier":"0"
                                    },
                                    {
                                        "style":"default",
                                        "title":"iPhone 8",
                                        "imageIdentifier":"b70de3eb-a412-4fdd-a4b1-cb4eef853ded",
                                        "subtitle":"iPhone 8 introduces an all new glass design",
                                        "order":1,
                                        "identifier":"1"
                                    },
                                    {
                                        "style":"default",
                                        "title":"iPhone SE",
                                        "imageIdentifier":"6de6a59c-846f-45d8-a1d7-24382d9919db",
                                        "subtitle":"A big step for small",
                                        "order":2,
                                        "identifier":"2"
                                    }
                                ],
                                "title":"Available offers!",
                                "multipleSelection":true,
                                "order":0
                            }
                        ]
                    }
                },
                "useLiveLayout":true,
                "receivedMessage":{
                    "style":"small",
                    "title":"The best deals on new iPhones!",
                    "subtitle":"Upgrade to a brand new iPhone this summer",
                    "imageIdentifier":"6de6a59c-846f-45d8-a1d7-24382d9919db"
                }
            }
        }
    }
  • date picker
"event":{
                        "timezoneOffset":-100,
                        "identifier":"fd296699-6ad1-4c96-af78-ae10dee1f19c",
                        "title":"NHS Appointments",
                        "timeslots":[
                            {
                                "duration":1800,
                                "startTime":"2019-01-01T15:30+0000",
                                "identifier":"0"
                            },
                            {
                                "duration":1800,
                                "startTime":"2019-01-02T16:30+0000",
                                "identifier":"1"
                            },
                            {
                                "duration":1800,
                                "startTime":"2019-01-03T16:30+0000",
                                "identifier":"2"
                            },
                            {
                                "duration":1800,
                                "startTime":"2019-01-04T12:30+0000",
                                "identifier":"3"
                            },
                            {
                                "duration":1800,
                                "startTime":"2019-01-05T13:30+0000",
                                "identifier":"4"
                            },
                            {
                                "duration":1800,
                                "startTime":"2019-01-06T17:30+0000",
                                "identifier":"5"
                            },
                            {
                                "duration":1800,
                                "startTime":"2019-01-07T15:30+0000",
                                "identifier":"0"
                            },
                            {
                                "duration":1800,
                                "startTime":"2019-01-08T15:30+0000",
                                "identifier":"0"
                            },
                            {
                                "duration":1800,
                                "startTime":"2019-01-09T15:30+0000",
                                "identifier":"0"
                            },
                            {
                                "duration":1800,
                                "startTime":"2019-01-10T15:30+0000",
                                "identifier":"0"
                            },
                            {
                                "duration":1800,
                                "startTime":"2019-01-11T15:30+0000",
                                "identifier":"0"
                            }
                        ],
                        "location":{
                            "title":"5 St Johns Street",
                            "latitude":51.5209041,
                            "longitude":-0.1025591,
                            "radius":16
                        }
                    }
                },
                "useLiveLayout":true,
                "replyMessage":{
                    "style":"small",
                    "title":"Selected time",
                    "alternateTitle":"06-Aug-2018 at 10:00 AM"
                },
                "requestIdentifier":"b0291fd1-d2ac-4109-bd53-9258d6748619",
                "receivedMessage":{
                    "style":"small",
                    "title":"NHS Appointment",
                    "subtitle":"Available appointments at your locall GP",
                    "imageIdentifier":"a9b37a98-92a2-4f65-b74a-6a0cabf51b93"
                }
            }
        }
    }
Language
Authorization
Header