---
title: getBounceCounter
slug: campaign/docs/getbouncecounter
docTags: 
createdAt: 2026-07-02T19:01:45.097Z
---

See also: [resetBounceCounter](docId\:kXjEUFHIsevIbiiEE0S58) and [getBounceCounterThreshold](docId\:xzMX5BOFee5i60eCZ178f).

This number is different from the one returned by [getRecipientResponseCount2](docId\:AE8MmtCF_ysA6ueljN6aY)  as this is the counter used to determine if a recipient will receive further mailings. This bounce counter may be reset to re-enable a recipient once the bounce threshold (usually three *hard bounces* and five *soft bounces*) is exceeded.

By default, the media type EMAIL is used. Use the SessionWebservice's [setMediaType](docId\:ElqHgIk1SYriXO5Zw18T-) method to select another media type such as SMS.

**Type**: int

**Parameters**

| Name        | Type   | Value                                                                                                                                                                           |
| ----------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sessionId   | String | ID of the session                                                                                                                                                               |
| recipientId | String | ID of the recipient                                                                                                                                                             |
| category    | String | See [Response categories](https://world.optimizely.com/documentation/developer-guides/campaign/SOAP-API/responsewebservice/#Response).<br /><br />Only hardbounce or softbounce |

**Return values**

Number of hard or soft bounces for the recipient

**Code structure**

```json
{
  "int": "getBounceCounter(String sessionId, String recipientId, String category)"
}
```
