API reference

Mailbox messages

The emails a mailbox search read, and whether each became a charge's receipt.

Guides: Find receipts in your mailbox

List the messages mailbox searches opened

GET/v1/mailbox_messages

client.mailboxMessages.list()

The messages mailbox searches opened, newest first, with what became of each: kept as a receipt, or set aside.

Parameters

NameTypeDescription
connection_idQuerystring or null

An id that starts with conn_.

statusQueryMessageStatus or null

Only messages kept, or only those set aside.

limitQueryinteger

Page size, 1–200.

Default 50
cursorQuerystring or null

The next_cursor of the previous page.

Response

200MailboxMessagePage

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl "https://api.ledgerit.ai/v1/mailbox_messages" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN"

Get a message a mailbox search opened

GET/v1/mailbox_messages/{message_id}

client.mailboxMessages.get()

One message a mailbox search opened, and what became of it.

Parameters

NameTypeDescription
message_idPath · Requiredstring

An id that starts with mail_msg_.

Response

200MailboxMessageOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl "https://api.ledgerit.ai/v1/mailbox_messages/{message_id}" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN"

Objects

The objects these operations take and return.

MailboxMessagePage

A page of the messages mailbox searches opened, newest first.

NameTypeDescription
dataRequiredarray of MailboxMessageOut
has_moreRequiredboolean
next_cursorRequiredstring or null

MailboxMessageOut

One message a mailbox search opened, and what became of it.

NameTypeDescription
connection_idRequiredstring

The mailbox it is in.

document_idRequiredstring or null

An id that starts with doc_.

idRequiredstring

An id that starts with mail_msg_.

opened_atRequiredstring (date-time)

When the search opened it.

received_atRequiredstring (date-time)

When it arrived in the mailbox.

senderRequiredstring or null

Who sent it.

statusRequiredstring

kept: it is a receipt, and document_id is the document it became. not_a_receipt: read and set aside; nothing of its body is kept.

subjectRequiredstring or null
transaction_idRequiredstring or null

An id that starts with txn_.