JSON Schema Reference
All outlookctl commands output JSON with consistent schemas. This document describes the output formats.
"1.0"
MessageId
Stable identifier for referencing messages across commands. Both fields are required when referencing a message.
EmailAddress
Represents a sender or recipient with display name and email address.
ListResult
Output of outlookctl list command. Returns message summaries from a folder.
Notes
body_snippetis only included when--include-body-snippetis used- Items are sorted by received time (newest first)
SearchResult
Output of outlookctl search command. Includes the query parameters used.
GetResult (Message Detail)
Output of outlookctl get command. Returns full message details.
Notes
bodyandbody_htmlonly included with--include-bodyheadersonly included with--include-headers
DraftResult
Output of outlookctl draft command. Returns the created draft's ID for later reference.
SendResult
Output of outlookctl send command. Confirms the message was sent.
AttachmentSaveResult
Output of outlookctl attachments save command.
DoctorResult
Output of outlookctl doctor command. Reports environment check results.
ErrorResult
All commands return this format on error. Includes remediation hints when available.
Error Codes
Common error codes and their meanings:
| Code | Description |
|---|---|
OUTLOOK_UNAVAILABLE |
Cannot connect to Outlook COM interface |
FOLDER_NOT_FOUND |
Specified folder doesn't exist |
MESSAGE_NOT_FOUND |
Message ID is invalid or expired |
CONFIRMATION_REQUIRED |
Send attempted without proper confirmation |
VALIDATION_ERROR |
Invalid arguments or missing required fields |
DRAFT_ERROR |
Failed to create draft |
SEND_ERROR |
Failed to send message |
ATTACHMENT_ERROR |
Failed to save attachments |