Pular para o conteúdo

Criar um lote

POST
/email-validation-batches
curl --request POST \
"https://api.iporto.com.br/api/external/v1/email-validation-batches" \
--header "Authorization: Bearer $IPORTO_API_KEY" \
--header "Content-Type: application/json" \
--data '{"name":"Carrinho abandonado","emails":["[email protected]","[email protected]"]}'

Aceita arquivo (multipart/form-data, campo file, .csv ou .txt) ou uma lista JSON.

A resposta é 201 com o identificador e os contadores zerados: um arquivo grande não cabe no tempo de uma requisição. Acompanhe em GET /email-validation-batches/{id}.

⚠️ Quem encerra é status (completed ou failed), não progress.

object
file
required
string format: binary

O lote foi aceito e entrou na fila.

Media typeapplication/json

Um lote de verificação. totals conta linhas e andamento; results conta o que o motor achou, e pode trazer null em qualquer campo — nulo é “não sabemos”.

object
object
string
nullable
id
string
nullable
name
string
nullable
source
string
nullable
origin
string
nullable
status
string
nullable
progress
integer
totals
object
lines
integer
emails
integer
duplicated
integer
pending
integer
completed
integer
failed
integer
insufficient_credits
integer
results
object
valid
integer
invalid
integer
unknown
integer
deliverable
integer
risky
integer
undeliverable
integer
unverified
integer
disposable
integer
gibberish
integer
typing_error
integer
trap
integer
abandoned
integer
free
integer
role
integer
name
integer
bank
integer
gov
integer
catch_all
integer
credits_charged
integer
file
object
size_bytes
integer
mime_type
string
nullable
error
nullable
created_at
string
nullable
started_at
string
nullable
completed_at
string
nullable
expires_at
string
nullable
items_pruned_at
nullable
Examplegenerated
{
"object": "example",
"id": "example",
"name": "example",
"source": "example",
"origin": "example",
"status": "example",
"progress": 1,
"totals": {
"lines": 1,
"emails": 1,
"duplicated": 1,
"pending": 1,
"completed": 1,
"failed": 1,
"insufficient_credits": 1
},
"results": {
"valid": 1,
"invalid": 1,
"unknown": 1,
"deliverable": 1,
"risky": 1,
"undeliverable": 1,
"unverified": 1,
"disposable": 1,
"gibberish": 1,
"typing_error": 1,
"trap": 1,
"abandoned": 1,
"free": 1,
"role": 1,
"name": 1,
"bank": 1,
"gov": 1,
"catch_all": 1
},
"credits_charged": 1,
"file": {
"size_bytes": 1,
"mime_type": "example"
},
"error": "example",
"created_at": "example",
"started_at": "example",
"completed_at": "example",
"expires_at": "example",
"items_pruned_at": "example"
}

A chave não foi enviada, ou venceu.

Media typeapplication/json
object
error
string
Examplegenerated
{
"error": "example"
}

Sem crédito para a quantidade de endereços do lote.

Media typeapplication/json
object
error
string
Examplegenerated
{
"error": "example"
}

O arquivo ou a lista passou do teto. A mensagem traz o limite e o tamanho recebido — é 413, e não 422, porque o pedido está correto: só é grande demais.

Media typeapplication/json
object
error
string
Examplegenerated
{
"error": "example"
}

Nem file nem emails vieram, ou a extensão não é .csv/.txt.

Media typeapplication/json
object
error
string
Examplegenerated
{
"error": "example"
}

Não foi possível consultar o saldo. Tente de novo.

Media typeapplication/json
object
error
string
Examplegenerated
{
"error": "example"
}