← Back to AgentMail
DELETE/v0/inboxes/{inbox_id}/threads/{thread_id}

Delete Thread

Move a thread to trash, or permanently delete if already trashed. Important: pass method: "DELETE" in your run request.

AgentMail·Free

Example code

// Using @orth/sdk - The simplest way to call APIs // Install: npm install @orth/sdk import Orthogonal from "@orth/sdk"; const orthogonal = new Orthogonal({ apiKey: process.env.ORTHOGONAL_API_KEY, }); const output = await orthogonal.run({ api: "agentmail", path: "/v0/inboxes/{inbox_id}/threads/{thread_id}" }); console.log(output);

Query parameters

permanent
boolean

If true, permanently delete instead of moving to trash.

    Orthogonal - Giving AI agents the tools they need.