---
title: removeBlacklisted
slug: campaign-dev-docs/removeblacklisted
createdAt: 2026-07-02T19:01:45.941Z
---

By default, the media type EMAIL is used. Use the [setMediaType](https://docs.optimizely.com/campaign-dev-docs/setmediatype) method to select another media type such as SMS.

**Type**: int

**Parameters**

| Name            | Type   | Value                    |
| --------------- | ------ | ------------------------ |
| sessionId       | String | ID of the session        |
| recipientListId | long   | ID of the recipient list |

**Return values**

Number of recipients that have been deleted

**Code structure**

```javascript
int removeBlacklisted(String sessionId, long recipientListId)
```
