---
title: cancel
slug: campaign/docs/cancel
docTags: 
createdAt: 2026-07-02T19:01:44.226Z
---

The mailing must be of the type regular. All other mailings (event, confirmation, template) cannot be canceled.

**Type**: void

**Parameters**

| Name      | Type   | Value             |
| --------- | ------ | ----------------- |
| sessionId | String | ID of the session |
| mailingId | long   | ID of the mailing |

**Return values**

- **Code structure**

```javascript
void cancel(String sessionId, long mailingId)
```
