NEW

Retrieve emails received by an inbox, including attachments.

GET/api/inbox/{inboxId}/messages
Public

Get all messages for an inbox.

Path Parameters

NameTypeRequiredDescription
inboxIdstringYesInbox ID

Response 200

Example Responsejson
[
  {
    "id": "Qm8fK2xvJN3pTa7bR1wYZ",
    "inboxId": "cpxNbXpHRKxH9U6ff8nBE",
    "fromAddress": "sender@example.com",
    "fromName": "John Doe",
    "subject": "Welcome to our service",
    "bodyText": "Plain text content...",
    "bodyHtml": "<html>HTML content...</html>",
    "hasAttachments": true,
    "rawSize": 15234,
    "receivedAt": "2025-01-29T12:00:00.000Z"
  }
]

Errors

StatusMessage
404Inbox not found
410Inbox has expired

Rate Limits

Free5 req/min per IP
Pro5 req/min per IP (use /stream for realtime)
Business5 req/min per IP (use /stream for realtime)

Code Examples

curl https://destroy.network/api/inbox/cpxNbXpHRKxH9U6ff8nBE/messages

Messages returned in reverse chronological order (newest first).

Rate-limited to 5 requests per minute per source IP, regardless of plan tier. The official UI polls every 60s and SDKs are expected to do the same. If you need realtime delivery, use the SSE /stream endpoint on Pro or Business instead of tight polling.

GET/api/inbox/{inboxId}/messages/{messageId}
Public

Retrieve a single message by ID.

Path Parameters

NameTypeRequiredDescription
inboxIdstringYesInbox ID
messageIdstringYesMessage ID

Response 200

Example Responsejson
{
  "id": "Qm8fK2xvJN3pTa7bR1wYZ",
  "inboxId": "cpxNbXpHRKxH9U6ff8nBE",
  "fromAddress": "sender@example.com",
  "fromName": "John Doe",
  "subject": "Welcome to our service",
  "bodyText": "Plain text content...",
  "bodyHtml": "<html>...</html>",
  "hasAttachments": true,
  "rawSize": 15234,
  "receivedAt": "2025-01-29T12:00:00.000Z"
}

Errors

StatusMessage
404Message not found

Rate Limits

Free60 req/min
Pro120 req/min
Business300 req/min

Code Examples

curl https://destroy.network/api/inbox/cpxNbXpHRKxH9U6ff8nBE/messages/Qm8fK2xvJN3pTa7bR1wYZ
GET/api/inbox/{inboxId}/messages/{messageId}/attachments
Auth Required

Get all attachments for a message.

Path Parameters

NameTypeRequiredDescription
inboxIdstringYesInbox ID
messageIdstringYesMessage ID

Response 200

Example Responsejson
[
  {
    "id": "aT9xPbQ4mK2fJc6vN8hWz",
    "messageId": "Qm8fK2xvJN3pTa7bR1wYZ",
    "filename": "document.pdf",
    "contentType": "application/pdf",
    "size": 102400,
    "createdAt": "2025-01-29T12:00:00.000Z"
  }
]

Errors

StatusMessage
404Message not found

Rate Limits

FreeN/A (Pro only)
Pro60 req/min
Business120 req/min

Code Examples

curl https://destroy.network/api/inbox/cpxNbXpHRKxH9U6ff8nBE/messages/Qm8fK2xvJN3pTa7bR1wYZ/attachments \
  -H "Authorization: Bearer sk_live_your_api_key"

Attachment downloads require Pro or Business plan.

GET/api/inbox/{inboxId}/messages/{messageId}/attachments/{attachmentId}
Auth Required

Download an attachment file.

Path Parameters

NameTypeRequiredDescription
inboxIdstringYesInbox ID
messageIdstringYesMessage ID
attachmentIdstringYesAttachment ID

Response 200

Example Responsejson
Content-Type: application/pdf
Content-Disposition: attachment; filename="document.pdf"
Content-Length: 102400

[binary data]

Errors

StatusMessage
404Attachment not found

Rate Limits

FreeN/A (Pro only)
Pro30 req/min
Business60 req/min

Code Examples

# Download to file
curl -o document.pdf \
  https://destroy.network/api/inbox/cpxNbXpHRKxH9U6ff8nBE/messages/Qm8fK2xvJN3pTa7bR1wYZ/attachments/aT9xPbQ4mK2fJc6vN8hWz \
  -H "Authorization: Bearer sk_live_your_api_key"

Requires Pro or Business plan.