Messages (email log)
/api/v1/email-logs/messagesRequest
/api/v1/email-logs/messagescurl -X GET 'https://app.mailyte.com/api/v1/email-logs/messages' \
-H 'Authorization: Bearer mk_live_YOUR_API_KEY'const response = await fetch('https://app.mailyte.com/api/v1/email-logs/messages', {
method: 'GET',
headers: {
Authorization: 'Bearer mk_live_YOUR_API_KEY',
},
});
const { data } = await response.json();import requests
response = requests.get(
"https://app.mailyte.com/api/v1/email-logs/messages",
headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
)
data = response.json()["data"]<?php
$response = Http::withToken('mk_live_YOUR_API_KEY')
->get('https://app.mailyte.com/api/v1/email-logs/messages');
$data = $response->json('data');require "net/http"
require "json"
uri = URI("https://app.mailyte.com/api/v1/email-logs/messages")
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer mk_live_YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }Response
Success.
dataobjectdataarray<object>objectstringmessageidstringMailyte's ID for the message, the value
GET /email-logs/messages/{id}takes. It is not the Message-ID.message_idstringThe Message-ID header, angle brackets included, for
GET /domains/{domain}/messages/{messageId}. Null when the message never had one.subjectstringThe subject. Null when none of this message's events has one.
fromobjectemailstringThe sending address. Null when none of this message's events names one.
namestringThe sender's display name. Null when there is none.
recipientstringThe one address this copy was sent to. A message to several people appears as one row per recipient.
statusstringsubmitted | sent | delivered | deferred | bounced | rejected | dropped | opened | clicked | complained | unsubscribed | unknownThe message's latest outcome. A value we do not recognise is shown as
unknown.sentandcomplaineddo not occur today.not_sent_reasonstringdoes_not_exist | dead_domain | misspelt_domain | suppressed | disposable | not_a_contact | not_checked | inbox_full | nullSet when Mailyte stopped the message before it left, so it was never sent and is not a bounce: -
does_not_exist: the address is known not to exist. -dead_domain: the domain takes no mail. -misspelt_domain: the domain is misspelled, such as gmail.con. -suppressed: the address is on your suppression list. -disposable: a throwaway address. -not_a_contactornot_checked: a marketing key sends only to checked contacts. -inbox_full: the inbox is full. Remove or correct the address in your app. Null for everything else.activityobjectCounts over every event recorded for this message.
totalintegerAll events, of any type.
opensintegerEvery open, not unique people: one person opening twice counts twice.
clicksintegerEvery
tracking.click, not unique links.typesarray<string>The distinct
typevalues seen for this message, from the same set as an event'stype.
first_event_atstringWhen the first event happened, in ISO 8601 UTC.
last_event_atstringWhen the latest event happened, in ISO 8601 UTC.
statuscomes from this event.
pagination_metaany
Returned inside the standard envelope.
Errors
| Status | When |
|---|---|
401 | The API key is missing, unknown, revoked or expired. All four answer identically, on purpose: distinguishing them would confirm which keys exist. |
403 | The key is valid but may not do this: it lacks the required scope, its IP allowlist does not include you, or this endpoint does not accept API keys. |
404 | No such resource in this organization. |
422 | The request was understood but the values were not acceptable. |
429 | Too many requests, or the organization has spent its sending allowance. `Retry-After` says how long to wait. |
Every status, with what causes it and what to do, is on the error reference.