Message Inbox

post
/getInboxMessages

https://cp.pushwoosh.com/json/1.3/getInboxMessages
Returns the list of Inbox messages for a specified HWID.
Request
Response
Body Parameters
application
required
string
Pushwoosh app code.
userId
required
string
If no custom user ID is set, use HWID.
hwid
required
string
Hardware ID of a device to get the Inbox messages for.
last_code
required
string
Code of the last message retrieved in the previous response. If empty, the first messages are returned.
count
required
integer
The number of messages to be showed in a single response; used for pagination. 0 for loading all messages in Inbox.
200: OK
{
"response": {
"messages": [ // array of messages currently stored in user's Inbox
{
"inbox_id" : "avde1c792cd",
"rt" : "146078676", // date to remove the message from Inbox
"send_date" : "1459758676", // date when the message was saved to Inbox
"order" : "59138176", // position in Inbox presentation order
"title" : "New Rich Media in inbox!",
"text" : "Hi! New feature is available right now!",
"action_type" : "RichMedia",
"action_params": {"rm" : "{ \"url\" : \"https:\/\/richmedia.pushwoosh.com\/C82F7-51FC1.zip\" , \"ts\" : \"1459758676\" , \"tags\" : { \"tagName\" : \"tagValue\" } }"} // payload describing the actions on push openingпэйлоад для описания действий для нажатие на инбокс
"status" : 1, //1-delivered, 2-read, 3-opened, 4-deleted(by a user), 5-deleted from Control Panel
"hash":"1C" // hash code of push notification
},
...
],
"next":"afarew511", // the next Inbox code to be returned by the following /getInboxMessages request
"deleted": ["bbaf85ab", "a41957b"], // the list of messages deleted from Control Panel
"new_inbox": 6 // the number of delivered Inbox messages for that user (can be used for badge)
}
}
Example
{
"request":
{
"application" : "XXXXX-XXXXX",
"userId" : "user_name_1",
"hwid" : "some_hwid",
"last_code" : "",
"count" : 20
}
}

post
/inboxStatus

https://cp.pushwoosh.com/json/1.3/inboxStatus
Updates status of a particular Inbox message.
Request
Response
Body Parameters
application
required
string
Pushwoosh app code.
inbox_id
required
string
The ID of the message saved to Inbox.
hash
required
string
Hash code of Inbox message.
hwid
required
string
Hardware ID of the device to update Inbox status for.
time
required
string
Send date timestamp.
userID
required
string
If no custom user ID is set, use HWID.
status
required
integer
1 - delivered, 2 - read, 3 - opened, 4 - deleted by a user.
device_type
required
integer
See possible values below.
200: OK
{
"status_code": 200,
"status_message": "OK",
"response":null
}
Example
{
"request": {
"application" :"XXXXX-XXXXX",
"inbox_id" : "5da99969af4011.68666357",
"hash" : "1C",
"hwid"` : "some_hwid",
"time" : 1539020254,
"userId" : "some_user",
"status" : 2, // 1-delivered, 2-read, 3-opened, 4-deleted (by a user)
"device_type" : 3
}
}

Possible device types:

  • 1 – iOS

  • 2 – BB

  • 3 – Android

  • 5 – Windows Phone

  • 7 – OS X

  • 8 – Windows 8

  • 9 – Amazon

  • 10 – Safari

  • 11 – Chrome

  • 12 – Firefox