KosmoKrator

productivity

Zoho Mail CLI for AI Agents

Use the Zoho Mail CLI from KosmoKrator to call Zoho Mail tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

Zoho Mail CLI Setup

Zoho Mail can be configured headlessly with `kosmokrator integrations:configure zoho-mail`.

Install, configure, and verify
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure zoho-mail --set access_token="$ZOHO_MAIL_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor zoho-mail --json
kosmokrator integrations:status --json

Credentials

Authentication type: Manual OAuth token oauth2_manual_token. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
access_token ZOHO_MAIL_ACCESS_TOKEN Secret secret yes Access Token
url ZOHO_MAIL_URL URL url no API Base URL

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call zoho-mail.zohomail_get_current_user '{}' --json
Provider shortcut
kosmo integrations:zoho-mail zohomail_get_current_user '{}' --json

Discovery

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

Discovery commands
kosmo integrations:docs zoho-mail --json
kosmo integrations:docs zoho-mail.zohomail_get_current_user --json
kosmo integrations:schema zoho-mail.zohomail_get_current_user --json
kosmo integrations:search "Zoho Mail" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

zoho-mail.zohomail_get_current_user

Get the current user's Zoho Mail account information. Returns account IDs needed for other Zoho Mail operations.

Read read
Parameters
none
Generic call
kosmo integrations:call zoho-mail.zohomail_get_current_user '{}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_get_current_user '{}' --json

zoho-mail.zohomail_get_account

Get details for a specific Zoho Mail account.

Read read
Parameters
accountId
Generic call
kosmo integrations:call zoho-mail.zohomail_get_account '{"accountId":"example_accountId"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_get_account '{"accountId":"example_accountId"}' --json

zoho-mail.zohomail_list_messages

List email messages in a Zoho Mail folder. Returns message summaries including sender, subject, and date.

Read read
Parameters
accountId, folderId, start, limit, searchKey
Generic call
kosmo integrations:call zoho-mail.zohomail_list_messages '{"accountId":"example_accountId","folderId":"example_folderId","start":1,"limit":1,"searchKey":"example_searchKey"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_list_messages '{"accountId":"example_accountId","folderId":"example_folderId","start":1,"limit":1,"searchKey":"example_searchKey"}' --json

zoho-mail.zohomail_search_messages

Search messages in a Zoho Mail account using official search parameters.

Read read
Parameters
accountId, params
Generic call
kosmo integrations:call zoho-mail.zohomail_search_messages '{"accountId":"example_accountId","params":"example_params"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_search_messages '{"accountId":"example_accountId","params":"example_params"}' --json

zoho-mail.zohomail_get_message

Get a single email message from Zoho Mail by ID. Returns full message content, headers, and attachment info.

Read read
Parameters
accountId, folderId, messageId, includeBlockContent
Generic call
kosmo integrations:call zoho-mail.zohomail_get_message '{"accountId":"example_accountId","folderId":"example_folderId","messageId":"example_messageId","includeBlockContent":true}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_get_message '{"accountId":"example_accountId","folderId":"example_folderId","messageId":"example_messageId","includeBlockContent":true}' --json

zoho-mail.zohomail_get_message_details

Get metadata details for a Zoho Mail message.

Read read
Parameters
none
Generic call
kosmo integrations:call zoho-mail.zohomail_get_message_details '{}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_get_message_details '{}' --json

zoho-mail.zohomail_get_message_headers

Get email headers for a Zoho Mail message.

Read read
Parameters
accountId, folderId, messageId
Generic call
kosmo integrations:call zoho-mail.zohomail_get_message_headers '{"accountId":"example_accountId","folderId":"example_folderId","messageId":"example_messageId"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_get_message_headers '{"accountId":"example_accountId","folderId":"example_folderId","messageId":"example_messageId"}' --json

zoho-mail.zohomail_get_original_message

Get the original MIME representation of a Zoho Mail message.

Read read
Parameters
accountId, messageId
Generic call
kosmo integrations:call zoho-mail.zohomail_get_original_message '{"accountId":"example_accountId","messageId":"example_messageId"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_get_original_message '{"accountId":"example_accountId","messageId":"example_messageId"}' --json

zoho-mail.zohomail_get_attachment_info

Get attachment metadata for a Zoho Mail message.

Read read
Parameters
accountId, folderId, messageId
Generic call
kosmo integrations:call zoho-mail.zohomail_get_attachment_info '{"accountId":"example_accountId","folderId":"example_folderId","messageId":"example_messageId"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_get_attachment_info '{"accountId":"example_accountId","folderId":"example_folderId","messageId":"example_messageId"}' --json

zoho-mail.zohomail_get_attachment_content

Get attachment content for a Zoho Mail message.

Read read
Parameters
accountId, folderId, messageId, attachmentId
Generic call
kosmo integrations:call zoho-mail.zohomail_get_attachment_content '{"accountId":"example_accountId","folderId":"example_folderId","messageId":"example_messageId","attachmentId":"example_attachmentId"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_get_attachment_content '{"accountId":"example_accountId","folderId":"example_folderId","messageId":"example_messageId","attachmentId":"example_attachmentId"}' --json

zoho-mail.zohomail_send_message

Send a new email message via Zoho Mail. Supports to, cc, bcc, subject, and HTML or plain text content.

Write write
Parameters
accountId, toAddress, subject, content, ccAddress, bccAddress, inReplyTo, mailFormat
Generic call
kosmo integrations:call zoho-mail.zohomail_send_message '{"accountId":"example_accountId","toAddress":"example_toAddress","subject":"example_subject","content":"example_content","ccAddress":"example_ccAddress","bccAddress":"example_bccAddress","inReplyTo":"example_inReplyTo","mailFormat":"example_mailFormat"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_send_message '{"accountId":"example_accountId","toAddress":"example_toAddress","subject":"example_subject","content":"example_content","ccAddress":"example_ccAddress","bccAddress":"example_bccAddress","inReplyTo":"example_inReplyTo","mailFormat":"example_mailFormat"}' --json

zoho-mail.zohomail_reply_message

Reply to an existing Zoho Mail message.

Write write
Parameters
accountId, messageId, payload
Generic call
kosmo integrations:call zoho-mail.zohomail_reply_message '{"accountId":"example_accountId","messageId":"example_messageId","payload":"example_payload"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_reply_message '{"accountId":"example_accountId","messageId":"example_messageId","payload":"example_payload"}' --json

zoho-mail.zohomail_update_messages

Update messages with an official Zoho Mail updatemessage payload, including read/unread, move, flag, labels, archive, or spam modes.

Write write
Parameters
accountId, payload
Generic call
kosmo integrations:call zoho-mail.zohomail_update_messages '{"accountId":"example_accountId","payload":"example_payload"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_update_messages '{"accountId":"example_accountId","payload":"example_payload"}' --json

zoho-mail.zohomail_delete_message

Delete a Zoho Mail message by account, folder, and message ID.

Write write
Parameters
accountId, folderId, messageId
Generic call
kosmo integrations:call zoho-mail.zohomail_delete_message '{"accountId":"example_accountId","folderId":"example_folderId","messageId":"example_messageId"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_delete_message '{"accountId":"example_accountId","folderId":"example_folderId","messageId":"example_messageId"}' --json

zoho-mail.zohomail_list_folders

List all email folders in a Zoho Mail account, including Inbox, Sent, Drafts, Trash, and custom folders.

Read read
Parameters
accountId
Generic call
kosmo integrations:call zoho-mail.zohomail_list_folders '{"accountId":"example_accountId"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_list_folders '{"accountId":"example_accountId"}' --json

zoho-mail.zohomail_get_folder

Get one Zoho Mail folder by ID.

Read read
Parameters
accountId, folderId
Generic call
kosmo integrations:call zoho-mail.zohomail_get_folder '{"accountId":"example_accountId","folderId":"example_folderId"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_get_folder '{"accountId":"example_accountId","folderId":"example_folderId"}' --json

zoho-mail.zohomail_create_folder

Create a Zoho Mail folder.

Write write
Parameters
accountId, payload
Generic call
kosmo integrations:call zoho-mail.zohomail_create_folder '{"accountId":"example_accountId","payload":"example_payload"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_create_folder '{"accountId":"example_accountId","payload":"example_payload"}' --json

zoho-mail.zohomail_update_folder

Update, rename, move, empty, or toggle IMAP for a Zoho Mail folder.

Write write
Parameters
accountId, folderId, payload
Generic call
kosmo integrations:call zoho-mail.zohomail_update_folder '{"accountId":"example_accountId","folderId":"example_folderId","payload":"example_payload"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_update_folder '{"accountId":"example_accountId","folderId":"example_folderId","payload":"example_payload"}' --json

zoho-mail.zohomail_delete_folder

Delete a Zoho Mail folder by ID.

Write write
Parameters
accountId, folderId
Generic call
kosmo integrations:call zoho-mail.zohomail_delete_folder '{"accountId":"example_accountId","folderId":"example_folderId"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_delete_folder '{"accountId":"example_accountId","folderId":"example_folderId"}' --json

zoho-mail.zohomail_list_labels

List labels for a Zoho Mail account.

Read read
Parameters
accountId
Generic call
kosmo integrations:call zoho-mail.zohomail_list_labels '{"accountId":"example_accountId"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_list_labels '{"accountId":"example_accountId"}' --json

zoho-mail.zohomail_get_label

Get a Zoho Mail label by ID.

Read read
Parameters
accountId, labelId
Generic call
kosmo integrations:call zoho-mail.zohomail_get_label '{"accountId":"example_accountId","labelId":"example_labelId"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_get_label '{"accountId":"example_accountId","labelId":"example_labelId"}' --json

zoho-mail.zohomail_create_label

Create a Zoho Mail label.

Write write
Parameters
accountId, payload
Generic call
kosmo integrations:call zoho-mail.zohomail_create_label '{"accountId":"example_accountId","payload":"example_payload"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_create_label '{"accountId":"example_accountId","payload":"example_payload"}' --json

zoho-mail.zohomail_update_label

Update a Zoho Mail label.

Write write
Parameters
accountId, labelId, payload
Generic call
kosmo integrations:call zoho-mail.zohomail_update_label '{"accountId":"example_accountId","labelId":"example_labelId","payload":"example_payload"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_update_label '{"accountId":"example_accountId","labelId":"example_labelId","payload":"example_payload"}' --json

zoho-mail.zohomail_delete_label

Delete a Zoho Mail label.

Write write
Parameters
accountId, labelId
Generic call
kosmo integrations:call zoho-mail.zohomail_delete_label '{"accountId":"example_accountId","labelId":"example_labelId"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_delete_label '{"accountId":"example_accountId","labelId":"example_labelId"}' --json

zoho-mail.zohomail_list_tasks

List tasks from Zoho Mail. Returns task details including title, status, due date, and priority.

Read read
Parameters
accountId, start, limit
Generic call
kosmo integrations:call zoho-mail.zohomail_list_tasks '{"accountId":"example_accountId","start":1,"limit":1}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_list_tasks '{"accountId":"example_accountId","start":1,"limit":1}' --json

zoho-mail.zohomail_api_get

Call a safe relative Zoho Mail API path with GET.

Read read
Parameters
path, params
Generic call
kosmo integrations:call zoho-mail.zohomail_api_get '{"path":"example_path","params":"example_params"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_api_get '{"path":"example_path","params":"example_params"}' --json

zoho-mail.zohomail_api_post

Call a safe relative Zoho Mail API path with POST.

Write write
Parameters
path, payload, params
Generic call
kosmo integrations:call zoho-mail.zohomail_api_post '{"path":"example_path","payload":"example_payload","params":"example_params"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_api_post '{"path":"example_path","payload":"example_payload","params":"example_params"}' --json

zoho-mail.zohomail_api_put

Call a safe relative Zoho Mail API path with PUT.

Write write
Parameters
path, payload, params
Generic call
kosmo integrations:call zoho-mail.zohomail_api_put '{"path":"example_path","payload":"example_payload","params":"example_params"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_api_put '{"path":"example_path","payload":"example_payload","params":"example_params"}' --json

zoho-mail.zohomail_api_delete

Call a safe relative Zoho Mail API path with DELETE.

Write write
Parameters
path, params
Generic call
kosmo integrations:call zoho-mail.zohomail_api_delete '{"path":"example_path","params":"example_params"}' --json
Shortcut
kosmo integrations:zoho-mail zohomail_api_delete '{"path":"example_path","params":"example_params"}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

zoho-mail.zohomail_get_current_user 0 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_get_current_user --json
ParameterTypeRequiredDescription
No parameters.
zoho-mail.zohomail_get_account 1 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_get_account --json
ParameterTypeRequiredDescription
accountId string yes Zoho Mail account ID.
zoho-mail.zohomail_list_messages 5 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_list_messages --json
ParameterTypeRequiredDescription
accountId string yes The Zoho Mail account ID.
folderId string no Folder ID to list messages from (default: Inbox).
start integer no Offset for pagination (default: 0).
limit integer no Maximum number of messages to return (default: 20, max: 100).
searchKey string no Search query to filter messages.
zoho-mail.zohomail_search_messages 2 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_search_messages --json
ParameterTypeRequiredDescription
accountId string yes Zoho Mail account ID.
params object no Zoho Mail message search query parameters.
zoho-mail.zohomail_get_message 4 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_get_message --json
ParameterTypeRequiredDescription
accountId string yes The Zoho Mail account ID.
folderId string yes The folder ID containing the message.
messageId string yes The message ID to retrieve.
includeBlockContent boolean no Whether to include quoted block content.
zoho-mail.zohomail_get_message_details 0 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_get_message_details --json
ParameterTypeRequiredDescription
No parameters.
zoho-mail.zohomail_get_message_headers 3 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_get_message_headers --json
ParameterTypeRequiredDescription
accountId string yes Zoho Mail account ID.
folderId string yes Folder ID.
messageId string yes Message ID.
zoho-mail.zohomail_get_original_message 2 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_get_original_message --json
ParameterTypeRequiredDescription
accountId string yes Zoho Mail account ID.
messageId string yes Message ID.
zoho-mail.zohomail_get_attachment_info 3 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_get_attachment_info --json
ParameterTypeRequiredDescription
accountId string yes Zoho Mail account ID.
folderId string yes Folder ID.
messageId string yes Message ID.
zoho-mail.zohomail_get_attachment_content 4 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_get_attachment_content --json
ParameterTypeRequiredDescription
accountId string yes Zoho Mail account ID.
folderId string yes Folder ID.
messageId string yes Message ID.
attachmentId string yes Attachment ID.
zoho-mail.zohomail_send_message 8 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_send_message --json
ParameterTypeRequiredDescription
accountId string yes The Zoho Mail account ID to send from.
toAddress string yes Recipient email address(es), comma-separated.
subject string yes Email subject line.
content string yes Email body content (HTML or plain text).
ccAddress string no CC recipients, comma-separated.
bccAddress string no BCC recipients, comma-separated.
inReplyTo string no Message ID to reply to (for threading).
mailFormat string no Format of the content: "html" or "plaintext" (default: "html").
zoho-mail.zohomail_reply_message 3 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_reply_message --json
ParameterTypeRequiredDescription
accountId string yes Zoho Mail account ID.
messageId string yes Message ID to reply to.
payload object yes Reply payload accepted by Zoho Mail.
zoho-mail.zohomail_update_messages 2 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_update_messages --json
ParameterTypeRequiredDescription
accountId string yes Zoho Mail account ID.
payload object yes Update payload including mode and messageId or threadId arrays.
zoho-mail.zohomail_delete_message 3 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_delete_message --json
ParameterTypeRequiredDescription
accountId string yes Zoho Mail account ID.
folderId string yes Folder ID.
messageId string yes Message ID.
zoho-mail.zohomail_list_folders 1 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_list_folders --json
ParameterTypeRequiredDescription
accountId string yes The Zoho Mail account ID.
zoho-mail.zohomail_get_folder 2 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_get_folder --json
ParameterTypeRequiredDescription
accountId string yes Account ID.
folderId string yes Folder ID.
zoho-mail.zohomail_create_folder 2 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_create_folder --json
ParameterTypeRequiredDescription
accountId string yes Account ID.
payload object yes Folder creation payload.
zoho-mail.zohomail_update_folder 3 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_update_folder --json
ParameterTypeRequiredDescription
accountId string yes Account ID.
folderId string yes Folder ID.
payload object yes Folder update payload.
zoho-mail.zohomail_delete_folder 2 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_delete_folder --json
ParameterTypeRequiredDescription
accountId string yes Account ID.
folderId string yes Folder ID.
zoho-mail.zohomail_list_labels 1 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_list_labels --json
ParameterTypeRequiredDescription
accountId string yes Zoho Mail account ID.
zoho-mail.zohomail_get_label 2 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_get_label --json
ParameterTypeRequiredDescription
accountId string yes Account ID.
labelId string yes Label ID.
zoho-mail.zohomail_create_label 2 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_create_label --json
ParameterTypeRequiredDescription
accountId string yes Account ID.
payload object yes Label creation payload.
zoho-mail.zohomail_update_label 3 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_update_label --json
ParameterTypeRequiredDescription
accountId string yes Account ID.
labelId string yes Label ID.
payload object yes Label update payload.
zoho-mail.zohomail_delete_label 2 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_delete_label --json
ParameterTypeRequiredDescription
accountId string yes Account ID.
labelId string yes Label ID.
zoho-mail.zohomail_list_tasks 3 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_list_tasks --json
ParameterTypeRequiredDescription
accountId string yes The Zoho Mail account ID.
start integer no Offset for pagination (default: 0).
limit integer no Maximum number of tasks to return (default: 20).
zoho-mail.zohomail_api_get 2 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_api_get --json
ParameterTypeRequiredDescription
path string yes Relative API path.
params object no Query parameters.
zoho-mail.zohomail_api_post 3 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_api_post --json
ParameterTypeRequiredDescription
path string yes Relative API path.
payload object no JSON request body.
params object no Query parameters.
zoho-mail.zohomail_api_put 3 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_api_put --json
ParameterTypeRequiredDescription
path string yes Relative API path.
payload object no JSON request body.
params object no Query parameters.
zoho-mail.zohomail_api_delete 2 parameters
Schema command
kosmo integrations:schema zoho-mail.zohomail_api_delete --json
ParameterTypeRequiredDescription
path string yes Relative API path.
params object no Query parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.