Unsubscribe list stores email addresses of recipients who unsubscribed from your mailings by clicking a Mailgun generated unsubscribe link.
Import a CSV file containing a list of addresses to add to the unsubscribe list.The CSV file must be 25MB or under and must contain the following column headers: address, tags, created_at.
A 202 response
A 400 response
A 500 response
{- "message": "file uploaded successfully"
}
Fetch a single unsubscribe record to check if a given address is present in a list of unsubscribed users.
{- "tags": [
- "some tag"
], - "created_at": "Fri, 18 Oct 2024 18:28:14 UTC",
- "address": "alice@example.com"
}
The delivery to the deleted email address resumes until it unsubscribes again.
{- "message": "Unsubscribe event has been removed",
- "address": "foo@bar.com"
}
Paginate over a list of unsubscribes for a domain.
A 200 response
required | Array of objects |
required | object |
A 400 response
{- "items": [
- {
- "address": "alice@example.com",
- "created_at": "Fri, 18 Oct 2024 18:28:14 UTC",
- "tags": [
- "some tag"
]
}
], - "paging": {
- "previous": "<previous page url>",
- "first": "<first page url>",
- "next": "<next page url>",
- "last": "<last page url>"
}
}
Request body is expected to be a valid JSON encoded sting containing up to 1000 unsubscribe records or a single unsubscribe record as application/form-data
{- "message": "4 addresses have been added to the unsubscribes table"
}
Clear all unsubscribe email addresses for the domain. Delivery to the deleted email addresses will no longer be suppressed.
{- "message": "Unsubscribe addresses for this domain have been removed"
}