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/create

Rate Limits

  • 1000 requests per hour (free tier)
  • 10,000 requests per hour (pro tier)
  • Custom limits for enterprise

API Endpoints

POST
/api/v1/inbox/create

Create a new temporary inbox

Returns inbox details and email address

GET
/api/v1/inbox/{id}/messages

Retrieve messages for an inbox

Array of email messages with metadata

GET
/api/v1/message/{id}

Get specific message details

Full message content including attachments

DELETE
/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_KEY

API Key Security

Keep your API key secure and never expose it in client-side code. Use environment variables in production.

Rate Limiting

Request Limits

Free Tier:100 requests/hour
Pro Tier:1,000 requests/hour
Enterprise:Custom limits

Response Headers

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200

Webhooks

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;
};
Scroll →

Python Integration

import requests
import json

class TempMailClient:
    def __init__(self, api_key):
        self.api_key = api_key
        self.base_url = &quot;https://api.tempmail.com.au/v1&quot;
        self.headers = {
            &quot;Authorization&quot;: f&quot;Bearer {api_key}&quot;,
            &quot;Content-Type&quot;: &quot;application/json&quot;
        }
    
    def create_inbox(self, domain=&quot;tempmail.com.au&quot;):
        response = requests.post(
            f&quot;{self.base_url}/inbox/create&quot;,
            json={&quot;domain&quot;: domain, &quot;retention&quot;: &quot;24h&quot;},
            headers=self.headers
        )
        return response.json()
    
    def get_messages(self, inbox_id):
        response = requests.get(
            f&quot;{self.base_url}/inbox/{inbox_id}/messages&quot;,
            headers=self.headers
        )
        return response.json()
Scroll →

SDKs & Libraries

🟡

JavaScript/Node.js

Coming Soon

🟡

Python

Coming Soon

🟡

PHP

Coming Soon

🟡

Ruby

Coming Soon

🔵

Go

Planned

🔵

Java

Planned

Support & Resources

Documentation

Comprehensive guides, API reference, and best practices for integration.

View FAQ

Developer Support

Get help with integration, report bugs, or request new features.

Contact Support

Ready to Start Building?

Get your API key and start integrating temporary email functionality today.

Live in Beta
Help us test