Delete List Entry
Remove an email address from your allowlist or blocklist
Authentication
Account API Key required via Authorization: Bearer {api_key} header.
Path Parameters
idstringpathrequiredList entry ID (prefix: lst_)
curl -X DELETE https://api.daimon.email/v1/lists/lst_xyz789 \
-H "Authorization: Bearer dm_free_7d8a9b0c1d2e3f4g5h6i7j8k9l0m1n2o"import { DaimonClient } from 'daimon-email';
const client = new DaimonClient({
apiKey: 'dm_free_7d8a9b0c1d2e3f4g5h6i7j8k9l0m1n2o'
});
const result = await client.lists.delete('lst_xyz789');
if (result.deleted) {
console.log('List entry removed successfully');
}from daimon_email import DaimonClient
client = DaimonClient(api_key='dm_free_7d8a9b0c1d2e3f4g5h6i7j8k9l0m1n2o')
result = client.lists.delete('lst_xyz789')
if result.deleted:
print('List entry removed successfully')Response
{
"result": {
"deleted": true
},
"next_steps": [
"List entry has been permanently removed",
"Previously blocked/allowed emails will now follow default rules",
"Use GET /v1/lists to verify deletion"
]
}Response Fields
deletedbooleanAlways true on successful deletion
Behavior
- Deletion is immediate and permanent
- Emails are evaluated against updated rules immediately
- There is no "soft delete" or undo
- The list entry ID cannot be reused
Common Workflows
Unblock Previously Blocked Address
// Find the blocklist entry
const lists = await client.lists.list({
type: 'blocklist',
inboxId: 'inb_abc123'
});
const entry = lists.lists.find(e => e.address === 'user@example.com');
if (entry) {
await client.lists.delete(entry.id);
console.log('Address unblocked');
}Remove Temporary Block
// Block for 24 hours
const block = await client.lists.create({
type: 'blocklist',
address: 'temp-block@example.com'
});
// Store for later removal
await redis.set(`temp_block:${block.id}`, Date.now() + 86400000);
// Later: cleanup job removes expired blocks
const blockId = await redis.get('temp_block:...');
await client.lists.delete(blockId);Clear All Allowlist Rules for Inbox
// Get all allowlist entries for inbox
const allowlists = await client.lists.list({
type: 'allowlist',
inboxId: 'inb_abc123'
});
// Remove all allowlist entries
for (const entry of allowlists.lists) {
await client.lists.delete(entry.id);
}
console.log(`Removed ${allowlists.total} allowlist entries - inbox now accepts all senders`);Bulk Delete by Pattern
// Remove all blocks for @example.com domain
const lists = await client.lists.list({ type: 'blocklist' });
const toDelete = lists.lists.filter(entry =>
entry.address === '*@example.com' || entry.address.endsWith('@example.com')
);
for (const entry of toDelete) {
await client.lists.delete(entry.id);
}
console.log(`Removed ${toDelete.length} @example.com blocks`);Error Responses
401errorInvalid or missing API key
404errorList entry not found or does not belong to this account
Impact of Deletion
Blocklist Entry Deleted
Before deletion:
spam@example.com→ REJECTED
After deletion:
spam@example.com→ ACCEPTED (no rules match)
Allowlist Entry Deleted
Before deletion (inbox has allowlist):
allowed@example.com→ ACCEPTED (on allowlist)other@example.com→ REJECTED (not on allowlist)
After deletion (if last allowlist entry removed):
allowed@example.com→ ACCEPTED (no rules)other@example.com→ ACCEPTED (no rules)
After deletion (if other allowlist entries remain):
allowed@example.com→ REJECTED (not on remaining allowlist)other@example.com→ REJECTED (not on remaining allowlist)
Warning
Allowlist behavior: If you delete the last allowlist entry for an inbox, the inbox will start accepting all senders. Make sure this is intentional.
Info
Idempotent deletion: Attempting to delete a non-existent list entry returns 404. This is safe to handle - it means the entry was already removed or never existed.
Related Endpoints
POST /v1/lists- Add a new list entryGET /v1/lists- View all list entries