Inboxes & Threads
Relevant source files
The following files were used as context for generating this wiki page:
Inboxes and Threads represent the bidirectional communication system within the Resend platform. An inbox acts as a centralized email address at a verified domain that sends and receives messages. Received messages are automatically grouped into threads to maintain conversational context.
The system allows you to manage the entire lifecycle of an email conversation, from creating an inbox and organizing threads with labels to managing drafts and sending replies.
Sources: skills/resend-cli/references/inboxes.md:1-10, tests/commands/webhooks/listen-summary.test.ts:10-50
Inbox Management
An inbox is an email address at one of your verified domains. It requires a full-access API key to operate. You can create inboxes with standard MX record receiving or use forwarding to generate a unique receiving_address.
Lifecycle and Configuration
The CLI provides commands to create, list, retrieve, update, and delete inboxes. When you update an inbox, you can modify its internal name or the name displayed to recipients (from-name).
| Command | Action | Key Parameters |
|---|---|---|
create | Creates a new inbox | --email-address, --forwarding |
list | Lists all inboxes | --limit, --after, --before |
get | Retrieves inbox details | <id> or email address |
update | Modifies configuration | --name, --from-name |
delete | Removes an inbox | <id>, --yes |
Sources: skills/resend-cli/references/inboxes.md:13-90
Threads and Organization
Threads group related email messages together. They are ordered by newest activity by default. The CLI allows for extensive filtering and search capabilities to locate specific conversations.
Thread Filtering and Search
You can filter threads by folder (inbox, archive, spam, sent, trash), labels, or read status. The search functionality enables full-text queries across subjects, bodies, and participant names.
The search system prioritizes body snippets over subjects in the results table to provide more context to the user.
Sources: src/commands/inboxes/threads/utils.ts:83-108, skills/resend-cli/references/inboxes.md:92-160
Thread Updates
Updating a thread modifies its metadata or location. Operations include marking messages as read/unread, moving the thread to a different folder, or managing label assignments.
- Labels: You can add or remove up to 10 label UUIDs per request.
- Folders: Valid targets for moving threads include
inbox,archive,spam, andtrash. - Atomic Order: Changes apply in a specific sequence: Read status -> Folder -> Added labels -> Removed labels.
Sources: src/commands/inboxes/threads/update.ts:40-65, skills/resend-cli/references/inboxes.md:175-200
Drafts and Replies
Drafts are unsent messages associated with an inbox. They can be standalone messages or replies to existing emails within a thread.
Draft Creation and Constraints
When creating a draft, at least one content field is required (recipients, subject, body, or attachments). Reply drafts are specifically linked to a thread_id and a reply_to_email_id.
| Constraint | Limit |
|---|---|
| Combined Recipients | Maximum 50 |
| Total Attachment Size | 25 MB |
| Unsent Reply Drafts | Only 1 per target email |
| Total Labels | 100 per inbox |
Sources: src/commands/inboxes/drafts/create.ts:70-120, src/commands/inboxes/drafts/update.ts:45-80, skills/resend-cli/references/inboxes.md:300-345
Updating and Sending Drafts
Updating a draft replaces existing values with new ones. Specific "clear" flags (e.g., --clear-subject) are provided to explicitly set fields to null. Once a draft is finalized, the send command converts the draft into a sent email and starts or continues a thread.
Sources: src/commands/inboxes/drafts/update.ts:88-115, skills/resend-cli/references/inboxes.md:370-400
Inbox Agent Settings
Each inbox can be configured with an AI agent. The agent assists in managing conversations based on provided instructions and a defined tone.
- Instructions: Guidelines for the agent (max 4000 characters).
- Tone: Preset values include
concise_professional,concise_casual,expanded_professional, andexpanded_casual. - Enabled Actions: A set of permissions for the agent, such as
draft_reply,archive_thread, ormark_as_spam.
Sources: skills/resend-cli/references/inboxes.md:405-435
Conclusion
The Inboxes & Threads module provides a robust framework for managing asynchronous communications through the Resend CLI. By combining organizational tools like threads and labels with flexible drafting and AI-assisted agent settings, the system handles complex email workflows while maintaining strict validation on recipients and attachment sizes.