User Centric API
API methods to manage users
registerUser
POST
https://api.pushwoosh.com/json/1.3/registerUser
Associates external User ID with a specified device.
Request Body
Name | Type | Description |
---|---|---|
userId | string | User ID to associate with a device. If empty, use hwid. |
application* | string | Pushwoosh application code. |
hwid* | string | Pushwoosh HWID |
tz_offset | integer | Timezone offset in seconds for the device. |
device_type | integer | Device type. See possible values in /registerDevice. |
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.
For emails, call /registerEmailUser
.
postEvent
POST
https://api.pushwoosh.com/json/1.3/postEvent
Calls the event within the app.
Request Body
Name | Type | Description |
---|---|---|
hwid* | string | Hardware device ID used in a /registerDevice request. Can be used along with 'userId' to identify a user who has triggered an event. |
application* | string | Pushwoosh application code. |
event* | string | Event name exactly as created in Pushwoosh Control Panel. |
attributes* | object | JSON object with the event attributes. Leave it empty if no attributes need to be passed. |
timestampUTC | integer | Timestamp in UTC. |
timestampCurrent | integer | Timestamp in local time. |
userId* | string | User ID associated with a user who has triggered the event. Can be replaced by or used along with an HWID. |
device_type | integer | See possible values in /registerDevice method. |
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.
Last updated