Skip to content

Events API

The Events API creates an event in a Pushwoosh application together with its description and attributes. Creating an event in advance is optional. Use it when you want to set the attribute types yourself, because /postEvent creates a missing event automatically and detects attribute types from the values it receives.

createEvent

Anchor link to

POST https://api.pushwoosh.com/json/1.3/createEvent

Creates an Event for the app.

Request Body

Anchor link to
NameTypeDescription
auth*stringAPI access token from Pushwoosh Control Panel.
application*stringPushwoosh application code
name*stringEvent name, 128 characters max. Can’t contain < or >.
descriptionstringEvent description, 512 characters max.
eventAttributesarrayEvent attributes array.
{
"status_code": 200,
"status_message": "OK",
"response": {
"event": 351 // Created Event Id
}
}
{
"request": {
"auth":"yxoPUlwqm…………pIyEX4H", // required. API access token from Pushwoosh Control Panel
"application": "XXXXX-XXXXX", // required. Pushwoosh application code
"name": "BasketOpen", // required. 128 characters max. Event name.
"description": "Open basket page", // optional. 512 characters max. Event description.
"eventAttributes": [{ // optional. Event attributes array
"type": 3, // Attribute type. Values:
// 1 - integer;
// 2 - string;
// 3 - list;
// 4 - date;
// 5 - boolean;
// 6 - price;
// 7 - version;
// 8 - timezone;
"name": "products" // 255 characters max. Attribute name
}, {
"type": 5,
"name": "delivery"
}]
}
}

Response:

200200Event successfully created
200210Argument error. See status_message for more info
200403Permissions error (for example, the API access token has no permission to edit the application)
400N/AMalformed request string
500N/AInternal error