# AgentMail Delete Thread

> AgentMail Delete Thread is a free API for AI agents from AgentMail at mpp.api.agentmail.to, Free, status unknown (last checked 2026-10-12).

Moves an email thread to trash (or permanently deletes it) by thread ID in the AgentMail system

## Facts

- Endpoint: DELETE https://mpp.api.agentmail.to/v0/threads/:thread_id?utm_source=zero.xyz
- Price: Free
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Provider: AgentMail
- Docs: https://docs.agentmail.to
- Website: https://agentmail.to
- Tags: email, inboxes, domains, drafts, threads, webhooks, messaging, ai, social
- Canonical page: https://www.zero.xyz/c/agentmail-thread-id-e831a403
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2DHgo1NwtHq8X4p_Mbs1M

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agentmail-thread-id-e831a403 -d '<json body>'
```

Example prompt: Move thread abc123 to trash in my AgentMail inbox — and if it's already in trash, go ahead and permanently delete it.

## When to prefer this

Use this endpoint when you need to programmatically clean up or discard email threads in an AgentMail inbox, especially in automated agent workflows that manage email at scale. Prefer this over archiving when the thread is no longer needed and should be removed from active view.

## Known failure modes

- Thread ID not found — 404 error
- Missing or invalid Authorization header — 401 unauthorized
- Thread already permanently deleted — 404 or 410 gone
- Malformed thread_id — 400 bad request
- Server error during deletion — 500 internal server error

## How this service works

Moves the thread to trash by adding a trash label to all messages. If the thread is already in trash, it will be permanently deleted. Use `permanent=true` to force permanent deletion.

## Output

Confirmation that the thread has been moved to trash (all messages labeled as trashed), or permanently deleted if it was already in trash or if permanent=true was specified.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "thread_id"
 ],
 "properties": {
  "permanent": {
   "type": "boolean",
   "description": "If true, permanently delete the thread instead of moving to trash."
  },
  "thread_id": {
   "type": "string",
   "title": "ThreadId",
   "description": "ID of thread."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentmail-thread-id-e831a403/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mpp.api.agentmail.to](https://www.zero.xyz/host/mpp.api.agentmail.to/llms.txt)
