Skip to content

POST /v1/validation/file ​

Queues the addresses contained in a file for validation. Sent as multipart/form-data with a single file field.

It is asynchronous: the response carries no results, only an id you use to read them afterwards. If you already have the addresses in an array, use POST /v1/validation/bulk instead.

Every address checked uses one validation credit.

Endpoint ​

http
POST /v1/validation/file
bash
curl -X POST https://api.mailiqo.com/v1/validation/file \
  -H "X-API-KEY: YOUR_API_KEY" \
  -F "[email protected]"

Request body ​

FieldTypeRequiredDescription
filefileYesA single file with the addresses to validate.

Accepted extensions: .csv, .xlsx, .txt and .json. Only one file per request is allowed; sending more than one is rejected with 1312.

How the file is read ​

Every candidate address in the file is validated and uses one credit, even if it is not shaped like an email: in that case it is classified as invalid. Anything that is not a candidate is neither validated nor charged. Repeated addresses count every time they appear.

ExtensionWhat counts as a candidate
.txtEvery non-empty line is one candidate. Lines are not split on commas, semicolons or spaces: [email protected], [email protected] on the same line is a single candidate, which turns out invalid.
.csvThe delimiter (,, ; or tab) is detected automatically. A column holds emails when more than half of its non-empty cells contain @, and every non-empty cell in those columns is a candidate. The first row is skipped if it has no @ (header). Other columns (name, phone…) are ignored.
.xlsxThe same rule as .csv, sheet by sheet.
.jsonThe whole structure is walked and every text value containing @ is a candidate. If the JSON cannot be parsed, it is read as a .txt.

TIP

Put one address per line, or per cell in a single column, so the count matches your addresses exactly.

Response ​

Code 200. The id identifies the validation so you can query its status and its result.

json
{
  "status": "success",
  "data": {
    "id": "val_6f1c0f3e6d1a4b7e9d2cxxxxxxxxxxxx"
  }
}
FieldTypeDescription
idstringIdentifier of the validation created.

Errors ​

CodeHTTPWhen
1308400No file was sent.
1312400More than one file was sent.
1309400MIME type not accepted.
1310400Extension not accepted.
1311400 / 503The file failed the security scan or could not be processed.
1305500Uploading the file to storage failed.
1306400Queueing the file check failed.

Credits are checked when processing, not when uploading

Unlike bulk, the number of addresses is not known until the file is read. That is why the request is accepted even when your balance is short: missing credits show up later, as the CREDITS_ERROR status when you query the validation.

Next step ​

With the id, follow the progress in GET /v1/validation/status/{id}, which in this case also carries a fileStatus field with the file status.

Built with VitePress