---
title: getOpenCount
slug: campaign/docs/getopencount
createdAt: 2026-07-02T19:01:44.226Z
---

**Type**: int

**Parameters**

| Name      | Type    | Value                                                                                                                                |
| --------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| sessionId | String  | ID of the session                                                                                                                    |
| mailingId | long    | ID of the mailing                                                                                                                    |
| unique    | Boolean | TRUE: Double counts of recipients that opened the mailing several times are removed. FALSE: The overall number of opens is returned. |

**Return values**

Number of opens of the mailing

**Code structure**

```javascript
int getOpenCount(String sessionId, long mailingId, boolean unique)
```
