threads
Conversation threads. The `machinemail threads` commands: arguments, flags, examples and the API routes they call.
Conversation threads. Also spelled thread.
| Command | Summary |
|---|---|
threads delete | Delete thread |
threads get | Get thread |
threads list | List threads |
threads search | Search threads |
threads update | Update thread |
Every command also takes the global flags.
threads delete
Delete thread.
Also: machinemail threads rm.
Permanently deletes the thread and its messages (up to 500).
Requires the thread_delete permission.
Arguments
<thread-id>stringRequiredFlags
--inbox <inbox-id>string--pod <pod-id>stringExamples
API
DELETE /v0/threads/{thread_id}DELETE /v0/inboxes/{inbox_id}/threads/{thread_id}with--inboxDELETE /v0/pods/{pod_id}/threads/{thread_id}with--pod
threads get
Get thread.
The thread with its messages, which carry their bodies and trust reports. Messages come in pages of —limit (default and maximum 500): the first page has the newest messages, oldest first within the page; follow next_page_token for older ones.
Requires the thread_read permission.
Arguments
<thread-id>stringRequiredFlags
--inbox <inbox-id>string--pod <pod-id>string--limit <n>integer--page-token <value>stringExamples
API
GET /v0/threads/{thread_id}GET /v0/inboxes/{inbox_id}/threads/{thread_id}with--inboxGET /v0/pods/{pod_id}/threads/{thread_id}with--pod
threads list
List threads.
Also: machinemail threads ls.
Threads, most recently active first. Pass —q to keep only threads with a message matching the words.
Threads with a spam, blocked, trash, quarantined or unauthenticated message are hidden unless you pass the matching —include-* flag or ask for the label in —label.
Requires the thread_read permission.
Flags
--inbox <inbox-id>string--pod <pod-id>string--limit <n>integer--page-token <value>string--ascendingboolean--label <value>string[]--before <time>string--after <time>string--include-spamboolean--include-blockedboolean--include-unauthenticatedboolean--include-trashboolean--include-quarantineboolean--q <value>string--allbooleanExamples
API
GET /v0/threadsGET /v0/inboxes/{inbox_id}/threadswith--inboxGET /v0/pods/{pod_id}/threadswith--pod
threads search
Search threads.
Threads with a message whose subject, sender, recipients, body or attachment file names contain every word of —q, ordered by thread activity (not ranked by relevance). Scans the newest 500 matching messages; the response has truncated: true when it hit that cap.
Requires the thread_read permission.
Flags
--inbox <inbox-id>string--pod <pod-id>string--q <value>stringRequired--limit <n>integer--page-token <value>string--before <time>string--after <time>string--ascendingboolean--label <value>string[]--include-spamboolean--include-blockedboolean--include-unauthenticatedboolean--include-trashboolean--include-quarantineboolean--allbooleanExamples
API
GET /v0/threads/searchGET /v0/inboxes/{inbox_id}/threads/searchwith--inboxGET /v0/pods/{pod_id}/threads/searchwith--pod
threads update
Update thread.
Adds and removes labels on every message in the thread (up to 500 messages); the thread labels are their union. Labels are free strings, system labels included. Returns the updated thread without messages.
Requires the message_update permission.
Arguments
<thread-id>stringRequiredFlags
--inbox <inbox-id>string--pod <pod-id>string--add-label <value>string[]--remove-label <value>string[]-d, --data <json|@file|->string