API-Dokumentation

Integrieren Sie Wegwerf-E-Mail-Adressen in Ihre Apps und Workflows

https://dustmail.net/api/v1

🔑 Authentifizierung

Alle API-Anfragen benötigen einen API-Schlüssel. Übermitteln Sie Ihren Schlüssel über den Authorization Header oder den X-API-Key Header.

Erzeugen Sie API-Schlüssel in Ihrem Dashboard. Jeder Schlüssel beginnt mit dm_live_.

bash
# Using Authorization header (recommended)
curl https://dustmail.net/api/v1/inbox \
  -H "Authorization: Bearer dm_live_your_api_key"

# Using X-API-Key header
curl https://dustmail.net/api/v1/inbox \
  -H "X-API-Key: dm_live_your_api_key"

Ratenlimits

Kostenlos
100
Anfragen / Tag
Premium
unbegrenzt
POST/api/v1/inbox

Erstellen Sie ein neues temporäres E-Mail-Postfach. Gibt die Postfachdetails einschließlich der generierten E-Mail-Adresse und Ablaufzeit zurück. Premium-Schlüssel können außerdem einen benutzerdefinierten Namen anfordern, aus konfigurierten gemeinsamen Domains wählen oder nach DNS-TXT- und MX-Verifizierung bestätigte benutzerdefinierte Domains auswählen, die dem Premium-Nutzer gehören.

Anfragetext

ParameterTypBeschreibung
usernameoptionalstringBenutzerdefinierter Name für die E-Mail-Adresse. Erfordert einen Premium-API-Schlüssel.
domainoptionalstringAngeforderte Postfach-Domain. Kostenlose Schlüssel verwenden die primäre gemeinsame Domain, während Premium-Schlüssel konfigurierte gemeinsame Domains oder bestätigte benutzerdefinierte Domains des API-Schlüsselinhabers auswählen können.

Beispiel

bash
curl -X POST https://dustmail.net/api/v1/inbox \
  -H "Authorization: Bearer dm_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"username":"swift.fox4291","domain":"brand.example"}'

Antwort

json
{
  "success": true,
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "email": "[email protected]",
    "domain": "brand.example",
    "created_at": "2026-03-30T12:00:00.000Z",
    "expires_at": "2027-03-30T12:00:00.000Z"
  },
  "meta": {
    "plan": "premium",
    "rate_limit": { "limit": null, "used": 1 },
    "available_domains": ["dustmail.net", "<configured-shared-domain>", "brand.example"]
  }
}
GET/api/v1/inbox

Listet alle aktiven Postfächer auf, die Ihrem Konto zugeordnet sind. Gibt bis zu 50 Postfächer mit E-Mail-Anzahl zurück.

Beispiel

bash
curl https://dustmail.net/api/v1/inbox \
  -H "Authorization: Bearer dm_live_your_api_key"

Antwort

json
{
  "success": true,
  "data": [
    {
      "id": "a1b2c3d4-...",
      "email": "[email protected]",
      "domain": "dustmail.net",
      "created_at": "2026-03-30T12:00:00.000Z",
      "expires_at": "2026-03-30T12:30:00.000Z",
      "email_count": 3
    }
  ],
  "meta": {
    "total": 1,
    "plan": "free",
    "rate_limit": { "limit": 100, "used": 2 }
  }
}
GET/api/v1/inbox/:id

Ruft Postfachdetails und alle empfangenen E-Mails ab. Gibt bis zu 100 neueste E-Mails mit vollständigem Inhalt (Text und HTML) zurück.

Pfadparameter

ParameterTypBeschreibung
iderforderlichuuidDie beim Erstellen zurückgegebene Postfach-ID

Beispiel

bash
curl https://dustmail.net/api/v1/inbox/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer dm_live_your_api_key"

Antwort

json
{
  "success": true,
  "data": {
    "inbox": {
      "id": "a1b2c3d4-...",
      "email": "[email protected]",
      "domain": "dustmail.net",
      "created_at": "2026-03-30T12:00:00.000Z",
      "expires_at": "2026-03-30T12:30:00.000Z"
    },
    "emails": [
      {
        "id": "e1f2a3b4-...",
        "from": "[email protected]",
        "subject": "Verify your email address",
        "text": "Click the link below to verify...",
        "html": "<html>...</html>",
        "received_at": "2026-03-30T12:05:30.000Z"
      }
    ]
  },
  "meta": {
    "email_count": 1,
    "rate_limit": { "limit": 100, "used": 3 }
  }
}

Codebeispiele

javascript
// Node.js / JavaScript
const response = await fetch(
  'https://dustmail.net/api/v1/inbox/YOUR_INBOX_ID',
  { headers: { 'Authorization': 'Bearer dm_live_your_api_key' } }
);
const { data } = await response.json();
console.log(data.emails); // Array of received emails
python
# Python
import requests

resp = requests.get(
    "https://dustmail.net/api/v1/inbox/YOUR_INBOX_ID",
    headers={"Authorization": "Bearer dm_live_your_api_key"}
)
emails = resp.json()["data"]["emails"]
print(f"Received {len(emails)} emails")
DELETE/api/v1/inbox/:id

Löscht (deaktiviert) ein Postfach. Sie können nur Postfächer löschen, die Ihrem Konto gehören. Das Postfach wird nach dem Löschen nicht mehr von der API zurückgegeben.

Beispiel

bash
curl -X DELETE https://dustmail.net/api/v1/inbox/a1b2c3d4-... \
  -H "Authorization: Bearer dm_live_your_api_key"

Antwort

json
{
  "success": true,
  "message": "Inbox deleted"
}