Skip to main content

Get one email by refId or Message-ID

GET 

/v1/imap/:mailerID/messages

Returns one email of a connected mailbox in the same JSON shape as the INCOMING_EMAIL webhook body. Give exactly one of refId or messageId. refId (the ref-id sent in INCOMING_EMAIL webhooks) reads the email Edith stored; if it is no longer stored the call returns 404 and the email can still be fetched by messageId. messageId (the email's Message-ID header, with or without angle brackets) returns the stored copy when Edith has one; otherwise the email is fetched from the mailbox, stored the same way as live inbound, and returned (source mailbox). No webhook is sent. Works for Google (Gmail) and Microsoft (Outlook) OAuth mailboxes and basic username/password IMAP mailboxes.

Request​

Path Parameters

    mailerID stringrequired

    Mailer ID

Query Parameters

    refId string

    ref-id from an INCOMING_EMAIL webhook

    messageId string

    Message-ID header of the email

Responses​

The email

Schema

    email object

    The email, in the same JSON shape as the INCOMING_EMAIL webhook body (event, details, success).

    refId string

    Edith's reference for the stored email, the same value as ref-id in INCOMING_EMAIL webhooks.

    source string

    Possible values: [stored, mailbox]

    stored: Edith already had the email. mailbox: fetched from the mailbox just now and stored.

    success boolean
Loading...