---
updatedAt: 2025-06-12T00:22:37.000Z
agentTools:
  projectIndex: https://api-documentation.versium.com/llms.txt
---

# Upload and Create a Suppression List

This functions allows you to upload a csv file to create a suppression list is achieved through a multipart/form-data upload.

* Endpoint: <<https://api.versium.com/v2/suppression-lists>>
* Request method: **POST**
* Request headers: Content-Type: multipart/form-data

Parameters:

| Name        | Required/Optional | Values                                                                                                    | Description                                                                            |
| :---------- | :---------------- | :-------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------- |
| list        | Required          | A csv file that contains at least one of the following suppressible field types: email, phone, or domain. |                                                                                        |
| has\_header | Required          | 1 or 0                                                                                                    | A boolean indicating whether the uploaded csv file contains a header in the first row. |
| header\_map | Optional          | A JSON object that contains mapping of column indexes in the csv file to suppressible fields.             | See below for details.                                                                 |

## The header\_map parameter

If passed, the structure of the *header\_map* parameter must be a JSON object, with one or more of the following keys: *email, phone, domain*.

The value for each entry is an array of integers, denoting which column in the uploaded csv file contains those values.

For example, if the csv file contained emails in the first and second columns, and phone numbers in the third column, the header\_map would look like:

```json
{
  "email": [
    0,
    1
  ],
  "phone": [
    2
  ]
}
```

As an alternative, to passing the *header\_map* parameter, you can modify the header of the csv file, so that it contains the recognizable suppression field names: email, phone, domain.

For example, this would be a valid csv file to upload:

```
first,last,email,email
bob,rogers,brogers@gmail.com,bob.rogers@gmail.com
julie,smith,jules@hotmail.com,jsmith@yahoo.com
```

The above csv would be equivalent to passing the following *header\_map* parameter:

```json
{
  "email": [
    2,
    3
  ]
}
```

### Example Response

```json
{
    "versium": {
        "version": "2.0",
        "query_id": "ba4298ae82760126d8f9fa62e4d4e82d",
        "query_time": 0.19606900215148926,
        "results": {
            "id": 51,
            "guid": "1361f1bd-713b-4571-9a7a-1e93b140989a",
            "name": "Consumer5-41.csv",
            "status": 4,
            "records": 6,
            "meta_data": {
                "errors": 0,
                "field_counts": {
                    "Phone": 0,
                    "Domain": 0,
                    "EmailAddr": 5
                },
                "callback_url": ""
            },
            "created_at": "2024-01-24T20:01:07.000000Z",
            "deleted_at": null,
            "header_map": {
                "email": [
                    0
                ]
            },
            "has_header": true
        }
    }
}
```