post https://api.imiconnect.io/resources/v1/messaging
Headers
Request Header | Description |
---|---|
Content-Type | application/json |
key | Service Key |
Response
This API may return the following response codes:
Response Code | Message | Description |
---|---|---|
1001 | Queued | Returned when the request is accepted by IMIconnect. |
7000 | Invalid JSON | Returned when an invalid JSON request is sent. |
7001 | Authentication failed | Returned when an invalid service key or profile key is provided in the request. |
7002 | Service key missing | Returned when the parameter key is missing in the message request. |
7003 | Mandatory parameters missing | Returned when the mandatory parameters configured in custom event are missing. |
7004 | Invalid parameters | Returned when the parameters are invalid. |
7006 | Internal error occurred | Returned when an internal error occurs. |
7007 | Service inactive | Returned when the service is in inactive state. |
7009 | Max number of destinations | Returned when an API request exceeds the limit (1000) to send messages using messaging API. |
##Request Body - Attachment and Text
{
"appid":"<your_app_id>",
"deliverychannel":"twitter",
"channels":{
"OTT-Messaging":{
"twitter":{
"text":"hi",
"attachment":{
"type":"media",
"media":{
"id":"1057943604868669445"
}
}
}
}
},
"destination":[
{
"twitterid":["1577568001"]
}]
}
Parameters - Attachment and Text
Parameter | Type | Mandatory | Description |
---|---|---|---|
twitter id | JSONArray | Yes | Destination of the twitter user. |
text | String | Yes | Message body. |
Attachment | Integer | Yes | Media Id retreived from the Upload API response. |
Request Body - Quick Replies
{
"appid":"<your_app_id>",
"deliverychannel":"twitter",
"channels":{
"OTT-Messaging":{
"twitter":{
"text":"Hi! Welcome to Connect Bank of Himayathnagar",
"attachment":{
"type":"media",
"media":{
"id":"1057943604868669445"
}
},
"quick_reply":{
"type":"options",
"options":[
{
"label":"Get Started",
"description":"A description about Get Started",
"metadata":"Welcome"
},
{
"label":"Account Overview",
"description":"A description about Account.",
"metadata":"account_overview"
},
{
"label":"Last 10 Transactions",
"description":"A description about Last 10.",
"metadata":"last-10_transactions"
},
{
"label":"Fund transfers",
"description":"A description about Fund ",
"metadata":"fund_transfer"
},
{
"label":"Account Statement",
"description":"A description about account statement",
"metadata":"STATEMENT"
},
{
"label":"Account re-verify",
"description":"A description about account details",
"metadata":"RE-VERIFY"
},
{
"label":"Bills and Payments",
"description":"A description about payments",
"metadata":"BILLSNPAYMENTS"
},
{
"label":"Branches Information",
"description":"A description about our all branches",
"metadata":"BRANCHES"
},
{
"label":"Special Offers",
"description":"A description about special offers",
"metadata":"SPECIAL"
},
{
"label":"Credit Card",
"description":"A description about credit card",
"metadata":"CREDIT"
}
]
} }
}},
"destination":[
{
"twitterid":[
"1577568001"
]
}
]
}
Parameters - Quick Replies
twitterid | JSONArray | Yes | Destinations of the twitter end user(can be multiple) |
metadata | String | Yes | Identifier of the user's response to the quick reply |
Channels
The channels parameter block configures channel communication parameters for channel-specific features
{
"appid":"<your_app_id>",
"deliverychannel": "twitter",
"channels": {
"OTT-Messaging":{
"twitter":{
"text":"Hi there"
}
}
},
"destination":[
{
"twitterid":["1577568001"]
}]
}
{
"url":"https://ibb.co/c5wLyL",
"type":"image"
}
{
"appid":"<your_app_id>",
"deliverychannel":"twitter",
"channels":{
"OTT-Messaging":{
"twitter":{
"text":"hi",
"attachment":{
"type":"media",
"media":{
"id":"1057943604868669445"
}
}
}
}
},
"destination":[
{
"twitterid":["1577568001"]
}]
}
smartlinks
An array that contains the parameters of Smartlink. This is an optional parameter. To use Smartlinks, you must create a smartlink and use the link id in messaging API. These smartlinks can be used in SMS, RT and OTT messaging channels.
Following are the parameters of smartlinks:
Parameter | Type | Mandatory | Description |
---|---|---|---|
linkid | Number | Yes | This parameter is mandatory when the smartlinks parameter is configured. The linkid gets generated for a smartlink created using IMIconnect. |
validity | Number | No | Specifies the time in minutes after which the link will expire. |
{
"smartlinks":[
{
"linkid": "<specifies the link id that is generated for a Smartlink using IMIconnect. >",
"validity": "<Specifies the time in minutes after which the link will expire>"
}
]
}