Message Inbox API

getInboxMessages

post
https://cp.pushwoosh.com/json/1.3
/getInboxMessages
/getInboxMessages
Example Request
1
Request:
2
{
3
"request":
4
{
5
"application" : "XXXXX-XXXXX",
6
"userId" : "user_name_1",
7
"device_type" : 1 // see device types below
8
}
9
}
10
11
Response:
12
{
13
"status_code": 200,
14
"status_message": "OK",
15
"response": {
16
"messages": [
17
{
18
"inbox_id": "6249b3be0f19a7.16973228",
19
"order": "1636321268891501", // message id
20
"rt": "1651330109", // timestamp - expiry date
21
"send_date": "1649008809", // send data
22
"title": "Title",
23
"text": "Message",
24
"action_type": 1, // 1 - link, 2 - rich media
25
"action_params": "{}", // push payload as json string
26
"image": "", // image
27
"status": 1, // 1 - delivered, 2 - read, 3 - open, 4 - deleted
28
"hash": "7t" // hash for stats
29
}],
30
"new_inbox": 1 // number of unread messages
31
}
32
}
Copied!

inboxStatus

post
https://cp.pushwoosh.com/json/1.3
/inboxStatus
/inboxStatus
Example
1
Request:
2
{
3
"request": {
4
"application" :"XXXXX-XXXXX",
5
"inbox_code": "874393934032909", // "order" parameter of /getInboxMessages request
6
"hash" : "1C",
7
"userId" : "some_user",
8
"status" : 2, // 1-delivered, 2-read, 3-opened, 4-deleted (by a user)
9
"device_type" : 3
10
}
11
}
12
13
Response:
14
{
15
"status_code": 200,
16
"status_message": "OK",
17
"response": null
18
}
Copied!
Possible device types:
  • 1 – iOS
  • 3 – Android
  • 5 – Windows Phone
  • 7 – OS X
  • 8 – Windows 8
  • 9 – Amazon
  • 10 – Safari
  • 11 – Chrome
  • 12 – Firefox