# 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> |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.heypoplar.com/api/endpoints/do-not-mail.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
