Documentation

API Access Key & Authentication

After signing up, every user is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the Mailet API, simply include your bearer token in the Authorization header.

Get API Key

Headers

Header Description
Authorization [Required] Should be Bearer access_key. See "Your API Access Key" above.

API Endpoints

This is an example of how you should make the request in Postman with:

Create

[POST]

Create a new random temporary email account

URL: https://app.getmailet.com/api/inbox/create

Create a new temporary email account with a personalized address

URL: https://app.getmailet.com/api/inbox/create?address=MYNEWEMAIL

HTTP Post Request Parameters:

Parameter Description
address Your personalized email address. Ex: MyNewEmail

This endpoint will return "[email protected]"

Inbox

[GET]

Get your email messages of that specific temp email

URL: https://app.getmailet.com/api/inbox?email=YOUR_TEMP_EMAIL

Delete

[POST]

Delete a message by id from your temp email inbox

URL: https://app.getmailet.com/api/inbox/delete/message=MESSAGE_ID

API Features

Object Description

Email [Required] Email to look up using Mailet. 
Message_id [Required] Message from temp email to look up using Mailet.

Example API Request

curl 'https://app.getmailet.com/api/inbox?email=YOUR_EMAIL' -X GET  -H 'Accept: application/json' -H 'Authorization: YOUR_API_KEY

PHP Curl

        $curl = curl_init();

        curl_setopt_array($curl, array(
            CURLOPT_URL => "https://app.getmailet.com/api/inbox/?access_token=YOUR_API_KEY&email=YOUR-EMAIL",
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_ENCODING => "",
            CURLOPT_MAXREDIRS => 10,
            CURLOPT_TIMEOUT => 30,
            CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
            CURLOPT_HTTPHEADER => array(
                "Accept: application/json",
                "Authorization:  YOUR_API_KEY",
                "Content-Type: application/json",
                "cache-control: no-cache"
            ),
        ));

        $response = curl_exec($curl);
        $err = curl_error($curl);

        curl_close($curl);

        if ($err) {
            echo "cURL Error #:" . $err;
        } else {
            echo $response;
        }
    

Python

        import requests

        url = "https://app.getmailet.com/api/inbox/?access_token=YOUR_API_KEY&email=YOUR-EMAIL"

        headers = {
            'Accept': "application/json",
            'Content-Type': "application/json",
            'Authorization': "YOUR_API_KEY",
            'cache-control': "no-cache"
            }

        response = requests.request("GET", url, headers=headers)

        print(response.text)
    

JavaScript Jquery AJAX

        var settings = {
            "async": true,
            "crossDomain": true,
            "url": "https://app.getmailet.com/api/inbox/?access_token=YOUR_API_KEY&email=YOUR-EMAIL",
            "method": "GET",
            "headers": {
                "Accept": "application/json",
                "Content-Type": "application/json",
                "Authorization": "YOUR_API_KEY"
                "cache-control": "no-cache"
            },
            "processData": false
        }

        $.ajax(settings).done(function (response) {
            console.log(response);
        });