Skip to content

Bulk import unsubscribes

Request

Import multiple email addresses into your unsubscribe list in one request.

Unsubscribe Scope:

  • Global: Omit domain_id to unsubscribe from ALL your domains
  • Domain-specific: Include domain_id to unsubscribe from a specific domain only

Duplicate emails in the request and emails that are already unsubscribed are counted as skipped. Invalid email addresses are counted as failed and returned in invalid_emails.

Security
ApiKeyAuth
Bodyapplication/jsonrequired
emailsArray of strings, (email), [ 1 .. 10000 ] itemsrequired

Email addresses to unsubscribe

Example:
[ "user@example.com", "another@example.com" ]
domain_idstring, (uuid)

Optional - Specify domain ID for domain-specific unsubscribes. Omit for global unsubscribes.

reasonstring

Optional reason for unsubscribe

Example:"CSV import"
curl -i -X POST \
  https://api.mailerlogic.net/api/customer/unsubscribes/import \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "emails": [
      "user@example.com",
      "another@example.com"
    ],
    "reason": "CSV import"
  }'

Responses

Unsubscribe import completed

Bodyapplication/json
messagestring
Example:"Unsubscribe import completed"
importedinteger
Example:245
skippedinteger
Example:12
failedinteger
Example:2
invalid_emailsArray of strings
duplicate_countinteger
already_unsubscribedinteger
scopestring
Enum:"global""domain-specific"
Response
{ "message": "Unsubscribe import completed", "imported": 245, "skipped": 12, "failed": 2, "invalid_emails": [ "string" ], "duplicate_count": 0, "already_unsubscribed": 0, "scope": "global" }