Документация API

Интегрируйте временные адреса электронной почты в свои приложения и рабочие процессы

https://dustmail.net/api/v1

🔑 Authentication

All API requests require an API key. Pass your key via the Authorization header or X-API-Key header.

Generate API keys from your Dashboard. Each key starts with 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"

Rate Limits

Free
100
requests / day
Premium
unlimited
POST/api/v1/inbox

Create a new temporary email inbox. Returns the inbox details including the generated email address and expiration time. Premium keys can also request a custom username, choose from configured shared domains, or select verified custom domains owned by the Premium user after DNS TXT + MX verification.

Request Body

ParameterTypeDescription
usernameoptionalstringCustom username for the email address. Requires a Premium API key.
domainoptionalstringRequested inbox domain. Free keys use the primary shared domain, while Premium keys can select configured shared domains or verified custom domains owned by the API key owner.

Example

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"}'

Response

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

List all active inboxes associated with your account. Returns up to 50 inboxes with email counts.

Example

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

Response

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

Get inbox details and all received emails. Returns up to 100 most recent emails with full content (text and HTML).

Path Parameters

ParameterTypeDescription
idrequireduuidThe inbox ID returned from creation

Example

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

Response

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 }
  }
}

Code Examples

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

Delete (deactivate) an inbox. You can only delete inboxes owned by your account. The inbox will no longer be returned by the API after deletion.

Example

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

Response

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