# Events API

<Aside type="note">
To track events triggered by users, call the [/postEvent](/developer/api-reference/user-centric-api#postevent) method from User Centric API.
</Aside>

## createEvent

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

Creates an Event for the app.

#### Request Body

| Name                                          | Type    | Description                                                                |
| --------------------------------------------- | ------- | -------------------------------------------------------------------------- |
| auth\*        | string  | [API access token](/developer/api-reference/api-identifiers/#api-access-token) from Pushwoosh Control Panel.                             |
| application\* | string  | [Pushwoosh application code](/developer/api-reference/api-identifiers/#application-code)                                                |
| name                                          | string  | Event name, 32 characters max.                                             |
| description                                   | string  | Event description, 64 characters max.                                      |
| eventAttributes                               | array   | Event attributes array.                                                    |
| trackRevenue                                  | boolean | See Track Event Revenue section.  |

<Tabs>
<TabItem label="200">
```json
{
  "status_code": 200,
  "status_message": "OK",
  "response": {
    "event": 351 // Created Event Id
  }
}
```
</TabItem>
</Tabs>

```json
{
  "request": {
    "auth":"yxoPUlwqm…………pIyEX4H",     // required. API access token from Pushwoosh Control Panel
    "application": "XXXXX-XXXXX",      // required. Pushwoosh application code
    "name": "BasketOpen",              // required. 32 characters max. Event name. 
    "description": "Open basket page", // optional. 64 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;
      "name": "products"               // 64 characters max. Attribute name 
    }, {
      "type": 5,
      "name": "delivery"
    }],
    "trackRevenue": false
  }
}
```

**Response:**

|     |     |                                                                |
| --- | --- | -------------------------------------------------------------- |
| 200 | 200 | Event successfully created                                     |
| 200 | 210 | Argument error. See status\_message for more info              |
| 200 | 403 | Permissions error (for example, when Events limit is exceeded) |
| 200 | 404 | Resource not found                                             |
| 400 | N/A | Malformed request string                                       |
| 500 | 500 | Internal error                                                 |