API Documentation
Introduction
Welcome to the Leveragers Mail Server API documentation. Our powerful and reliable API enables you to generate temporary email addresses and retrieve emails programmatically. Whether you're building a testing framework, creating a privacy-focused application, or need temporary email functionality, our API provides the tools you need.
https://leveragers.xyz/api
Note:
leveragers.xyz
Make Sure to check The Domian is live on not.
Key Features
- Instant Email Generation: Create temporary email addresses in milliseconds
- Real-time Email Retrieval: Access incoming emails immediately
- Rich Content Support: Handle both plain text and HTML emails
- Secure Authentication: API key-based security with expiration controls
- RESTful Design: Clean, predictable JSON API responses
- High Availability: 99.9% uptime with global infrastructure
Use Cases
Testing & QA
Perfect for automated testing, email verification workflows, and quality assurance processes.
Privacy Protection
Protect user privacy by providing temporary emails for registrations and one-time communications.
Development
Integrate temporary email functionality into your applications without managing email infrastructure.
Getting Started
To begin using the Leveragers Mail Server API, you'll need an API key. Our API keys provide secure access to all endpoints and come with configurable expiration dates for enhanced security. Contact our support team through our Discord server to obtain your API key and get started within minutes.
Authentication
The Leveragers Mail Server API uses API key authentication for secure access. Your API key must be included in the Authorization header of each request using the Bearer token format. This ensures that only authorized users can access our services.
Authorization: Bearer YOUR_API_KEY
- Never share your API key publicly or include it in client-side code
- Store API keys in environment variables or secure configuration files
- Use different API keys for development, staging, and production environments
- Rotate your API keys regularly for enhanced security
- Monitor API key usage and report suspicious activity immediately
API Key Lifecycle
Understanding your API key's lifecycle is crucial for maintaining uninterrupted service. Each API key has an expiration date set during creation, and monitoring this date ensures your applications continue to function properly.
API Key Status Types
API keys can have different statuses that affect their functionality:
Status | Description | Action Required |
---|---|---|
Active | The API key is valid and fully functional for all endpoints. | None - continue using normally |
Expired | The API key has reached its expiration date and is no longer valid. | Request a new API key from support |
Revoked | The API key has been manually revoked by an administrator. | Contact support for clarification and new key |
Banned | The API key has been banned due to violation of terms of service. | Contact support to resolve the issue |
Authentication Errors
When authentication fails, the API returns specific error messages to help you diagnose and resolve issues quickly:
{
"success": false,
"error": "Unauthorized",
"message": "API key has expired",
"code": "AUTH_EXPIRED",
"timestamp": "2025-06-07T10:30:00Z"
}
Error Handling
The Leveragers Mail Server API uses standard HTTP response codes and provides detailed error information to help you quickly identify and resolve issues. All error responses include a consistent JSON structure with helpful debugging information.
HTTP Status Codes
Error Response Structure
All error responses follow a consistent structure to provide maximum information for debugging:
{
"success": false,
"error": "Bad Request",
"message": "Email parameter is required",
"code": "MISSING_PARAMETER",
"details": {
"parameter": "email",
"expected_type": "string",
"received": null
},
"timestamp": "2025-06-07T10:30:00Z",
"request_id": "req_abc123def456"
}
Error Handling Best Practices
Recommended Error Handling Strategy:
- Always check the success field before processing response data
- Implement retry logic for 5xx errors with exponential backoff
- Log error details including request_id for support inquiries
- Handle rate limits gracefully by implementing proper delays
- Validate input data before sending requests to minimize 4xx errors
- Monitor error rates to identify potential issues early
Email Generation
Generate temporary email addresses instantly with our email generation endpoint. Each generated email is unique, immediately active, and ready to receive messages. Perfect for testing, user registration, or any scenario requiring disposable email addresses.
Generates a new random email address with the domain @leveragers.xyz. The email address is immediately active and ready to receive messages.
Request Headers
Header | Required | Description |
---|---|---|
Authorization | Required | Bearer token with your API key |
Content-Type | Required | application/json |
User-Agent | Optional | Your application identifier |
Request Example
curl -X POST \
https://leveragers.xyz/api/email \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-H 'User-Agent: MyApp/1.0'
Response
{
"success": true,
"email": "abc123def456@leveragers.xyz",
"message": "Email generated successfully",
"metadata": {
"created_at": "2025-06-07T10:30:00Z",
"expires_at": "2025-06-14T10:30:00Z",
"domain": "leveragers.xyz"
},
"request_id": "req_abc123def456"
}
Inbox Management
Retrieve emails from any inbox using our powerful inbox management endpoint. Access both metadata and full email content, including HTML formatting, attachments, and sender information. Perfect for automated email processing and verification workflows.
Retrieves all emails for a specified email address, including full content, metadata, and attachment information.
Request Headers
Header | Required | Description |
---|---|---|
Authorization | Required | Bearer token with your API key |
Content-Type | Required | application/json |
Request Body Parameters
Parameter | Type | Required | Description |
---|---|---|---|
string | Required | The email address to check for incoming emails | |
limit | integer | Optional | Maximum number of emails to return (default: 50, max: 100) |
offset | integer | Optional | Number of emails to skip for pagination (default: 0) |
{
"email": "abc123def456@leveragers.xyz",
"limit": 10,
"offset": 0
}
Complete Request Example
curl -X POST \
https://leveragers.xyz/api/inbox \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"email": "abc123def456@leveragers.xyz",
"limit": 10,
"offset": 0
}'
Response
{
"success": true,
"data": [
{
"id": "msg_123456789",
"from": "sender@example.com",
"to": "abc123def456@leveragers.xyz",
"subject": "Welcome to our service",
"date": "2025-06-07T10:30:00Z",
"text": "This is the plain text content of the email.",
"html": "<html><body><p>This is the HTML content.</p></body></html>",
"attachments": [
{
"filename": "document.pdf",
"content_type": "application/pdf",
"size": 12345
}
],
"read": false
}
],
"pagination": {
"total": 1,
"limit": 10,
"offset": 0,
"has_more": false
},
"message": "Inbox retrieved successfully"
}
{
"success": false,
"error": "Not found",
"message": "No emails found for this address",
"code": "INBOX_EMPTY"
}
Email Content Retrieval
Access detailed email content including full HTML rendering, attachment downloads, and metadata analysis. This endpoint provides comprehensive email information for advanced processing and analysis workflows.
Retrieves comprehensive email content and metadata for a specified email address, including advanced parsing and analysis features.
Request Headers
Header | Required | Description |
---|---|---|
Authorization | Required | Bearer token with your API key |
Content-Type | Required | application/json |
Request Body Parameters
Parameter | Type | Required | Description |
---|---|---|---|
string | Required | The email address to retrieve content for | |
include_attachments | boolean | Optional | Include attachment content in response (default: false) |
parse_links | boolean | Optional | Extract and analyze links from email content (default: false) |
{
"email": "abc123def456@leveragers.xyz",
"include_attachments": true,
"parse_links": true
}
Complete Request Example
curl -X POST \
https://leveragers.xyz/api/result \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"email": "abc123def456@leveragers.xyz",
"include_attachments": true,
"parse_links": true
}'
Enhanced Response
{
"success": true,
"data": [
{
"id": "msg_123456789",
"from": "sender@example.com",
"to": "abc123def456@leveragers.xyz",
"subject": "Welcome to our service",
"date": "2025-06-07T10:30:00Z",
"text": "Welcome! Click here to verify: https://example.com/verify",
"html": "<html><body><h1>Welcome!</h1><a href='https://example.com/verify'>Verify</a></body></html>",
"attachments": [
{
"filename": "welcome.pdf",
"content_type": "application/pdf",
"size": 15420,
"content_base64": "JVBERi0xLjQKJcOkw7zDtsO..."
}
],
"links": [
{
"url": "https://example.com/verify",
"text": "Verify",
"type": "verification"
}
],
"metadata": {
"spam_score": 0.1,
"language": "en",
"word_count": 12
}
}
],
"message": "Email content retrieved successfully"
}
Rate Limits & Usage
To ensure optimal performance and fair usage across all users, our API implements intelligent rate limiting. These limits are designed to accommodate most use cases while preventing abuse and maintaining service quality for everyone.
Current Rate Limits
Endpoint | Rate Limit | Burst Limit | Reset Window |
---|---|---|---|
/api/email | 60 requests/minute | 10 requests/second | 60 seconds |
/api/inbox | 120 requests/minute | 20 requests/second | 60 seconds |
/api/result | 120 requests/minute | 20 requests/second | 60 seconds |
X-RateLimit-Limit
: Maximum requests allowed per time windowX-RateLimit-Remaining
: Requests remaining in current windowX-RateLimit-Reset
: Unix timestamp when the limit resetsX-RateLimit-Retry-After
: Seconds to wait before retrying (when rate limited)
Handling Rate Limits
{
"success": false,
"error": "Too Many Requests",
"message": "Rate limit exceeded. Please wait before making more requests.",
"code": "RATE_LIMIT_EXCEEDED",
"retry_after": 30,
"limit_reset_at": "2025-06-07T10:31:00Z"
}
Best Practices & Guidelines
Follow these comprehensive best practices to ensure optimal performance, security, and reliability when integrating with the Leveragers Mail Server API.
Security Best Practices
- Store API keys in environment variables, never in code
- Use different API keys for different environments
- Implement proper access controls and permissions
- Regularly rotate API keys for enhanced security
- Monitor API usage for unusual patterns
- Use HTTPS for all API communications
Error Handling
- Always check the
success
field in responses - Implement exponential backoff for retry logic
- Log error details including request IDs
- Handle different error types appropriately
- Provide meaningful error messages to users
- Set appropriate timeout values for requests
Performance Optimization
- Implement intelligent caching strategies
- Use connection pooling for multiple requests
- Implement pagination for large result sets
- Optimize polling intervals for real-time needs
- Compress request/response data when possible
- Monitor and optimize API response times
Development Guidelines
- Validate input data before sending requests
- Use proper HTTP methods for different operations
- Include meaningful User-Agent headers
- Implement proper logging and monitoring
- Test thoroughly in staging environments
- Document your integration for team members
Sample Implementation
import requests
import time
import os
from typing import Optional, Dict, Any
class LeveragersAPI:
def __init__(self, api_key: str, base_url: str = "https://leveragers.xyz/api"):
self.api_key = api_key
self.base_url = base_url
self.session = requests.Session()
self.session.headers.update({
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json',
'User-Agent': 'LeveragersAPI-Python/1.0'
})
def _make_request(self, method: str, endpoint: str, data: Optional[Dict] = None,
max_retries: int = 3) -> Dict[Any, Any]:
"""Make API request with retry logic and error handling."""
url = f"{self.base_url}/{endpoint.lstrip('/')}"
for attempt in range(max_retries):
try:
response = self.session.request(method, url, json=data, timeout=30)
if response.status_code == 429: # Rate limited
retry_after = int(response.headers.get('X-RateLimit-Retry-After', 60))
time.sleep(retry_after)
continue
response.raise_for_status()
return response.json()
except requests.exceptions.RequestException as e:
if attempt == max_retries - 1:
raise
time.sleep(2 ** attempt) # Exponential backoff
raise Exception("Max retries exceeded")
def generate_email(self) -> str:
"""Generate a new temporary email address."""
response = self._make_request('POST', '/email')
if response.get('success'):
return response['email']
raise Exception(f"Failed to generate email: {response.get('message')}")
def get_inbox(self, email: str, limit: int = 50) -> list:
"""Retrieve emails from inbox."""
data = {'email': email, 'limit': limit}
response = self._make_request('POST', '/inbox', data)
if response.get('success'):
return response['data']
raise Exception(f"Failed to get inbox: {response.get('message')}")
# Usage example
api = LeveragersAPI(os.getenv('LEVERAGERS_API_KEY'))
email = api.generate_email()
emails = api.get_inbox(email)
Frequently Asked Questions
Find answers to the most common questions about the Leveragers Mail Server API. If you don't find what you're looking for, don't hesitate to reach out to our support team.
How do I get an API key?
Getting an API key is simple and fast:
- Join our Discord server
- Navigate to the #api-support channel
- Request an API key with your use case details
- Our team will provide you with a key within 24 hours
API keys are free for development and testing. Production usage may require a subscription based on your volume needs.
How long do generated email addresses remain active?
Email addresses have different retention periods:
- Email Address: Remains active for 7 days by default
- Email Storage: Messages are stored for up to 7 days
- Extended Retention: Available for enterprise customers
- Custom Domains: Available for premium plans
You can extend retention periods by contacting our support team for custom arrangements.
What are the rate limits and how can I increase them?
Our rate limits are designed to accommodate most use cases:
- Free Tier: 60 email generations per minute, 120 inbox checks per minute
- Pro Tier: 300 email generations per minute, 600 inbox checks per minute
- Enterprise: Custom limits based on your needs
To increase your limits, contact our sales team through Discord or email. We offer flexible plans for high-volume users.
Can I use the API for commercial purposes?
Yes, commercial usage is fully supported:
- Development/Testing: Free for non-production use
- Commercial Applications: Paid plans available
- Enterprise Solutions: Custom pricing and SLAs
- White-label Options: Available for enterprise customers
Please ensure compliance with our terms of service and contact us for commercial licensing details.
What happens if my API key expires?
When your API key expires:
- All API requests will return a 401 Unauthorized error
- You'll receive email notifications 7 days and 1 day before expiration
- Existing email addresses remain accessible for their retention period
- You can request a new API key through our support channels
We recommend setting up monitoring to track your API key expiration date and renew before it expires.
Is there a limit to how many emails I can receive?
Email receiving limits depend on your plan:
- Per Email Address: Up to 100 emails per address
- Total Storage: 10MB per email address
- Attachment Size: Maximum 25MB per attachment
- Daily Limits: Vary by subscription tier
Higher limits are available for premium and enterprise customers. Contact us for custom storage solutions.
How do I handle errors and implement retry logic?
Implement robust error handling:
- Check Response Status: Always verify the 'success' field
- Exponential Backoff: Wait progressively longer between retries
- Rate Limit Handling: Respect the 'Retry-After' header
- Log Errors: Include request IDs for support inquiries
- Circuit Breaker: Stop retrying after consecutive failures
See our best practices section for detailed implementation examples.
How do I report issues or get technical support?
We offer multiple support channels:
- Discord Community: Join our server for real-time help
- Email Support: Send detailed reports to our support team
- Documentation: Check this documentation for common solutions
- Status Page: Monitor service status and planned maintenance
When reporting issues, include your request ID, API key (last 4 characters only), and error details for faster resolution.
Do you offer webhooks for real-time email notifications?
Webhook support is coming soon:
- Current Status: Webhooks are in development
- Expected Release: Q2 2025
- Features: Real-time email notifications, delivery confirmations
- Early Access: Available for enterprise customers
Join our Discord server to get notified when webhook support becomes available.