MailBlinker API Documentation

Explore the MailBlinker API to programmatically access and manage email messages, unread messages, OTP codes, and create new email accounts.

The MailBlinker API provides powerful tools to interact with email data programmatically.

Introduction to MailBlinker API

The MailBlinker API allows you to programmatically access and manage email messages, including retrieving messages, unread messages, OTP codes or confirmation links, and creating new email accounts. This API is designed for developers to integrate email functionality into their applications seamlessly.

Key benefits of using the MailBlinker API include:

  • Fast and reliable access to email data.
  • Secure authentication with Bearer tokens.
  • Easy integration with multiple programming languages.

Quick Start Guide

  1. {Sign up for a MailBlinker account at mailblinker.com.}
  2. Generate an API token from your account dashboard.
  3. Use the token in the Authorization header of your API requests.
  4. Explore the endpoints below to start making requests.

Note: Ensure your API token is kept secure and not shared publicly.

Available Endpoints

Endpoint Explore the MailBlinker API to programmatically access and manage email messages, unread messages, OTP codes, and create new email accounts.
POST /api/mail/messages Retrieve a list of email messages for a specified email address.
POST /api/mail/last-unread-message Fetch the most recent unread email message for a specified email address.
POST /api/mail/last-unread-otp-or-link Extract an OTP code or confirmation link from the last unread email message.
POST /api/mail/create-mail Creates a new permanent email account for the authenticated user.

Authentication

All API endpoints require authentication using a Bearer token. Include your token in the Authorization header of each request.

Authorization Header Example

Authorization: Bearer your_api_token_here

If authentication fails, you will receive a 401 Unauthorized response.

Usage Examples

JavaScript (fetch)

fetch('https://mailblinker.com/api/mail/messages', {
    method: 'POST',
    headers: {
        'Authorization': 'Bearer 5720c4dbb4601183486a9259a8e8f7b9b6fef2dc61f34ee901516995710e49aa',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({ email: 'kajwgzjx9f@xomll.com' })
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Python (requests)

import requests
import sys

sys.stdout.reconfigure(encoding='utf-8')
url = 'https://mailblinker.com/api/mail/messages'
headers = {
    'Authorization': 'Bearer 5720c4dbb4601183486a9259a8e8f7b9b6fef2dc61f34ee901516995710e49aa',
    'Content-Type': 'application/json'
}
data = {
    'email': 'kajwgzjx9f@xomll.com'
}
response = requests.post(url, headers=headers, json=data)
print(response.json())

cURL

curl -X POST https://mailblinker.com/api/mail/messages \
-H "Authorization: Bearer your_api_token_here" \
-H "Content-Type: application/json" \
-d '{"email": "ms3cgwumw0@mloqq.com"}'

Error Handling

Error Code Message Description
401 Unauthorized Invalid or missing API token.
403 Forbidden Access to the requested resource is restricted.
404 Not Found The requested resource does not exist.
500 Internal Server Error An unexpected error occurred on the server.

Contact Support

Need help? Reach out to our support team at support@mailblinker.com

Tip: Test the API using the examples provided or contact support for assistance.