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

This method queries only exact matches.

If, for example, "\*@example.com" is contained in the blocklist and you query [john@example.com](mailto\:john@example.com) using this method, false is returned. If you query @example.com, true is returned. To a query both exact matches as well as wildcards, use the [isBlacklisted](docId\:XT88UKRVUj58aiG0XezHl) method.

**Type**: boolean

**Parameters**

| Name      | Type   | Value               |
| --------- | ------ | ------------------- |
| sessionId | String | ID of the session   |
| entry     | String | Entry to be queried |

**Return values**

- true: Entry is contained in the blocklist
- false: Entry is not contained in the blocklist

**Code structure**

```javascript
boolean contains(String sessionId, String entry)
```
