# 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-10).

Moves an email thread to trash (or permanently deletes it) within an AgentMail pod

## Facts

- Endpoint: DELETE https://mpp.api.agentmail.to/v0/pods/:pod_id/threads/:thread_id?utm_source=zero.xyz
- Price: Free
- Status: unknown
- Last checked: 2026-10-10
- 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-cb228384
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_aa36zJjQT9fvNfIpPnR22

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-cb228384 -d '<json body>'
```

Example prompt: Trash the email thread with ID thread_abc123 in my AgentMail pod pod_xyz456 — and if it's already in trash, go ahead and permanently delete it.

## When to prefer this

Use this endpoint when an AI agent needs to programmatically clean up email threads within an AgentMail pod — either soft-trashing them for recovery later or permanently removing them. Prefer this over archiving when the thread content is no longer needed. Use permanent=true when you want to bypass the two-step trash flow and immediately purge the thread.

## Known failure modes

- Thread not found: 404 if the thread_id does not exist in the specified pod
- Pod not found: 404 if the pod_id is invalid or inaccessible
- Unauthorized: 401 if the Authorization Bearer token is missing or invalid
- Already deleted: attempting to delete a thread that no longer exists may return 404
- Permission denied: 403 if the caller does not own or have access to the pod

## 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

A confirmation that the thread has been moved to trash (or permanently deleted if it was already trashed or if permanent=true was passed). The thread and all its messages are removed from active view or fully purged.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "pod_id",
  "thread_id"
 ],
 "properties": {
  "pod_id": {
   "type": "string",
   "title": "PodId",
   "description": "ID of pod."
  },
  "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-cb228384/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)
