daimon.email
Api referenceInboxes

Delete Inbox

Soft delete an inbox (marks as deleted, data retained)

Overview

Delete an inbox by marking it as deleted. This is a soft delete - the inbox and all its messages, threads, and metadata are retained in the database but marked as deleted. The email address becomes available for re-use.

Warning

Soft delete: The inbox is marked as deleted but data is not immediately purged. Messages and metadata remain accessible for recovery or compliance purposes.

Authentication

Authorizationstringheaderrequired

Inbox API key in Bearer token format

Authorization: Bearer dm_free_7d8a9b0c1d2e3f4g5h6i7j8k9l0m1n2o

Use the inbox-scoped api_key for the inbox you're deleting.

Path Parameters

idstringpathrequired

Unique inbox identifier (format: inb_...)

The inbox ID you want to delete.

Response

resultobject
properties
idstring

Unique inbox identifier (format: inb_...)

statusstring

New status - always "deleted"

deleted_atstring

ISO 8601 timestamp of when the inbox was marked as deleted

next_stepsarray

Array of suggested actions for your agent to take next

Examples

curl -X DELETE https://api.daimon.email/v1/inboxes/inb_abc123def456 \
  -H "Authorization: Bearer dm_free_7d8a9b0c1d2e3f4g5h6i7j8k9l0m1n2o"
import { DaimonClient } from 'daimon-email';

// Initialize with inbox-scoped API key
const client = new DaimonClient({
  apiKey: 'dm_free_7d8a9b0c1d2e3f4g5h6i7j8k9l0m1n2o'
});

const result = await client.inboxes.delete('inb_abc123def456');

console.log(`Inbox ${result.id} deleted at ${result.deletedAt}`);
console.log(`Status: ${result.status}`);
from daimon_email import DaimonClient

# Initialize with inbox-scoped API key
client = DaimonClient(
    api_key="dm_free_7d8a9b0c1d2e3f4g5h6i7j8k9l0m1n2o"
)

result = client.inboxes.delete('inb_abc123def456')

print(f"Inbox {result.id} deleted at {result.deleted_at}")
print(f"Status: {result.status}")

Response

{
  "result": {
    "id": "inb_abc123def456",
    "status": "deleted",
    "deleted_at": "2026-03-16T17:00:00Z"
  },
  "next_steps": [
    "The inbox has been marked as deleted",
    "The email address 'my-agent@daimon.email' is now available for re-use",
    "All messages and threads are retained for compliance/recovery",
    "The API key for this inbox is now invalid"
  ]
}
{
  "error": "INVALID_API_KEY",
  "message": "The provided API key does not have access to this inbox",
  "next_steps": [
    "Verify you are using the correct inbox-scoped API key",
    "Ensure the API key has not been revoked"
  ]
}
{
  "error": "INBOX_NOT_FOUND",
  "message": "No inbox found with ID 'inb_abc123def456'",
  "next_steps": [
    "Verify the inbox ID is correct",
    "The inbox may have already been deleted"
  ]
}
{
  "error": "INBOX_ALREADY_DELETED",
  "message": "This inbox was already deleted on 2026-03-16T17:00:00Z",
  "next_steps": [
    "The inbox is already marked as deleted",
    "No further action is needed"
  ]
}

Important Notes

Warning

API key invalidation: After deletion, the inbox-scoped API key will no longer work. Any subsequent API calls using this key will return 401 Unauthorized.

Note

Username availability: After deletion, the username (e.g., my-agent) becomes available for re-use. Another agent could create an inbox with the same username.

Info

Data retention: Messages, threads, and metadata are retained after soft delete for:

  • Compliance and auditing purposes
  • Potential recovery if deletion was accidental
  • Historical analysis and debugging

Contact support if you need permanent deletion (hard delete) for privacy/compliance reasons.

Soft Delete vs Hard Delete

AspectSoft Delete (this endpoint)Hard Delete (support only)
StatusMarked as deletedCompletely removed
MessagesRetainedPermanently deleted
API keyInvalidatedInvalidated
UsernameAvailable for re-useAvailable for re-use
RecoveryPossible via supportNot possible
Default retention90 daysN/A

Use Cases

  • Agent decommissioning: When an agent is no longer needed, delete its inbox to free up the username
  • Testing cleanup: Delete test inboxes after development/testing
  • Account hygiene: Remove unused or inactive inboxes to keep your account organized
  • Security: Immediately invalidate API keys if they've been compromised