📬Get a Mailbox Listing

This is the GraphQL query to run in order to get a list of all messages inside a mailbox.

Gets an array of messages belonging to a mailbox.

POST https://api.maildrop.cc/graphql

This GraphQL query takes a mailbox and an id as required parameters. Returns an array of Message objects with the "data" and "html" fields set to null.

(GraphQL best practices discourage queries and variable names from being the same, so the query is named "inbox".)

Headers

Name
Type
Description

Content-Type

String

application/json

Request Body

Name
Type
Description

String

'{"query":"query Example { inbox(mailbox:\"testing\") { id headerfrom subject date } }"}'

{
    "data": {
        "inbox": [{
            "id": "AIm59ihdGy",
            "headerfrom": "[email protected]",
            "subject": "Testing!",
            "date": "2023-02-09T23:51:14.411Z"
        }]
    }
}

See Also

curl --request POST \
    --header 'content-type: application/json' \
    --url https://api.maildrop.cc/graphql \
    --data '{"query":"query Example { inbox(mailbox:\"testing\") { id headerfrom subject date } }"}'

returns:

{"data":{"inbox":[{"id":"AIm59ihdGy","headerfrom":"[email protected]","subject":"test Thu, 09 Feb 2023 23:51:14 +0000","date":"2023-02-09T23:51:14.411Z"}]}}

Last updated