List emails from the mailbox

GET {{baseUrl}}/emails/mailboxes/:email/messages?maxResults=<string>&pageToken=<string>&labelIds=<string>&q=<string>&includeSpamTrash=<boolean>

Lists the messages in the user's mailbox.

Scopes: mail:read

Rate Limit Label: MEDIUM

Not supported in Gov cluster

Request Params

KeyDatatypeRequiredDescription
maxResultsstringMaximum number of messages to return. This field defaults to 50. The maximum allowed value for this field is 500.
pageTokenstringPage token to retrieve a specific page of results in the list.
labelIdsstringOnly return messages with labels that match all of the specified label IDs in this query parameter.
qstringOnly return messages matching the specified elastic search query.
includeSpamTrashstringWhether to include messages from SPAM and TRASH in the results.

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{&quot;messages&quot;:[{&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;threadId&quot;:&quot;\u003cstring\u003e&quot;},{&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;threadId&quot;:&quot;\u003cstring\u003e&quot;}],&quot;nextPageToken&quot;:&quot;\u003cstring\u003e&quot;,&quot;resultSizeEstimate&quot;:&quot;\u003cinteger\u003e&quot;}