Get a Mailbox Alias
This is the GraphQL query to run when you want to get the mailbox alias for a given mailbox.
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:

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).
post
https://api.maildrop.cc/graphql
Gets the Mailbox Alias for a given mailbox.
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.
Parameters
Header
Content-Type
String
application/json
Body
String
'{"query":"query Example { altinbox(mailbox:\"myusername\") }"}'
Responses
200: OK
curl
React
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"}}
export const GET_ALIAS = gql`
query GetAlias($mailbox: String!) {
altinbox(mailbox: $mailbox)
}
}`;
interface QueryReturn {
altinbox: string;
}
interface MyComponentProps {
mailbox: string;
}
const MyComponent = (props: MyComponentProps) => {
const [{ loading, error, data }] = useQuery<QueryReturn>(GET_ALIAS, {
variables: { mailbox: props.mailbox },
});
return (
<div>
{loading && <div>Loading...</div>}
{!loading && error && <div>There was an error.</div>}
{!loading && data?.altinbox && <div>Mailbox Alias: {data.altinbox}@maildrop.cc</div>}
</div>
);
};
Last modified 7mo ago