Developer API is in Free Beta
Our API is currently in an open beta testing phase. We are offering completely free access to all endpoints to gather feedback and stress-test the system before our official launch.
Developer APIDocumentation
Integrate temporary email functionality into your applications with our simple, reliable REST API. Built for developers, optimized for performance.
Quick Start
Authentication
All API requests require authentication using API keys. Include your key in the Authorization header.
curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
https://api.tempmail.com.au/v1/inbox/createRate Limits
- 1000 requests per hour (free tier)
- 10,000 requests per hour (pro tier)
- Custom limits for enterprise
API Endpoints
/api/v1/inbox/createCreate a new temporary inbox
Returns inbox details and email address
/api/v1/inbox/{id}/messagesRetrieve messages for an inbox
Array of email messages with metadata
/api/v1/message/{id}Get specific message details
Full message content including attachments
/api/v1/inbox/{id}Delete inbox and all messages
Confirmation of deletion
Authentication
API Key Authentication
All API requests require authentication using your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYAPI Key Security
Keep your API key secure and never expose it in client-side code. Use environment variables in production.
Rate Limiting
Request Limits
Response Headers
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200Webhooks
Real-time Notifications
Receive instant notifications when emails arrive in your temporary inboxes. Perfect for automation and testing workflows.
POST https://yourapp.com/webhooks/tempmail
{
"event": "mail.received",
"inbox_id": "abc123",
"email": "abc123@tempmail.com.au",
"message": {
"id": "msg_456",
"subject": "Your verification code",
"from": "noreply@example.com",
"to": "abc123@tempmail.com.au",
"received_at": "2025-01-12T08:05:00Z",
"body_text": "Your code is: 123456",
"body_html": "<p>Your code is: <strong>123456</strong></p>",
"attachments": [
{
"filename": "receipt.pdf",
"size": 10240,
"content_type": "application/pdf"
}
]
}
}Security Features
- HMAC Signatures: All webhooks include SHA-256 HMAC signatures for verification
- Replay Protection: Timestamps and nonces prevent replay attacks
- Retry Logic: Failed deliveries are retried with exponential backoff
- TLS Required: All webhook endpoints must support HTTPS
Integration Examples
Node.js Integration
const axios = require('axios');
// Create temporary inbox
const createInbox = async () => {
const response = await axios.post('https://api.tempmail.com.au/v1/inbox/create', {
domain: 'tempmail.com.au',
retention: '24h'
}, {
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
return response.data;
};
// Check for new messages
const checkMessages = async (inboxId) => {
const response = await axios.get(`https://api.tempmail.com.au/v1/inbox/${inboxId}/messages`);
return response.data.messages;
};Python Integration
import requests
import json
class TempMailClient:
def __init__(self, api_key):
self.api_key = api_key
self.base_url = "https://api.tempmail.com.au/v1"
self.headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
def create_inbox(self, domain="tempmail.com.au"):
response = requests.post(
f"{self.base_url}/inbox/create",
json={"domain": domain, "retention": "24h"},
headers=self.headers
)
return response.json()
def get_messages(self, inbox_id):
response = requests.get(
f"{self.base_url}/inbox/{inbox_id}/messages",
headers=self.headers
)
return response.json()SDKs & Libraries
JavaScript/Node.js
Coming Soon
Python
Coming Soon
PHP
Coming Soon
Ruby
Coming Soon
Go
Planned
Java
Planned
Support & Resources
Ready to Start Building?
Get your API key and start integrating temporary email functionality today.