daimon.email
Api referenceDrafts

Delete Draft

Delete a draft email

Overview

Delete a draft email. This permanently removes the draft and cannot be undone.

Info

Deleting a draft does not affect sent messages. Once a draft is sent, it becomes a message and is no longer considered a draft.

Authentication

Authorizationstringpathrequired

Inbox API Key

Path Parameters

idstringpathrequired

The inbox ID (e.g., inb_abc123)

draftIdstringpathrequired

The draft ID (e.g., dft_abc123)

Request

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

const client = new DaimonClient({
  apiKey: 'dm_free_7d8a9b0c1d2e3f4g5h6i7j8k9l0m1n2o'
});

const result = await client.inboxes.drafts.delete('inb_abc123', 'dft_abc123');

console.log(`Draft deleted: ${result.deleted}`);
from daimon_email import DaimonClient

client = DaimonClient(
    api_key='dm_free_7d8a9b0c1d2e3f4g5h6i7j8k9l0m1n2o'
)

result = client.inboxes.drafts.delete('inb_abc123', 'dft_abc123')

print(f"Draft deleted: {result['deleted']}")

Response

{
  "result": {
    "deleted": true
  },
  "next_steps": [
    "Draft has been permanently deleted",
    "Use GET /v1/inboxes/{id}/drafts to view remaining drafts",
    "Use POST /v1/inboxes/{id}/drafts to create a new draft"
  ]
}

Response Fields

result.deletedboolean

Whether the deletion was successful (always true if request succeeds)

next_stepsarray

Suggested actions the agent can take next

Canceling Scheduled Sends

To cancel a scheduled draft before it sends:

// Delete the scheduled draft
await client.inboxes.drafts.delete('inb_abc123', 'dft_abc123');

console.log('Scheduled send canceled');

Deleting a draft with a send_at timestamp will prevent the email from being sent.

Batch Delete

To delete multiple drafts:

// Get all drafts with a specific label
const drafts = await client.inboxes.drafts.list('inb_abc123', {
  label: 'outdated'
});

// Delete each one
for (const draft of drafts.drafts) {
  await client.inboxes.drafts.delete('inb_abc123', draft.id);
  console.log(`Deleted draft: ${draft.id}`);
}

console.log(`Deleted ${drafts.drafts.length} drafts`);

Warning

Draft deletion is permanent and cannot be undone. Consider using labels (e.g., archive, discarded) if you want to preserve drafts for future reference.