# Ban

A **Ban** object contains data that articulates how to structure a ban. It is present on [Recommendations](https://dfend.gitbook.io/documentation/developer-api/types/event/recommendation) within [Events](https://dfend.gitbook.io/documentation/developer-api/types/event), when the [Recommendation Type](https://dfend.gitbook.io/documentation/developer-api/types/event/recommendation/type) relates to a ban.

## Attributes

* `action`  <mark style="color:blue;">enum</mark>  The recommended [Ban Action](https://dfend.gitbook.io/documentation/developer-api/types/event/recommendation/ban/action).
* `until`  <mark style="color:blue;">number</mark>  A Unix timestamp (ms) representing the time to end the ban.
* `ip`  <mark style="color:blue;">string</mark>  If the ban relates to an IP, this will contain the offending IP.
* `email`  <mark style="color:blue;">string</mark>  If the ban relates to an email [Identifier](https://dfend.gitbook.io/documentation/developer-api/types/identifiers), this will contain the email.
* `phone`  <mark style="color:blue;">string</mark>  If the ban relates to a phone [Identifier](https://dfend.gitbook.io/documentation/developer-api/types/identifiers), this will contain the phone number.
* `userId`  <mark style="color:blue;">string</mark>  If the ban relates to a user ID [Identifier](https://dfend.gitbook.io/documentation/developer-api/types/identifiers), this will contain the user ID.
