For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
contact@agentmail.ccDiscord
DocumentationAPI ReferenceKnowledge BaseChangelog
DocumentationAPI ReferenceKnowledge BaseChangelog
  • API Reference
      • GETList Pods
      • GETGet Pod
      • POSTCreate Pod
      • DELDelete Pod
        • GETList Threads
        • GETGet Thread
        • GETGet Attachment
        • PATCHUpdate Thread
        • DELDelete Thread
LogoLogo
contact@agentmail.ccDiscord
API ReferencePodsThreads

Delete Thread

DELETE
/v0/pods/:pod_id/threads/:thread_id
DELETE
/v0/pods/:pod_id/threads/:thread_id
1from agentmail import AgentMail
2
3client = AgentMail(
4 api_key="YOUR_TOKEN_HERE",
5)
6
7client.pods.threads.delete(
8 pod_id="pod_id",
9 thread_id="thread_id",
10)
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. **CLI:** ```bash agentmail pods:threads delete --pod-id <pod_id> --thread-id <thread_id> ```
Was this page helpful?
Previous

List Drafts

Next
Built with

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.

CLI:

$agentmail pods:threads delete --pod-id <pod_id> --thread-id <thread_id>

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

pod_idstringRequired
ID of pod.
thread_idstringRequired
ID of thread.

Query parameters

permanentbooleanOptional
If true, permanently delete the thread instead of moving to trash.

Errors

404
Not Found Error