---
title: getMailingId
slug: campaign/docs/getmailingid
createdAt: 2026-07-02T19:01:47.121Z
---

:::hint{type="info"}
**Note**
The mailing must have been sent. Only then is a mail ID created.
:::

**Type**: long

**Parameters**

| Name      | Type   | Value             |
| --------- | ------ | ----------------- |
| sessionId | String | ID of the session |
| mailId    | String | Mail ID           |

**Return values**

Mailing ID

**Code structure**

```javascript
long getMailingId(String sessionId, String mailId)
```
