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
POST /v1/validation/filecurl -X POST https://api.mailiqo.com/v1/validation/file \
-H "X-API-KEY: YOUR_API_KEY" \
-F "[email protected]"Request body
| Field | Type | Required | Description |
|---|---|---|---|
file | file | Yes | A 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.
| Extension | What counts as a candidate |
|---|---|
.txt | Every 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. |
.csv | The 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. |
.xlsx | The same rule as .csv, sheet by sheet. |
.json | The 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.
{
"status": "success",
"data": {
"id": "val_6f1c0f3e6d1a4b7e9d2cxxxxxxxxxxxx"
}
}| Field | Type | Description |
|---|---|---|
id | string | Identifier of the validation created. |
Errors
| Code | HTTP | When |
|---|---|---|
1308 | 400 | No file was sent. |
1312 | 400 | More than one file was sent. |
1309 | 400 | MIME type not accepted. |
1310 | 400 | Extension not accepted. |
1311 | 400 / 503 | The file failed the security scan or could not be processed. |
1305 | 500 | Uploading the file to storage failed. |
1306 | 400 | Queueing 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.
Related endpoints
POST /v1/validation/bulk— the same addresses, from an arrayPOST /v1/validation/single-email— one address, without waiting
