CLI: Mail
The commands of the doorman command line under Mail. Threads, messages, raw and HTML bodies, attachments and their extracted text.
doorman inboxes threads list
doorman inboxes threads list <inboxId> [flags]Sends inboxes.threads.list: GET /v1/inboxes/{inboxId}/threads
List threads. Access any: any API key, or a console session. An app token needs mail:read.
Flags
--inbox-idstringoptionalThe same as the argument
<inboxId>, for a script that names everything.--is-read"true" | "false"optionalOnly read or only unread threads.
--qstringoptionalKeep the threads whose subject or a participant address contains this text, case-insensitively.
--labelstringoptionalOnly threads containing this exact, case-sensitive label.
--limitintegeroptionalPage size, 1 to 100. Defaults to 50.
--offsetintegeroptionalRows to skip. Defaults to 0.
doorman inboxes threads list inb_01jc4q7w9k2m5n8p3r6t1v4x7zdoorman threads get
doorman threads get <threadId> [flags]Sends threads.get: GET /v1/threads/{threadId}
Read a thread. Access any: any API key, or a console session. An app token needs mail:read.
Flags
--thread-idstringoptionalThe same as the argument
<threadId>, for a script that names everything.
doorman threads get thr_01jc5a1b2c3d4e5f6g7h8j9k0mdoorman threads update
doorman threads update <threadId> [flags]Sends threads.update: PATCH /v1/threads/{threadId}
Update a thread. Access any: any API key, or a console session. An app token needs mail:write and mail:read.
Flags
--thread-idstringoptionalThe same as the argument
<threadId>, for a script that names everything.--is-readbooleanoptional--metadataobject of string | number | boolean | nulloptionalExtension state: at most 20 keys and 2048 bytes of UTF-8 JSON. Keys are 1 to 64 ASCII letters, digits, underscores, dots, colons or hyphens, starting with a letter or digit. Values are strings, finite numbers, booleans or null. Replaced as a whole; {} clears it. Do not store secrets.
--labelsstring[]optionalAt most 20 unique labels. Replaced as a whole; [] clears the labels.
--jsonobjectoptionalThe request body as one JSON object. A flag given beside it replaces the field of the same name.
doorman threads update thr_01jc5a1b2c3d4e5f6g7h8j9k0m \
--is-read truedoorman threads trash
doorman threads trash <threadId> [flags]Sends threads.trash: DELETE /v1/threads/{threadId}
Trash a thread. Access any: any API key, or a console session. An app token needs mail:write and mail:read.
Flags
--thread-idstringoptionalThe same as the argument
<threadId>, for a script that names everything.
doorman threads trash thr_01jc5a1b2c3d4e5f6g7h8j9k0mdoorman threads messages
doorman threads messages <threadId> [flags]Sends threads.messages: GET /v1/threads/{threadId}/messages
Read a thread's messages. Access any: any API key, or a console session. An app token needs mail:read.
Flags
--thread-idstringoptionalThe same as the argument
<threadId>, for a script that names everything.
doorman threads messages thr_01jc5a1b2c3d4e5f6g7h8j9k0mdoorman inboxes messages list
doorman inboxes messages list <inboxId> [flags]Sends inboxes.messages.list: GET /v1/inboxes/{inboxId}/messages
List messages. Access any: any API key, or a console session. An app token needs mail:read.
Flags
--inbox-idstringoptionalThe same as the argument
<inboxId>, for a script that names everything.--direction"inbound" | "outbound"optionalOnly received or only sent messages.
--limitintegeroptionalPage size, 1 to 100. Defaults to 50.
--offsetintegeroptionalRows to skip. Defaults to 0.
doorman inboxes messages list inb_01jc4q7w9k2m5n8p3r6t1v4x7zdoorman messages get
doorman messages get <messageId> [flags]Sends messages.get: GET /v1/messages/{messageId}
Read a message. Access any: any API key, or a console session. An app token needs mail:read.
Flags
--message-idstringoptionalThe same as the argument
<messageId>, for a script that names everything.
doorman messages get msg_01jc5a6g7h8j9k0m1n2p3q4r5sdoorman messages raw
doorman messages raw <messageId> [flags]Sends messages.raw: GET /v1/messages/{messageId}/raw
Download the original message. Access any: any API key, or a console session. An app token needs mail:read.
Flags
--message-idstringoptionalThe same as the argument
<messageId>, for a script that names everything.--outpathoptionalWrite the answer to this file instead of standard output.
doorman messages raw msg_01jc5a6g7h8j9k0m1n2p3q4r5sdoorman messages html
doorman messages html <messageId> [flags]Sends messages.html: GET /v1/messages/{messageId}/html
Read the HTML body. Access any: any API key, or a console session. An app token needs mail:read.
Flags
--message-idstringoptionalThe same as the argument
<messageId>, for a script that names everything.--outpathoptionalWrite the answer to this file instead of standard output.
doorman messages html msg_01jc5a6g7h8j9k0m1n2p3q4r5sdoorman attachments download
doorman attachments download <messageId> <filename> [flags]Sends attachments.download: GET /v1/attachments/{messageId}/{filename}
Download an attachment. Access any: any API key, or a console session. An app token needs mail:read.
Flags
--message-idstringoptionalThe same as the argument
<messageId>, for a script that names everything.--filenamestringoptionalThe same as the argument
<filename>, for a script that names everything.--outpathoptionalWrite the answer to this file instead of standard output.
doorman attachments download msg_01jc5a6g7h8j9k0m1n2p3q4r5s invoice.pdfdoorman attachments text
doorman attachments text <messageId> <filename> [flags]Sends attachments.text: GET /v1/attachments/{messageId}/{filename}/text
Read an attachment's text. Access any: any API key, or a console session. An app token needs mail:read.
Flags
--message-idstringoptionalThe same as the argument
<messageId>, for a script that names everything.--filenamestringoptionalThe same as the argument
<filename>, for a script that names everything.
doorman attachments text msg_01jc5a6g7h8j9k0m1n2p3q4r5s invoice.pdf
