---
updatedAt: 2026-01-02T16:11:28.000Z
agentTools:
  projectIndex: https://docs.retention.com/llms.txt
---

# Upload Suppression

This API endpoint is specifically designed for uploading files containing new email addresses that should be suppressed by Retention.com.

> 📘 Your daily suppression files should only include contacts newly added to your list in the last 24-48 hours using the timestamp that represents when they were first added to your list. We recommend 48 hours in the event of an outage in your ESP platform.

> 👍 For a successful integration, please refer to the [API guide](https://docs.retention.com/docs/getting-started), which provides detailed information on the rules and limitations applicable to this endpoint.

### File Format

The uploaded CSV file should adhere to the following format:

* **Plain Text Encoding:** Ensure the file is encoded in plain text (e.g., UTF-8).
* **One Entry Per Row:** Each email address or MD5 hash should be on a new line.
* **Optional Header Row:** The first row of the file can be a header row with column names, which will be skipped during processing.
* **Supported Content:** Each row should contain either a valid email address or a 32-character lowercase hexadecimal MD5 hash.

  **Example (Emails):**

  ```csv
  email
  test1@example.com
  another@domain.net
  user123@anothersite.org
  ```

  **Example (MD5 Hashes):**

  ```csv
  md5
  e10adc3949ba59abbe56e057f20f883e
  d41d8cd98f00b204e9800998ecf8427e
  a5d4c3b7d6e0b2a1f83d7e9c5f0d9a2b
  ```

> ❗️ For consistent identification, **ensure email addresses are converted to lowercase before generating their MD5 hash**.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "retentioncom-api",
    "version": "1.5"
  },
  "servers": [
    {
      "url": "https://api.retention.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "api-key"
      },
      "sec1": {
        "type": "apiKey",
        "in": "header",
        "name": "api-id"
      }
    }
  },
  "security": [
    {
      "sec0": [],
      "sec1": []
    }
  ],
  "paths": {
    "/api/v1/suppression": {
      "post": {
        "summary": "Upload Suppression",
        "description": "This API endpoint is specifically designed for uploading files containing new email addresses that should be suppressed by Retention.com.",
        "operationId": "suppression",
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string",
              "default": "multipart/form-data"
            }
          },
          {
            "name": "api-id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api-key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "This should be a CSV file containing only 1 column with the header 'email' or 'md5'.",
                    "format": "binary"
                  },
                  "is_md5": {
                    "type": "boolean",
                    "description": "If your file contains only MD5 hashed of the emails, set this to true, else it can be ignored.",
                    "default": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\"message\": \"Suppression file containing 32,442 emails is in queue to be processed.\",\"success\": true}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Suppression file containing 32,442 emails is in queue to be processed."
                    },
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\"message\": \"CSV file not sent.\",\"success\": false}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "CSV file not sent."
                    },
                    "success": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\"message\": \"Invalid API Key or ID\"}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Invalid API Key or ID"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl -X POST \\\n  'https://api.retention.com/api/v1/suppression' \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -H 'Content-Type: multipart/form-data' \\\n  -H 'api-id: YOUR_API_ID' \\\n  -H 'api-key: YOUR_API_KEY' \\\n  -F 'file=@/path/to/your/emails.csv' \\\n  -F 'is_md5=false'"
            }
          ],
          "samples-languages": [
            "curl"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```