Our documentation is changing, please click here to enjoy it!
This API route allows you to send a new message to targets. This new message won't be visible on the Accengage interface but will be linked to an existing one (the "parent" message).
Operations
|
|
Parameter | Model |
body | Data
Message
Popup
Target
Criterion
Content
InteractiveButtons The value of the template can be found in the category on the interface or here for the Accengage's templates.
Buttons
CustomParam |
Response | |
---|---|
body | |
Return code | |
returnCode | Description |
| Instant Message has been sent |
1 | A database error occured |
2 | No sendInstantMessage |
3 | No or bad user |
4 | No or bad partner |
5 | No or bad message |
6 | Bad custom params |
9 | Bad targets |
10 | No parent message ID |
11 | Message limit exceeded |
13 | Field unknown |
14 | Target max number exceeded |
15 | Template cannot be replaced |
16 | No or bad appId |
17 | The selected language does not exist |
23 | No or bad template for buttons |
24 | No or bad button id |
25 | Bad custom params for buttons |
The targets
array contains all target definition for the message. This array can contain up to 100 entries.
One target object can contain multiple criteria, so a device will be targeted if all the criteria match the device properties. In the example below, a device will only be targeted if its language property is set to "en"
AND the user opened the application more than once.
If the action is set in the buttons, its value must be in browser, email, phone, store, sms, webView, urlSheme, and close.
The message text can contain template macros. These templates will be replaced with, in order:
- values set in API target
data
object - values set in API message
data
object - values set in the devices database
If no value is found, an error is triggered.
Examples
Request | Body | Description |
---|---|---|
|
With buttons : | Sends an instant message |