# Do Not Mail

Managing your do not mail list is just as important for direct mail as it is for email. We offer two ways to suppress mailings, either via an API or manually via a `.csv` list upload. The API is the easiest way to integrate an opt out form with our triggered mail service.&#x20;

You can also set up rules for[ audience suppression](https://docs.heypoplar.com/article/204-suppression-settings#audience-suppressions) to suppress by geographic area, and repeat frequency.

Recipient suppression can be made via any of the following four data types:

* Email (plaintext or hashed)
* Address
* Customer ID (for known customers)

When you send an address we will run it through our CASS Standardization and base the opt out on the updated version as oppose to the original provided.

## Do Not Mail

<mark style="color:green;">`POST`</mark> `https://api.heypoplar.com/v1/do-not-mail`

Either `email`, `email_sha256`, `identifier`, or `address` is required. For suppression to work, the same identifier must be sent when triggering a mailing.

#### Headers

| Name                                            | Type   | Description                                                     |
| ----------------------------------------------- | ------ | --------------------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer *<mark style="color:blue;">ProductionAccessToken</mark>* |

#### Request Body

| Name                                      | Type   | Description                                                                                                                                             |
| ----------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| address<mark style="color:red;">\*</mark> | object | Customer mailing address.                                                                                                                               |
| identifier                                | string | A unique identifier for the customer within your system. This could be a database ID or derivative, however it must be unique to the specific customer. |
| email\_sha256                             | string | The SHA-256 hash of the customers *lowercased* email address, as a 64-character text string.                                                            |
| email<mark style="color:red;">\*</mark>   | string | Customer email email address.                                                                                                                           |

{% tabs %}
{% tab title="201: Created Do Not Mail list member added" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="400: Bad Request Incorrectly formatted or missing data" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

### Address Object

The `address` object is structured as follows:

| Field          | Type   | Description                                                                                                         |
| -------------- | ------ | ------------------------------------------------------------------------------------------------------------------- |
| `address_1`    | String | **Required**                                                                                                        |
| `address_2`    | String | Optional                                                                                                            |
| `city`         | String | Optional                                                                                                            |
| `state`        | String | Optional                                                                                                            |
| `postal_code`  | String | **Required**                                                                                                        |
| `country_code` | String | <p>Optional<br></p><p>An ISO Alpha-2 formatted country code. By default we assume that this is <code>US</code>.</p> |
