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 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.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
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.
kosmo integrations:call zoho-mail.zohomail_get_current_user '{}' --json 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.
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 - Parameters
- none
kosmo integrations:call zoho-mail.zohomail_get_current_user '{}' --json kosmo integrations:zoho-mail zohomail_get_current_user '{}' --json zoho-mail.zohomail_get_account
Get details for a specific Zoho Mail account.
read - Parameters
- accountId
kosmo integrations:call zoho-mail.zohomail_get_account '{"accountId":"example_accountId"}' --json 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 - Parameters
- accountId, folderId, start, limit, searchKey
kosmo integrations:call zoho-mail.zohomail_list_messages '{"accountId":"example_accountId","folderId":"example_folderId","start":1,"limit":1,"searchKey":"example_searchKey"}' --json 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 - Parameters
- accountId, params
kosmo integrations:call zoho-mail.zohomail_search_messages '{"accountId":"example_accountId","params":"example_params"}' --json 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 - Parameters
- accountId, folderId, messageId, includeBlockContent
kosmo integrations:call zoho-mail.zohomail_get_message '{"accountId":"example_accountId","folderId":"example_folderId","messageId":"example_messageId","includeBlockContent":true}' --json 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 - Parameters
- none
kosmo integrations:call zoho-mail.zohomail_get_message_details '{}' --json kosmo integrations:zoho-mail zohomail_get_message_details '{}' --json zoho-mail.zohomail_get_message_headers
Get email headers for a Zoho Mail message.
read - Parameters
- accountId, folderId, messageId
kosmo integrations:call zoho-mail.zohomail_get_message_headers '{"accountId":"example_accountId","folderId":"example_folderId","messageId":"example_messageId"}' --json 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 - Parameters
- accountId, messageId
kosmo integrations:call zoho-mail.zohomail_get_original_message '{"accountId":"example_accountId","messageId":"example_messageId"}' --json 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 - Parameters
- accountId, folderId, messageId
kosmo integrations:call zoho-mail.zohomail_get_attachment_info '{"accountId":"example_accountId","folderId":"example_folderId","messageId":"example_messageId"}' --json 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 - Parameters
- accountId, folderId, messageId, attachmentId
kosmo integrations:call zoho-mail.zohomail_get_attachment_content '{"accountId":"example_accountId","folderId":"example_folderId","messageId":"example_messageId","attachmentId":"example_attachmentId"}' --json 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 - Parameters
- accountId, toAddress, subject, content, ccAddress, bccAddress, inReplyTo, mailFormat
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 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 - Parameters
- accountId, messageId, payload
kosmo integrations:call zoho-mail.zohomail_reply_message '{"accountId":"example_accountId","messageId":"example_messageId","payload":"example_payload"}' --json 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 - Parameters
- accountId, payload
kosmo integrations:call zoho-mail.zohomail_update_messages '{"accountId":"example_accountId","payload":"example_payload"}' --json 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 - Parameters
- accountId, folderId, messageId
kosmo integrations:call zoho-mail.zohomail_delete_message '{"accountId":"example_accountId","folderId":"example_folderId","messageId":"example_messageId"}' --json 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 - Parameters
- accountId
kosmo integrations:call zoho-mail.zohomail_list_folders '{"accountId":"example_accountId"}' --json kosmo integrations:zoho-mail zohomail_list_folders '{"accountId":"example_accountId"}' --json zoho-mail.zohomail_get_folder
Get one Zoho Mail folder by ID.
read - Parameters
- accountId, folderId
kosmo integrations:call zoho-mail.zohomail_get_folder '{"accountId":"example_accountId","folderId":"example_folderId"}' --json 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 - Parameters
- accountId, payload
kosmo integrations:call zoho-mail.zohomail_create_folder '{"accountId":"example_accountId","payload":"example_payload"}' --json 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 - Parameters
- accountId, folderId, payload
kosmo integrations:call zoho-mail.zohomail_update_folder '{"accountId":"example_accountId","folderId":"example_folderId","payload":"example_payload"}' --json 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 - Parameters
- accountId, folderId
kosmo integrations:call zoho-mail.zohomail_delete_folder '{"accountId":"example_accountId","folderId":"example_folderId"}' --json 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 - Parameters
- accountId
kosmo integrations:call zoho-mail.zohomail_list_labels '{"accountId":"example_accountId"}' --json kosmo integrations:zoho-mail zohomail_list_labels '{"accountId":"example_accountId"}' --json zoho-mail.zohomail_get_label
Get a Zoho Mail label by ID.
read - Parameters
- accountId, labelId
kosmo integrations:call zoho-mail.zohomail_get_label '{"accountId":"example_accountId","labelId":"example_labelId"}' --json 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 - Parameters
- accountId, payload
kosmo integrations:call zoho-mail.zohomail_create_label '{"accountId":"example_accountId","payload":"example_payload"}' --json 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 - Parameters
- accountId, labelId, payload
kosmo integrations:call zoho-mail.zohomail_update_label '{"accountId":"example_accountId","labelId":"example_labelId","payload":"example_payload"}' --json 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 - Parameters
- accountId, labelId
kosmo integrations:call zoho-mail.zohomail_delete_label '{"accountId":"example_accountId","labelId":"example_labelId"}' --json 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 - Parameters
- accountId, start, limit
kosmo integrations:call zoho-mail.zohomail_list_tasks '{"accountId":"example_accountId","start":1,"limit":1}' --json 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 - Parameters
- path, params
kosmo integrations:call zoho-mail.zohomail_api_get '{"path":"example_path","params":"example_params"}' --json 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 - Parameters
- path, payload, params
kosmo integrations:call zoho-mail.zohomail_api_post '{"path":"example_path","payload":"example_payload","params":"example_params"}' --json 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 - Parameters
- path, payload, params
kosmo integrations:call zoho-mail.zohomail_api_put '{"path":"example_path","payload":"example_payload","params":"example_params"}' --json 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 - Parameters
- path, params
kosmo integrations:call zoho-mail.zohomail_api_delete '{"path":"example_path","params":"example_params"}' --json 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
kosmo integrations:schema zoho-mail.zohomail_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
zoho-mail.zohomail_get_account 1 parameters
kosmo integrations:schema zoho-mail.zohomail_get_account --json | Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | yes | Zoho Mail account ID. |
zoho-mail.zohomail_list_messages 5 parameters
kosmo integrations:schema zoho-mail.zohomail_list_messages --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema zoho-mail.zohomail_search_messages --json | Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | yes | Zoho Mail account ID. |
params | object | no | Zoho Mail message search query parameters. |
zoho-mail.zohomail_get_message 4 parameters
kosmo integrations:schema zoho-mail.zohomail_get_message --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema zoho-mail.zohomail_get_message_details --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
zoho-mail.zohomail_get_message_headers 3 parameters
kosmo integrations:schema zoho-mail.zohomail_get_message_headers --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema zoho-mail.zohomail_get_original_message --json | Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | yes | Zoho Mail account ID. |
messageId | string | yes | Message ID. |
zoho-mail.zohomail_get_attachment_info 3 parameters
kosmo integrations:schema zoho-mail.zohomail_get_attachment_info --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema zoho-mail.zohomail_get_attachment_content --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema zoho-mail.zohomail_send_message --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema zoho-mail.zohomail_reply_message --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema zoho-mail.zohomail_update_messages --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema zoho-mail.zohomail_delete_message --json | Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | yes | Zoho Mail account ID. |
folderId | string | yes | Folder ID. |
messageId | string | yes | Message ID. |
zoho-mail.zohomail_list_folders 1 parameters
kosmo integrations:schema zoho-mail.zohomail_list_folders --json | Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | yes | The Zoho Mail account ID. |
zoho-mail.zohomail_get_folder 2 parameters
kosmo integrations:schema zoho-mail.zohomail_get_folder --json | Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | yes | Account ID. |
folderId | string | yes | Folder ID. |
zoho-mail.zohomail_create_folder 2 parameters
kosmo integrations:schema zoho-mail.zohomail_create_folder --json | Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | yes | Account ID. |
payload | object | yes | Folder creation payload. |
zoho-mail.zohomail_update_folder 3 parameters
kosmo integrations:schema zoho-mail.zohomail_update_folder --json | Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | yes | Account ID. |
folderId | string | yes | Folder ID. |
payload | object | yes | Folder update payload. |
zoho-mail.zohomail_delete_folder 2 parameters
kosmo integrations:schema zoho-mail.zohomail_delete_folder --json | Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | yes | Account ID. |
folderId | string | yes | Folder ID. |
zoho-mail.zohomail_list_labels 1 parameters
kosmo integrations:schema zoho-mail.zohomail_list_labels --json | Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | yes | Zoho Mail account ID. |
zoho-mail.zohomail_get_label 2 parameters
kosmo integrations:schema zoho-mail.zohomail_get_label --json | Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | yes | Account ID. |
labelId | string | yes | Label ID. |
zoho-mail.zohomail_create_label 2 parameters
kosmo integrations:schema zoho-mail.zohomail_create_label --json | Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | yes | Account ID. |
payload | object | yes | Label creation payload. |
zoho-mail.zohomail_update_label 3 parameters
kosmo integrations:schema zoho-mail.zohomail_update_label --json | Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | yes | Account ID. |
labelId | string | yes | Label ID. |
payload | object | yes | Label update payload. |
zoho-mail.zohomail_delete_label 2 parameters
kosmo integrations:schema zoho-mail.zohomail_delete_label --json | Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | yes | Account ID. |
labelId | string | yes | Label ID. |
zoho-mail.zohomail_list_tasks 3 parameters
kosmo integrations:schema zoho-mail.zohomail_list_tasks --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema zoho-mail.zohomail_api_get --json | Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Relative API path. |
params | object | no | Query parameters. |
zoho-mail.zohomail_api_post 3 parameters
kosmo integrations:schema zoho-mail.zohomail_api_post --json | Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Relative API path. |
payload | object | no | JSON request body. |
params | object | no | Query parameters. |
zoho-mail.zohomail_api_put 3 parameters
kosmo integrations:schema zoho-mail.zohomail_api_put --json | Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Relative API path. |
payload | object | no | JSON request body. |
params | object | no | Query parameters. |
zoho-mail.zohomail_api_delete 2 parameters
kosmo integrations:schema zoho-mail.zohomail_api_delete --json | Parameter | Type | Required | Description |
|---|---|---|---|
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.