{"uid":"cap_2DHgo1NwtHq8X4p_Mbs1M","slug":"agentmail-thread-id-e831a403","name":"AgentMail Delete Thread","description":"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.","url":"https://mpp.api.agentmail.to/v0/threads/:thread_id?utm_source=zero.xyz","method":"DELETE","headers":{},"bodySchema":{"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."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["email","inboxes","domains","drafts","threads","webhooks","messaging","ai","social"],"displayCostAmount":"0","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"proven_free","priceSource":"unknown","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"free","summary":"Free","primary":null,"accepted":[]},"paymentMethods":[],"brandName":"AgentMail","brandSlug":"agentmail","brandBaseUrl":"https://agentmail.to","brandDocsUrl":"https://docs.agentmail.to","whatItDoes":"Moves an email thread to trash (or permanently deletes it) by thread ID in the AgentMail system","exampleAgentPrompt":"Move thread abc123 to trash in my AgentMail inbox — and if it's already in trash, go ahead and permanently delete it.","exampleUseCases":[{"title":"Clean up spam and unwanted conversations","prompt":"I've got a bunch of junk emails cluttering my inbox. Can you trash all those spam threads from unknown senders that I've flagged? And if any of them are already in trash, just permanently delete them to free up space."},{"title":"Remove completed project email threads","prompt":"Now that we've finished the Q3 project, I don't need those email conversations anymore. Go ahead and move the entire thread about the Q3 planning discussion to trash, and permanently delete it so it's completely gone."},{"title":"Discard sensitive customer support cases","prompt":"We had a customer complaint thread that's now resolved and no longer needed. Can you permanently delete that thread right away? I want to make sure it's completely removed from the system, not just in trash."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T12:42:48.740Z","isFirstParty":false,"canonicalSlug":"agentmail-thread-id-a7fb9855"}