Get a message timeline

GET/api/v1/email-logs/messages/{messageKey}
Requires anorganization API keywith the scopeevents:read

Every event for one message, oldest first — the whole story of a single send in one call.

Parameters

NameInTypeDescription
messageKeyrequiredpathstringThe message key identifier.

Request

GET/api/v1/email-logs/messages/{messageKey}
curl -X GET 'https://app.mailyte.com/api/v1/email-logs/messages/01JBT8XQ2M9WYC3K4F6R7S8T9V' \
  -H 'Authorization: Bearer mk_live_YOUR_API_KEY'
The key names its own organization, so no X-Organization-ID header is needed.

Response

Success.

  • dataobject
    • objectstringmessage
    • idstring

      Mailyte's ID for the message: a ULID, without angle brackets. Use it with GET /email-logs/messages/{id}. It is not the Message-ID.

    • message_idstring

      The Message-ID header, angle brackets included, such as <01JBT8XQ2M…@example.com>. It is in the recipient's headers and in any bounce. Use it, percent-encoded, with GET /domains/{domain}/messages/{messageId}. Null for an email.dropped event, because the message was never sent.

    • subjectstring

      The subject. In this list it is set only on the email.submitted row; GET /email-logs/{event} returns it for any event.

    • fromobject
      • emailstring

        The sending address. In this list it is set only on the email.submitted row, as with subject.

      • namestring

        The sender's display name. Null when there is none, or on a list row that is not email.submitted.

    • tagsarray<string>

      Your labels from the send. [] means the message had no tags. Null means this row is not email.submitted, so the tags are not shown here.

    • metadataobject

      The metadata you set when sending, returned unchanged on every event for this message. {} means there was none. Null means this row is not email.submitted.

    • htmlstring

      The HTML body as sent. Null when the message was text only, or we never saw it being sent.

    • textstring

      The plain-text body as sent. Null when there was none, or we never saw it being sent.

    • recipientstring

      The one address this copy was sent to. A message to several people appears as one message per recipient.

    • eventsarray<object>

      Everything that happened to this message, oldest first, in the same shape as GET /email-logs.

      • objectstringevent
      • idstring

        This event's ID, the value GET /email-logs/{event} takes.

      • typestringemail.submitted | email.accepted | email.delivered | email.deferred | email.bounced | email.dropped | email.rejected | email.inbound | tracking.open | tracking.click | tracking.unsubscribe | delivery.complaint | spam.reported | storage.quota.warning | storage.quota.exceeded | quota.warning

        What happened, exactly as ?event_type= accepts it. email.submitted is written when we accept a message. A complaint is delivery.complaint. quota.warning is an older name for storage.quota.warning. The storage.* and spam.reported events are about a mailbox rather than one of your messages.

      • recipientstring

        The address the event is about. Rarely null, when the mail server's report gave no address.

      • detailobject

        The extras that only some event types carry. Grouped rather than flat: on a plain delivery all four are null, and flat they read as four missing fields instead of one absent category.

        • ip_addressstring

          Who opened or clicked. Null on everything else.

        • user_agentstring

          The app that opened or clicked, as it named itself. Often null, for example when an image proxy loaded the message.

        • urlstring

          The link that was clicked. Set only when type is tracking.click.

        • reasonstring

          Why a message bounced, was deferred or was dropped, in the receiving server's words. Null when nothing went wrong.

        • not_sent_reasonstringdoes_not_exist | dead_domain | misspelt_domain | suppressed | disposable | not_a_contact | not_checked | inbox_full | null

          Set 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_contact or not_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.

      • messageobject

        The message this event is about, without its body. subject, from and tags are set only on the email.submitted row; GET /email-logs/{event} returns them for any event.

        • idstring

          Mailyte's ID for the message: a ULID, without angle brackets. Use it with GET /email-logs/messages/{id}. It is not the Message-ID.

        • message_idstring

          The Message-ID header, angle brackets included, such as <01JBT8XQ2M…@example.com>. It is in the recipient's headers and in any bounce. Use it, percent-encoded, with GET /domains/{domain}/messages/{messageId}. Null for an email.dropped event, because the message was never sent.

        • subjectstring

          The subject. In this list it is set only on the email.submitted row; GET /email-logs/{event} returns it for any event.

        • fromobject
        • tagsarray<string>

          Your labels from the send. [] means the message had no tags. Null means this row is not email.submitted, so the tags are not shown here.

        • metadataobject

          The metadata you set when sending, returned unchanged on every event for this message. {} means there was none. Null means this row is not email.submitted.

      • created_atstring

        When we recorded the event, which can be a little after it happened.

Returned inside the standard envelope.

Errors

StatusWhen
401The API key is missing, unknown, revoked or expired. All four answer identically, on purpose: distinguishing them would confirm which keys exist.
403The 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.
404No such resource in this organization.
422The request was understood but the values were not acceptable.
429Too 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.