API 문서
일회용 이메일 주소를 앱과 워크플로에 통합하세요
https://dustmail.net/api/v1
🔑 인증
모든 API 요청에는 API 키가 필요합니다. 키를 Authorization 헤더 또는 X-API-Key 헤더로 전달하세요.
API 키는 대시보드에서 생성합니다. 각 키는 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"
요청 한도
무료
100
요청 / 일
프리미엄
∞
무제한
POST/api/v1/inbox
새 임시 이메일 받은편지함을 만듭니다. 생성된 이메일 주소와 만료 시간을 포함한 받은편지함 정보를 반환합니다. 프리미엄 키는 사용자 지정 사용자 이름을 요청하거나, 구성된 공유 도메인 중에서 선택하거나, DNS TXT + MX 확인을 거쳐 프리미엄 사용자 소유로 확인된 사용자 지정 도메인을 선택할 수도 있습니다.
요청 본문
| 매개변수 | 유형 | 설명 |
|---|---|---|
| username선택 사항 | string | 이메일 주소에 사용할 맞춤 사용자 이름입니다. 프리미엄 API 키가 필요합니다. |
| domain선택 사항 | string | 요청한 받은편지함 도메인입니다. 무료 키는 기본 공유 도메인을 사용하며, 프리미엄 키는 구성된 공유 도메인 또는 API 키 소유자가 보유한 검증된 맞춤 도메인을 선택할 수 있습니다. |
예시
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"}'응답
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
계정에 연결된 모든 활성 받은편지함을 나열합니다. 이메일 수와 함께 최대 50개의 받은편지함을 반환합니다.
예시
bash
curl https://dustmail.net/api/v1/inbox \ -H "Authorization: Bearer dm_live_your_api_key"
응답
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
받은편지함 정보와 수신된 모든 이메일을 가져옵니다. 전체 내용(텍스트 및 HTML)을 포함한 최신 이메일을 최대 100개 반환합니다.
경로 매개변수
| 매개변수 | 유형 | 설명 |
|---|---|---|
| id필수 | uuid | 생성 시 반환된 받은편지함 ID |
예시
bash
curl https://dustmail.net/api/v1/inbox/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \ -H "Authorization: Bearer dm_live_your_api_key"
응답
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 }
}
}코드 예시
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 emailspython
# 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
받은편지함을 삭제(비활성화)합니다. 계정이 소유한 받은편지함만 삭제할 수 있습니다. 삭제 후 API는 해당 받은편지함을 더 이상 반환하지 않습니다.
예시
bash
curl -X DELETE https://dustmail.net/api/v1/inbox/a1b2c3d4-... \ -H "Authorization: Bearer dm_live_your_api_key"
응답
json
{
"success": true,
"message": "Inbox deleted"
}