---
title: "Clean (and optionally verify and save) a list"
method: POST
path: "/api/v1/files"
tags: ["Files", "List Cleaning"]
---

# Clean (and optionally verify and save) a list

`POST /api/v1/files`

## Request

- Base URL: `https://verifly.email`
- URL: `https://verifly.email/api/v1/files`
- Auth: HTTP bearer

Clean a list supplied as emails[], raw text, or a multipart CSV file. Optionally verify=true (costs credits) and save=true to store the result as a downloadable file. Returns cleaning stats, results, and (when saved) a file reference.

## Request body

- FileProcessRequest
  - `emails` string[]
  - `text` string
  - `options` object
    - `deduplicate` boolean
    - `exclude_public_domains` boolean
    - `remove_public` boolean
    - `exclude_role_accounts` boolean
    - `remove_role` boolean
    - `remove_disposable` boolean
    - `domain_blacklist` string[]
    - `pattern_blacklist` string[]
    - `verify` boolean: Verify each email (costs credits).
    - `save` boolean: Save the result as a downloadable file.
    - `filename` string

## Response `200`

Processing result.

- FileProcessResult
  - `success` boolean, required
  - `stats` object, required
    - `original` integer
    - `duplicates_removed` integer
    - `public_domains_removed` integer
    - `role_accounts_removed` integer
    - `disposable_removed` integer
    - `blacklisted_removed` integer
    - `patterns_removed` integer
    - `final_count` integer
  - `results` object[]: Omitted when more than 1000 rows.
  - `count` integer, required
  - `saved` object, nullable
    - `id` string
    - `filename` string
    - `download_url` string
  - `credits` Credits
    - `used` integer, required: Credits charged by this request.
    - `remaining` integer, required

## Other responses

- `400`: Invalid request or invalid input.
- `401`: Missing or invalid API key.
- `402`: Not enough Verifly credits to complete the request.
- `429`: Too many requests. Includes Retry-After (seconds) and the X-RateLimit-* headers.

---

[API](https://skmtc.dev/verifly/apis/verifly-email-verification-api.md) · [All operations](https://skmtc.dev/verifly/apis/verifly-email-verification-api/llms.txt) · [OpenAPI document](https://skmtc.dev/verifly/apis/verifly-email-verification-api/revisions/9b2787c04363?raw)
