Use our API to Automate your Message Workflow

Mailinator's REST API allows full access to Inboxes, Messages, even Attachments directly from your application and tests. Mailinator subscribers are provided with an API token, enabling automation and interface with your system.

GET /api/v2/domains/private/inboxes/testinbox


{
    "domain": "yourprivatedomain.com",
    "to": "testinbox"
    "msgs": [
        {
            "subject": "this is a test email 1",
            "domain": "yourprivatedomain.com",
            "from": "Our Qa Tester <qatester@company.com>"
            "id": "testinbox-1571155952-33840774",
            "to": "testinbox",
            "time": 1571155952000,
            "seconds_ago": 258277
        },
        {
            "subject": "This is my test email [with attachment]",
            "domain": "yourprivatedomain.com",
            "from": "Our Qa Tester <qatester@company.com>"
            "id": "testinbox-1570635306-12914603",
            "to": "testinbox",
            "time": 1570635306000,
            "seconds_ago": 778923
        }
    ],
   }
}

GET /api/v2/domain/private/inboxes/testinbox/messages/testinbox-157-s8393


{
    "fromfull": "Our Qa Tester <qatester@company.com>",
    "headers": {
        "mime-version": "1.0",
        "date": "Tue, 15 Oct 2019 12:12:20 -0400",
        "subject": "this is a test email 1",
        "content-type": "multipart/mixed",
    },
    "subject": "this is a test email 1",
    "parts": [
        {
            "headers": {
                "content-type": "text/plain; charset=UTF-8"
            },
            "body": "here is our test email\r\n"
        },
    ],
    "from": "Our Qa Tester",
    "to": "testinbox",
    "id": "testinbox-1570635306-12914603",
    "time": 1571155952000,
    "seconds_ago": 260276
}

GET /api/v2/domain/private/inboxes/15555555555/messages/15555555555-838-20


{
    "fromfull": "4444444444",
    "subject": "Here's your 2-factor code!",
    "parts": [
        {
            "body": "Your code is: 382910"
        },
    ],
    "to": "15555555555",
    "time": 1571155952000,
    "seconds_ago": 260276
}

POST https://api.mailinator.com/api/v2/domains/private/inboxes/testinbox/


{"from":"ourtest@xyz.com", "subject":"testing message", "text" : "hello world" }
{
    "status" : "ok",
    "id" : "testinbox-3282929-109191"
}