{"uid":"cap_ejLx5QrnanBi9EbY2VReq","slug":"agentmail-thread-id-a7fb9855","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/inboxes/:inbox_id/threads/:thread_id?utm_source=zero.xyz","method":"DELETE","headers":{},"bodySchema":{"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."}}},"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":"unprobed","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) within an AgentMail inbox","exampleAgentPrompt":"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.","exampleUseCases":null,"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T00:31:15.107Z","isFirstParty":false,"canonicalSlug":"agentmail-thread-id-a7fb9855"}