The Direct Trigger Push Message API based on template is used to send the following types of messages:
...
POST | https://saas.appoxee.com/api/v3/message/direct |
---|
Request Header
The request header must include the following authentication parameters, used to log into Appoxee:
Name | Value |
---|---|
X-ACCOUNT_CODE | Your Appoxee account code. In case you don't have an account code add your Appoxee user name here as well |
X-USERNAME | Your Appoxee user name. |
X-PASSWORD | Your Appoxee password. |
Example Request
Trigger a "Direct" Message
Request paramters
Parameter name | Mandatory | Parameter type | Parameter value | Acceptable values | Example |
---|---|---|---|---|---|
template_id | yes | INT | Message template id | - | 123 |
messages_data | yes | ARRAY | Messages data | - | [{ |
Each API request body should contain the following parameters:
Parameter name | Mandatory | Parameter type | Parameter value | Acceptable values | Example | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
alias | yes | STRING | Device alias | - | "mor" | ||||||
push_body | yes | STRING | Push body text | - | "hello world!" | ||||||
push_badge | no | INT | Push badge value | - | 5 | ||||||
sound | no | STRING | Name of sound file | - | "greeting" | ||||||
payload | no | OBJECT | Extra fields | - | |||||||
ios_push_title | no |
| Push title | - | "title" | ||||||
ios_subtitle | no |
| Push sub title | - | "sub title" | ||||||
ios_apx_media | no |
| Push media content url | - | "http://pngimg.com/uploads/google/google_PNG19629.png" | ||||||
ios_mutable_content | no |
| Whether content is rich or not | - | 1 |
Example request
The following request will trigger template 1234 to alias "mor"
Request Format
{ "template_id" : 2350498 , "messages_data" : [ { "alias" : "mor" , "push_body" : "hello" , "push_badge" : 5 , "sound" : "greeting" , "payload" : { "banner" : "1234" } } ] } |
HTTP Response Header
HTTP Header Field | Value |
---|---|
Status Code |
|
HTTP Response Body
The response body includes a description of the request result in JSON format.
The API call has one of the following results:
Response Result | Returns | Examples |
---|---|---|
metadata | Contains the "error" parameter:
| { "error": "false" } |
Example 2
Request Example 1:
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"HTTP Response Header
HTTP Header Field | Value |
---|---|
Status Code |
|
Response body:
{
"metadata"
: {
"error"
:
false
},
"links"
: [],
"payload"
: {
Request Example 2:
|
"2350498"
|
|
|
|
|
|
|
|
Example 3
{
"template_id":194736,
"
|
"sound"
:
"greeting"
}
],
}
}
|
{
"alias": "mor",
"push_body": "hello",
"push_badge": 5,
"sound": "greeting",
"payload": {
"apx_dpl": "myapp://product/4",
"banner": "1234"
}
}
]
}
HTTP Response Header
HTTP Field Header | Value |
---|---|
Status Code |
|
{
"metadata": {
"error": false
},
"links": [],
"payload": {
"template_id": 194736,
"platform": "0",
"ios_push_title": "title",
"ios_subtitle": "sub title",
"messages_data": [
{
"alias": "mor",
"push_body": "hello",
"push_badge": 5,
|
}
|