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

## Facts

- Endpoint: DELETE https://mpp.api.agentmail.to/v0/inboxes/:inbox_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-a7fb9855
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ejLx5QrnanBi9EbY2VReq

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

Example prompt: Move the thread thread_abc123 in inbox inbox_xyz456 to trash on AgentMail — or if it's already in trash, go ahead and permanently delete it.

## When to prefer this

Use this endpoint when you need to remove or trash an email thread within an AgentMail inbox as part of an automated agent workflow. Prefer this over manual message-level deletion when you want to operate at the thread level. Use permanent=true when you want immediate irreversible deletion rather than a recoverable trash state.

## Known failure modes

- 404 if inbox_id or thread_id does not exist
- 401 if Authorization Bearer token is missing or invalid
- 400 if required path parameters are missing
- Thread already permanently deleted — may return 404 on retry
- Attempting to delete a thread from an inbox the auth token does not own

## 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 (trash label applied to all messages) or permanently deleted if it was already in trash or if the permanent flag was set to true.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "inbox_id",
  "thread_id"
 ],
 "properties": {
  "inbox_id": {
   "type": "string",
   "title": "InboxId",
   "description": "The ID of the inbox."
  },
  "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-a7fb9855/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)
