Skip to content

Verification workflow

Base URL: https://api.agentsverify.dev. Send your key in X-API-Key to the API. Manage keys and credits in the dashboard. The API is ordinary HTTP; no SDK is required.

Verify personal and business emails, including catch-all addresses and addresses protected by secure email gateways (SEGs), without sending an email. Additional address-level checks resolve most catch-all addresses as valid or invalid; catch-all detection is the starting point, not the final delivery conclusion.

Method and path Purpose
POST /v1/verifications/single Submit one email as JSON; save its own ID
GET /v1/verifications/single List single verifications
GET /v1/verifications/single/{id} Read one saved single verification and assessment
DELETE /v1/verifications/single/{id} Delete a finished single verification
POST /v1/verifications/bulk Submit an email array or CSV
POST /v1/verifications/bulk/resumable Start or recover a large CSV transfer
GET /v1/verifications/bulk List bulk jobs and current input limits
GET /v1/verifications/bulk/{id} Read progress, credits and actionable issues
GET /v1/verifications/bulk/{id}/results Paginated JSON (default) or ?format=csv
POST /v1/verifications/bulk/{id}/cancel Stop remaining work; no request body
DELETE /v1/verifications/bulk/{id} Delete a finished bulk job
GET /v1/credits Read available credits; does not reserve them

Single and bulk histories are separate. A one-row bulk submission is still bulk. History defaults to 20 items, maximum 100. Pass the returned next_cursor as cursor to continue; stop when it is null. Results pagination has separate limits.

For numbered navigation, request ?page=1&limit=20 on either history endpoint. The response also includes pagination with page, page_size, total and total_pages, scoped to this workspace and submission type and excluding deleted jobs. Each request loads only its requested page. page and cursor cannot be combined. Pages beyond the end return the last available page; an empty history returns page 1 of 1 with zero items. Totals and rows share one database snapshot; new or deleted jobs can change page boundaries between requests. Omit page to keep cursor-based navigation without counting the complete history.

All creation requests require a saved UUID Idempotency-Key, scoped to the workspace across single and bulk. HTTP 201 creates a resource; HTTP 200 recovers the same request. Reuse the same key and identical input/options after an uncertain response. Changed input with the same key returns 409. A new key deliberately creates another check and may charge again. Keep a key for the entire retry cycle; do not generate a new key on each attempt. Workflow and automation tools that retry steps automatically can derive the key from a stable record identifier, such as a UUIDv5 of the record ID and email, so a retry recovers the existing verification. Add a run identifier when a later re-check should start a new verification.

POST /v1/verifications/single
X-API-Key: YOUR_KEY
Idempotency-Key: 45164a5e-57e8-4201-a475-78df03e477a8
Content-Type: application/json
{"email":"Person@example.com"}

The response includes id, email, status, created_at, nullable completed_at, nullable assessment, credits and optional issue. The server waits up to five seconds for completion. If assessment is null, poll GET /v1/verifications/single/{id}, respecting Retry-After (normally 5s). An HTTP wait ending does not cancel saved work. Automation steps with a fixed time limit can save the id and read it in a later step. There is no single cancellation endpoint. Single admission reserves any necessary credit atomically; insufficient funds return 402 without creating a job. Syntax-only invalid and locally known unsupported inputs can finish without a credit.

POST /v1/verifications/bulk
X-API-Key: YOUR_KEY
Idempotency-Key: 6539fd89-8de4-42b6-bd1d-ab8ee25a8937
Content-Type: application/json
{"emails":["alice@example.com","bob@example.com","not-an-email"]}

Supply 1–100,000 strings, at most 65,536 characters each. The entire UTF-8 HTTP body, including JSON syntax, is limited to 32 MiB (33,554,432 bytes). Count and byte limits both apply. Larger lists can use CSV or separate jobs. Unknown request fields and non-string array entries are rejected. Null bytes and invalid Unicode are unsupported; ordinary non-email strings become free invalid_syntax assessments. Input correspondence uses zero-based occurrence indexes.

Single-email JSON and resumable-upload setup requests have a 2 MiB (2,097,152-byte) body limit. Direct bulk JSON and multipart CSV submissions have a 32 MiB (33,554,432-byte) body limit, including JSON formatting or multipart overhead.

Larger CSV files use resumable upload: the API receives the file metadata, while the file itself uploads directly to storage under the separate CSV file limits described below.

Use the same bulk endpoint with a multipart body. The client library constructs that body from these form fields; it is not an empty-body request.

Terminal window
curl --fail-with-body 'https://api.agentsverify.dev/v1/verifications/bulk' \
-H "X-API-Key: ${AGENTS_VERIFY_API_KEY:?Set your API key}" \
-H "Idempotency-Key: ${REQUEST_ID:?Save a UUID first}" \
-F 'file=@contacts.csv;type=text/csv' \
-F 'has_header=true' \
-F 'email_column_index=1'

has_header is required, exactly true or false. email_column_index is the zero-based position of the email column (default 0). For name,email,company, select 1. The 32 MiB body limit includes multipart overhead; use resumable transfer for files close to or above it. The dashboard handles this automatically and offers a header checkbox and email-column preview.

CSV must be UTF-8, optionally starting with a BOM, comma-separated, with standard quoting and LF or CRLF. Quoted commas/newlines and escaped quotes are supported. All records must have the same column count (maximum 1,024). Each source record is limited to 65,536 characters and 256 KiB encoded bytes. The selected column must exist. Broken quoting, unsupported encoding, inconsistent columns, an empty file or header-only input rejects the file before checks or credit holds. A well-formed row with an empty/non-email selected cell is retained with a free invalid_syntax result. Original cell values, columns, row order and duplicates are retained. Input uses normalized email identity alone for deduplication; other customer columns never influence uniqueness. Local-part case is preserved; domain case/IDNA and surrounding whitespace follow the normalization reflected in normalized_email. No speculative typo correction replaces the input.

Exact header collisions with any of the seven generated av_ columns are rejected before processing. Headerless files receive column_1, column_2, etc. in exports. The default CSV limit is 256 MiB and 1,000,000 data records before deduplication; GET /v1/verifications/bulk reports the effective file/row limits.

POST /v1/verifications/bulk/resumable
X-API-Key: YOUR_KEY
Idempotency-Key: db8fc155-d972-4a55-9567-2b3483b517f7
Content-Type: application/json
{"filename":"contacts.csv","size_bytes":183442,"has_header":true,"email_column_index":1}

Get size_bytes automatically from file metadata (File.size, stat, etc.). It is required for the storage protocol, admission and byte-limit enforcement; the backend independently validates the received size and checksum. A wrong size cannot silently start verification. filename is optional cosmetic basename metadata. Creation returns the normal bulk job and, while outstanding, upload: {method: "PUT", url, expires_at}. Treat the URL as a private capability.

PUT the raw bytes to that returned URL with Content-Type: text/csv and Content-Range: bytes 0-<last byte index>/<total bytes> for a whole-file transfer. Send no API key or Authorization header to storage. HTTP 200/201 confirms receipt; 308 means incomplete. Query progress with an empty PUT and Content-Range: bytes */<total bytes>; continue from the next byte after the returned Range, or zero if absent. Non-final chunk sizes must be multiples of 256 KiB. Follow the storage resumption protocol. A final CRC32C can be supplied using X-Goog-Hash: crc32c=<base64>. After confirmed receipt, poll the saved bulk ID; do not re-upload or call finalize. Backend discovery, whole-file validation and processing start automatically. Unfinished upload sessions expire after seven days. Validation or funding issues are reported on the saved job. Fix a rejected file by submitting corrected input with a new key; add credits to resume credits_required without re-uploading.

Status Meaning
uploading Waiting for the complete input transfer
processing Preparing, waiting, verifying or settling cancellation
completed Input and all address outcomes/credits finalized
cancelled Requested cancellation and settlement finalized
failed Input rejected or operation could not finish; inspect issue

issue gives a machine code, human message and sometimes a CSV record number. A cancellation settling remains processing with cancellation_pending. The cancel call returns promptly (202 while settling, otherwise 200). Completed assessments remain available and billable. Unchecked cancelled inputs have no assessment. There is no email-level cancelled/error result.

Bulk progress is {total, completed, cancelled} in unique email identities. total is null until full input validation; completed includes finalized unknowns/service-error assessments. input: {rows, duplicates} counts original data occurrences; rows = unique identities + duplicates. completed + cancelled reaches total when finalized. Duplicates reuse the same saved assessment.

Per-job credits: {reserved, charged, released} separates current held credits from final charges and returned holds. Valid, invalid (except local syntax rejections) and catch-all cost one credit per unique assessed identity. Unknown, invalid syntax, our failed attempts and unchecked cancelled work cost zero. Bulk reserves potential funding after full structural validation; underfunded jobs wait and resume after a top-up. Reading status/results is free. The available balance is a snapshot; funding is checked when new work is admitted.

created_at, nullable completed_at and checked_at use ISO 8601 UTC. Completion records input/outcome/credit settlement, excluding archive maintenance. Historical timestamps can remain null. Reading saved results does not refresh evidence, perform checks or charge again.

{
"email": " Person@EXAMPLE.com ",
"normalized_email": "Person@example.com",
"result": "valid",
"reason_code": "verified",
"message": "The email address passed verification.",
"checked_at": "2026-10-18T10:30:00Z",
"is_disposable": false,
"is_accept_all": true,
"is_role": false
}

Exactly four delivery results: valid, invalid, catch_all, unknown. Valid predicts very low bounce risk from the evidence at checked_at. Invalid means a current receiving failure or a confirmed disposable address excluded from sending. Its reason distinguishes these cases; it does not necessarily mean the mailbox is nonexistent or permanently unusable. Catch-all means address deliverability remains unresolved after further checks on a domain with accept-all behavior. Additional evidence resolves most catch-all addresses as valid or invalid, including addresses behind secure email gateways. Unknown is inconclusive, including a failed attempt explained by internal_error.

reason_code is one primary delivery explanation, not a bag of traits. message is for people and may change; never parse it. Clients must tolerate added response fields and unfamiliar reason codes, falling back to the main result.

Result Known reason codes (default first)
valid verified
invalid invalid_address, invalid_syntax, domain_not_found, no_mail_route, mailbox_not_found, mailbox_full, disposable
catch_all accept_all
unknown verification_inconclusive, dns_error, connection_failed, temporary_rejection, greylisted, verification_blocked, unsupported_address, verification_timeout, internal_error
Reason code Explanation
verified The email address passed verification.
invalid_syntax The email address has invalid syntax.
domain_not_found The email domain does not exist.
no_mail_route The email domain has no supported route for receiving mail.
mailbox_not_found The mail server reported that the mailbox does not exist.
invalid_address The email address was assessed as unable to receive mail.
accept_all The server accepts unrecognised addresses; this address could not be resolved reliably.
dns_error A DNS lookup could not be completed reliably.
connection_failed A connection to the mail server could not be established.
temporary_rejection The mail server temporarily refused verification.
greylisted The mail server deferred verification using greylisting. Try again later.
verification_blocked The mail server blocked verification.
mailbox_full The mailbox is full and cannot currently receive mail. Verify it again later.
disposable The email address is disposable and should not be used for sending.
unsupported_address The address requires an email capability that could not be verified.
verification_timeout Verification ended before a reliable result was available.
verification_inconclusive Verification could not determine a reliable delivery result.
internal_error Verification could not finish because of a service interruption. No credit was charged.

greylisted identifies an unresolved attempt with explicit greylisting evidence from the mail server or a qualified fallback provider. Retrying later may resolve it. A generic temporary refusal uses temporary_rejection; a temporary SMTP status or retry instruction alone does not establish greylisting. If further verification resolves the address, its final result and reason take precedence.

mailbox_full explains an invalid result supported by a current mailbox-capacity refusal. The mailbox may receive mail again after space becomes available; verify it again later. Generic temporary errors remain unknown. This result uses the ordinary invalid-result credit rule. Earlier saved assessments retain their original result, reason and message, including historical unknown / mailbox_full.

invalid / disposable excludes a confirmed temporary-email service address or public throwaway inbox from sending. It does not mean the mailbox is missing or unable to receive. New completed verifications with a confirmed AV finding is_disposable: true use this result and the ordinary invalid-result credit rule, without additional source checks or external fallback. False or unavailable findings do not trigger the exclusion. Earlier saved assessments retain their original verdict, reason and message. Operational failures remain free failures.

When external fallback is used, a qualified ZeroBounce do_not_mail / role_based maps to valid / verified, do_not_mail / role_based_catch_all to catch_all / accept_all, and invalid / mailbox_quota_exceeded to invalid / mailbox_full. Provider-only disposable and MX-forward policy labels remain unknown / verification_inconclusive unless AV independently confirms the disposable finding. Role and disposable properties retain their independent AV checks; provider labels do not supply that confirmation.

is_disposable identifies known temporary-email services and public throwaway inboxes. True means a maintained provider-domain match, native DNS identification of a reviewed public-inbox service, a recently service-issued public inbox recipient, a reviewed public-account family, reviewed managed temporary-pool membership, or a current published public-inbox namespace. Public throwaway inboxes can have reusable addresses. Native MX evidence identifies reviewed public-inbox receivers across all advertised routes, or across the complete preferred tier when ordinary backup routes are also present. Permanent private aliases and ordinary alias naming alone do not establish this finding. Public-account matching requires a recently observed account in a documented public pool and provider-supported alias lookup; it does not classify Gmail users or arbitrary plus aliases as a group. Managed temporary pools require recent service-issued membership and documented alias rules; ordinary Gmail/Outlook addresses do not qualify by domain or naming. False means the supported provider check completed without a positive identification; null means no usable determination, including expired evidence for a previously identified public recipient, account family or namespace. A previously identified namespace withdrawn from the current public inventory also remains null unless another independent source establishes true. This identifies the address type; new confirmed disposable results are explicitly excluded as invalid / disposable as described above. Findings are saved with the assessment. is_accept_all reports observed domain/server acceptance behavior. It can remain true when additional address evidence supports a valid or invalid result, as the valid example above shows. Use result for the address’s delivery conclusion. AgentsVerify uses additional address-level checks to resolve addresses on accept-all domains. A valid address with is_accept_all: true passed verification with very low bounce risk. Only result: catch_all means deliverability remains unresolved on an accept-all server after those checks. Use properties for the user’s stated filters, without reclassifying or downgrading the delivery result. All valid addresses share the same very low bounce risk assessment regardless of their property combination. Audience selection does not change stored results or the full CSV. See the MCP guide for assistant sending defaults and explicit disclosure of disposable exclusions. Qualified native and external accept-all findings are combined: conflicting findings produce null, while missing findings preserve an existing determination. A positive domain finding does not change a valid address result. is_role classifies a recognized functional address name, such as support@, sales@ or billing@. Matching is exact and case-insensitive on an unquoted ASCII base before the first +. For example, SUPPORT+west@example.com matches, while supporter@example.com and person+support@example.com do not. The address is not rewritten or deduplicated differently. Quoted local parts, non-ASCII bases and unsupported/malformed input have no role determination. The classifier uses the reviewed vocabulary below; false means a supported check completed without a vocabulary match, not proof of a personal mailbox. The finding establishes naming, not ownership, shared access or engagement. A functional address may be a business’s primary contact.

The initial recognized base names are:

abuse accounting accounts admin administrator admissions alerts appointments
billing bookings careers ceo cfo compliance contact coo cto customer-care
customer-service customer.care customer.service customer_care customer_service
customercare customerservice do-not-reply donotreply enquiries finance founders
ftp hello help helpdesk hostmaster hr human-resources human.resources
human_resources humanresources info inquiries jobs legal marketing media news
no-reply no_reply noc noreply office operations orders partners partnerships
payments payroll postmaster press privacy procurement reception recruiting
recruitment refunds returns sales security service shipping subscriptions
support team training unsubscribe usenet uucp webmaster www

All three flags can coexist with any supported result when evidence permits. They always appear: true detected, false checked/not detected within scope, null no usable determination (including older saved assessments or unavailable data). Properties are saved when assessed, not recomputed on retrieval. Actual assessment time is preserved; unassessed inputs stay null.

GET /v1/verifications/bulk/{id}/results?format=csv streams all original input rows once the entire input has validated, even while processing. It appends:

av_result,av_reason_code,av_message,av_checked_at,av_is_disposable,av_is_accept_all,av_is_role

Unfinished/unchecked cancelled rows have those fields blank. Boolean values use lowercase true/false; unavailable findings/times are blank. The CSV has one finite snapshot of finalized assessments at request time. Later completions appear on a new download, never halfway through the old snapshot. Original values are preserved as CSV cell values, including customer-entered spreadsheet formulas; quoting/newline serialization can differ from the uploaded bytes.

The role column is appended after the previous six result columns. Match CSV columns by header name, allowing added result columns; historical assessments without a role finding have a blank role cell. If a saved source file predates a newly reserved column and its original header now collides, CSV download returns HTTP 409 csv_header_conflict before streaming. Read verification results as JSON. Report csv_header_conflict with the saved verification ID only if you require the blocked original-column CSV export; this report does not require a new verification submission. The job and its charges are not changed by that download error.

JSON is available after a validated job reaches a terminal state. Default 1,000, maximum 10,000 input occurrences per page; unusually large address values may produce a shorter page to keep each response within 4 MiB. Follow next_cursor until null, even after a short page. For example:

{"results":[{"input_index":0,"assessment":null}],"next_cursor":null}

input_index follows original zero-based order. Each assessment contains only the standard address fields, not arbitrary original customer columns. Duplicates have distinct indexes and share the same assessment evidence; unassessed cancelled rows have null. Pass cursor and optional limit on the next request. Do not reuse a cursor for a different job. CSV does not accept cursors. Single results and bulk job information are JSON. Earlier-format saved jobs retain normalized unique addresses/results; legacy_input explains when original values/duplicates were not retained by that format.

Your verification history is saved for your convenience, so you can revisit past checks and download results. Uploaded files, original input rows and saved assessments stay with the job until you delete it.

Delete finished jobs using the corresponding single/bulk DELETE endpoint, or in dashboard history choose Select, check the finished jobs, then choose Delete selected and confirm. Page selection includes only eligible jobs on the current page. Cancel closes selection without deleting anything. Inputs, assessments, outputs and job-owned evidence are removed and the job disappears from history. An unfinished job returns 409; cancel bulk work first and wait for settlement. 204 confirms cleanup; 202 means inaccessible immediately while cleanup retries, with Retry-After. Repeat DELETE to confirm completion. Deletion cannot be undone. Replaying a deleted creation key returns 410 instead of starting/charging again.

Once deletion completes, the job’s uploaded files, submitted data and results are removed from active systems. Previously issued upload links cannot recreate deleted input. Existing backups expire under the infrastructure retention policy; restoration must reapply deletion records before serving data. Billing records are retained separately for accounting; minimal non-content security and retry metadata remains.

Errors use {issue: {code, message}, request_id}. Keep the request ID for support; omit API keys and private upload URLs. HTTP 401 authentication, 402 single funding, 403 access/origin, 404 missing/inaccessible, 409 conflicting request or current state, 410 deleted retry identity, 413 byte/count limit, 415 media type, 422 input validation. On 429/503 respect Retry-After and retry the same creation identity. Automatic backend recovery is not a reason to submit new jobs.

Default API-key budgets per workspace/minute:

Scope Limit per minute
Reads, including polling and results 300
Creation calls for single, bulk and resumable-upload endpoints, including retries 120
Other submissions, including cancellation and deletion 60
New single verifications 60
New bulk jobs, including JSON lists and direct or resumable CSV uploads 10

New single and bulk jobs have independent admission counters, in addition to the shared API-key creation-call budget. For example, a new bulk submission consumes one creation call and one new-bulk-job slot, regardless of its email count. A 429 identifies the binding scope and allowance in its message; Retry-After reports the remaining time in that scope’s 60-second window. These are separate request/admission scopes; replays consume the API request budget but not another fresh-job slot. All API keys in a workspace share budgets. Default file intake allows three unfinished uploads/preparations and 512 MiB pending bytes per workspace; ready jobs no longer occupy these slots. A processing-workspace backlog limit (default 1,000,000 addresses) can delay additional admission. Temporary service capacity can return 503 before acceptance. No credits are charged for rejected requests. Parallel downloads use bounded buffering and may wait briefly between chunks; they do not reserve verification credits.

Original filenames are cosmetic. The service retains a safe basename, shortened to 120 characters, consistently for multipart and resumable CSV. Invalid or missing filename metadata does not change parsing or prevent verification.

Choose an email address and run the example below. It generates and saves the request ID, submits your email and follows the saved verification until its result is ready.

Get your key from the API keys page and set it as AGENTS_VERIFY_API_KEY in your terminal environment. With Node.js 22 or later, save this code as verify.mjs. It uses built-in modules and needs no packages.

Node.js single-verification example
async function verifyEmail(email, apiKey, stateFile = 'agentsverify-single.json') {
const {readFile, writeFile, rename} = await import('node:fs/promises');
const {randomUUID} = await import('node:crypto');
const {setTimeout: sleep} = await import('node:timers/promises');
if (!email || !apiKey) {
throw new Error('Pass an email address and set AGENTS_VERIFY_API_KEY');
}
// Save the request identity before the first API call. Never save the API key.
try {
await writeFile(stateFile, JSON.stringify({email, requestId: randomUUID()}),
{flag: 'wx', mode: 0o600});
} catch (error) {
if (error.code !== 'EEXIST') throw error;
}
const saved = JSON.parse(await readFile(stateFile, 'utf8'));
if (saved.email !== email) {
throw new Error('Use a different state filename to verify a different email');
}
const deadline = Date.now() + 5 * 60 * 1000;
while (Date.now() < deadline) {
const path = '/v1/verifications/single' +
(saved.id ? '/' + encodeURIComponent(saved.id) : '');
const response = await fetch('https://api.agentsverify.dev' + path, {
method: saved.id ? 'GET' : 'POST', redirect: 'error',
signal: AbortSignal.timeout(30000),
headers: {
'X-API-Key': apiKey,
...(!saved.id ? {
'Idempotency-Key': saved.requestId,
'Content-Type': 'application/json'
} : {})
},
...(!saved.id ? {body: JSON.stringify({email: saved.email})} : {})
});
if (response.status !== 429 && response.status !== 503) {
const job = await response.json();
if (!response.ok) {
throw new Error(job.issue?.message || 'Request rejected (HTTP ' + response.status + ')');
}
if (!saved.id) {
saved.id = job.id;
await writeFile(stateFile + '.tmp', JSON.stringify(saved), {mode: 0o600});
await rename(stateFile + '.tmp', stateFile);
}
if (job.status === 'completed') {
if (!job.assessment) throw new Error('The completed job has no assessment');
return job.assessment;
}
if (job.status === 'failed' || job.status === 'cancelled') {
throw new Error(job.issue?.message || 'Verification ' + job.status);
}
}
const retryAfter = response.headers.get('Retry-After');
const delay = retryAfter === null ? 5000 : /^\d+$/.test(retryAfter)
? Number(retryAfter) * 1000 : Math.max(0, Date.parse(retryAfter) - Date.now());
const wait = Number.isFinite(delay) ? delay : 5000;
await sleep(Math.min(wait, Math.max(0, deadline - Date.now())));
}
throw new Error('Still processing. Run the same command to continue the saved verification.');
}
const assessment = await verifyEmail(
process.argv[2],
process.env.AGENTS_VERIFY_API_KEY,
process.argv[3] || 'agentsverify-single.json'
);
console.log(JSON.stringify(assessment, null, 2));

Run it with an address you want to verify:

Terminal window
node verify.mjs 'person@your-domain.com'

The output is the final assessment, including result, reason_code and message. Any of valid, invalid, catch_all or unknown can be a completed result. Failed or cancelled jobs stop with their issue instead of polling forever.

The local agentsverify-single.json file saves the email, request UUID and returned verification ID. If your connection drops or the command stops, run the same command from the same directory: it recovers the original request or reads the saved verification. The API key stays in your environment. To deliberately start another check, supply a new state filename, for example node verify.mjs 'another@your-domain.com' another-check.json.

Use Node.js 22 or later. Configure AGENTS_VERIFY_API_KEY, generate and save a UUID as REQUEST_ID for the new job, and reuse it across retries. For parser fields and file limits, see large CSV transfers.

This Node.js example performs both stages. Save it as upload.mjs and run node upload.mjs contacts.csv with both environment variables set:

Node.js CSV upload example
async function uploadCsv(filePath, apiKey, idempotencyKey) {
const {stat} = await import('node:fs/promises');
const {createReadStream} = await import('node:fs');
const {basename} = await import('node:path');
if (!apiKey || !idempotencyKey) {
throw new Error('Set AGENTS_VERIFY_API_KEY and your saved REQUEST_ID');
}
const file = await stat(filePath);
if (file.size === 0) throw new Error('The CSV file is empty');
const filename = encodeURIComponent(basename(filePath));
const created = await fetch('https://api.agentsverify.dev/v1/verifications/bulk/resumable', {
method: 'POST', redirect: 'manual',
headers: {
'X-API-Key': apiKey,
'Idempotency-Key': idempotencyKey,
'Content-Type': 'application/json'
},
body: JSON.stringify({filename: basename(filePath), size_bytes: file.size, has_header: true, email_column_index: 0})
});
const receipt = await created.json();
if (created.status !== 200 && created.status !== 201) {
throw new Error(receipt.issue?.message || 'API request rejected');
}
if (receipt.upload) {
const stored = await fetch(receipt.upload.url, {
method: 'PUT', body: createReadStream(filePath), duplex: 'half',
credentials: 'omit', redirect: 'manual',
headers: {
'Content-Type': 'text/csv',
'Content-Range': 'bytes 0-' + (file.size - 1) + '/' + file.size,
'X-Goog-Meta-Original-Filename': filename
}
});
if (stored.status === 308) {
throw new Error('Upload incomplete: resume the saved session');
}
if (stored.status !== 200 && stored.status !== 201) {
throw new Error('Storage rejected the upload (HTTP ' + stored.status + ')');
}
}
return receipt.id;
}
const verificationId = await uploadCsv(
process.argv[2] || 'contacts.csv',
process.env.AGENTS_VERIFY_API_KEY,
process.env.REQUEST_ID
);
console.log('Verification ID:', verificationId);

The example streams a whole file without buffering it in memory. It does not automatically resume incomplete transfers. Storage HTTP 200 or 201 confirms receipt. After confirmation, the job can briefly remain uploading while the backend detects completion. Continue polling instead of re-uploading.

Poll GET /v1/verifications/bulk/{id} and respect Retry-After. Read issue for actionable guidance. Whole-file validation and processing start automatically; no completion or batching call is needed.

Download GET /v1/verifications/bulk/{id}/results?format=csv once the complete input is validated. Partial snapshots retain every original row with blank assessment fields for unfinished checks. Default results are terminal-only paginated JSON. Read saved results again without submitting another verification.

See Results and credits for exports and charges, or the API reference for endpoint schemas.

Send an empty PUT to the same private upload.url with Content-Range: bytes */<total bytes>. HTTP 200 or 201 means complete. A 308 response identifies persisted bytes in Range. Continue at the next byte, or byte zero if no Range is present, following the storage resumption protocol.

Keep omitting API credentials from storage requests. Recover an uncertain API creation using the original Idempotency-Key; a new identity creates new work and can charge again.