Our documentation is changing, please click here to enjoy it!

Skip to end of metadata
Go to start of metadata

This API enables you to trigger an existing message on Accengage for specific users or a static list. Any parameter defined in the API will overload the parameter defined in the message on our dashboard. 

Behavior: A successfull return of the call means we handled your request. We will then proceed to the delivery for the targeted devices.

Customization: In the message (on the dashboard or in the 'text' parameter of the API call, you can define custom fields with a specific value defined at the target level. It enables you to customize the final message at a device level with data coming from your system without having to store this data in our database.

Use case example: Order delivery message.

  1. The Marketing team can create a message template in the Accengage dashboard with the following content: Hi ${firstname}, your order number ${order_id} will be delivered the ${delivery_date}.
  2. A Send Instant Message API call is triggered on this message every time a user gets eligible. It targets a specific Client Id (already tracked in Accengage) and specifies the values of order_id and delivery_date for the user.

Using a web application ?

If you are using this API to target web users, please note that your message can only be delivered to devices with the "sw_version" field greater than or equal to "b3.1.0

Please, don't create one message for each Send Instant Message API call. This could overload messages list in Accengage interface.
You can create one message and re-use it as many times as you like through parentMessageId / parentMessageExternalId parameter.

Operations

POST

/v1/me/apps/:partnerId/send

ParameterModel
headersGeneric Accengage headers
URL

See Partner ID for the partnerId URL parameter

body
InstantMessage

 


 

MessageData

 


 

AndroidButton

 


 

iOSButton

 


 

Target

 


 

action, if defined in AndroidButton or iOSButton, must have a value in ["browser", "email", "phone", "store", "sms", "urlsheme", "webview", "request", "close"].

Its default value is "close".

Please note : marketing pressure does not apply for instant message calls.

Either parentMessageId or parentMessageExternalId must be defined.

Response
CodeReasonModel

200

OK

 

400

Invalid format

The precise reason will be given in the error message

400Using segments, lists and/or filters in the same Instant Message
400Unmatched template parameter(s)
400

Using non indexed criterions to query.

See if the "clientId" option is checked on your database scheme

404

Resource not found

The precise resource will be given in the message of the error

In the target object, you have to use at least your client id, the token, the deviceId field, or any indexed field (a field marked as "client Id" in you database scheme) with an "=" operator. You just have to use the name of the field in the database scheme of the application. See examples.

The data field of the targets is used if you want to send custom informations for the user(s).

Please note that at least one target must be valid.

Examples

RequestCodeResponseReason

POST /v1/me/apps/:myPartnerId/send

Here, are different examples of targets. The first and the second one both use indexed fields only, using two different formats, while the third target combines indexed fields and queries on non indexed fields.

200

The instant message has been sent to the targets.

You can have up to 100 targets in a single instant message request, resulting in the fastest instant messages possible.

  • No labels