Skip to main content
DELETE
Delete DNC entry

Overview

Remove a specific LinkedIn URL from your team’s Do Not Contact (DNC) list. This allows the contact to be included in campaigns again and reverses the opt-out status.

Use Cases

  • Consent Restoration: Re-enable contact after receiving new consent
  • Error Correction: Remove URLs added to DNC list by mistake
  • Customer Return: Allow returning customers to receive outreach again
  • Testing: Clean up test entries from DNC list
  • Data Management: Maintain accurate DNC list by removing outdated entries

Key Features

  • Team Authorization: Ensures only team owners can delete their DNC entries
  • Immediate Effect: Contact can be added to campaigns immediately after deletion
  • Cache Invalidation: Automatically updates cache for instant availability
  • Rate Limited: 30 requests per minute for reliable performance
  • Audit Trail: Deletion logged for compliance tracking
  • Permanent Deletion: Entry completely removed from database

Testing Example

URL Parameters

ID Format

The DNC entry ID follows the format: dnc_[alphanumeric] Example: dnc_12345abcde

Response Format

Success Response (200 OK)

Error Responses

404 Not Found - DNC Entry Not Found

403 Forbidden - Unauthorized Access

429 Too Many Requests - Rate Limit Exceeded

401 Unauthorized - Invalid API Key

500 Internal Server Error

Authorization & Security

Team Ownership Verification

The endpoint performs two-level authorization:
  1. API Key Verification: Validates your API key
  2. Team Ownership Check: Ensures the DNC entry belongs to your team

Security Features

  • Team Isolation: Cannot delete DNC entries from other teams
  • Permission Enforcement: Database-level permission checks
  • Audit Logging: All deletions logged to BetterStack
  • API Key Validation: Requires valid API key with proper scope

Rate Limiting

  • Limit: 30 requests per minute per team
  • Window: Rolling 60-second window
  • Shared with: Other DNC write operations
  • Exceeded: Returns 429 status with resetTime timestamp

Rate Limit Best Practices

  1. Sequential Processing: Delete entries one at a time
  2. Batch Tracking: Maintain local queue for multiple deletions
  3. Exponential Backoff: Wait for resetTime on 429 responses
  4. Error Handling: Gracefully handle rate limit errors

Integration Examples

Delete with Error Handling

Bulk Delete with Rate Limiting

Re-Enable Contact Workflow

Cleanup Test Entries

Dashboard Integration

Best Practices

  1. Verify Ownership: Endpoint automatically verifies team ownership
  2. Handle 404s: Entry may have been deleted by another process
  3. Rate Limit Awareness: Add delays when deleting multiple entries
  4. Audit Trail: Log all deletions with reason and timestamp
  5. Confirmation UI: Implement confirmation dialogs in user interfaces
  6. Error Handling: Gracefully handle all error responses
  7. Cache Awareness: Deletion invalidates team cache immediately
  8. Re-verification: Check DNC status after deletion if critical

Cache Invalidation

Deleting a DNC entry automatically invalidates:
  • Team Cache: All cached DNC checks for your team
  • Immediate Effect: Next check for the URL will return onList: false
  • TTL Reset: New checks will create fresh cache entries

Performance Considerations

  • Authorization Check: ~50ms for ownership verification
  • Database Deletion: ~100ms for actual deletion
  • Cache Invalidation: Immediate, adds ~5ms
  • Total Response Time: Typically 150-200ms
  • Team Isolation: Permissions enforced at database level

Response Fields

Common Error Scenarios

Entry Not Found

Unauthorized Access

Rate Limit Exceeded

Compliance Considerations

GDPR

  • Audit Trail: Log all deletions with reason and timestamp
  • Right to Withdraw: Allow contacts to re-enable communications
  • Data Retention: Document deletion for compliance audits
  • Consent Management: Link deletions to consent restoration

CAN-SPAM

  • Opt-In Verification: Only delete after verified opt-in
  • Documentation: Maintain records of consent restoration
  • Automated Processing: Process re-enable requests promptly

Important Warnings

⚠️ Permanent Deletion: Once deleted, the entry is permanently removed. The contact can be added to campaigns immediately. ⚠️ Team Authorization: You can only delete DNC entries belonging to your team. Attempts to delete other teams’ entries will fail with 403 Forbidden. ⚠️ Immediate Effect: Deletion takes effect immediately. The contact becomes available for campaigns right away. ⚠️ No Bulk Endpoint: There is no bulk delete endpoint. Delete entries one at a time with rate limit considerations.

Common Use Cases

Error Correction

Periodic Cleanup

Next Steps

After deleting a DNC entry:
  1. Verify Deletion: Use Check DNC to confirm removal
  2. Add to Campaign: Contact can now be added to campaigns
  3. Update Records: Update any external systems or CRM records
  4. Monitor: Track if contact needs to be re-added to DNC

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The unique ID of the DNC entry to delete

Example:

"dnc_12345abcde"

Response

DNC entry deleted successfully

error
null
data
object
Last modified on November 18, 2025