Get a Mailbox Alias

This is the GraphQL query to run when you want to get the mailbox alias for a given mailbox.

What's a Mailbox Alias?

Every email address on Maildrop has a corresponding "Mailbox Alias", which is an encoded two-way-hash of the email address itself, with the secret key for the hash known only to Maildrop.

This means, if you wanted to give someone the address "[email protected]" but didn't want them to be able to go to the site and read that mailbox, you could give them the mailbox alias, for example "[email protected]". Messages sent to this mailbox alias would still go to [email protected] but the sender wouldn't know the true destination.

This serves as an additional layer of security if you're concerned about others getting access to the mailbox.

Each mailbox on the maildrop.cc site has this section which includes the mailbox alias:

A sample Maildrop alias address.
From the maildrop.cc website

If you're using Maildrop in an automated fashion it's unlikely that you'll need to query for the mailbox alias - it's more useful for you to just create a unique address that only you know (for example, a uuidv4 address @ maildrop.cc).

Gets the Mailbox Alias for a given mailbox.

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

Retrieves the Mailbox Alias for the address in the query. The query does not need to contain the entire email address, just the username portion. For example, "[email protected]" only needs "test" as the query parameter.

Headers

Name
Type
Description

Content-Type

String

application/json

Request Body

Name
Type
Description

String

'{"query":"query Example { altinbox(mailbox:\"myusername\") }"}'

{
    "data": {
        "altinbox": "D-1lp8kheq"
    }
}

Examples

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

returns:

{"data":{"altinbox":"D-1lp8kheq"}}

Last updated