{ "openapi": "3.1.0", "info": { "description": "This is a Zoho Mail API OpenAPI 3.0 specification", "title": "Zoho Mail API", "version": "1.0.0" }, "tags": [ { "name": "message", "description": "The Message APIs help you to retrieve messages from the user account and access them.", "externalDocs": { "description": "Find out more", "url": "https://www.zoho.com/mail/help/api/email-api.html" } } ], "paths": { "/api/accounts/{accountId}/messages/view": { "get": { "tags": [ "message" ], "x-mcp-group": [ "Message" ], "summary": "Retrieves emails", "description": "The API retrieves a list of all the emails in a specific folder or a list of emails based on predefined conditions like status/flags/labels, and more.", "operationId": "listEmails", "parameters": [ { "name": "accountId", "in": "path", "required": true, "description": "This key is used to identify the account from which the folders have to be fetched. It is generated during account addition.", "schema": { "type": "string" } }, { "name": "folderId", "in": "query", "description": "The unique identifier for the folder from which the emails need to be retrieved. This can be fetched using the Get all folders API.", "schema": { "type": "string" } }, { "name": "start", "in": "query", "description": "The starting sequence number of the emails to be retrieved.", "schema": { "type": "integer", "format": "int32", "default": 1 } }, { "name": "limit", "in": "query", "description": "The number of emails to be retrieved from the start value mentioned. Allowed values:- Min. value:- 1 and max. value:- 200.", "schema": { "type": "integer", "format": "int32", "default": 10, "minimum": 1, "maximum": 200 } }, { "name": "status", "in": "query", "description": "Retrieve emails by read or unread status.", "schema": { "type": "string", "enum": [ "read", "unread", "all" ], "default": "all" } }, { "name": "flagid", "in": "query", "schema": { "type": "integer", "format": "int32" }, "description": "Possible values: 0 - flag_not_set 1 - info 2 - important 3 - followup" }, { "name": "labelid", "in": "query", "description": "The unique identifier for the label used to retrieve emails based on a specific label.", "schema": { "type": "string" } }, { "name": "threadId", "in": "query", "description": "The unique identifier for the flag used to retrieve emails of the given threadId.", "schema": { "type": "string" } }, { "name": "sortBy", "in": "query", "description": "The basis on which the sorting of the list of emails should be done.", "schema": { "type": "string", "enum": [ "date", "messageId", "size" ], "default": "date" } }, { "name": "sortorder", "in": "query", "description": "The order in which the sorting of the list of emails should be done.", "schema": { "type": "boolean", "description": "true for ascending order, false for descending order", "default": false } }, { "name": "includeto", "in": "query", "description": "Whether to details need to be included or not on the list of emails retrieved.", "schema": { "type": "boolean", "description": "true to include to details, false to not include to details.", "default": false } }, { "name": "includesent", "in": "query", "description": "Whether sent emails need to be included or not on the list of emails retrieved.", "schema": { "type": "boolean", "description": "true to include sent emails, false to not include sent emails.", "default": false } }, { "name": "includearchive", "in": "query", "description": "Whether archived emails need to be included or not on the list of emails retrieved.", "schema": { "type": "boolean", "description": "true to include archived emails, false to not include archived emails.", "default": false } }, { "name": "attachedMails", "in": "query", "description": "Retrieve only the emails with attachments.", "schema": { "type": "boolean", "description": "true to retrieve the emails with attachments, false to retrieve all emails.", "default": false } }, { "name": "inlinedMails", "in": "query", "description": "Retrieve only the emails with inline images.", "schema": { "type": "boolean", "description": "true to retrieve the emails with inline images, false to retrieve all emails.", "default": false } }, { "name": "flaggedMails", "in": "query", "description": "Retrieve only flagged emails.", "schema": { "type": "boolean", "description": "true to retrieve flagged emails, false to retrieve all emails.", "default": false } }, { "name": "respondedMails", "in": "query", "description": "Retrieve only emails with replies.", "schema": { "type": "boolean", "description": "true to retrieve emails with replies, false to retrieve all emails.", "default": false } }, { "name": "threadedMails", "in": "query", "description": "Retrieve emails that are a part of conversations.", "schema": { "type": "boolean", "description": "true to retrieve threaded emails, false to retrieve all emails.", "default": false } }, { "name": "fields", "in": "query", "required": true, "description": "Comma-separated list of fields to include in the response. Allowed values: summary,sentDateInGMT,calendarType,subject,messageId,threadCount,flagid,status2,priority,hasInline,toAddress,folderId,ccAddress,threadId,hasAttachment,size,sender,receivedTime,fromAddress,status. Default: fields=subject,messageId,folderId,fromAddress,toAddress,receivedTime", "schema": { "type": "string", "default": "subject,messageId,folderId,fromAddress,toAddress,receivedTime" } } ], "responses": { "200": { "description": "Fetched emails successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmailsResponse" } } } }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.READ" ] } ] } }, "/api/accounts/{accountId}/messages/search": { "get": { "description": "Retrieve emails based on Zoho Mail search syntax and parameters.", "x-system-description": "Use the searchKey format {field}:{value}. Combine conditions using :: for AND and :or: for OR.\n\nExamples:\nAND search: subject:\"Project\"::fileContent:summary\nComplex search: subject:\"Q1 Results\"::fileContent:summary::has:attachment\nOR search: sender:abc@domain.com:or:to:def@domain.com\nSearch by attachment content: fileContent:budget\nSearch by attachment name: fileName:invoice.pdf\nSearch by cc: cc:test@zohomail.com\nSearch by content: content:testing\nSearch by recipient or to: to:def@domain.com\nSearch by sender or from: sender:abc@domain.com\nSearch by subject: subject:\"Project Update\"\nSearch conversation mails: has:convo\nSearch entire mail: entire:hello\nSearch fromDate: fromDate:DD-MMM-YYYY\nSearch groupResults: groupResult:true\nSearch in folder: in:folderid\nSearch ToDate: toDate:DD-MMM-YYYY\nSearch with attachment: has:attachment\nSearch with flags: has:flags\nSearch with includeSpamTrash: inclspamtrash:true\nSearch with labels: label:labelid", "operationId": "SearchEmails", "parameters": [ { "description": "The account identifier from which emails will be fetched.", "in": "path", "name": "accountId", "required": true, "schema": { "type": "string" } }, { "description": "Search input must follow the format {field}:{value}. Supported fields: entire, content, subject, sender, to, cc, fileName, fileContent, has, in, label, fromDate, toDate, inclspamtrash, groupResult. Examples: entire:hello (search full email), subject:projects, content:testing, sender:abc@domain.com, to:def@domain.com, cc:abc, fileName:invoice.pdf, fileContent:budget, has:attachment, has:flags, has:convo, in:folderid, label:labelid, fromDate:01-JAN-2024, toDate:31-JAN-2024, inclspamtrash:true, groupResult:true. Combine conditions using :: for AND and :or: for OR. Example: subject:projects::sender:abc@domain.com. All inputs must follow this format for correct parsing.", "in": "query", "name": "searchKey", "required": true, "schema": { "type": "string" } }, { "description": "Specifies the start index (1-based) for fetching emails.", "in": "query", "name": "start", "schema": { "default": 1, "minimum": 1, "type": "integer" } }, { "description": "Limits the number of emails fetched during search.", "in": "query", "name": "limit", "schema": { "default": 25, "maximum": 200, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmailsResponse" } } }, "description": "Fetched emails successfully" }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.READ" ] } ], "summary": "Search mails", "tags": [ "search" ], "x-mcp-group": [ "Search" ] } }, "/api/accounts/{accountId}/folders/{folderId}/messages/{messageId}/header": { "get": { "tags": [ "message" ], "x-mcp-group": [ "Message" ], "summary": "retrieves message headers", "description": "The API retrieves the internet message headers of a particular email, based on the message ID passed as the request parameter.", "operationId": "getMessageHeader", "parameters": [ { "name": "accountId", "in": "path", "required": true, "description": "This key is used to identify the account from which the folders have to be fetched. It is generated during account addition.", "schema": { "type": "string" } }, { "name": "folderId", "in": "path", "required": true, "description": "This key is used to identify the folder to be used.", "schema": { "type": "string" } }, { "name": "messageId", "in": "path", "required": true, "description": "This key is used to identify the message to be used.", "schema": { "type": "string" } }, { "name": "raw", "in": "query", "description": "This parameter is used to specify the response format of message headers.", "schema": { "type": "boolean", "description": "This parameter is used to specify the response format of message headers.", "default": true } } ], "responses": { "200": { "description": "Fetched email header successfully", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/EmailHeaderResponse" }, { "$ref": "#/components/schemas/EmailHeaderRawResponse" } ] } } } }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.READ" ] } ] } }, "/api/accounts/{accountId}/folders/{folderId}/messages/{messageId}/content": { "get": { "tags": [ "message" ], "x-mcp-group": [ "Message" ], "summary": "retrieves the content of email", "description": "This API is used to retrieve the message contents of an email based on the message ID passed in the request URL. In case, you retrieve an email from a thread, you can add the includeBlockContent parameter to get the reply email and the parent email separately. If block content is available but the includeBlockContent parameter is not passed, then the original email content can only be retrieved.", "operationId": "getMessageContent", "parameters": [ { "name": "accountId", "in": "path", "required": true, "description": "This key is used to identify the account from which the folders have to be fetched. It is generated during account addition.", "schema": { "type": "string" } }, { "name": "folderId", "in": "path", "required": true, "description": "This key is used to identify the folder to be used.", "schema": { "type": "string" } }, { "name": "messageId", "in": "path", "required": true, "description": "This key is used to identify the message to be used.", "schema": { "type": "string" } }, { "name": "includeBlockContent", "in": "query", "description": "This parameter specifies whether to include the block quote content in an email along with the email content.", "schema": { "type": "boolean", "description": "This parameter specifies whether to include the block quote content in an email along with the email content.", "default": false } } ], "responses": { "200": { "description": "Fetched email content successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmailContentResponse" } } } }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.READ" ] } ] } }, "/api/accounts/{accountId}/messages/{messageId}/originalmessage": { "get": { "tags": [ "message" ], "x-mcp-group": [ "Message" ], "summary": "retrieves the original content of email", "description": "This API retrieves the MIME representation of an email message.", "operationId": "getOriginalMessage", "parameters": [ { "name": "accountId", "in": "path", "required": true, "description": "This key is used to identify the account from which the folders have to be fetched. It is generated during account addition.", "schema": { "type": "string" } }, { "name": "messageId", "in": "path", "required": true, "description": "This key is used to identify the message to be used.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Fetched email original content successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmailContentResponse" } } } }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.READ" ] } ] } }, "/api/accounts/{accountId}/folders/{folderId}/messages/{messageId}/details": { "get": { "tags": [ "message" ], "x-mcp-group": [ "Message" ], "summary": "retrieves the message details", "description": "The API retrieves the metadata information of an email based on the message ID passed in the request URL.", "operationId": "getMessageDetails", "parameters": [ { "name": "accountId", "in": "path", "required": true, "description": "This key is used to identify the account from which the folders have to be fetched. It is generated during account addition.", "schema": { "type": "string" } }, { "name": "folderId", "in": "path", "required": true, "description": "This key is used to identify the folder to be used.", "schema": { "type": "string" } }, { "name": "messageId", "in": "path", "required": true, "description": "This key is used to identify the message to be used.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Fetched email details successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmailResponse" } } } }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.READ" ] } ] } }, "/api/accounts/{accountId}/folders/{folderId}/messages/{messageId}/attachmentinfo": { "get": { "tags": [ "message" ], "x-mcp-group": [ "Message" ], "summary": "retrieves the message attachment details", "description": "The API retrieves the attachment information of a particular email, based on the message ID passed in the request URL.", "operationId": "getMessageAttachmentInfo", "parameters": [ { "name": "accountId", "in": "path", "required": true, "description": "This key is used to identify the account from which the folders have to be fetched. It is generated during account addition.", "schema": { "type": "string" } }, { "name": "folderId", "in": "path", "required": true, "description": "This key is used to identify the folder to be used.", "schema": { "type": "string" } }, { "name": "messageId", "in": "path", "required": true, "description": "This key is used to identify the message to be used.", "schema": { "type": "string" } }, { "name": "includeInline", "in": "query", "description": "This parameter specifies whether to include inline information in the response.", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Fetched email attachment details successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AttachmentInfoResponse" } } } }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.READ" ] } ] } }, "/api/accounts/{accountIdToUnread}/updatemessage": { "put": { "tags": [ "message" ], "x-mcp-group": [ "Message" ], "summary": "Unread messages", "description": "This API is used to mark single or multiple emails as unread", "operationId": "unreadMessage", "parameters": [ { "name": "accountIdToUnread", "in": "path", "required": true, "description": "This key is used to identify the account from which the folders have to be fetched. It is generated during account addition.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageUnreadPayload" } } } }, "responses": { "200": { "description": "Updated message successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.UPDATE" ] } ] } }, "/api/accounts/{accountIdToRead}/updatemessage": { "put": { "tags": [ "message" ], "x-mcp-group": [ "Message" ], "summary": "Read messages", "description": "This API is used to mark single or multiple emails as read.", "operationId": "readMessages", "parameters": [ { "name": "accountIdToRead", "in": "path", "required": true, "description": "This key is used to identify the account from which the folders have to be fetched. It is generated during account addition.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageReadPayload" } } } }, "responses": { "200": { "description": "Updated message successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.UPDATE" ] } ] } }, "/api/accounts/{accountIdToMove}/updatemessage": { "put": { "tags": [ "message" ], "x-mcp-group": [ "Message" ], "summary": "Move messages", "description": "This API is used to move a particular email or a group of emails from the existing folder to a new folder.", "operationId": "moveMessages", "parameters": [ { "name": "accountIdToMove", "in": "path", "required": true, "description": "This key is used to identify the account from which the folders have to be fetched. It is generated during account addition.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageMovePayload" } } } }, "responses": { "200": { "description": "Updated message successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.UPDATE" ] } ] } }, "/api/accounts/{accountIdToFlag}/updatemessage": { "put": { "tags": [ "message" ], "x-mcp-group": [ "Message" ], "summary": "Flag messages", "description": "This API is used to set one of the four flags (info, important, follow-up, flag_not_set) for a particular email or a group of emails.", "operationId": "flagMessages", "parameters": [ { "name": "accountIdToFlag", "in": "path", "required": true, "description": "This key is used to identify the account from which the folders have to be fetched. It is generated during account addition.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageFlagPayload" } } } }, "responses": { "200": { "description": "Updated message successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.UPDATE" ] } ] } }, "/api/accounts/{accountIdToApplyLabel}/updatemessage": { "put": { "tags": [ "message" ], "x-mcp-group": [ "Message" ], "summary": "Apply label to messages", "description": "This API is used to apply labels to a particular email or a group of emails. ", "operationId": "applyLabelToMessages", "parameters": [ { "name": "accountIdToApplyLabel", "in": "path", "required": true, "description": "This key is used to identify the account from which the folders have to be fetched. It is generated during account addition.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageApplyLabelPayload" } } } }, "responses": { "200": { "description": "Updated message successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.UPDATE" ] } ] } }, "/api/accounts/{accountIdToRemoveLabel}/updatemessage": { "put": { "tags": [ "message" ], "x-mcp-group": [ "Message" ], "summary": "Remove label from messages", "description": "This API is used to remove a specific labels from a particular email or a group of emails.", "operationId": "removeLabelFromMessage", "parameters": [ { "name": "accountIdToRemoveLabel", "in": "path", "required": true, "description": "This key is used to identify the account from which the folders have to be fetched. It is generated during account addition.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageRemoveLabelPayload" } } } }, "responses": { "200": { "description": "Updated message successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.UPDATE" ] } ] } }, "/api/accounts/{accountIdToRemoveAllLabel}/updatemessage": { "put": { "tags": [ "message" ], "x-mcp-group": [ "Message" ], "summary": "Remove all label from messages", "description": "This API is used to remove all labels from a particular email or a group of emails. ", "operationId": "removeAllLabelFromMessage", "parameters": [ { "name": "accountIdToRemoveAllLabel", "in": "path", "required": true, "description": "This key is used to identify the account from which the folders have to be fetched. It is generated during account addition.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageRemoveAllLabelPayload" } } } }, "responses": { "200": { "description": "Updated message successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.UPDATE" ] } ] } }, "/api/accounts/{accountIdToArchive}/updatemessage": { "put": { "tags": [ "message" ], "x-mcp-group": [ "Message" ], "summary": "Archive messages", "description": "This API is used to archive an email or a group of emails.", "operationId": "archiveMessage", "parameters": [ { "name": "accountIdToArchive", "in": "path", "required": true, "description": "This key is used to identify the account from which the folders have to be fetched. It is generated during account addition.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageArchivePayload" } } } }, "responses": { "200": { "description": "Updated message successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.UPDATE" ] } ] } }, "/api/accounts/{accountIdToUnArchive}/updatemessage": { "put": { "tags": [ "message" ], "x-mcp-group": [ "Message" ], "summary": "UnArchive messages", "description": "This API is used to unarchive an email or a group of emails.", "operationId": "unArchiveMessage", "parameters": [ { "name": "accountIdToUnArchive", "in": "path", "required": true, "description": "This key is used to identify the account from which the folders have to be fetched. It is generated during account addition.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageUnArchivePayload" } } } }, "responses": { "200": { "description": "Updated message successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.UPDATE" ] } ] } }, "/api/accounts/{accountIdToSpam}/updatemessage": { "put": { "tags": [ "message" ], "x-mcp-group": [ "Message" ], "summary": "Spam messages", "description": "This API is used to mark a particular email or a group of emails as spam.", "operationId": "spamMessage", "parameters": [ { "name": "accountIdToSpam", "in": "path", "required": true, "description": "This key is used to identify the account from which the folders have to be fetched. It is generated during account addition.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageSpamPayload" } } } }, "responses": { "200": { "description": "Updated message successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.UPDATE" ] } ] } }, "/api/accounts/{accountIdToUnSpam}/updatemessage": { "put": { "tags": [ "message" ], "x-mcp-group": [ "Message" ], "summary": "UnSpam messages", "description": "This API is used to mark a particular email or a group of emails as not spam.", "operationId": "unSpamMessage", "parameters": [ { "name": "accountIdToUnSpam", "in": "path", "required": true, "description": "This key is used to identify the account from which the folders have to be fetched. It is generated during account addition.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageNotSpamPayload" } } } }, "responses": { "200": { "description": "Updated message successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.UPDATE" ] } ] } }, "/api/accounts/{accountId}/folders/{folderId}/messages/{messageId}": { "delete": { "tags": [ "message" ], "x-mcp-group": [ "Message" ], "summary": "Delete a email", "description": "This API is used to delete an email.", "operationId": "deleteEmail", "parameters": [ { "name": "accountId", "in": "path", "required": true, "description": "This key is used to identify the account from which the folders have to be fetched. It is generated during account addition.", "schema": { "type": "string" } }, { "name": "folderId", "in": "path", "required": true, "description": "This key is used to identify the folder to be used.", "schema": { "type": "string" } }, { "name": "messageId", "in": "path", "required": true, "description": "This key is used to identify the message to be used.", "schema": { "type": "string" } }, { "name": "expunge", "in": "query", "description": "This parameter specifies whether the email should be deleted permanently without moving it to the trash folder.", "schema": { "type": "boolean", "description": "This parameter specifies whether the email should be deleted permanently without moving it to the trash folder.", "default": false } } ], "responses": { "200": { "description": "Fetched email details successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageDeleteResponse" } } } }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.DELETE" ] } ] } }, "/api/accounts/{accountId}/messages": { "post": { "tags": [ "message" ], "x-mcp-group": [ "Message" ], "summary": "Send mail/ Save draft or template", "description": "This API is used to send an email.", "operationId": "sendEmail", "parameters": [ { "name": "accountId", "in": "path", "required": true, "description": "This key is used to identify the account from which the folders have to be fetched. It is generated during account addition.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendEmailRequest" } } } }, "responses": { "200": { "description": "Sent email successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.CREATE" ] } ] } }, "/api/accounts/{accountId}/messages/{messageId}": { "post": { "tags": [ "message" ], "x-mcp-group": [ "Message" ], "summary": "Send reply to email", "description": "This API is used to send a reply to a received email.", "operationId": "sendReplyEmail", "parameters": [ { "name": "accountId", "in": "path", "required": true, "description": "This key is used to identify the account from which the folders have to be fetched. It is generated during account addition.", "schema": { "type": "string" } }, { "name": "messageId", "in": "path", "required": true, "description": "This key is used to identify the message to be used.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendReplyEmailRequest" } } } }, "responses": { "200": { "description": "Replied email successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } }, "400": { "description": "Invalid input passed" }, "404": { "description": "Page not found" }, "500": { "description": "Internal Error" } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.READ" ] } ] } } }, "components": { "schemas": { "Status": { "type": "object", "properties": { "code": { "type": "integer", "examples": [ 200 ] }, "description": { "type": "string", "examples": [ "success" ] } } }, "NoDataResponse": { "type": "object", "properties": { "status": { "$ref": "#/components/schemas/Status" } } }, "EmailsResponse": { "type": "object", "properties": { "status": { "$ref": "#/components/schemas/Status" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Email" } } } }, "EmailHeaderResponse": { "type": "object", "properties": { "status": { "$ref": "#/components/schemas/Status" }, "data": { "$ref": "#/components/schemas/EmailHeaderDetails" } } }, "EmailHeaderRawResponse": { "type": "object", "properties": { "status": { "$ref": "#/components/schemas/Status" }, "data": { "type": "object", "properties": { "headerContent": { "type": "string" }, "messageId": { "type": "string" } } } } }, "EmailContentResponse": { "type": "object", "properties": { "status": { "$ref": "#/components/schemas/Status" }, "data": { "type": "object", "properties": { "messageId": { "type": "string" }, "content": { "type": "string" } } } } }, "EmailResponse": { "type": "object", "properties": { "status": { "$ref": "#/components/schemas/Status" }, "data": { "$ref": "#/components/schemas/Email" } } }, "AttachmentInfoResponse": { "type": "object", "properties": { "status": { "$ref": "#/components/schemas/Status" }, "data": { "type": "object", "properties": { "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/EmailAttachment" } }, "inline": { "type": "array", "items": { "$ref": "#/components/schemas/EmailAttachment" } }, "messageId": { "type": "string" } } } } }, "MessageDeleteResponse": { "type": "object", "properties": { "status": { "$ref": "#/components/schemas/Status" }, "data": { "type": "object", "properties": { "cId": { "type": "string" } } } } }, "AttachmentsResponse": { "type": "object", "properties": { "status": { "$ref": "#/components/schemas/Status" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Attachment" } } } }, "Email": { "type": "object", "properties": { "summary": { "type": "string", "description": "A brief summary of the email." }, "sentDateInGMT": { "type": "string", "description": "The sent date of the email in GMT, represented as a Unix timestamp in milliseconds." }, "calendarType": { "type": "integer", "description": "The type of calendar associated with the email." }, "subject": { "type": "string", "description": "The subject of the email." }, "messageId": { "type": "string", "description": "The unique identifier of the email message." }, "threadCount": { "type": "string", "description": "The number of emails in the thread." }, "flagid": { "type": "string", "description": "The flag identifier associated with the email (e.g., flag_not_set)." }, "status2": { "type": "string", "description": "An alternative status code for the email." }, "priority": { "type": "string", "description": "The priority of the email." }, "hasInline": { "type": "string", "description": "Indicates whether the email has inline content (true/false, represented as string)." }, "toAddress": { "type": "string", "description": "The recipient's email address, including display name." }, "folderId": { "type": "string", "description": "The unique identifier of the folder containing the email." }, "ccAddress": { "type": "string", "description": "The CC recipient's email address, or \"Not Provided\"." }, "threadId": { "type": "string", "description": "The unique identifier of the email thread." }, "hasAttachment": { "type": "string", "description": "Indicates whether the email has attachments (0 or 1, represented as string)." }, "size": { "type": "string", "description": "The size of the email." }, "sender": { "type": "string", "description": "The sender's display name." }, "receivedTime": { "type": "string", "description": "The received time of the email, represented as a Unix timestamp in milliseconds." }, "fromAddress": { "type": "string", "description": "The sender's email address." }, "status": { "type": "string", "description": "The status of the email (e.g., 1 for read, 0 for unread)." } } }, "EmailHeaderDetails": { "type": "object", "properties": { "headerContent": { "type": "object", "properties": { "Importance": { "type": "array", "items": { "type": "string" } }, "X-Mailer": { "type": "array", "items": { "type": "string" } }, "X-Zoho-Virus-Status": { "type": "array", "items": { "type": "string" } }, "Received": { "type": "array", "items": { "type": "string" } }, "User-Agent": { "type": "array", "items": { "type": "string" } }, "From": { "type": "array", "items": { "type": "string" } }, "To": { "type": "array", "items": { "type": "string" } }, "Message-Id": { "type": "array", "items": { "type": "string" } }, "Date": { "type": "array", "items": { "type": "string" } }, "Subject": { "type": "array", "items": { "type": "string" } }, "MIME-Version": { "type": "array", "items": { "type": "string" } }, "Content-Type": { "type": "array", "items": { "type": "string" } } } }, "messageId": { "type": "string" } } }, "EmailAttachment": { "type": "object", "properties": { "attachmentSize": { "type": "integer", "description": "Size of the attachment in bytes." }, "attachmentName": { "type": "string", "description": "Name of the attachment file." }, "attachmentId": { "type": "string", "description": "Unique identifier for the attachment." }, "cid": { "type": "string", "description": "Content Id" } } }, "MessageUpdateMode": { "type": "string", "enum": [ "markAsRead", "markAsUnread", "moveMessage", "setFlag", "applyLabel", "removeLabel", "removeAllLabels", "archiveMails", "unArchiveMails", "moveToSpam", "markNotSpam" ] }, "MessageFlag": { "type": "string", "enum": [ "info", "important", "followup", "flag_not_set" ] }, "SendEmailMode": { "type": "string", "enum": [ "draft", "template" ] }, "SendReplyEmailRequest": { "type": "object", "required": [ "fromAddress", "toAddress", "action" ], "properties": { "fromAddress": { "type": "string", "description": "Provide the sender's email address (associated to the authenticated account). Allowed values:- Valid email address corresponding to the authenticated account for the From field." }, "toAddress": { "type": "string", "description": "Provide the recipient's email address. Allowed values:- Valid recipient email address for the To field." }, "ccAddress": { "type": "string", "description": "Provide the recipient's email address for the Cc field. Allowed values:- Valid recipient email address for the Cc field." }, "bccAddress": { "type": "string", "description": "Provide the recipient's email address for the Bcc field. Allowed values:- Valid recipient email address for the Bcc field." }, "subject": { "type": "string", "description": "Provide the subject of the email." }, "content": { "type": "string", "description": "Provide the content of the email." }, "mailFormat": { "type": "string", "enum": [ "html", "plaintext" ], "description": "Specify the format in which the mail needs to be sent. The value can be html or plaintext. The default value is html.", "default": "html" }, "askReceipt": { "type": "string", "enum": [ "yes", "no" ], "description": "Specifies whether Read receipt from the recipient is requested or not. Allowed values:- yes - Requesting a read receipt. no - Not requesting a read receipt" }, "encoding": { "type": "string", "enum": [ "Big5", "EUC-JP", "EUC-KR", "GB2312", "ISO-2022-JP", "ISO-8859-1", "KOI8-R", "Shift_JIS", "US-ASCII", "UTF-8", "WINDOWS-1251", "X-WINDOWS-ISO2022JP" ], "description": "Specifies the encoding that is to be used in the email content. Allowed values:- Big5, EUC-JP, EUC-KR, GB2312, ISO-2022-JP, ISO-8859-1, KOI8-R, Shift_JIS, US-ASCII, UTF-8, WINDOWS-1251, X-WINDOWS-ISO2022JP. The default value is UTF-8.", "default": "UTF-8" }, "isSchedule": { "type": "boolean", "description": "Depending on whether the mail has to be scheduled or not, the value can be true - if the email should be scheduled. false - if the email should be sent immediately." }, "scheduleType": { "type": "integer", "enum": [ 1, 2, 3, 4, 5, 6 ], "description": "Specifies the type of scheduling. Allowed values:- 1 - Schedules email to be sent after one hour from the time of the request. 2 - Schedules email to be sent after two hours from the time of the request. 3 - Schedules email to be sent after four hours from the time of the request. 4 - Schedules email to be sent by the morning of the next day from the time of the request. 5 - Schedules email to be sent by the afternoon of the next day from the time of the request. 6 - Schedules email to be sent on the custom date and time of your choice." }, "timeZone": { "type": "string", "description": "Specify the timezone to schedule your email. This parameter is mandatory if scheduleType is set to value 6. For example:- GMT 5.30 (India Standard Time - Asia/Calcutta)." }, "scheduleTime": { "type": "string", "description": "Specify the date and time you want to schedule your email. This parameter is mandatory if scheduleType is set to value 6. Format:- MM/DD/YYYY HH:MM:SS. For example:- 09/15/2023 14:30:28" }, "attachments": { "description": "This paramters is array of attachmes info jsons.", "type": "array", "items": { "description": "This paramters is array of attachmes info jsons.", "type": "object", "properties": { "attachmentName": { "type": "string", "description": "Specifies the name of the attachment. This parameter can be fetched from Upload Attachments API." }, "attachmentPath": { "type": "string", "description": "Specifies the path in which the attachment is stored. This parameter can be fetched from Upload Attachments API." }, "storeName": { "type": "string", "description": "Specifies the name of the store where the attachment is saved. This parameter can be fetched from Upload Attachments API." } } } }, "mode": { "description": "Specifies whether the content should be saved as a draft or a template. Allowed values: draft, template", "$ref": "#/components/schemas/SendEmailMode" }, "action": { "type": "string", "description": "Specifies which action you would like to perform with the message. Allowed values: reply", "enum": [ "reply" ], "default": "reply" } } }, "SendEmailRequest": { "type": "object", "required": [ "fromAddress", "toAddress" ], "properties": { "fromAddress": { "type": "string", "description": "Provide the sender's email address (associated to the authenticated account). Allowed values:- Valid email address corresponding to the authenticated account for the From field." }, "toAddress": { "type": "string", "description": "Provide the recipient's email address. Allowed values:- Valid recipient email address for the To field." }, "ccAddress": { "type": "string", "description": "Provide the recipient's email address for the Cc field. Allowed values:- Valid recipient email address for the Cc field." }, "bccAddress": { "type": "string", "description": "Provide the recipient's email address for the Bcc field. Allowed values:- Valid recipient email address for the Bcc field." }, "subject": { "type": "string", "description": "Provide the subject of the email." }, "content": { "type": "string", "description": "Provide the content of the email." }, "mailFormat": { "type": "string", "enum": [ "html", "plaintext" ], "description": "Specify the format in which the mail needs to be sent. The value can be html or plaintext. The default value is html.", "default": "html" }, "includeSignature": { "type": "boolean", "description": "Whether to include email signature in content. Default: false. It is supported only when mailFormat is html." }, "askReceipt": { "type": "string", "enum": [ "yes", "no" ], "description": "Specifies whether Read receipt from the recipient is requested or not. Allowed values:- yes - Requesting a read receipt. no - Not requesting a read receipt" }, "encoding": { "type": "string", "enum": [ "Big5", "EUC-JP", "EUC-KR", "GB2312", "ISO-2022-JP", "ISO-8859-1", "KOI8-R", "Shift_JIS", "US-ASCII", "UTF-8", "WINDOWS-1251", "X-WINDOWS-ISO2022JP" ], "description": "Specifies the encoding that is to be used in the email content. Allowed values:- Big5, EUC-JP, EUC-KR, GB2312, ISO-2022-JP, ISO-8859-1, KOI8-R, Shift_JIS, US-ASCII, UTF-8, WINDOWS-1251, X-WINDOWS-ISO2022JP. The default value is UTF-8.", "default": "UTF-8" }, "isSchedule": { "type": "boolean", "description": "Depending on whether the mail has to be scheduled or not, the value can be true - if the email should be scheduled. false - if the email should be sent immediately." }, "scheduleType": { "type": "integer", "enum": [ 1, 2, 3, 4, 5, 6 ], "description": "Specifies the type of scheduling. Allowed values:- 1 - Schedules email to be sent after one hour from the time of the request. 2 - Schedules email to be sent after two hours from the time of the request. 3 - Schedules email to be sent after four hours from the time of the request. 4 - Schedules email to be sent by the morning of the next day from the time of the request. 5 - Schedules email to be sent by the afternoon of the next day from the time of the request. 6 - Schedules email to be sent on the custom date and time of your choice." }, "timeZone": { "type": "string", "description": "Specify the timezone to schedule your email. This parameter is mandatory if scheduleType is set to value 6. For example:- GMT 5.30 (India Standard Time - Asia/Calcutta)." }, "scheduleTime": { "type": "string", "description": "Specify the date and time you want to schedule your email. This parameter is mandatory if scheduleType is set to value 6. Format:- MM/DD/YYYY HH:MM:SS. For example:- 09/15/2023 14:30:28" }, "attachments": { "description": "This paramters is array of attachmes info jsons.", "type": "array", "items": { "description": "This paramters is array of attachmes info jsons.", "type": "object", "properties": { "attachmentName": { "type": "string", "description": "Specifies the name of the attachment. This parameter can be fetched from Upload Attachments API." }, "attachmentPath": { "type": "string", "description": "Specifies the path in which the attachment is stored. This parameter can be fetched from Upload Attachments API." }, "storeName": { "type": "string", "description": "Specifies the name of the store where the attachment is saved. This parameter can be fetched from Upload Attachments API." } } } }, "mode": { "description": "Specifies whether the content should be saved as a draft or a template. Allowed values: draft, template", "$ref": "#/components/schemas/SendEmailMode" } } }, "Attachment": { "type": "object", "properties": { "storeName": { "type": "string", "description": "store name." }, "attachmentName": { "type": "string", "description": "Name of the attachment file." }, "attachmentPath": { "type": "string", "description": "Attachment Path" }, "url": { "type": "string" } } }, "MessageUnreadPayload": { "type": "object", "required": [ "mode", "messageId" ], "properties": { "mode": { "type": "string", "enum": [ "markAsUnread" ], "description": "This parameter represents the type of operation that is to be performed, 'markAsUnread' should be passed", "default": "markAsUnread" }, "messageId": { "type": "array", "description": "Id of the message which should be unread", "items": { "description": "Id of the message which should be unread", "type": "string" } } } }, "MessageReadPayload": { "type": "object", "required": [ "mode", "messageId" ], "properties": { "mode": { "type": "string", "enum": [ "markAsRead" ], "description": "This parameter represents the type of operation that is to be performed, 'markAsRead' should be passed", "default": "markAsRead" }, "messageId": { "type": "array", "description": "Id of the message which should be read", "items": { "description": "Id of the message which should be read", "type": "string" } } } }, "MessageMovePayload": { "type": "object", "required": [ "mode", "destfolderId", "messageId" ], "properties": { "mode": { "type": "string", "enum": [ "moveMessage" ], "description": "This parameter represents the type of operation that is to be performed, 'moveMessage' should be passed", "default": "moveMessage" }, "messageId": { "type": "array", "description": "Id of the message which should be moved", "items": { "description": "Id of the message which should be moved", "type": "string" } }, "destfolderId": { "description": "Id of the folder to which the message should be moved", "type": "string" }, "threadId": { "type": "array", "description": "message thread's id", "items": { "description": "message thread's id", "type": "string" } }, "isFolderSpecific": { "description": "Should move message in thread of the given folder", "type": "boolean" }, "folderId": { "description": "Which folder's thread messages to be moved.", "type": "string" }, "isArchive": { "description": "Should include archive messages in this action", "type": "boolean" } } }, "MessageFlagPayload": { "type": "object", "required": [ "mode", "flagid", "messageId" ], "properties": { "mode": { "type": "string", "enum": [ "setFlag" ], "description": "This parameter represents the type of operation that is to be performed, 'setFlag' should be passed", "default": "setFlag" }, "messageId": { "type": "array", "description": "Id of the message which should be flagged", "items": { "description": "Id of the message which should be flagged", "type": "string" } }, "flagid": { "description": "Flag which should be flagged for the message", "$ref": "#/components/schemas/MessageFlag" }, "threadId": { "description": "message thread's id", "type": "array", "items": { "description": "message thread's id", "type": "string" } }, "isFolderSpecific": { "description": "Should flag message in thread of the given folder", "type": "boolean" }, "folderId": { "description": "Which folder's thread messages to be flagged.", "type": "string" }, "isArchive": { "description": "Should include archive messages in this action", "type": "boolean" } } }, "MessageApplyLabelPayload": { "type": "object", "required": [ "mode", "labelId", "messageId" ], "properties": { "mode": { "type": "string", "enum": [ "applyLabel" ], "default": "applyLabel", "description": "This parameter represents the type of operation that is to be performed, 'applyLabel' should be passed" }, "messageId": { "type": "array", "description": "Id of the message which should be labelled", "items": { "description": "Id of the message which should be labelled", "type": "string" } }, "labelId": { "description": "Label that should be applied to the message", "type": "array", "items": { "description": "Label that should be applied to the message", "type": "string" } }, "threadId": { "description": "message thread's id", "type": "array", "items": { "description": "message thread's id", "type": "string" } }, "isFolderSpecific": { "description": "Should apply label to message in thread of the given folder", "type": "boolean" }, "folderId": { "description": "Which folder's thread messages to be flagged.", "type": "string" }, "isArchive": { "description": "Should include archive messages in this action", "type": "boolean" } } }, "MessageRemoveLabelPayload": { "type": "object", "required": [ "mode", "labelId", "messageId" ], "properties": { "mode": { "type": "string", "enum": [ "removeLabel" ], "description": "This parameter represents the type of operation that is to be performed, 'removeLabel' should be passed", "default": "removeLabel" }, "messageId": { "description": "Id of the message which should be label removed", "type": "array", "items": { "description": "Id of the message which should be label removed", "type": "string" } }, "labelId": { "description": "Label that should be removed from message", "type": "array", "items": { "description": "Label that should be removed from message", "type": "string" } }, "threadId": { "description": "message thread's id", "type": "array", "items": { "description": "message thread's id", "type": "string" } }, "isFolderSpecific": { "description": "Should remove label from message in thread of the given folder", "type": "boolean" }, "folderId": { "description": "Which folder's thread messages to remove label.", "type": "string" }, "isArchive": { "description": "Should include archive messages in this action", "type": "boolean" } } }, "MessageRemoveAllLabelPayload": { "type": "object", "required": [ "mode", "messageId" ], "properties": { "mode": { "type": "string", "enum": [ "removeAllLabels" ], "description": "This parameter represents the type of operation that is to be performed, 'removeAllLabels' should be passed", "default": "removeAllLabels" }, "messageId": { "description": "Id of the message which should be all labels removed", "type": "array", "items": { "description": "Id of the message which should be all labels removed", "type": "string" } }, "threadId": { "description": "message thread's id", "type": "array", "items": { "description": "message thread's id", "type": "string" } }, "isFolderSpecific": { "description": "Should remove all label from message in thread of the given folder", "type": "boolean" }, "folderId": { "description": "Which folder's thread messages to remove all label.", "type": "string" }, "isArchive": { "description": "Should include archive messages in this action", "type": "boolean" } } }, "MessageArchivePayload": { "type": "object", "required": [ "mode", "messageId" ], "properties": { "mode": { "type": "string", "enum": [ "archiveMails" ], "description": "This parameter represents the type of operation that is to be performed, 'archiveMails' should be passed", "default": "archiveMails" }, "messageId": { "description": "Id of the message which should be archived", "type": "array", "items": { "description": "Id of the message which should be archived", "type": "string" } }, "threadId": { "description": "message thread's id", "type": "array", "items": { "description": "message thread's id", "type": "string" } } } }, "MessageUnArchivePayload": { "type": "object", "required": [ "mode", "messageId" ], "properties": { "mode": { "type": "string", "enum": [ "unArchiveMails" ], "description": "This parameter represents the type of operation that is to be performed, 'unArchiveMails' should be passed", "default": "unArchiveMails" }, "messageId": { "description": "Id of the message which should be unarchived", "type": "array", "items": { "description": "Id of the message which should be unarchived", "type": "string" } }, "threadId": { "description": "message thread's id", "type": "array", "items": { "description": "Id of the thread which should be unarchived", "type": "string" } } } }, "MessageSpamPayload": { "type": "object", "required": [ "mode", "messageId" ], "properties": { "mode": { "type": "string", "enum": [ "moveToSpam" ], "description": "This parameter represents the type of operation that is to be performed, 'moveToSpam' should be passed", "default": "moveToSpam" }, "messageId": { "type": "array", "description": "Id of the message which should be spammed", "items": { "description": "Id of the message which should be spammed", "type": "string" } }, "threadId": { "description": "message thread's id", "type": "array", "items": { "description": "message thread's id", "type": "string" } }, "isFolderSpecific": { "description": "Should spam message in thread of the given folder", "type": "boolean" }, "folderId": { "description": "Which folder's thread messages to spam.", "type": "string" } } }, "MessageNotSpamPayload": { "type": "object", "required": [ "mode", "messageId" ], "properties": { "mode": { "type": "string", "enum": [ "markNotSpam" ], "description": "This parameter represents the type of operation that is to be performed, 'markNotSpam' should be passed", "default": "markNotSpam" }, "messageId": { "type": "array", "description": "Id of the message which should be not spammed", "items": { "description": "Id of the message which should be not spammed", "type": "string" } }, "threadId": { "description": "message thread's id", "type": "array", "items": { "description": "message thread's id", "type": "string" } }, "isFolderSpecific": { "description": "Should un spam message in thread of the given folder", "type": "boolean" }, "folderId": { "description": "Which folder's thread messages to unspam.", "type": "string" } } } }, "securitySchemes": { "iam-oauth2-schema": { "type": "oauth2", "flows": { "authorizationCode": { "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth", "tokenUrl": "https://accounts.zoho.com/oauth/v2/token", "scopes": { "ZohoMail.messages.ALL": "Full access to messages.", "ZohoMail.messages.CREATE": "Create access to messages.", "ZohoMail.messages.READ": "Read access to messages", "ZohoMail.messages.UPDATE": "Update access to messages", "ZohoMail.messages.DELETE": "Delete access to messages" } } } } } } }