Skip to main content
Every zohomail.api.* operation is listed below with parameter shapes and return types from the plugin Zod schemas.
New to Corsair? See API access, authentication, and error handling.

Folders

create

folders.create Create a new folder Risk: write
await corsair.zohomail.api.folders.create({});
Input
NameTypeRequiredDescription
accountIdstringNoZoho Mail accountId. When omitted, the first account on the authenticated user is resolved automatically.
folderNamestringYes
parentFolderIdstringNoParent folder ID for creating a sub-folder.
Output
NameTypeRequiredDescription
folderIdstringNo
folderNamestringNo
pathstringNo
parentFolderIdstringNo
previousFolderIdstringNo
folderTypestringNo
isArchivedstring | booleanNo
imapAccessstring | booleanNo
unreadCountstring | numberNo
messageCountstring | numberNo
URIstringNo

delete

folders.delete Delete a folder along with its emails and sub-folders [DESTRUCTIVE · IRREVERSIBLE] Risk: destructive · Irreversible
await corsair.zohomail.api.folders.delete({});
Input
NameTypeRequiredDescription
accountIdstringNoZoho Mail accountId. When omitted, the first account on the authenticated user is resolved automatically.
folderIdstringYes
Output: void

get

folders.get Get a specific folder Risk: read
await corsair.zohomail.api.folders.get({});
Input
NameTypeRequiredDescription
accountIdstringNoZoho Mail accountId. When omitted, the first account on the authenticated user is resolved automatically.
folderIdstringYes
Output
NameTypeRequiredDescription
folderIdstringNo
folderNamestringNo
pathstringNo
parentFolderIdstringNo
previousFolderIdstringNo
folderTypestringNo
isArchivedstring | booleanNo
imapAccessstring | booleanNo
unreadCountstring | numberNo
messageCountstring | numberNo
URIstringNo

list

folders.list List all mail folders Risk: read
await corsair.zohomail.api.folders.list({});
Input
NameTypeRequiredDescription
accountIdstringNoZoho Mail accountId. When omitted, the first account on the authenticated user is resolved automatically.
Output
NameTypeRequiredDescription
foldersobject[]Yes
{
  folderId?: string,
  folderName?: string,
  path?: string,
  parentFolderId?: string,
  previousFolderId?: string,
  folderType?: string,
  isArchived?: string | boolean,
  imapAccess?: string | boolean,
  unreadCount?: string | number,
  messageCount?: string | number,
  URI?: string
}[]

update

folders.update Rename, mark all emails read, or empty a folder Risk: write
await corsair.zohomail.api.folders.update({});
Input
NameTypeRequiredDescription
accountIdstringNoZoho Mail accountId. When omitted, the first account on the authenticated user is resolved automatically.
folderIdstringYes
moderename | markAsRead | emptyFolderYes
folderNamestringNoNew folder name. Required when mode = rename.
Output: void

Messages

delete

messages.delete Permanently delete an email [DESTRUCTIVE · IRREVERSIBLE] Risk: destructive · Irreversible
await corsair.zohomail.api.messages.delete({});
Input
NameTypeRequiredDescription
accountIdstringNoZoho Mail accountId. When omitted, the first account on the authenticated user is resolved automatically.
folderIdstringYes
messageIdstringYes
Output: void

get

messages.get Get a specific email with its content Risk: read
await corsair.zohomail.api.messages.get({});
Input
NameTypeRequiredDescription
accountIdstringNoZoho Mail accountId. When omitted, the first account on the authenticated user is resolved automatically.
folderIdstringYes
messageIdstringYes
Output
NameTypeRequiredDescription
messageIdstringNo
threadIdstringNo
folderIdstringNo
subjectstringNo
summarystringNo
fromAddressstringNo
toAddressstringNo
ccAddressstringNo
senderstringNo
sentDateInGMTstringNo
receivedTimestringNo
sizestringNo
hasAttachmentstringNo
hasInlinestringNo
statusstringNo
status2stringNo
flagidstringNo
prioritystringNo
calendarTypestringNo
threadCountstringNo
contentstringNo
mailFormatstringNo
returnPathstringNo
bccAddressstringNo
replyTostringNo

list

messages.list List emails in a folder Risk: read
await corsair.zohomail.api.messages.list({});
Input
NameTypeRequiredDescription
accountIdstringNoZoho Mail accountId. When omitted, the first account on the authenticated user is resolved automatically.
folderIdstringYesFolder to list emails from (required).
startnumberNoStarting sequence number (default 1).
limitnumberNoNumber of emails to retrieve, 1-200 (default 10).
statusread | unread | allNo
sortBydate | messageId | sizeNo
sortorderbooleanNotrue = ascending, false = descending (default).
includetobooleanNo
Output
NameTypeRequiredDescription
messagesobject[]Yes
{
  messageId?: string,
  threadId?: string,
  folderId?: string,
  subject?: string,
  summary?: string,
  fromAddress?: string,
  toAddress?: string,
  ccAddress?: string,
  sender?: string,
  sentDateInGMT?: string,
  receivedTime?: string,
  size?: string,
  hasAttachment?: string,
  hasInline?: string,
  status?: string,
  status2?: string,
  flagid?: string,
  priority?: string,
  calendarType?: string,
  threadCount?: string
}[]

markRead

messages.markRead Mark emails as read Risk: write
await corsair.zohomail.api.messages.markRead({});
Input
NameTypeRequiredDescription
accountIdstringNoZoho Mail accountId. When omitted, the first account on the authenticated user is resolved automatically.
messageIdstring[]Yes
Output: void

markUnread

messages.markUnread Mark emails as unread Risk: write
await corsair.zohomail.api.messages.markUnread({});
Input
NameTypeRequiredDescription
accountIdstringNoZoho Mail accountId. When omitted, the first account on the authenticated user is resolved automatically.
messageIdstring[]Yes
Output: void

move

messages.move Move emails to another folder Risk: write
await corsair.zohomail.api.messages.move({});
Input
NameTypeRequiredDescription
accountIdstringNoZoho Mail accountId. When omitted, the first account on the authenticated user is resolved automatically.
messageIdstring[]YesMessage IDs to move.
destfolderIdstringYesDestination folder ID.
Output: void

send

messages.send Send an email to one or more recipients Risk: write
await corsair.zohomail.api.messages.send({});
Input
NameTypeRequiredDescription
accountIdstringNoZoho Mail accountId. When omitted, the first account on the authenticated user is resolved automatically.
fromAddressstringYesSender address; must belong to the authenticated account.
toAddressstringYesRecipient address(es), comma-separated.
ccAddressstringNo
bccAddressstringNo
subjectstringNo
contentstringNo
mailFormathtml | plaintextNo
askReceiptyes | noNo
Output
NameTypeRequiredDescription
messageIdstringNo
threadIdstringNo
folderIdstringNo
subjectstringNo
summarystringNo
fromAddressstringNo
toAddressstringNo
ccAddressstringNo
senderstringNo
sentDateInGMTstringNo
receivedTimestringNo
sizestringNo
hasAttachmentstringNo
hasInlinestringNo
statusstringNo
status2stringNo
flagidstringNo
prioritystringNo
calendarTypestringNo
threadCountstringNo