Pular para o conteúdo

Listar mensagens

GET
/messages
curl --request GET \
"https://api.iporto.com.br/api/external/v1/messages" \
--header "Authorization: Bearer $IPORTO_API_KEY" \
--header "Accept: application/json"

As mensagens da conta, da mais recente para a mais antiga.

⚠️ A resposta não traz o total: contar o histórico a cada requisição exigiria varrer uma coleção de milhões de documentos. Use meta.has_more para saber se há próxima página.

channel
string
default: email
Allowed values: email sms

O canal: email (padrão) ou sms. Valor inválido responde 422.

tracking_code
string

O código de rastreio da mensagem — o filtro mais direto.

message_id
string

O identificador do servidor de envio.

to
string

O destinatário: endereço de e-mail ou telefone, conforme o canal.

status
string

O status de entrega, como aparece em delivery.status.

tag
string

Uma das etiquetas enviadas com a mensagem. Só no canal de e-mail.

sent_since
string

Início do período, no formato AAAA-MM-DD.

sent_until
string

Fim do período, no formato AAAA-MM-DD. Inclui o dia inteiro.

per_page
integer
default: 25 >= 1 <= 100

Itens por página.

page
integer
default: 1 >= 1

A página, começando em 1.

A página de mensagens.

Media typeapplication/json
object
object
string
Allowed value: list
data
Array<object>

O mesmo objeto que o webhook entrega em param.details (v1) e data (v2). Cada campo está descrito em https://docs.iporto.com.br/api/webhooks/eventos/

object
object
string
nullable
event
nullable
channel
string
nullable
message
object
id
string
nullable
tracking_code
string
nullable
message_id
string
nullable
message_id_relay
string
nullable
subject
string
nullable
body
nullable
from
string
nullable
from_visible
string
nullable
to
string
nullable
recipients
Array<string>
tags
Array<string>
smtp_domain_id
integer
smtp_account_id
integer
plan_type
string
nullable
attachments_dropped
Array
sent_at
string
nullable
delivery
object
status
string
nullable
hard_bounce
integer
soft_bounce
integer
discarded
integer
trap
integer
bounce
object
kind
string
nullable
code
string
nullable
answer
string
nullable
domain
string
nullable
recipients
Array<object>
object
email
string
nullable
domain
string
nullable
kind
string
nullable
code
string
nullable
answer
string
nullable
discard_reason
nullable
engagement
object
link
string
nullable
ip
string
nullable
user_agent
string
nullable
device
string
nullable
platform
string
nullable
referer
nullable
meta
object
channel
string
Allowed values: email sms
page
integer
per_page
integer
has_more

Há próxima página. Não existe total — ver a descrição da listagem.

boolean
Example
{
"object": "list",
"meta": {
"channel": "email"
}
}

A chave não foi enviada, ou venceu.

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

Um filtro de valor fechado recebeu valor inválido.

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