User Centric API
API methods to manage users

registerUser

post
https://cp.pushwoosh.com/json/1.3
/registerUser
/registerUser
Can be used later in /createMessage API call (the users parameter). This is normal to call this function before you have the push token and before /registerDevice call.
Example
1
{
2
"request": {
3
"userId": "user_3078a", // type: string. If empty, use hwid
4
"application": "XXXXX-XXXXX", // Pushwoosh application code
5
"hwid": "8f65b16df378e7a6bece9614e1530fb2", // Hardware device ID
6
"tz_offset": -2917, // Timezone offset
7
"device_type": 3 // device type, see /registerDevice for device types
8
}
9
}
Copied!
For emails, call /registerEmailUser.

postEvent

post
https://cp.pushwoosh.com/json/1.3
/postEvent
/postEvent
The event's name in the request must match the event name in Pushwoosh Control Panel. Note that "attributes" property may be empty (but not omitted) in case the event has no attributes.
Please be aware that HWID is required for /postEvent requests for Customer Journeys. With no HWID specified, users won't enter the journey even if the userID is included in a request.
Example
1
{
2
"request":{
3
"hwid": "8f65b16df378e7a6bece9614e1530fb2", // Optional. Hardware device ID used in a /registerDevice request. Can be used together with an userId to identify a user who has triggered an event.
4
"application": "XXXXX-XXXXX", // Pushwoosh application code
5
"event": "activityCompleted", // event name exactly as created in Pushwoosh Control Panel
6
"attributes": {
7
"login": "facebook",
8
"success": "yes",
9
"internet": "wifi",
10
...
11
},
12
"timestampUTC": 1435228403, // timestamp in UTC
13
"timestampCurrent": 1435253603, // timestamp in local time
14
"userId": "[email protected]", // Required. a user id which is used for identification of users on multiple devices. Can be used instead of or together with an HWID.
15
"device_type": 1
16
}
17
}
18
19
Copied!

getUsersDetails

post
https://cp.pushwoosh.com/json/1.3
/getUsersDetails
/getUsersDetails
For Private Offering subscriptions only.
Example
1
{
2
"request": {
3
"auth": "yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel
4
"application": "XXXXX-XXXXX", // Pushwoosh application code
5
"userIds": ["user_id321"]
6
}
7
}
Copied!
Like every scheduled request, /getUsersDetails requires an additional /getResults request.
Response body:
Field
Type
Description
request_id
string
Scheduled request ID. Please check /getResults method for more info.
Scheduled (/getResults) response:
Example
1
{
2
"status_code": 200,
3
"status_message": "OK",
4
"response": {
5
"devices": [
6
{
7
"applicationCode": "APPLICATION_CODE",
8
"hwid": "HWID",
9
"pushToken": "PUSH_TOKEN",
10
"type": 3,
11
"tzOffset": 0,
12
"tags": "{\"First Install\":\"2017-07-25\"}",
13
"badges": 0,
14
"androidPackages": "[]",
15
"latitude": null,
16
"longitude": null,
17
"publicKey": "",
18
"authToken": "",
19
"userId": "myuser_id321"
20
}
21
]
22
}
23
}
Copied!
Last modified 12d ago