---
title: "Delete contacts in bulk"
method: POST
path: "/contacts/batch/remove"
tags: ["Contacts"]
---

# Delete contacts in bulk

`POST /contacts/batch/remove`

## Request

- Base URL: `https://api.mepmail.dev`
- URL: `https://api.mepmail.dev/contacts/batch/remove`
- Auth: HTTP bearer

MepMail extension (Resend deletes contacts one at a time): deletes up to 1000 contacts by id or by email address in one request and lists the rows actually deleted; unknown ids or addresses are skipped. Emails stay in the log; `erase: true` also scrubs each address from email history, event payloads and API logs, like DELETE /contacts/{id}?erase=true.

## Request body

- BatchRemoveContactsRequest
  - `ids` string[]: Contact ids to delete, up to 1000
  - `emails` string[]: Contact email addresses to delete, up to 1000; matched case-insensitively
  - `erase` boolean: Also erase each address from email history, event payloads and API logs (GDPR/LGPD); by default the send log is kept

## Response `200`

The contacts that were deleted

- BatchRemoveContactsResponse
  - `data` RemoveContactResponse[], required
    - `object` 'contact', required
    - `contact` string, uuid, required
    - `deleted` true, required

## Other responses

- `401`: Missing, malformed or invalid API key
- `422`: Validation error
- `429`: Rate limit exceeded: 600 requests per minute per API key and 3,000 per team; wait for Retry-After

---

[API](https://skmtc.dev/mepmail/apis/mepmail-api.md) · [All operations](https://skmtc.dev/mepmail/apis/mepmail-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mepmail/apis/mepmail-api/revisions/262a89f73730?raw)
