Create bulk email validation job
curl --request POST \
--url https://api.mailglyph.com/v1/verify/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-fileimport requests
url = "https://api.mailglyph.com/v1/verify/files"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.mailglyph.com/v1/verify/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mailglyph.com/v1/verify/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mailglyph.com/v1/verify/files"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mailglyph.com/v1/verify/files")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mailglyph.com/v1/verify/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "8a607588-1d7c-4d4f-9807-2a625fb20b14",
"status": "QUEUED",
"originalFilename": "emails_list_input.csv",
"fileSizeBytes": 234,
"localEmailCount": 6,
"reservedCredits": 6,
"confirmedEmailCount": null,
"creditUsed": null,
"valid": 0,
"invalid": 0,
"unknown": 0,
"catchall": 0,
"duplicates": 0,
"spamTrap": 0,
"toxicDomains": 0,
"readyForDownload": false,
"errorCode": null,
"errorMessage": null,
"lastValidationStatus": null,
"createdAt": "2026-06-18T10:12:30.000Z",
"updatedAt": "2026-06-18T10:13:10.000Z",
"completedAt": null
}
}{
"code": 123,
"error": "<string>",
"message": "<string>",
"time": 123
}{
"code": 123,
"error": "<string>",
"message": "<string>",
"time": 123
}{
"code": 123,
"error": "<string>",
"message": "<string>",
"time": 123
}Email Validation
Create bulk email validation
Upload a TXT, CSV, or XLSX file for bulk Email Validation.
POST
/
v1
/
verify
/
files
Create bulk email validation job
curl --request POST \
--url https://api.mailglyph.com/v1/verify/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-fileimport requests
url = "https://api.mailglyph.com/v1/verify/files"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.mailglyph.com/v1/verify/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mailglyph.com/v1/verify/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mailglyph.com/v1/verify/files"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mailglyph.com/v1/verify/files")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mailglyph.com/v1/verify/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "8a607588-1d7c-4d4f-9807-2a625fb20b14",
"status": "QUEUED",
"originalFilename": "emails_list_input.csv",
"fileSizeBytes": 234,
"localEmailCount": 6,
"reservedCredits": 6,
"confirmedEmailCount": null,
"creditUsed": null,
"valid": 0,
"invalid": 0,
"unknown": 0,
"catchall": 0,
"duplicates": 0,
"spamTrap": 0,
"toxicDomains": 0,
"readyForDownload": false,
"errorCode": null,
"errorMessage": null,
"lastValidationStatus": null,
"createdAt": "2026-06-18T10:12:30.000Z",
"updatedAt": "2026-06-18T10:13:10.000Z",
"completedAt": null
}
}{
"code": 123,
"error": "<string>",
"message": "<string>",
"time": 123
}{
"code": 123,
"error": "<string>",
"message": "<string>",
"time": 123
}{
"code": 123,
"error": "<string>",
"message": "<string>",
"time": 123
}Authorizations
API Key authentication. Secret keys (sk_*) are required for all endpoints except /v1/track. Public keys (pk_*) only work with the /v1/track endpoint for client-side event tracking. Workspaces can have multiple active keys, and sender-domain operations enforce per-key domain scope when configured.
Body
multipart/form-data
TXT, CSV, or XLSX email list file.

